Simplify IMMS#startInputUncheckedLocked a bit
This is a follow up CL to our previous CL [1], which made
InputMethodBindingController
per-user instance.
There must be no behavior change in this CL.
[1]: Id6e9eca6caaa8edde8c4a405448c31c0ca986509
2238ecd4633b60b87f8bf34fc027a8780082d235
Bug: 325515685
Test: presubmit
Change-Id: I80cb41e8e9f14cb893152d31fb6c86d446e9f884
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 1b9d6c5..0fde760 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -2234,7 +2234,7 @@
mInputManagerInternal.notifyInputMethodConnectionActive(connectionIsActive);
}
final var userData = mUserDataRepository.getOrCreate(mCurrentUserId);
-
+ final var bindingController = userData.mBindingController;
// If configured, we want to avoid starting up the IME if it is not supposed to be showing
if (shouldPreventImeStartupLocked(selectedMethodId, startInputFlags,
@@ -2243,7 +2243,7 @@
Slog.d(TAG, "Avoiding IME startup and unbinding current input method.");
}
invalidateAutofillSessionLocked();
- userData.mBindingController.unbindCurrentMethod();
+ bindingController.unbindCurrentMethod();
return InputBindResult.NO_EDITOR;
}
@@ -2275,8 +2275,8 @@
}
}
- userData.mBindingController.unbindCurrentMethod();
- return userData.mBindingController.bindCurrentMethod();
+ bindingController.unbindCurrentMethod();
+ return bindingController.bindCurrentMethod();
}
/**