Loading services/core/java/com/android/server/inputmethod/InputMethodUtils.java +2 −2 Original line number Diff line number Diff line Loading @@ -194,8 +194,8 @@ final class InputMethodUtils { int uid, String packageName) { // PackageManagerInternal#getPackageUid() doesn't check MATCH_INSTANT/MATCH_APEX as of // writing. So setting 0 should be fine. return packageManagerInternal.getPackageUid(packageName, 0 /* flags */, UserHandle.getUserId(uid)) == uid; return packageManagerInternal.isSameApp(packageName, /* flags= */ 0, uid, UserHandle.getUserId(uid)); } /** Loading services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ public class InputMethodManagerServiceTestBase { when(mMockActivityManagerInternal.isSystemReady()).thenReturn(true); when(mMockPackageManagerInternal.getPackageUid(anyString(), anyLong(), anyInt())) .thenReturn(Binder.getCallingUid()); when(mMockPackageManagerInternal.isSameApp(anyString(), anyLong(), anyInt(), anyInt())) .thenReturn(true); when(mMockWindowManagerInternal.onToggleImeRequested(anyBoolean(), any(), any(), anyInt())) .thenReturn(TEST_IME_TARGET_INFO); when(mMockInputMethodClient.asBinder()).thenReturn(mMockInputMethodBinder); Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodUtils.java +2 −2 Original line number Diff line number Diff line Loading @@ -194,8 +194,8 @@ final class InputMethodUtils { int uid, String packageName) { // PackageManagerInternal#getPackageUid() doesn't check MATCH_INSTANT/MATCH_APEX as of // writing. So setting 0 should be fine. return packageManagerInternal.getPackageUid(packageName, 0 /* flags */, UserHandle.getUserId(uid)) == uid; return packageManagerInternal.isSameApp(packageName, /* flags= */ 0, uid, UserHandle.getUserId(uid)); } /** Loading
services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ public class InputMethodManagerServiceTestBase { when(mMockActivityManagerInternal.isSystemReady()).thenReturn(true); when(mMockPackageManagerInternal.getPackageUid(anyString(), anyLong(), anyInt())) .thenReturn(Binder.getCallingUid()); when(mMockPackageManagerInternal.isSameApp(anyString(), anyLong(), anyInt(), anyInt())) .thenReturn(true); when(mMockWindowManagerInternal.onToggleImeRequested(anyBoolean(), any(), any(), anyInt())) .thenReturn(TEST_IME_TARGET_INFO); when(mMockInputMethodClient.asBinder()).thenReturn(mMockInputMethodBinder); Loading