diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 13 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java | 3 |
2 files changed, 7 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index beef7612b..3ff20791f 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -530,7 +530,7 @@ public final class InputLogic { && settingsValues.isSuggestionsRequested() && // 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) + (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations) || !settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces)) { // Reset entirely the composing state anyway, then start composing a new word unless // the character is a single quote or a dash. The idea here is, single quote and dash @@ -816,7 +816,8 @@ public final class InputLogic { } if (settingsValues.isSuggestionStripVisible() && settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces - && !mConnection.isCursorFollowedByWordCharacter(settingsValues)) { + && !mConnection.isCursorFollowedByWordCharacter( + settingsValues.mSpacingAndPunctuations)) { restartSuggestionsOnWordTouchedByCursor(settingsValues, true /* includeResumedWordInSuggestions */, keyboardSwitcher); } @@ -1061,8 +1062,6 @@ public final class InputLogic { // recorrection. This is a temporary, stopgap measure that will be removed later. // TODO: remove this. if (settingsValues.isBrokenByRecorrection()) return; - // A simple way to test for support from the TextView. - if (!mLatinIME.isSuggestionsStripVisible()) return; // Recorrection is not supported in languages without spaces because we don't know // how to segment them yet. if (!settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces) return; @@ -1071,7 +1070,7 @@ public final class InputLogic { // If we don't know the cursor location, return. if (mConnection.getExpectedSelectionStart() < 0) return; final int expectedCursorPosition = mConnection.getExpectedSelectionStart(); - if (!mConnection.isCursorTouchingWord(settingsValues)) return; + if (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)) return; final TextRange range = mConnection.getWordRangeAtCursor( settingsValues.mSpacingAndPunctuations.mWordSeparators, 0 /* additionalPrecedingWordsCount */); @@ -1292,7 +1291,7 @@ public final class InputLogic { final int inputType = ei.inputType; // Warning: this depends on mSpaceState, which may not be the most current value. If // mSpaceState gets updated later, whoever called this may need to be told about it. - return mConnection.getCursorCapsMode(inputType, settingsValues, + return mConnection.getCursorCapsMode(inputType, settingsValues.mSpacingAndPunctuations, SpaceState.PHANTOM == mSpaceState); } @@ -1536,7 +1535,7 @@ public final class InputLogic { * @param settingsValues the current values of the settings. * @param suggestedWords suggestedWords to use. */ - public void endBatchInputAsyncInternal(final SettingsValues settingsValues, + public void endBatchInputInternal(final SettingsValues settingsValues, final SuggestedWords suggestedWords, // TODO: remove this argument final KeyboardSwitcher keyboardSwitcher) { diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java index ea010b6f5..b09e20591 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java @@ -29,8 +29,7 @@ import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback; /** * A helper to manage deferred tasks for the input logic. */ -// TODO: Make this package private -public class InputLogicHandler implements Handler.Callback { +class InputLogicHandler implements Handler.Callback { final Handler mNonUIThreadHandler; // TODO: remove this reference. final LatinIME mLatinIME; |