diff options
author | 2014-05-21 08:44:58 +0000 | |
---|---|---|
committer | 2014-05-21 08:44:58 +0000 | |
commit | 1c7a0b036461d52c7102682739971fee844e6049 (patch) | |
tree | 7c6a20591d4e5bb84e708d89aa75a9f8c7c22e33 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 2f3db0f38102f05d4c42bb39936e3b5fe97f5751 (diff) | |
parent | 17f326b7458c2bde2569e283a96e703755485328 (diff) | |
download | latinime-1c7a0b036461d52c7102682739971fee844e6049.tar.gz latinime-1c7a0b036461d52c7102682739971fee844e6049.tar.xz latinime-1c7a0b036461d52c7102682739971fee844e6049.zip |
am 17f326b7: Add beginning of sentence information in PrevWordsInfo.
* commit '17f326b7458c2bde2569e283a96e703755485328':
Add beginning of sentence information in PrevWordsInfo.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 5e45275f8..19c777a3e 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1435,12 +1435,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // We're checking the previous word in the text field against the memorized previous // word. If we are composing a word we should have the second word before the cursor // memorized, otherwise we should have the first. - final CharSequence rereadPrevWord = mInputLogic.getNthPreviousWordForSuggestion( - currentSettings.mSpacingAndPunctuations, - mInputLogic.mWordComposer.isComposingWord() ? 2 : 1); - if (!TextUtils.equals(prevWordsInfo.mPrevWord, rereadPrevWord)) { + final PrevWordsInfo rereadPrevWordsInfo = + mInputLogic.getPrevWordsInfoFromNthPreviousWordForSuggestion( + currentSettings.mSpacingAndPunctuations, + mInputLogic.mWordComposer.isComposingWord() ? 2 : 1); + if (!TextUtils.equals(prevWordsInfo.mPrevWord, rereadPrevWordsInfo.mPrevWord)) { throw new RuntimeException("Unexpected previous word: " - + prevWordsInfo.mPrevWord + " <> " + rereadPrevWord); + + prevWordsInfo.mPrevWord + " <> " + rereadPrevWordsInfo.mPrevWord); } } } |