Loading
Avoid using UserHandle.isSameApp() in package check
SDK sandbox processes created from the sandbox package do not have the uid of the package - they use a separate uid range instead. UserHandle.isSameApp() does not take this account when run for the sandbox. This causes clipboard tests that use this API to fail when run in the sandbox. Instead, use the API PackageManagerService.isSameApp() that takes into account the differences between sandbox package uid and sandbox process uid. Bug: 344805434 Test: atest TextViewReceiveContentTest -- --enable-optional-parameterization --enable-parameterized-modules --module-parameter run_on_sdk_sandbox Change-Id: I08ae3027b2b9fb64a3d88539dc8150a76be881bd