Revert "Remove an unused param from IMMS#showInputMethodPickerFromClient()"

This reverts commit 3efbbb5e49.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=aosp_bramble-userdebug&lkgb=9245415&lkbb=9246274&fkbb=9245423, bug https://buganizer.corp.google.com/issues/256952514

Change-Id: I343828ad83d50436211004753f1b9ba1b13b60ca
Bug: 256952514
This commit is contained in:
Hieu Dang
2022-11-02 07:19:01 +00:00
parent 3efbbb5e49
commit 2fb98cdab1
4 changed files with 8 additions and 5 deletions

View File

@@ -346,13 +346,14 @@ final class IInputMethodManagerGlobalInvoker {
@AnyThread
@RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS)
static void showInputMethodPickerFromSystem(int auxiliarySubtypeMode, int displayId) {
static void showInputMethodPickerFromSystem(@NonNull IInputMethodClient client,
int auxiliarySubtypeMode, int displayId) {
final IInputMethodManager service = getService();
if (service == null) {
return;
}
try {
service.showInputMethodPickerFromSystem(auxiliarySubtypeMode, displayId);
service.showInputMethodPickerFromSystem(client, auxiliarySubtypeMode, displayId);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}

View File

@@ -3456,7 +3456,7 @@ public final class InputMethodManager {
final int mode = showAuxiliarySubtypes
? SHOW_IM_PICKER_MODE_INCLUDE_AUXILIARY_SUBTYPES
: SHOW_IM_PICKER_MODE_EXCLUDE_AUXILIARY_SUBTYPES;
IInputMethodManagerGlobalInvoker.showInputMethodPickerFromSystem(mode, displayId);
IInputMethodManagerGlobalInvoker.showInputMethodPickerFromSystem(mClient, mode, displayId);
}
@GuardedBy("mH")

View File

@@ -81,7 +81,8 @@ interface IInputMethodManager {
@EnforcePermission("WRITE_SECURE_SETTINGS")
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "
+ "android.Manifest.permission.WRITE_SECURE_SETTINGS)")
void showInputMethodPickerFromSystem(int auxiliarySubtypeMode, int displayId);
void showInputMethodPickerFromSystem(in IInputMethodClient client,
int auxiliarySubtypeMode, int displayId);
@EnforcePermission("TEST_INPUT_METHOD")
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "

View File

@@ -3894,7 +3894,8 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
@EnforcePermission(Manifest.permission.WRITE_SECURE_SETTINGS)
@Override
public void showInputMethodPickerFromSystem(int auxiliarySubtypeMode, int displayId) {
public void showInputMethodPickerFromSystem(IInputMethodClient client, int auxiliarySubtypeMode,
int displayId) {
// Always call subtype picker, because subtype picker is a superset of input method
// picker.
mHandler.obtainMessage(MSG_SHOW_IM_SUBTYPE_PICKER, auxiliarySubtypeMode, displayId)