mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Cleanup, part 7 (C7)
Change-Id: I662be9d3b31fb9e157722f38cab1e6fb8a1152ab
This commit is contained in:
parent
0e8b1db948
commit
2f3a694e29
@ -1076,7 +1076,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||
}
|
||||
|
||||
private boolean maybeDoubleSpace() {
|
||||
if (mCurrentSettings.mCorrectionMode == Suggest.CORRECTION_NONE) return false;
|
||||
if (!mCurrentSettings.mCorrectionEnabled) return false;
|
||||
if (!mHandler.isAcceptingDoubleSpaces()) return false;
|
||||
final CharSequence lastThree = mConnection.getTextBeforeCursor(3, 0);
|
||||
if (lastThree != null && lastThree.length() == 3
|
||||
@ -1864,8 +1864,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||
// - There is a dictionary and the word is not in it
|
||||
// Please note that if mSuggest is null, it means that everything is off: suggestion
|
||||
// and correction, so we shouldn't try to show the hint
|
||||
// We used to look at mCorrectionMode here, but showing the hint should have nothing
|
||||
// to do with the autocorrection setting.
|
||||
final boolean showingAddToDictionaryHint = index == 0 && mSuggest != null
|
||||
// If there is no dictionary the hint should be shown.
|
||||
&& (!mSuggest.hasMainDictionary()
|
||||
@ -2220,7 +2218,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||
p.println(" Keyboard mode = " + keyboardMode);
|
||||
p.println(" mIsSuggestionsSuggestionsRequested = "
|
||||
+ mCurrentSettings.isSuggestionsRequested(mDisplayOrientation));
|
||||
p.println(" mCorrectionMode=" + mCurrentSettings.mCorrectionMode);
|
||||
p.println(" mCorrectionEnabled=" + mCurrentSettings.mCorrectionEnabled);
|
||||
p.println(" isComposingWord=" + mWordComposer.isComposingWord());
|
||||
p.println(" isCorrectionOn=" + mCurrentSettings.isCorrectionOn());
|
||||
p.println(" mSoundOn=" + mCurrentSettings.mSoundOn);
|
||||
|
@ -94,7 +94,7 @@ public class SettingsValues {
|
||||
public final int mKeyPreviewPopupDismissDelay;
|
||||
private final boolean mAutoCorrectEnabled;
|
||||
public final float mAutoCorrectionThreshold;
|
||||
public final int mCorrectionMode;
|
||||
public final boolean mCorrectionEnabled;
|
||||
public final int mSuggestionVisibility;
|
||||
private final boolean mVoiceKeyEnabled;
|
||||
private final boolean mVoiceKeyOnMain;
|
||||
@ -172,7 +172,7 @@ public class SettingsValues {
|
||||
mVoiceKeyOnMain = mVoiceMode != null && mVoiceMode.equals(voiceModeMain);
|
||||
mAdditionalSubtypes = AdditionalSubtype.createAdditionalSubtypesArray(
|
||||
getPrefAdditionalSubtypes(prefs, res));
|
||||
mCorrectionMode = createCorrectionMode();
|
||||
mCorrectionEnabled = mAutoCorrectEnabled && !mInputAttributes.mInputTypeNoAutoCorrect;
|
||||
mSuggestionVisibility = createSuggestionVisibility(res);
|
||||
}
|
||||
|
||||
@ -206,14 +206,6 @@ public class SettingsValues {
|
||||
return wordSeparators;
|
||||
}
|
||||
|
||||
private int createCorrectionMode() {
|
||||
if (mAutoCorrectEnabled && !mInputAttributes.mInputTypeNoAutoCorrect) {
|
||||
return Suggest.CORRECTION_FULL;
|
||||
} else {
|
||||
return Suggest.CORRECTION_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
private int createSuggestionVisibility(final Resources res) {
|
||||
final String suggestionVisiblityStr = mShowSuggestionsSetting;
|
||||
for (int visibility : SUGGESTION_VISIBILITY_VALUE_ARRAY) {
|
||||
@ -245,7 +237,7 @@ public class SettingsValues {
|
||||
}
|
||||
|
||||
public boolean isCorrectionOn() {
|
||||
return mCorrectionMode == Suggest.CORRECTION_FULL;
|
||||
return mCorrectionEnabled;
|
||||
}
|
||||
|
||||
public boolean isSuggestionStripVisibleInOrientation(final int orientation) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user