diff options
author | 2011-07-22 02:35:16 -0700 | |
---|---|---|
committer | 2011-07-22 02:35:16 -0700 | |
commit | 60c8eba634ed77ecfc5deadee806c02e5ebf3500 (patch) | |
tree | 829a6587b0834e105816fdc09da79314ff1c5883 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 6988d09ac2ff2908cb781595b1e598474ab98082 (diff) | |
parent | ada26bb383f5b9de4717a980a3aa8f53d267df93 (diff) | |
download | latinime-60c8eba634ed77ecfc5deadee806c02e5ebf3500.tar.gz latinime-60c8eba634ed77ecfc5deadee806c02e5ebf3500.tar.xz latinime-60c8eba634ed77ecfc5deadee806c02e5ebf3500.zip |
Merge "Check user dictionary is enabled before showing touch-to-save"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 64f7e6011..1364c4a54 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -151,6 +151,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private UserDictionary mUserDictionary; private UserBigramDictionary mUserBigramDictionary; private UserUnigramDictionary mUserUnigramDictionary; + private boolean mIsUserDictionaryAvaliable; // TODO: Create an inner class to group options and pseudo-options to improve readability. // These variables are initialized according to the {@link EditorInfo#inputType}. @@ -436,6 +437,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mUserDictionary = new UserDictionary(this, localeStr); mSuggest.setUserDictionary(mUserDictionary); + mIsUserDictionaryAvaliable = mUserDictionary.isEnabled(); resetContactsDictionary(); @@ -1691,7 +1693,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // take a noticeable delay to update them which may feel uneasy. } if (showingAddToDictionaryHint) { - mCandidateView.showAddToDictionaryHint(suggestion); + if (mIsUserDictionaryAvaliable) { + mCandidateView.showAddToDictionaryHint(suggestion); + } else { + mHandler.postUpdateSuggestions(); + } } if (ic != null) { ic.endBatchEdit(); |