summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-05-15 05:54:37 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-05-15 05:54:37 +0000
commit4e7848ccfc4ae3e79f1a4bee5bb57d123492bfbe (patch)
treefaaf8e9fa67ade3aee9a3fd1bc461f446295d090
parentad441d1679fc24c94d1d3f54ccd9fdeeb2f3770c (diff)
parent57e50b106c0ccaf4ec8a3e724f9b1fc491d98be2 (diff)
Merge "Inline IMMS#getCurIntentLocked" into main
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java20
1 files changed, 5 insertions, 15 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 598be11b2a1a..691145c500d9 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -562,16 +562,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
boolean mInFullscreenMode;
/**
- * The Intent used to connect to the current input method.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- private Intent getCurIntentLocked() {
- final var userData = mUserDataRepository.getOrCreate(mCurrentUserId);
- return userData.mBindingController.getCurIntent();
- }
-
- /**
* The token we have made for the currently active input method, to
* identify it in the future.
*/
@@ -3812,10 +3802,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
if (mCurrentUserId != UserHandle.getUserId(uid)) {
return false;
}
- if (getCurIntentLocked() != null && InputMethodUtils.checkIfPackageBelongsToUid(
- mPackageManagerInternal,
- uid,
- getCurIntentLocked().getComponent().getPackageName())) {
+ final var userData = mUserDataRepository.getOrCreate(mCurrentUserId);
+ final var curIntent = userData.mBindingController.getCurIntent();
+ if (curIntent != null && InputMethodUtils.checkIfPackageBelongsToUid(
+ mPackageManagerInternal, uid, curIntent.getComponent().getPackageName())) {
return true;
}
return false;
@@ -5904,7 +5894,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
p.println(" mCurToken=" + getCurTokenLocked());
p.println(" mCurTokenDisplayId=" + mCurTokenDisplayId);
p.println(" mCurHostInputToken=" + mAutofillController.getCurHostInputToken());
- p.println(" mCurIntent=" + getCurIntentLocked());
+ p.println(" mCurIntent=" + userData.mBindingController.getCurIntent());
method = getCurMethodLocked();
p.println(" mCurMethod=" + getCurMethodLocked());
p.println(" mEnabledSession=" + mEnabledSession);