aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-20 14:22:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-20 14:22:48 +0000
commita118d19f6c2ad1e6f6bfe34b0ce022e961da4f02 (patch)
tree2a1bacaa22dbeabcad0837a82c72bda712a5efd9 /java/src/com/android/inputmethod/latin/LatinIME.java
parente03e4257f1dc727db383bd56097eb60eeae7ceb8 (diff)
parent3c84eb8822e56378eac4ed32591e254597bd1eaf (diff)
downloadlatinime-a118d19f6c2ad1e6f6bfe34b0ce022e961da4f02.tar.gz
latinime-a118d19f6c2ad1e6f6bfe34b0ce022e961da4f02.tar.xz
latinime-a118d19f6c2ad1e6f6bfe34b0ce022e961da4f02.zip
Merge "Don't distrust the cursor pos so much as to bug on IPC delay"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 47a3e9469..47137e7fb 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -799,19 +799,22 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
suggest = mInputLogic.mSuggest;
}
- // Sometimes, while rotating, for some reason the framework tells the app we are not
- // connected to it and that means we can't refresh the cache. In this case, schedule a
- // refresh later.
// TODO[IL]: Can the following be moved to InputLogic#startInput?
final boolean canReachInputConnection;
if (!mInputLogic.mConnection.resetCachesUponCursorMoveAndReturnSuccess(
editorInfo.initialSelStart, editorInfo.initialSelEnd,
false /* shouldFinishComposition */)) {
+ // Sometimes, while rotating, for some reason the framework tells the app we are not
+ // connected to it and that means we can't refresh the cache. In this case, schedule a
+ // refresh later.
// We try resetting the caches up to 5 times before giving up.
mHandler.postResetCaches(isDifferentTextField, 5 /* remainingTries */);
// mLastSelection{Start,End} are reset later in this method, don't need to do it here
canReachInputConnection = false;
} else {
+ // When rotating, initialSelStart and initialSelEnd sometimes are lying. Make a best
+ // effort to work around this bug.
+ mInputLogic.mConnection.tryFixLyingCursorPosition();
if (isDifferentTextField) {
mHandler.postResumeSuggestions();
}