From 55f546a95da3546eb626a885a416092fb99227f8 Mon Sep 17 00:00:00 2001 From: Nikolas Havrikov Date: Thu, 11 Nov 2021 12:12:14 +0100 Subject: [PATCH] Add accessors for client-related members of IMMS While not immediately used, these comprise a preparatory refactoring step. Bug: 205676419 Test: make Change-Id: Iaf6d2f67fdf423365810e9a14637dceeca7a64ee --- .../InputMethodManagerService.java | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 62d628c0dcf9c..a35687d579b33 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -513,10 +513,18 @@ public class InputMethodManagerService extends IInputMethodManager.Stub */ boolean mImeHiddenByDisplayPolicy; + ClientState getCurClient() { + return mCurClient; + } + + void setCurClient(ClientState curClient) { + mCurClient = curClient; + } + /** * The client that is currently bound to an input method. */ - ClientState mCurClient; + private ClientState mCurClient; /** * The last window token that we confirmed to be focused. This is always updated upon reports @@ -594,10 +602,18 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mBindingController.setHasConnection(hasConnection); } + boolean isShowRequested() { + return mShowRequested; + } + + void setShowRequested(boolean showRequested) { + mShowRequested = showRequested; + } + /** * Set if the client has asked for the input method to be shown. */ - boolean mShowRequested; + private boolean mShowRequested; /** * Set if we were explicitly told to show the input method. @@ -609,10 +625,18 @@ public class InputMethodManagerService extends IInputMethodManager.Stub */ boolean mShowForced; + boolean isInputShown() { + return mInputShown; + } + + void setInputShown(boolean inputShown) { + mInputShown = inputShown; + } + /** * Set if we last told the input method to show itself. */ - boolean mInputShown; + private boolean mInputShown; /** * {@code true} if the current input method is in fullscreen mode.