Call getPackageUidAsUser instead of getPackageUid
PackageManager.java has a lot of similar options for getPackageUid, 3 of
which are:
1. getPackageUid(String packageName, @PackageInfoFlags int flags)
2. getPackageUid(String packageName, @PackageInfoFlags int flags,
@UserIdInt)
3. getPackageUidAsUser(String packageName, @UserIdInt int userId)
The function being called here in set appop getPackageUid is calling 1st
method but passing userId. Passing the user ID is accepted as it is also
int, but the uid of the current user is returned.
Test: manual
Change-Id: I032df4a3e666ebb3efee673153bb75fa4c571e83
1 file changed