Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1296,6 +1296,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showInInputMethodPicker = 16844361; // 0x1010649 field public static final int showMetadataInPreview = 16844079; // 0x101052f field @Deprecated public static final int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb core/java/android/view/inputmethod/InputMethodInfo.java +23 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import java.util.List; * @attr ref android.R.styleable#InputMethod_supportsSwitchingToNextInputMethod * @attr ref android.R.styleable#InputMethod_supportsInlineSuggestions * @attr ref android.R.styleable#InputMethod_suppressesSpellChecker * @attr ref android.R.styleable#InputMethod_showInInputMethodPicker */ public final class InputMethodInfo implements Parcelable { static final String TAG = "InputMethodInfo"; Loading Loading @@ -123,6 +124,11 @@ public final class InputMethodInfo implements Parcelable { */ private final boolean mSuppressesSpellChecker; /** * The flag whether this IME should be shown as an option in the IME picker. */ private final boolean mShowInInputMethodPicker; /** * @param service the {@link ResolveInfo} corresponds in which the IME is implemented. * @return a unique ID to be returned by {@link #getId()}. We have used Loading Loading @@ -167,6 +173,7 @@ public final class InputMethodInfo implements Parcelable { boolean supportsSwitchingToNextInputMethod = false; // false as default boolean inlineSuggestionsEnabled = false; // false as default boolean suppressesSpellChecker = false; // false as default boolean showInInputMethodPicker = true; // true as default mForceDefault = false; PackageManager pm = context.getPackageManager(); Loading Loading @@ -212,6 +219,8 @@ public final class InputMethodInfo implements Parcelable { com.android.internal.R.styleable.InputMethod_supportsInlineSuggestions, false); suppressesSpellChecker = sa.getBoolean( com.android.internal.R.styleable.InputMethod_suppressesSpellChecker, false); showInInputMethodPicker = sa.getBoolean( com.android.internal.R.styleable.InputMethod_showInInputMethodPicker, true); sa.recycle(); final int depth = parser.getDepth(); Loading Loading @@ -284,6 +293,7 @@ public final class InputMethodInfo implements Parcelable { mSupportsSwitchingToNextInputMethod = supportsSwitchingToNextInputMethod; mInlineSuggestionsEnabled = inlineSuggestionsEnabled; mSuppressesSpellChecker = suppressesSpellChecker; mShowInInputMethodPicker = showInInputMethodPicker; mIsVrOnly = isVrOnly; } Loading @@ -295,6 +305,7 @@ public final class InputMethodInfo implements Parcelable { mSupportsSwitchingToNextInputMethod = source.readInt() == 1; mInlineSuggestionsEnabled = source.readInt() == 1; mSuppressesSpellChecker = source.readBoolean(); mShowInInputMethodPicker = source.readBoolean(); mIsVrOnly = source.readBoolean(); mService = ResolveInfo.CREATOR.createFromParcel(source); mSubtypes = new InputMethodSubtypeArray(source); Loading Loading @@ -354,6 +365,7 @@ public final class InputMethodInfo implements Parcelable { mSupportsSwitchingToNextInputMethod = supportsSwitchingToNextInputMethod; mInlineSuggestionsEnabled = inlineSuggestionsEnabled; mSuppressesSpellChecker = false; mShowInInputMethodPicker = true; mIsVrOnly = isVrOnly; } Loading Loading @@ -507,7 +519,8 @@ public final class InputMethodInfo implements Parcelable { + " mIsVrOnly=" + mIsVrOnly + " mSupportsSwitchingToNextInputMethod=" + mSupportsSwitchingToNextInputMethod + " mInlineSuggestionsEnabled=" + mInlineSuggestionsEnabled + " mSuppressesSpellChecker=" + mSuppressesSpellChecker); + " mSuppressesSpellChecker=" + mSuppressesSpellChecker + " mShowInInputMethodPicker=" + mShowInInputMethodPicker); pw.println(prefix + "mIsDefaultResId=0x" + Integer.toHexString(mIsDefaultResId)); pw.println(prefix + "Service:"); Loading Loading @@ -582,6 +595,14 @@ public final class InputMethodInfo implements Parcelable { return mSuppressesSpellChecker; } /** * Return {@code true} if this input method should be shown in the IME picker. * @hide */ public boolean showInInputMethodPicker() { return mShowInInputMethodPicker; } /** * Used to package this object into a {@link Parcel}. * Loading @@ -597,6 +618,7 @@ public final class InputMethodInfo implements Parcelable { dest.writeInt(mSupportsSwitchingToNextInputMethod ? 1 : 0); dest.writeInt(mInlineSuggestionsEnabled ? 1 : 0); dest.writeBoolean(mSuppressesSpellChecker); dest.writeBoolean(mShowInInputMethodPicker); dest.writeBoolean(mIsVrOnly); mService.writeToParcel(dest, flags); mSubtypes.writeToParcel(dest); Loading core/res/res/values/attrs.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3579,6 +3579,12 @@ <!-- Specifies whether the IME supports showing inline suggestions. --> <attr name="supportsInlineSuggestions" format="boolean" /> <attr name="suppressesSpellChecker" format="boolean" /> <!-- Specifies whether the IME wants to be shown in the Input Method picker. Defaults to true. Set this to false if the IME is intended to be accessed programmatically. <p> Note: This functions as a hint to the system, which may choose to ignore this preference in certain situations or in future releases.--> <attr name="showInInputMethodPicker" format="boolean" /> </declare-styleable> <!-- This is the subtype of InputMethod. Subtype can describe locales (for example, en_US and Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3098,6 +3098,7 @@ <public name="lStar" /> <!-- @hide @SystemApi --> <public name="throttleDurationMillis" /> <public name="showInInputMethodPicker" /> </public-group> <public-group type="drawable" first-id="0x010800b5"> Loading services/core/java/com/android/server/inputmethod/InputMethodMenuController.java +2 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,8 @@ public class InputMethodMenuController { synchronized (mMethodMap) { final List<ImeSubtypeListItem> imList = mSwitchingController .getSortedInputMethodAndSubtypeListLocked(showAuxSubtypes, isScreenLocked); .getSortedInputMethodAndSubtypeListForImeMenuLocked( showAuxSubtypes, isScreenLocked); if (imList.isEmpty()) { return; } Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1296,6 +1296,7 @@ package android { field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 field public static final int showForAllUsers = 16844015; // 0x10104ef field public static final int showInInputMethodPicker = 16844361; // 0x1010649 field public static final int showMetadataInPreview = 16844079; // 0x101052f field @Deprecated public static final int showOnLockScreen = 16843721; // 0x10103c9 field public static final int showSilent = 16843259; // 0x10101fb
core/java/android/view/inputmethod/InputMethodInfo.java +23 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import java.util.List; * @attr ref android.R.styleable#InputMethod_supportsSwitchingToNextInputMethod * @attr ref android.R.styleable#InputMethod_supportsInlineSuggestions * @attr ref android.R.styleable#InputMethod_suppressesSpellChecker * @attr ref android.R.styleable#InputMethod_showInInputMethodPicker */ public final class InputMethodInfo implements Parcelable { static final String TAG = "InputMethodInfo"; Loading Loading @@ -123,6 +124,11 @@ public final class InputMethodInfo implements Parcelable { */ private final boolean mSuppressesSpellChecker; /** * The flag whether this IME should be shown as an option in the IME picker. */ private final boolean mShowInInputMethodPicker; /** * @param service the {@link ResolveInfo} corresponds in which the IME is implemented. * @return a unique ID to be returned by {@link #getId()}. We have used Loading Loading @@ -167,6 +173,7 @@ public final class InputMethodInfo implements Parcelable { boolean supportsSwitchingToNextInputMethod = false; // false as default boolean inlineSuggestionsEnabled = false; // false as default boolean suppressesSpellChecker = false; // false as default boolean showInInputMethodPicker = true; // true as default mForceDefault = false; PackageManager pm = context.getPackageManager(); Loading Loading @@ -212,6 +219,8 @@ public final class InputMethodInfo implements Parcelable { com.android.internal.R.styleable.InputMethod_supportsInlineSuggestions, false); suppressesSpellChecker = sa.getBoolean( com.android.internal.R.styleable.InputMethod_suppressesSpellChecker, false); showInInputMethodPicker = sa.getBoolean( com.android.internal.R.styleable.InputMethod_showInInputMethodPicker, true); sa.recycle(); final int depth = parser.getDepth(); Loading Loading @@ -284,6 +293,7 @@ public final class InputMethodInfo implements Parcelable { mSupportsSwitchingToNextInputMethod = supportsSwitchingToNextInputMethod; mInlineSuggestionsEnabled = inlineSuggestionsEnabled; mSuppressesSpellChecker = suppressesSpellChecker; mShowInInputMethodPicker = showInInputMethodPicker; mIsVrOnly = isVrOnly; } Loading @@ -295,6 +305,7 @@ public final class InputMethodInfo implements Parcelable { mSupportsSwitchingToNextInputMethod = source.readInt() == 1; mInlineSuggestionsEnabled = source.readInt() == 1; mSuppressesSpellChecker = source.readBoolean(); mShowInInputMethodPicker = source.readBoolean(); mIsVrOnly = source.readBoolean(); mService = ResolveInfo.CREATOR.createFromParcel(source); mSubtypes = new InputMethodSubtypeArray(source); Loading Loading @@ -354,6 +365,7 @@ public final class InputMethodInfo implements Parcelable { mSupportsSwitchingToNextInputMethod = supportsSwitchingToNextInputMethod; mInlineSuggestionsEnabled = inlineSuggestionsEnabled; mSuppressesSpellChecker = false; mShowInInputMethodPicker = true; mIsVrOnly = isVrOnly; } Loading Loading @@ -507,7 +519,8 @@ public final class InputMethodInfo implements Parcelable { + " mIsVrOnly=" + mIsVrOnly + " mSupportsSwitchingToNextInputMethod=" + mSupportsSwitchingToNextInputMethod + " mInlineSuggestionsEnabled=" + mInlineSuggestionsEnabled + " mSuppressesSpellChecker=" + mSuppressesSpellChecker); + " mSuppressesSpellChecker=" + mSuppressesSpellChecker + " mShowInInputMethodPicker=" + mShowInInputMethodPicker); pw.println(prefix + "mIsDefaultResId=0x" + Integer.toHexString(mIsDefaultResId)); pw.println(prefix + "Service:"); Loading Loading @@ -582,6 +595,14 @@ public final class InputMethodInfo implements Parcelable { return mSuppressesSpellChecker; } /** * Return {@code true} if this input method should be shown in the IME picker. * @hide */ public boolean showInInputMethodPicker() { return mShowInInputMethodPicker; } /** * Used to package this object into a {@link Parcel}. * Loading @@ -597,6 +618,7 @@ public final class InputMethodInfo implements Parcelable { dest.writeInt(mSupportsSwitchingToNextInputMethod ? 1 : 0); dest.writeInt(mInlineSuggestionsEnabled ? 1 : 0); dest.writeBoolean(mSuppressesSpellChecker); dest.writeBoolean(mShowInInputMethodPicker); dest.writeBoolean(mIsVrOnly); mService.writeToParcel(dest, flags); mSubtypes.writeToParcel(dest); Loading
core/res/res/values/attrs.xml +6 −0 Original line number Diff line number Diff line Loading @@ -3579,6 +3579,12 @@ <!-- Specifies whether the IME supports showing inline suggestions. --> <attr name="supportsInlineSuggestions" format="boolean" /> <attr name="suppressesSpellChecker" format="boolean" /> <!-- Specifies whether the IME wants to be shown in the Input Method picker. Defaults to true. Set this to false if the IME is intended to be accessed programmatically. <p> Note: This functions as a hint to the system, which may choose to ignore this preference in certain situations or in future releases.--> <attr name="showInInputMethodPicker" format="boolean" /> </declare-styleable> <!-- This is the subtype of InputMethod. Subtype can describe locales (for example, en_US and Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3098,6 +3098,7 @@ <public name="lStar" /> <!-- @hide @SystemApi --> <public name="throttleDurationMillis" /> <public name="showInInputMethodPicker" /> </public-group> <public-group type="drawable" first-id="0x010800b5"> Loading
services/core/java/com/android/server/inputmethod/InputMethodMenuController.java +2 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,8 @@ public class InputMethodMenuController { synchronized (mMethodMap) { final List<ImeSubtypeListItem> imList = mSwitchingController .getSortedInputMethodAndSubtypeListLocked(showAuxSubtypes, isScreenLocked); .getSortedInputMethodAndSubtypeListForImeMenuLocked( showAuxSubtypes, isScreenLocked); if (imList.isEmpty()) { return; } Loading