diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 3 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 7cdeef897..187252a31 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1895,7 +1895,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (mSettingsValues.mEnableSuggestionSpanInsertion) { final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); ic.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan( - this, bestWord, suggestedWords), 1); + this, bestWord, suggestedWords, mSubtypeSwitcher.isDictionaryAvailable()), + 1); } else { ic.commitText(bestWord, 1); } diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index 6612c24cd..99f0ee184 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -63,6 +63,7 @@ public class SubtypeSwitcher { /*-----------------------------------------------------------*/ // Variants which should be changed only by reload functions. private boolean mNeedsToDisplayLanguage; + private boolean mIsDictionaryAvailable; private boolean mIsSystemLanguageSameAsInputLanguage; private InputMethodInfo mShortcutInputMethodInfo; private InputMethodSubtype mShortcutSubtype; @@ -260,6 +261,7 @@ public class SubtypeSwitcher { getInputLocale().getLanguage()); mNeedsToDisplayLanguage = !(getEnabledKeyboardLocaleCount() <= 1 && mIsSystemLanguageSameAsInputLanguage); + mIsDictionaryAvailable = DictionaryFactory.isDictionaryAvailable(mService, mInputLocale); } //////////////////////////// @@ -379,6 +381,10 @@ public class SubtypeSwitcher { } } + public boolean isDictionaryAvailable() { + return mIsDictionaryAvailable; + } + // TODO: Remove this method private boolean isKeyboardMode() { return KEYBOARD_MODE.equals(getCurrentSubtypeMode()); |