Use PM#isSameApp instead of getPackageUidAsUser.
PM#isSameApp provides the same intended functionality as checking PM#getPackageUidAsUser, but has special case handling for SDK Sandbox uids which follow a different pattern. PM#isSameApp uses UserHandle#isSameApp under the hood, which also already includes logic to ignore the user id part of uids so we preserve the same MATCH_ANY_USER behavior as the prior version. Bug: 257047268 Test: atest AccessibilitySecurityPolicyTest Test: Install SdkSandboxClient test app in work profile, explore by touch using TalkBack Change-Id: Icb49d024a7c1ee9dda6f7a57778142e833e55613
Loading
Please register or sign in to comment