From 83c853b24badb057d58f54e040fe5ca857c3076e Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Thu, 13 Oct 2022 21:52:32 -0700 Subject: [PATCH] Remove InputMethodManagerDelegate#startInput() This is a follow up CL to my previous CL [1], which partly reverted the initial commit of ImeFocusController [2]. With that CL, InputMethodManagerDelegate#startInput() is no longer called. Thus we no longer need to defined it. There must be no behavior change. [1]: Ie3446e1d0f62c489195e31fc7f073020884d6cae ff975479b4f60fe1c599826dd6f42f24a42883f9 [2]: Ib455704fe1e9d243f93190a84f230210dbceac2a 970d9d2e0c979cf9a0ff0a79ef49044ed1363d4f Bug: 234882948 Bug: 244504062 Test: presubmit Change-Id: I62ae648b75cc33592e4e985b4c975c97ccdd24f8 --- core/java/android/view/ImeFocusController.java | 9 --------- .../android/view/inputmethod/InputMethodManager.java | 7 ++----- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/core/java/android/view/ImeFocusController.java b/core/java/android/view/ImeFocusController.java index 1afd048c1623d..4e162f58b69e0 100644 --- a/core/java/android/view/ImeFocusController.java +++ b/core/java/android/view/ImeFocusController.java @@ -26,8 +26,6 @@ import android.util.proto.ProtoOutputStream; import android.view.inputmethod.InputMethodManager; import com.android.internal.inputmethod.InputMethodDebug; -import com.android.internal.inputmethod.StartInputFlags; -import com.android.internal.inputmethod.StartInputReason; /** * Responsible for IME focus handling inside {@link ViewRootImpl}. @@ -189,13 +187,6 @@ public final class ImeFocusController { * @hide */ public interface InputMethodManagerDelegate { - /** - * Starts the input connection. - */ - boolean startInput(@StartInputReason int startInputReason, View focusedView, - @StartInputFlags int startInputFlags, - @WindowManager.LayoutParams.SoftInputModeFlags int softInputMode, int windowFlags); - void onPostWindowFocus(View viewForWindowFocus, @NonNull WindowManager.LayoutParams windowAttribute); void onViewFocusChanged(@NonNull View view, boolean hasFocus); diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 08a7583a80e9f..2e8ee77f43f28 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -737,11 +737,8 @@ public final class InputMethodManager { private final class DelegateImpl implements ImeFocusController.InputMethodManagerDelegate { - /** - * Used by {@link ImeFocusController} to start input connection. - */ - @Override - public boolean startInput(@StartInputReason int startInputReason, View focusedView, + + private boolean startInput(@StartInputReason int startInputReason, View focusedView, @StartInputFlags int startInputFlags, @SoftInputModeFlags int softInputMode, int windowFlags) { ImeTracing.getInstance().triggerClientDump(