aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-24 14:18:11 +0900
committerJean Chalard <jchalard@google.com>2014-01-27 18:42:32 +0900
commitabbd755689fae94b0fc2047f0c0bd19417d9f2b4 (patch)
tree1682e62480c3df7d3caacb2d95bd84d83967c628 /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parentf1e5b9b4d1844f540fb8d3e31134ea4402a2530f (diff)
downloadlatinime-abbd755689fae94b0fc2047f0c0bd19417d9f2b4.tar.gz
latinime-abbd755689fae94b0fc2047f0c0bd19417d9f2b4.tar.xz
latinime-abbd755689fae94b0fc2047f0c0bd19417d9f2b4.zip
[IL81] Remove a useless test.
It seems the comments were right all along. This seems to really be useless. Bug: 8636060 Change-Id: Ie030e9cb73007334380d023abeaa4ce52a863a34
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java15
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 d4f7f0ecd..71212b952 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