diff options
| author | 2024-05-09 16:31:18 +0000 | |
|---|---|---|
| committer | 2024-05-10 23:34:31 +0000 | |
| commit | de3fe1524ba5ed1ccd5776f44c902b78dcbd7383 (patch) | |
| tree | 56cacd3c04fb84316a6ae2cbcd9666aecabf44d8 | |
| parent | 921858a4f5c7af260e91d8f08e8aafb7fa7953d2 (diff) | |
Inline IMMS#getLastBindTimeLocked
This CL represents an internal refactoring and shouldn't introduce any
observable breakage.
Bug: 325515685
Test: atest FrameworksInputMethodSystemServerTests
Test: atest CtsInputMethodTestCases
Test: atest FrameworksServicesTests
Test: atest --host FrameworksInputMethodSystemServerTestsRavenwood
Change-Id: I8003a77d24160915fdeee0f630adffa7289a42c1
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 4609f558c203..94f73f950a69 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -659,16 +659,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } /** - * Time that we last initiated a bind to the input method, to determine - * if we should try to disconnect and reconnect to it. - */ - @GuardedBy("ImfLock.class") - private long getLastBindTimeLocked() { - final var userData = mUserDataRepository.getOrCreate(mCurrentUserId); - return userData.mBindingController.getLastBindTime(); - } - - /** * Have we called mCurMethod.bindInput()? */ @MultiUserUnawareField @@ -2376,7 +2366,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. InputBindResult.ResultCode.SUCCESS_WAITING_IME_SESSION, null, null, null, getCurIdLocked(), getSequenceNumberLocked(), false); } else { - long bindingDuration = SystemClock.uptimeMillis() - getLastBindTimeLocked(); + final long lastBindTime = userData.mBindingController.getLastBindTime(); + long bindingDuration = SystemClock.uptimeMillis() - lastBindTime; if (bindingDuration < TIME_TO_RECONNECT) { // In this case we have connected to the service, but // don't yet have its interface. If it hasn't been too |