Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76bf20fc authored by Ahaan Ugale's avatar Ahaan Ugale
Browse files

Make InputMethodInfo#showInInputMethodPicker public.

Allows custom Input Method Pickers to exclude relevant IMEs, like the
system picker does now.

Fix: 184890628
Test: atest InputMethodInfoTest InputMethodManagerTest
Change-Id: I20033de2f6679ed8cd538de66e157f737792d847
parent 1f6711ff
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51977,6 +51977,7 @@ package android.view.inputmethod {
    method public int getSubtypeCount();
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public CharSequence loadLabel(android.content.pm.PackageManager);
    method public boolean shouldShowInInputMethodPicker();
    method public boolean suppressesSpellChecker();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodInfo> CREATOR;
+4 −3
Original line number Diff line number Diff line
@@ -638,10 +638,11 @@ public final class InputMethodInfo implements Parcelable {
    }

    /**
     * Return {@code true} if this input method should be shown in the IME picker.
     * @hide
     * Returns {@code true} if this input method should be shown in menus for selecting an Input
     * Method, such as the system Input Method Picker. This is {@code false} if the IME is intended
     * to be accessed programmatically.
     */
    public boolean showInInputMethodPicker() {
    public boolean shouldShowInInputMethodPicker() {
        return mShowInInputMethodPicker;
    }

+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ final class InputMethodSubtypeSwitchingController {
            final int numImes = imis.size();
            for (int i = 0; i < numImes; ++i) {
                final InputMethodInfo imi = imis.get(i);
                if (forImeMenu && !imi.showInInputMethodPicker()) {
                if (forImeMenu && !imi.shouldShowInInputMethodPicker()) {
                    continue;
                }
                final List<InputMethodSubtype> explicitlyOrImplicitlyEnabledSubtypeList =