From 3efbbb5e49ca6104ede631cead2d725403fd8d29 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Tue, 1 Nov 2022 13:12:09 -0700 Subject: [PATCH] Remove an unused param from IMMS#showInputMethodPickerFromClient() This is a follow up CL to our previous CL [1], which introduced InputMethodManagerService#showInputMethodPickerFromClient( @NonNull IInputMethodClient client, int auxiliarySubtypeMode, int displayId); Somehow the "client" has never been used, which is fine because the actual caller verification is done by requiring WRITE_SECURE_SETTINGS permission. Let's remove such an unused parameter for simplicity. There must be no observable behavior change. [1]: Ic7d7c5a7ad8005a3fbd9d1c1b73e3c5a39a07001 0b05f9e49dc6e2a418479f432e8728346ebaaf54 Bug: 234882948 Test: presubmit Change-Id: I2f27160cbe7d83201c8f52dbb6dcb774a5b8ae43 --- .../view/inputmethod/IInputMethodManagerGlobalInvoker.java | 5 ++--- core/java/android/view/inputmethod/InputMethodManager.java | 2 +- core/java/com/android/internal/view/IInputMethodManager.aidl | 3 +-- .../server/inputmethod/InputMethodManagerService.java | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java b/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java index e8b1b46b83b6a..a66c67b2e2554 100644 --- a/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +++ b/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java @@ -346,14 +346,13 @@ final class IInputMethodManagerGlobalInvoker { @AnyThread @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) - static void showInputMethodPickerFromSystem(@NonNull IInputMethodClient client, - int auxiliarySubtypeMode, int displayId) { + static void showInputMethodPickerFromSystem(int auxiliarySubtypeMode, int displayId) { final IInputMethodManager service = getService(); if (service == null) { return; } try { - service.showInputMethodPickerFromSystem(client, auxiliarySubtypeMode, displayId); + service.showInputMethodPickerFromSystem(auxiliarySubtypeMode, displayId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 91eb57f0cbcb2..d5292dbfb4df2 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -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(mClient, mode, displayId); + IInputMethodManagerGlobalInvoker.showInputMethodPickerFromSystem(mode, displayId); } @GuardedBy("mH") diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl index f7bb16e8ba54c..40c6a05650cf8 100644 --- a/core/java/com/android/internal/view/IInputMethodManager.aidl +++ b/core/java/com/android/internal/view/IInputMethodManager.aidl @@ -81,8 +81,7 @@ interface IInputMethodManager { @EnforcePermission("WRITE_SECURE_SETTINGS") @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.WRITE_SECURE_SETTINGS)") - void showInputMethodPickerFromSystem(in IInputMethodClient client, - int auxiliarySubtypeMode, int displayId); + void showInputMethodPickerFromSystem(int auxiliarySubtypeMode, int displayId); @EnforcePermission("TEST_INPUT_METHOD") @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 3e0ba5d95c921..3be1450213327 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -3894,8 +3894,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub @EnforcePermission(Manifest.permission.WRITE_SECURE_SETTINGS) @Override - public void showInputMethodPickerFromSystem(IInputMethodClient client, int auxiliarySubtypeMode, - int displayId) { + public void showInputMethodPickerFromSystem(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)