diff options
author | 2012-01-20 17:55:03 +0900 | |
---|---|---|
committer | 2012-01-20 18:09:59 +0900 | |
commit | 7546ff6e34d540e9529d785bfc691b9c155b4051 (patch) | |
tree | cfb6216921d509b98e0994913aee16ca8a9cf904 /java/src | |
parent | 2010130e4425bd18f68d9de3ec7b846d00c61e0a (diff) | |
download | latinime-7546ff6e34d540e9529d785bfc691b9c155b4051.tar.gz latinime-7546ff6e34d540e9529d785bfc691b9c155b4051.tar.xz latinime-7546ff6e34d540e9529d785bfc691b9c155b4051.zip |
Fix a bug where a check would fail
Bug: 5894393
Change-Id: I810de58730f2cabcaf7b8dc1d85b3725f959094b
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 6 |
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 d36140de6..db6b1bada 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() |