Fixes PM.grantImplicitAccess for multi-user am: 7494002c94
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12729198 Change-Id: I4bc339b413af79bfea596a361e2f93609084b65f
This commit is contained in:
@@ -25434,7 +25434,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
// This API is exposed temporarily to only the contacts provider. (b/158688602)
|
// This API is exposed temporarily to only the contacts provider. (b/158688602)
|
||||||
final int callingUid = Binder.getCallingUid();
|
final int callingUid = Binder.getCallingUid();
|
||||||
ProviderInfo contactsProvider = resolveContentProviderInternal(
|
ProviderInfo contactsProvider = resolveContentProviderInternal(
|
||||||
ContactsContract.AUTHORITY, 0, UserHandle.USER_SYSTEM);
|
ContactsContract.AUTHORITY, 0, UserHandle.getUserId(callingUid));
|
||||||
if (contactsProvider == null || contactsProvider.applicationInfo == null
|
if (contactsProvider == null || contactsProvider.applicationInfo == null
|
||||||
|| !UserHandle.isSameApp(contactsProvider.applicationInfo.uid, callingUid)) {
|
|| !UserHandle.isSameApp(contactsProvider.applicationInfo.uid, callingUid)) {
|
||||||
throw new SecurityException(callingUid + " is not allow to call grantImplicitAccess");
|
throw new SecurityException(callingUid + " is not allow to call grantImplicitAccess");
|
||||||
|
|||||||
Reference in New Issue
Block a user