Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -526,6 +526,7 @@ package android { field public static final int installLocation = 16843447; // 0x10102b7 field public static final int interpolator = 16843073; // 0x1010141 field public static final int isAlwaysSyncable = 16843571; // 0x1010333 field public static final int isAuxiliary = 16843641; // 0x1010379 field public static final int isDefault = 16843297; // 0x1010221 field public static final int isIndicator = 16843079; // 0x1010147 field public static final int isModifier = 16843334; // 0x1010246 core/res/res/values/attrs.xml +5 −0 Original line number Diff line number Diff line Loading @@ -2137,6 +2137,11 @@ string will be passed to the IME when the framework calls the IME with the subtype. --> <attr name="imeSubtypeMode" format="string" /> <!-- Set true if the subtype is auxiliary. An auxiliary subtype won't be shown in the input method selection list in the settings app. InputMethodManager#switchToLastInputMethod will ignore auxiliary subtypes when it chooses a target subtype. --> <attr name="isAuxiliary" format="boolean" /> <!-- The extra value of the subtype. This string can be any string and will be passed to the IME when the framework calls the IME with the subtype. --> <attr name="imeSubtypeExtraValue" format="string" /> Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1685,4 +1685,5 @@ <public type="attr" name="layout_columnSpan" /> <public type="attr" name="layout_columnWeight" /> <public type="attr" name="isAuxiliary" /> </resources> services/java/com/android/server/InputMethodManagerService.java +3 −6 Original line number Diff line number Diff line Loading @@ -126,10 +126,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private static final String SUBTYPE_MODE_KEYBOARD = "keyboard"; private static final String SUBTYPE_MODE_VOICE = "voice"; // TODO: Will formalize this value as API private static final String SUBTYPE_EXTRAVALUE_EXCLUDE_FROM_LAST_IME = "excludeFromLastInputMethod"; final Context mContext; final Resources mRes; final Handler mHandler; Loading Loading @@ -1883,7 +1879,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final int subtypeCount = imi.getSubtypeCount(); for (int j = 0; j < subtypeCount; ++j) { InputMethodSubtype subtype = imi.getSubtypeAt(j); if (enabledSubtypeSet.contains(String.valueOf(subtype.hashCode()))) { if (enabledSubtypeSet.contains(String.valueOf(subtype.hashCode())) && !subtype.isAuxiliary()) { final CharSequence title; int nameResId = subtype.getNameResId(); String mode = subtype.getMode(); Loading Loading @@ -2078,7 +2075,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private boolean canAddToLastInputMethod(InputMethodSubtype subtype) { if (subtype == null) return true; return !subtype.containsExtraValueKey(SUBTYPE_EXTRAVALUE_EXCLUDE_FROM_LAST_IME); return !subtype.isAuxiliary(); } private void saveCurrentInputMethodAndSubtypeToHistory() { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -526,6 +526,7 @@ package android { field public static final int installLocation = 16843447; // 0x10102b7 field public static final int interpolator = 16843073; // 0x1010141 field public static final int isAlwaysSyncable = 16843571; // 0x1010333 field public static final int isAuxiliary = 16843641; // 0x1010379 field public static final int isDefault = 16843297; // 0x1010221 field public static final int isIndicator = 16843079; // 0x1010147 field public static final int isModifier = 16843334; // 0x1010246
core/res/res/values/attrs.xml +5 −0 Original line number Diff line number Diff line Loading @@ -2137,6 +2137,11 @@ string will be passed to the IME when the framework calls the IME with the subtype. --> <attr name="imeSubtypeMode" format="string" /> <!-- Set true if the subtype is auxiliary. An auxiliary subtype won't be shown in the input method selection list in the settings app. InputMethodManager#switchToLastInputMethod will ignore auxiliary subtypes when it chooses a target subtype. --> <attr name="isAuxiliary" format="boolean" /> <!-- The extra value of the subtype. This string can be any string and will be passed to the IME when the framework calls the IME with the subtype. --> <attr name="imeSubtypeExtraValue" format="string" /> Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1685,4 +1685,5 @@ <public type="attr" name="layout_columnSpan" /> <public type="attr" name="layout_columnWeight" /> <public type="attr" name="isAuxiliary" /> </resources>
services/java/com/android/server/InputMethodManagerService.java +3 −6 Original line number Diff line number Diff line Loading @@ -126,10 +126,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private static final String SUBTYPE_MODE_KEYBOARD = "keyboard"; private static final String SUBTYPE_MODE_VOICE = "voice"; // TODO: Will formalize this value as API private static final String SUBTYPE_EXTRAVALUE_EXCLUDE_FROM_LAST_IME = "excludeFromLastInputMethod"; final Context mContext; final Resources mRes; final Handler mHandler; Loading Loading @@ -1883,7 +1879,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final int subtypeCount = imi.getSubtypeCount(); for (int j = 0; j < subtypeCount; ++j) { InputMethodSubtype subtype = imi.getSubtypeAt(j); if (enabledSubtypeSet.contains(String.valueOf(subtype.hashCode()))) { if (enabledSubtypeSet.contains(String.valueOf(subtype.hashCode())) && !subtype.isAuxiliary()) { final CharSequence title; int nameResId = subtype.getNameResId(); String mode = subtype.getMode(); Loading Loading @@ -2078,7 +2075,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private boolean canAddToLastInputMethod(InputMethodSubtype subtype) { if (subtype == null) return true; return !subtype.containsExtraValueKey(SUBTYPE_EXTRAVALUE_EXCLUDE_FROM_LAST_IME); return !subtype.isAuxiliary(); } private void saveCurrentInputMethodAndSubtypeToHistory() { Loading