Loading services/core/java/com/android/server/inputmethod/AutofillSuggestionsController.java +1 −3 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ final class AutofillSuggestionsController { private static final String TAG = AutofillSuggestionsController.class.getSimpleName(); @NonNull private final InputMethodManagerService mService; @NonNull private final InputMethodUtils.InputMethodSettings mSettings; private static final class CreateInlineSuggestionsRequest { @NonNull final InlineSuggestionsRequestInfo mRequestInfo; Loading Loading @@ -76,7 +75,6 @@ final class AutofillSuggestionsController { AutofillSuggestionsController(@NonNull InputMethodManagerService service) { mService = service; mSettings = mService.mSettings; } @GuardedBy("ImfLock.class") Loading @@ -88,7 +86,7 @@ final class AutofillSuggestionsController { final InputMethodInfo imi = mService.queryInputMethodForCurrentUserLocked( mService.getSelectedMethodIdLocked()); try { if (userId == mSettings.getCurrentUserId() if (userId == mService.getCurrentImeUserIdLocked() && imi != null && isInlineSuggestionsEnabled(imi, touchExplorationEnabled)) { mPendingInlineSuggestionsRequest = new CreateInlineSuggestionsRequest( requestInfo, callback, imi.getPackageName()); Loading services/core/java/com/android/server/inputmethod/InputMethodBindingController.java +2 −4 Original line number Diff line number Diff line Loading @@ -63,7 +63,6 @@ final class InputMethodBindingController { @NonNull private final InputMethodManagerService mService; @NonNull private final Context mContext; @NonNull private final InputMethodUtils.InputMethodSettings mSettings; @NonNull private final PackageManagerInternal mPackageManagerInternal; @NonNull private final WindowManagerInternal mWindowManagerInternal; Loading Loading @@ -113,7 +112,6 @@ final class InputMethodBindingController { int imeConnectionBindFlags, CountDownLatch latchForTesting) { mService = service; mContext = mService.mContext; mSettings = mService.mSettings; mPackageManagerInternal = mService.mPackageManagerInternal; mWindowManagerInternal = mService.mWindowManagerInternal; mImeConnectionBindFlags = imeConnectionBindFlags; Loading Loading @@ -322,7 +320,7 @@ final class InputMethodBindingController { private void updateCurrentMethodUid() { final String curMethodPackage = mCurIntent.getComponent().getPackageName(); final int curMethodUid = mPackageManagerInternal.getPackageUid( curMethodPackage, 0 /* flags */, mSettings.getCurrentUserId()); curMethodPackage, 0 /* flags */, mService.getCurrentImeUserIdLocked()); if (curMethodUid < 0) { Slog.e(TAG, "Failed to get UID for package=" + curMethodPackage); mCurMethodUid = Process.INVALID_UID; Loading Loading @@ -478,7 +476,7 @@ final class InputMethodBindingController { return false; } return mContext.bindServiceAsUser(mCurIntent, conn, flags, new UserHandle(mSettings.getCurrentUserId())); new UserHandle(mService.getCurrentImeUserIdLocked())); } @GuardedBy("ImfLock.class") Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub registerDeviceListenerAndCheckStylusSupport(); } @GuardedBy("ImfLock.class") @UserIdInt int getCurrentImeUserIdLocked() { return mSettings.getCurrentUserId(); } private final class InkWindowInitializer implements Runnable { public void run() { synchronized (ImfLock.class) { Loading services/core/java/com/android/server/inputmethod/InputMethodMenuController.java +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ final class InputMethodMenuController { synchronized (ImfLock.class) { final boolean isScreenLocked = mWindowManagerInternal.isKeyguardLocked() && mWindowManagerInternal.isKeyguardSecure(mSettings.getCurrentUserId()); && mWindowManagerInternal.isKeyguardSecure( mService.getCurrentImeUserIdLocked()); final String lastInputMethodId = mSettings.getSelectedInputMethod(); int lastInputMethodSubtypeId = mSettings.getSelectedInputMethodSubtypeId(lastInputMethodId); Loading Loading
services/core/java/com/android/server/inputmethod/AutofillSuggestionsController.java +1 −3 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ final class AutofillSuggestionsController { private static final String TAG = AutofillSuggestionsController.class.getSimpleName(); @NonNull private final InputMethodManagerService mService; @NonNull private final InputMethodUtils.InputMethodSettings mSettings; private static final class CreateInlineSuggestionsRequest { @NonNull final InlineSuggestionsRequestInfo mRequestInfo; Loading Loading @@ -76,7 +75,6 @@ final class AutofillSuggestionsController { AutofillSuggestionsController(@NonNull InputMethodManagerService service) { mService = service; mSettings = mService.mSettings; } @GuardedBy("ImfLock.class") Loading @@ -88,7 +86,7 @@ final class AutofillSuggestionsController { final InputMethodInfo imi = mService.queryInputMethodForCurrentUserLocked( mService.getSelectedMethodIdLocked()); try { if (userId == mSettings.getCurrentUserId() if (userId == mService.getCurrentImeUserIdLocked() && imi != null && isInlineSuggestionsEnabled(imi, touchExplorationEnabled)) { mPendingInlineSuggestionsRequest = new CreateInlineSuggestionsRequest( requestInfo, callback, imi.getPackageName()); Loading
services/core/java/com/android/server/inputmethod/InputMethodBindingController.java +2 −4 Original line number Diff line number Diff line Loading @@ -63,7 +63,6 @@ final class InputMethodBindingController { @NonNull private final InputMethodManagerService mService; @NonNull private final Context mContext; @NonNull private final InputMethodUtils.InputMethodSettings mSettings; @NonNull private final PackageManagerInternal mPackageManagerInternal; @NonNull private final WindowManagerInternal mWindowManagerInternal; Loading Loading @@ -113,7 +112,6 @@ final class InputMethodBindingController { int imeConnectionBindFlags, CountDownLatch latchForTesting) { mService = service; mContext = mService.mContext; mSettings = mService.mSettings; mPackageManagerInternal = mService.mPackageManagerInternal; mWindowManagerInternal = mService.mWindowManagerInternal; mImeConnectionBindFlags = imeConnectionBindFlags; Loading Loading @@ -322,7 +320,7 @@ final class InputMethodBindingController { private void updateCurrentMethodUid() { final String curMethodPackage = mCurIntent.getComponent().getPackageName(); final int curMethodUid = mPackageManagerInternal.getPackageUid( curMethodPackage, 0 /* flags */, mSettings.getCurrentUserId()); curMethodPackage, 0 /* flags */, mService.getCurrentImeUserIdLocked()); if (curMethodUid < 0) { Slog.e(TAG, "Failed to get UID for package=" + curMethodPackage); mCurMethodUid = Process.INVALID_UID; Loading Loading @@ -478,7 +476,7 @@ final class InputMethodBindingController { return false; } return mContext.bindServiceAsUser(mCurIntent, conn, flags, new UserHandle(mSettings.getCurrentUserId())); new UserHandle(mService.getCurrentImeUserIdLocked())); } @GuardedBy("ImfLock.class") Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub registerDeviceListenerAndCheckStylusSupport(); } @GuardedBy("ImfLock.class") @UserIdInt int getCurrentImeUserIdLocked() { return mSettings.getCurrentUserId(); } private final class InkWindowInitializer implements Runnable { public void run() { synchronized (ImfLock.class) { Loading
services/core/java/com/android/server/inputmethod/InputMethodMenuController.java +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ final class InputMethodMenuController { synchronized (ImfLock.class) { final boolean isScreenLocked = mWindowManagerInternal.isKeyguardLocked() && mWindowManagerInternal.isKeyguardSecure(mSettings.getCurrentUserId()); && mWindowManagerInternal.isKeyguardSecure( mService.getCurrentImeUserIdLocked()); final String lastInputMethodId = mSettings.getSelectedInputMethod(); int lastInputMethodSubtypeId = mSettings.getSelectedInputMethodSubtypeId(lastInputMethodId); Loading