summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2024-05-17 12:20:27 +0900
committer Yohei Yukawa <yukawa@google.com> 2024-05-17 12:20:27 +0900
commitdf24762207b1e297238feb2fcd578e46aad0c2ae (patch)
tree7d8de72feea900a0337a2bce02d9f02ea44eb406
parent7e6e69e8ebd04afed6700afa0effd91c8e84986b (diff)
Inline InputMethodBindingController#addFreshWindowToken()
This is a mechanical refactoring CL. There must be no observable behavior change. Bug: 341179600 Test: presubmit Change-Id: I2350ce50735e049b157e71a7809f8a675a562b7a
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodBindingController.java27
1 files changed, 10 insertions, 17 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
index b7091744c3b6..e862c7e96200 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
@@ -443,7 +443,16 @@ final class InputMethodBindingController {
mCurId = info.getId();
mLastBindTime = SystemClock.uptimeMillis();
- addFreshWindowToken();
+ final int displayIdToShowIme = mService.getDisplayIdToShowImeLocked();
+ mCurToken = new Binder();
+ mService.setCurTokenDisplayIdLocked(displayIdToShowIme);
+ if (DEBUG) {
+ Slog.v(TAG, "Adding window token: " + mCurToken + " for display: "
+ + displayIdToShowIme);
+ }
+ mWindowManagerInternal.addWindowToken(mCurToken,
+ WindowManager.LayoutParams.TYPE_INPUT_METHOD,
+ displayIdToShowIme, null /* options */);
return new InputBindResult(
InputBindResult.ResultCode.SUCCESS_WAITING_IME_BINDING,
null, null, null, mCurId, mCurSeq, false);
@@ -471,22 +480,6 @@ final class InputMethodBindingController {
}
@GuardedBy("ImfLock.class")
- private void addFreshWindowToken() {
- int displayIdToShowIme = mService.getDisplayIdToShowImeLocked();
- mCurToken = new Binder();
-
- mService.setCurTokenDisplayIdLocked(displayIdToShowIme);
-
- if (DEBUG) {
- Slog.v(TAG, "Adding window token: " + mCurToken + " for display: "
- + displayIdToShowIme);
- }
- mWindowManagerInternal.addWindowToken(mCurToken,
- WindowManager.LayoutParams.TYPE_INPUT_METHOD,
- displayIdToShowIme, null /* options */);
- }
-
- @GuardedBy("ImfLock.class")
private void unbindMainConnection() {
mContext.unbindService(mMainConnection);
mHasMainConnection = false;