aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-20 01:16:44 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-20 01:16:44 -0800
commit7c177e82aff62ba5ac97eb7ef21ef0e0c36d32a1 (patch)
treef5f4d4fa92a8296f28cdce76c9337478a56adaa2 /java/src
parent3eede315dc9998091477eb95e748e13ad6fd6e57 (diff)
parent7546ff6e34d540e9529d785bfc691b9c155b4051 (diff)
downloadlatinime-7c177e82aff62ba5ac97eb7ef21ef0e0c36d32a1.tar.gz
latinime-7c177e82aff62ba5ac97eb7ef21ef0e0c36d32a1.tar.xz
latinime-7c177e82aff62ba5ac97eb7ef21ef0e0c36d32a1.zip
Merge "Fix a bug where a check would fail"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 78e6602d8..94c47bdc9 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2129,12 +2129,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final String wordBeforeCursor =
ic.getTextBeforeCursor(cancelLength + 1, 0).subSequence(0, cancelLength)
.toString();
- if (!autoCorrectedTo.equals(wordBeforeCursor)) {
+ if (!TextUtils.equals(autoCorrectedTo, wordBeforeCursor)) {
throw new RuntimeException("cancelAutoCorrect check failed: we thought we were "
+ "reverting \"" + autoCorrectedTo
+ "\", but before the cursor we found \"" + wordBeforeCursor + "\"");
}
- if (originallyTypedWord.equals(wordBeforeCursor)) {
+ if (TextUtils.equals(originallyTypedWord, wordBeforeCursor)) {
throw new RuntimeException("cancelAutoCorrect check failed: we wanted to cancel "
+ "auto correction and revert to \"" + originallyTypedWord
+ "\" but we found this very string before the cursor");
@@ -2169,7 +2169,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final String wordBeforeCursor =
ic.getTextBeforeCursor(restartLength + 1, 0).subSequence(0, restartLength)
.toString();
- if (!mWordComposer.getTypedWord().equals(wordBeforeCursor)) {
+ if (!TextUtils.equals(mWordComposer.getTypedWord(), wordBeforeCursor)) {
throw new RuntimeException("restartSuggestionsOnManuallyPickedTypedWord "
+ "check failed: we thought we were reverting \""
+ mWordComposer.getTypedWord()