aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-06-26 00:38:42 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-06-26 00:38:42 -0700
commit9252ea38a90637fc718fdce231fd8e59fb9c9d0a (patch)
tree771e7ade0535eb1d557da3256c445d2717d17321 /java
parentee86815fdeab8cecf6c1c20593619edf0ca090c1 (diff)
parent173f74bb18016ccab3e5fad4c86c5201add41c30 (diff)
downloadlatinime-9252ea38a90637fc718fdce231fd8e59fb9c9d0a.tar.gz
latinime-9252ea38a90637fc718fdce231fd8e59fb9c9d0a.tar.xz
latinime-9252ea38a90637fc718fdce231fd8e59fb9c9d0a.zip
am 173f74bb: Merge "Fixing follow-up to I548d899b"
* commit '173f74bb18016ccab3e5fad4c86c5201add41c30': Fixing follow-up to I548d899b
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java8
2 files changed, 7 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 6fcac9a65..9ef273918 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -968,6 +968,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// text, but that is probably too expensive to do, so we decided to leave things
// as is.
resetEntireInputState(newSelStart);
+ } else {
+ // resetEntireInputState calls resetCachesUponCursorMove, but with the second
+ // argument as true. But in all cases where we don't reset the entire input state,
+ // we still want to tell the rich input connection about the new cursor position so
+ // that it can update its caches.
+ mConnection.resetCachesUponCursorMove(newSelStart,
+ false /* shouldFinishComposition */);
}
// We moved the cursor. If we are touching a word, we need to resume suggestion,
@@ -975,7 +982,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (isSuggestionsStripVisible()) {
mHandler.postResumeSuggestions();
}
- mConnection.userMovedCursor(newSelEnd);
// Reset the last recapitalization.
mRecapitalizeStatus.deactivate();
mKeyboardSwitcher.updateShiftState();
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 6e3e7b218..5391b1303 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -730,14 +730,6 @@ public final class RichInputConnection {
}
/**
- * The user moved the cursor by hand. Take a note of it.
- * @param newCursorPosition The new cursor position.
- */
- public void userMovedCursor(final int newCursorPosition) {
- mCurrentCursorPosition = newCursorPosition;
- }
-
- /**
* Looks at the text just before the cursor to find out if it looks like a URL.
*
* The weakest point here is, if we don't have enough text bufferized, we may fail to realize