aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-20 02:30:55 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-20 02:30:55 -0800
commitdf63ed4156c67e2ee3456671e3f38179192eba7a (patch)
tree24febf626ebd7536d5b232f46d4c4cc48b34fb25 /java/src/com/android/inputmethod/latin/LatinIME.java
parenta0dd43268dacf2dfb78cb6ea59bbe58c1a681782 (diff)
parent55ce2cc2d562a5733e8430f41dce265c8cf8f8db (diff)
downloadlatinime-df63ed4156c67e2ee3456671e3f38179192eba7a.tar.gz
latinime-df63ed4156c67e2ee3456671e3f38179192eba7a.tar.xz
latinime-df63ed4156c67e2ee3456671e3f38179192eba7a.zip
am 55ce2cc2: [IL27] Some refactoring
* commit '55ce2cc2d562a5733e8430f41dce265c8cf8f8db': [IL27] Some refactoring
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dd2c80664..d6bebe22d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -128,7 +128,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private final SubtypeState mSubtypeState = new SubtypeState();
private UserBinaryDictionary mUserDictionary;
- private boolean mIsUserDictionaryAvailable;
// Personalization debugging params
private boolean mUseOnlyPersonalizationDictionaryForDebug = false;
@@ -563,7 +562,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
mUserDictionary = new UserBinaryDictionary(this, subtypeLocale);
- mIsUserDictionaryAvailable = mUserDictionary.isEnabled();
newSuggest.setUserDictionary(mUserDictionary);
newSuggest.setAdditionalDictionaries(mInputLogic.mSuggest /* oldSuggest */,
mSettings.getCurrent());
@@ -1246,6 +1244,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
return mInputLogic.getCurrentRecapitalizeState();
}
+ public Locale getCurrentSubtypeLocale() {
+ return mSubtypeSwitcher.getCurrentSubtypeLocale();
+ }
+
// Callback for the {@link SuggestionStripView}, to call when the "add to dictionary" hint is
// pressed.
@Override
@@ -1256,7 +1258,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
final String wordToEdit;
if (CapsModeUtils.isAutoCapsMode(mInputLogic.mLastComposedWord.mCapitalizedMode)) {
- wordToEdit = word.toLowerCase(mSubtypeSwitcher.getCurrentSubtypeLocale());
+ wordToEdit = word.toLowerCase(getCurrentSubtypeLocale());
} else {
wordToEdit = word;
}
@@ -1884,7 +1886,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
LatinImeLoggerUtils.onSeparator((char)Constants.CODE_SPACE,
Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
}
- if (showingAddToDictionaryHint && mIsUserDictionaryAvailable) {
+ if (showingAddToDictionaryHint && mUserDictionary.mEnabled) {
mSuggestionStripView.showAddToDictionaryHint(
suggestion, currentSettings.mHintToSaveText);
} else {