diff options
author | 2014-01-27 02:13:35 -0800 | |
---|---|---|
committer | 2014-01-27 02:13:35 -0800 | |
commit | 0256b15d3aa2f71f7611285dd8887d5a935ba04e (patch) | |
tree | ee027a03fef21ea4d58aa704a39ad79c385307e5 | |
parent | 7f1a5c4d9b8bb97ca45d8a44d77fe1386738c7df (diff) | |
parent | 75ec579e07ccb598970bc800db2d9f2dac11ec7a (diff) | |
download | latinime-0256b15d3aa2f71f7611285dd8887d5a935ba04e.tar.gz latinime-0256b15d3aa2f71f7611285dd8887d5a935ba04e.tar.xz latinime-0256b15d3aa2f71f7611285dd8887d5a935ba04e.zip |
am 75ec579e: Merge "[IL81] Remove a useless test."
* commit '75ec579e07ccb598970bc800db2d9f2dac11ec7a':
[IL81] Remove a useless test.
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 300c7c9bf..e688d2c31 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -206,18 +206,9 @@ public final class InputLogic { // state-related special processing to kick in. mSpaceState = SpaceState.NONE; - // 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 - // by us or not. If we are composing a word but there is no composing span, then - // we know for sure the cursor moved while we were composing and we should reset - // the state. TODO: rescind this policy: the framework never removes the composing - // span on its own accord while editing. This test is useless. - final boolean noComposingSpan = composingSpanStart == -1 && composingSpanEnd == -1; - final boolean selectionChanged = oldSelStart != newSelStart || oldSelEnd != newSelEnd; - - // TODO: is it still necessary to test for composingSpan related stuff? - final boolean selectionChangedOrSafeToReset = selectionChanged - || (!mWordComposer.isComposingWord()) || noComposingSpan; + final boolean selectionChangedOrSafeToReset = + oldSelStart != newSelStart || oldSelEnd != newSelEnd // selection changed + || !mWordComposer.isComposingWord(); // safe to reset final boolean hasOrHadSelection = (oldSelStart != oldSelEnd || newSelStart != newSelEnd); final int moveAmount = newSelStart - oldSelStart; if (selectionChangedOrSafeToReset && (hasOrHadSelection |