From bc3dba451a7af85eab600968fbafda3040b7ced4 Mon Sep 17 00:00:00 2001 From: satok Date: Mon, 18 Apr 2011 16:06:31 +0900 Subject: A fix for handling dummy voice subtypes Change-Id: I75d4d1625e0925d01ae84c9577e15087d83e4191 --- java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/latin') 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; } -- cgit v1.2.3-83-g751a