Merge "Add support for Input ads from the SDK runtime." into udc-dev am: e0fe75c325

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23036716

Change-Id: I179756135b0ee5a494eeffb7db835c4e0f6c6cae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-05-10 10:27:10 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 2 deletions

View File

@@ -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));
}
/**

View File

@@ -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);