From 285c6dea7b394ac43ead97751f21e8e583eae0bd Mon Sep 17 00:00:00 2001 From: Nikolas Havrikov Date: Thu, 11 Nov 2021 18:09:40 +0100 Subject: [PATCH] Remove parameter from current input binding Bug: 205676419 Test: make Change-Id: I331567a5072916d477af6a9ccad99a3a9d7d6cc1 --- .../server/inputmethod/InputMethodManagerService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index ad78ccd6ab387..b64904d338cbd 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -1985,8 +1985,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } @GuardedBy("mMethodMap") - private boolean bindCurrentInputMethodServiceLocked( - Intent service, ServiceConnection conn, int flags) { + private boolean bindCurrentInputMethodServiceLocked(ServiceConnection conn, int flags) { + Intent service = getCurIntent(); if (service == null || conn == null) { Slog.e(TAG, "--- bind failed: service = " + service + ", conn = " + conn); return false; @@ -3211,8 +3211,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub showInputToken)); mInputShown = true; if (hasConnection() && !isVisibleBound()) { - bindCurrentInputMethodServiceLocked( - getCurIntent(), getVisibleConnection(), IME_VISIBLE_BIND_FLAGS); + bindCurrentInputMethodServiceLocked(getVisibleConnection(), IME_VISIBLE_BIND_FLAGS); setVisibleBound(true); } res = true; @@ -3228,7 +3227,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub Slog.w(TAG, "Force disconnect/connect to the IME in showCurrentInputLocked()"); ServiceConnection connection = getMainConnection(); mContext.unbindService(connection); - bindCurrentInputMethodServiceLocked(getCurIntent(), connection, + bindCurrentInputMethodServiceLocked(connection, mImeConnectionBindFlags); } else { if (DEBUG) {