aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-16 01:05:10 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-16 01:05:10 -0700
commitf73efa9077730e0e5aa8c81e792207dca1d616b9 (patch)
tree7e86e5bee70fd8fba39189a2e3c91dd3c1d8ecb8 /java/src/com/android/inputmethod/latin/LatinIME.java
parent9945f364061dc0b297da0e13a7e864ac6890bb4c (diff)
parentc68d1bbfafe4b2041db49523c044123f78d6635d (diff)
downloadlatinime-f73efa9077730e0e5aa8c81e792207dca1d616b9.tar.gz
latinime-f73efa9077730e0e5aa8c81e792207dca1d616b9.tar.xz
latinime-f73efa9077730e0e5aa8c81e792207dca1d616b9.zip
Merge "Move the UserUnigramDictionary functionality over"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 7c08377be..234a501de 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -204,7 +204,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private UserDictionary mUserDictionary;
private UserBigramDictionary mUserBigramDictionary;
- private UserUnigramDictionary mUserUnigramDictionary;
private boolean mIsUserDictionaryAvailable;
private LastComposedWord mLastComposedWord = LastComposedWord.NOT_A_COMPOSED_WORD;
@@ -528,12 +527,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
resetContactsDictionary(oldContactsDictionary);
- mUserUnigramDictionary
- = new UserUnigramDictionary(this, this, localeStr, Suggest.DIC_USER_UNIGRAM);
- mSuggest.setUserUnigramDictionary(mUserUnigramDictionary);
-
+ // TODO: rename UserBigramDictionary into UserHistoryDictionary
mUserBigramDictionary
= new UserBigramDictionary(this, this, localeStr, Suggest.DIC_USER_BIGRAM);
+ mSuggest.setUserUnigramDictionary(mUserBigramDictionary);
mSuggest.setUserBigramDictionary(mUserBigramDictionary);
LocaleUtils.setSystemLocale(res, savedLocale);
@@ -776,7 +773,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
if (inputView != null) inputView.closing();
- if (mUserUnigramDictionary != null) mUserUnigramDictionary.flushPendingWrites();
if (mUserBigramDictionary != null) mUserBigramDictionary.flushPendingWrites();
}
@@ -2009,11 +2005,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
return;
}
- if (null != mUserUnigramDictionary) {
- mUserUnigramDictionary.addUnigram(suggestion.toString());
- }
-
if (mUserBigramDictionary != null) {
+ mUserBigramDictionary.addUnigram(suggestion.toString());
final InputConnection ic = getCurrentInputConnection();
if (null != ic) {
final CharSequence prevWord =