diff options
author | 2014-07-22 10:18:38 -0700 | |
---|---|---|
committer | 2014-07-27 14:47:07 +0900 | |
commit | ab661e3ef886a36b02fe094864ae4be6a3260f71 (patch) | |
tree | 7a2c8175549d184938d4769c73685673e2d2ad5b /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | |
parent | 825243bfdd6fb63c2ef8bf99024bb06e6f52e946 (diff) | |
download | latinime-ab661e3ef886a36b02fe094864ae4be6a3260f71.tar.gz latinime-ab661e3ef886a36b02fe094864ae4be6a3260f71.tar.xz latinime-ab661e3ef886a36b02fe094864ae4be6a3260f71.zip |
Make "Show correction suggestions" as a binary option
Formerly "Show correction suggestions" had three options, "always
show", "show in portrait mode", and "always hide". The reason behind
"show in portrait mode" was that there may not be enough screen estate
in landscape mode to show suggestions. Because recent phone devices
have relatively large screen, we decide to remove "show in portrait
mode" option.
Bug: 15780939
Change-Id: I896d737452c3893d43ce20bd88127f10c1eb3d83
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 6588951df..74d879919 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -745,7 +745,7 @@ public final class InputLogic { // a letter or a word connector. && settingsValues.isWordCodePoint(codePoint) // We never go into composing state if suggestions are not requested. - && settingsValues.isSuggestionsRequested() && + && settingsValues.needsToLookupSuggestions() && // In languages with spaces, we only start composing a word when we are not already // touching a word. In languages without spaces, the above conditions are sufficient. (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations) @@ -810,7 +810,7 @@ public final class InputLogic { } // isComposingWord() may have changed since we stored wasComposing if (mWordComposer.isComposingWord()) { - if (settingsValues.mAutoCorrectionEnabled) { + if (settingsValues.mAutoCorrectionEnabledPerUserSettings) { final String separator = shouldAvoidSendingCode ? LastComposedWord.NOT_A_SEPARATOR : StringUtils.newSingleCodePointString(codePoint); commitCurrentAutoCorrection(settingsValues, separator, handler); @@ -1029,7 +1029,7 @@ public final class InputLogic { } } if (inputTransaction.mSettingsValues - .isCurrentOrientationAllowingSuggestionsPerUserSettings() + .isSuggestionsEnabledPerUserSettings() && inputTransaction.mSettingsValues.mSpacingAndPunctuations .mCurrentLanguageHasSpaces && !mConnection.isCursorFollowedByWordCharacter( @@ -1224,7 +1224,7 @@ public final class InputLogic { // If correction is not enabled, we don't add words to the user history dictionary. // That's to avoid unintended additions in some sensitive fields, or fields that // expect to receive non-words. - if (!settingsValues.mAutoCorrectionEnabled) return; + if (!settingsValues.mAutoCorrectionEnabledPerUserSettings) return; if (TextUtils.isEmpty(suggestion)) return; final boolean wasAutoCapitalized = @@ -1237,7 +1237,7 @@ public final class InputLogic { public void performUpdateSuggestionStripSync(final SettingsValues settingsValues) { // Check if we have a suggestion engine attached. - if (!settingsValues.isSuggestionsRequested()) { + if (!settingsValues.needsToLookupSuggestions()) { if (mWordComposer.isComposingWord()) { Log.w(TAG, "Called updateSuggestionsOrPredictions but suggestions were not " + "requested!"); @@ -1299,7 +1299,7 @@ public final class InputLogic { // how to segment them yet. || !settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces // If no suggestions are requested, don't try restarting suggestions. - || !settingsValues.isSuggestionsRequested() + || !settingsValues.needsToLookupSuggestions() // If we are currently in a batch input, we must not resume suggestions, or the result // of the batch input will replace the new composition. This may happen in the corner case // that the app moves the cursor on its own accord during a batch input. @@ -2003,7 +2003,7 @@ public final class InputLogic { new SettingsValuesForSuggestion(settingsValues.mBlockPotentiallyOffensive, settingsValues.mPhraseGestureEnabled, settingsValues.mAdditionalFeaturesSettingValues), - settingsValues.mAutoCorrectionEnabled, + settingsValues.mAutoCorrectionEnabledPerUserSettings, sessionId, sequenceNumber, callback); } } |