Merge "Make InputMethodInfo#showInInputMethodPicker public." into sc-dev am: 6bf4cb6147

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14489960

Change-Id: I20d6c8e37d649c0438f74bf3650f0a00f461eb69
This commit is contained in:
Ahaan Ugale
2021-05-14 16:22:01 +00:00
committed by Automerger Merge Worker
3 changed files with 6 additions and 4 deletions

View File

@@ -51987,6 +51987,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;

View File

@@ -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;
}

View File

@@ -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 =