diff options
author | 2011-04-18 16:06:31 +0900 | |
---|---|---|
committer | 2011-04-18 19:32:40 +0900 | |
commit | bc3dba451a7af85eab600968fbafda3040b7ced4 (patch) | |
tree | 1fed69c3631949fb7c041e8b328cc367d60ef99c /java/src/com/android/inputmethod/latin | |
parent | 458807e8a3f948ccbb6a2183053e0d2eda0b3f63 (diff) | |
download | latinime-bc3dba451a7af85eab600968fbafda3040b7ced4.tar.gz latinime-bc3dba451a7af85eab600968fbafda3040b7ced4.tar.xz latinime-bc3dba451a7af85eab600968fbafda3040b7ced4.zip |
A fix for handling dummy voice subtypes
Change-Id: I75d4d1625e0925d01ae84c9577e15087d83e4191
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index 2cdc4d2cd..632195533 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -382,12 +382,16 @@ public class SubtypeSwitcher { return false; if (mShortcutSubtype == null) return true; + // For compatibility, if the shortcut subtype is dummy, we assume the shortcut IME + // (built-in voice dummy subtype) is available. + if (!mShortcutSubtype.hasOriginalObject()) return true; final boolean allowsImplicitlySelectedSubtypes = true; for (final InputMethodSubtypeCompatWrapper enabledSubtype : mImm.getEnabledInputMethodSubtypeList( mShortcutInputMethodInfo, allowsImplicitlySelectedSubtypes)) { - if (enabledSubtype.equals(mShortcutSubtype)) + if (enabledSubtype.equals(mShortcutSubtype)) { return true; + } } return false; } |