aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-10 10:46:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-10 10:46:27 +0000
commit4be9137609913cb1e3769b3f47b925b649ca91f8 (patch)
tree5d49b63722f362a575fe609f81f76140e0fa8946 /java/src/com/android/inputmethod/latin/LatinIME.java
parentf96e0f07af8230a43d733ee7a19c08c205197037 (diff)
parenta224aafea36a80f6727aa7ed93fe87091f01d585 (diff)
downloadlatinime-4be9137609913cb1e3769b3f47b925b649ca91f8.tar.gz
latinime-4be9137609913cb1e3769b3f47b925b649ca91f8.tar.xz
latinime-4be9137609913cb1e3769b3f47b925b649ca91f8.zip
Merge "[IL54.5] Use the cursor pos estimate, not the last value"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 3984c197a..c9602bcc4 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -880,8 +880,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Notify ResearchLogger
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.latinIME_onFinishInputViewInternal(finishingInput,
- mInputLogic.mLastSelectionStart,
- mInputLogic.mLastSelectionEnd, getCurrentInputConnection());
+ // TODO[IL]: mInputLogic.mConnection should be private
+ mInputLogic.mConnection.getExpectedSelectionStart(),
+ mInputLogic.mConnection.getExpectedSelectionEnd(), getCurrentInputConnection());
}
}
@@ -894,22 +895,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (DEBUG) {
Log.i(TAG, "onUpdateSelection: oss=" + oldSelStart
+ ", ose=" + oldSelEnd
- + ", lss=" + mInputLogic.mLastSelectionStart
- + ", lse=" + mInputLogic.mLastSelectionEnd
+ ", nss=" + newSelStart
+ ", nse=" + newSelEnd
+ ", cs=" + composingSpanStart
+ ", ce=" + composingSpanEnd);
}
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_onUpdateSelection(mInputLogic.mLastSelectionStart,
- mInputLogic.mLastSelectionEnd,
+ ResearchLogger.latinIME_onUpdateSelection(oldSelStart, oldSelEnd,
oldSelStart, oldSelEnd, newSelStart, newSelEnd, composingSpanStart,
composingSpanEnd, mInputLogic.mConnection);
}
- final boolean selectionChanged = mInputLogic.mLastSelectionStart != newSelStart
- || mInputLogic.mLastSelectionEnd != newSelEnd;
+ final boolean selectionChanged = oldSelStart != newSelStart || oldSelEnd != newSelEnd;
// if composingSpanStart and composingSpanEnd are -1, it means there is no composing
// span in the view - we can use that to narrow down whether the cursor was moved
@@ -972,9 +969,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mKeyboardSwitcher.updateShiftState();
}
- // Make a note of the cursor position
- mInputLogic.mLastSelectionStart = newSelStart;
- mInputLogic.mLastSelectionEnd = newSelEnd;
mSubtypeState.currentSubtypeUsed();
}