Merge "Support @string reference in moreKeys attribute"
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 78e6602..94c47bd 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2129,12 +2129,12 @@
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 @@
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()