aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-10-15 07:40:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-15 07:40:51 +0000
commitd9c04a6b65f1eba95b87a00b90f8685108d48b2e (patch)
tree12534000ff0e4eda41742040b9324d6e435a9d0b /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parent6d23337f6d022e7bcdc91f63a2d4f5edfc3d6590 (diff)
parent6456af0e1ce1044bf89bd8768849365aa3a21413 (diff)
downloadlatinime-d9c04a6b65f1eba95b87a00b90f8685108d48b2e.tar.gz
latinime-d9c04a6b65f1eba95b87a00b90f8685108d48b2e.tar.xz
latinime-d9c04a6b65f1eba95b87a00b90f8685108d48b2e.zip
am 6456af0e: am ecea8551: Fix a bug with no suggestions flag
* commit '6456af0e1ce1044bf89bd8768849365aa3a21413': Fix a bug with no suggestions flag
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 21e2a1c10..fdab7f25f 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -358,10 +358,11 @@ public final class InputLogic {
* @param oldSelEnd old selection end
* @param newSelStart new selection start
* @param newSelEnd new selection end
+ * @param settingsValues the current values of the settings.
* @return whether the cursor has moved as a result of user interaction.
*/
public boolean onUpdateSelection(final int oldSelStart, final int oldSelEnd,
- final int newSelStart, final int newSelEnd) {
+ final int newSelStart, final int newSelEnd, final SettingsValues settingsValues) {
if (mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart, oldSelEnd, newSelEnd)) {
return false;
}
@@ -386,8 +387,9 @@ public final class InputLogic {
// should be true, but that is if the framework had taken that wrong cursor position
// into account, which means we have to reset the entire composing state whenever there
// is or was a selection regardless of whether it changed or not.
- if (hasOrHadSelection || (selectionChangedOrSafeToReset
- && !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
+ if (hasOrHadSelection || !settingsValues.needsToLookupSuggestions()
+ || (selectionChangedOrSafeToReset
+ && !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
// If we are composing a word and moving the cursor, we would want to set a
// suggestion span for recorrection to work correctly. Unfortunately, that
// would involve the keyboard committing some new text, which would move the