Merge "Fix isAutoRevokeWhitelisted vulnerability" into sc-dev
This commit is contained in:
@@ -1384,12 +1384,16 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
|||||||
|
|
||||||
final AndroidPackage pkg = mPackageManagerInt.getPackage(packageName);
|
final AndroidPackage pkg = mPackageManagerInt.getPackage(packageName);
|
||||||
final int callingUid = Binder.getCallingUid();
|
final int callingUid = Binder.getCallingUid();
|
||||||
final int packageUid = UserHandle.getUid(userId, pkg.getUid());
|
if (mPackageManagerInt.filterAppAccess(packageName, callingUid, userId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!checkAutoRevokeAccess(pkg, callingUid)) {
|
if (!checkAutoRevokeAccess(pkg, callingUid)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final int packageUid = UserHandle.getUid(userId, pkg.getUid());
|
||||||
|
|
||||||
final long identity = Binder.clearCallingIdentity();
|
final long identity = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
return mAppOpsManager.checkOpNoThrow(
|
return mAppOpsManager.checkOpNoThrow(
|
||||||
|
|||||||
Reference in New Issue
Block a user