am 7c177e82
: Merge "Fix a bug where a check would fail"
* commit '7c177e82aff62ba5ac97eb7ef21ef0e0c36d32a1': Fix a bug where a check would fail
This commit is contained in:
commit
4ef7a8e430
1 changed files with 3 additions and 3 deletions
|
@ -2129,12 +2129,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
final String wordBeforeCursor =
|
final String wordBeforeCursor =
|
||||||
ic.getTextBeforeCursor(cancelLength + 1, 0).subSequence(0, cancelLength)
|
ic.getTextBeforeCursor(cancelLength + 1, 0).subSequence(0, cancelLength)
|
||||||
.toString();
|
.toString();
|
||||||
if (!autoCorrectedTo.equals(wordBeforeCursor)) {
|
if (!TextUtils.equals(autoCorrectedTo, wordBeforeCursor)) {
|
||||||
throw new RuntimeException("cancelAutoCorrect check failed: we thought we were "
|
throw new RuntimeException("cancelAutoCorrect check failed: we thought we were "
|
||||||
+ "reverting \"" + autoCorrectedTo
|
+ "reverting \"" + autoCorrectedTo
|
||||||
+ "\", but before the cursor we found \"" + wordBeforeCursor + "\"");
|
+ "\", 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 "
|
throw new RuntimeException("cancelAutoCorrect check failed: we wanted to cancel "
|
||||||
+ "auto correction and revert to \"" + originallyTypedWord
|
+ "auto correction and revert to \"" + originallyTypedWord
|
||||||
+ "\" but we found this very string before the cursor");
|
+ "\" but we found this very string before the cursor");
|
||||||
|
@ -2169,7 +2169,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
final String wordBeforeCursor =
|
final String wordBeforeCursor =
|
||||||
ic.getTextBeforeCursor(restartLength + 1, 0).subSequence(0, restartLength)
|
ic.getTextBeforeCursor(restartLength + 1, 0).subSequence(0, restartLength)
|
||||||
.toString();
|
.toString();
|
||||||
if (!mWordComposer.getTypedWord().equals(wordBeforeCursor)) {
|
if (!TextUtils.equals(mWordComposer.getTypedWord(), wordBeforeCursor)) {
|
||||||
throw new RuntimeException("restartSuggestionsOnManuallyPickedTypedWord "
|
throw new RuntimeException("restartSuggestionsOnManuallyPickedTypedWord "
|
||||||
+ "check failed: we thought we were reverting \""
|
+ "check failed: we thought we were reverting \""
|
||||||
+ mWordComposer.getTypedWord()
|
+ mWordComposer.getTypedWord()
|
||||||
|
|
Loading…
Reference in a new issue