Fix isAutoRevokeWhitelisted api to ignore manifest declaration
This behavior is a leftover from it was expected we'll have a manifest-based whitelist Test: use the app to ensure manifest declaration no longer changes API result Fixes: 162077344 Change-Id: If613d02c74459d61d9dd7db05ad5c60a129f16e3
This commit is contained in:
@@ -25289,18 +25289,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
int mode = mInjector.getAppOpsManager().checkOpNoThrow(
|
||||
AppOpsManager.OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED,
|
||||
Binder.getCallingUid(), packageName);
|
||||
if (mode == MODE_ALLOWED) {
|
||||
return false;
|
||||
} else if (mode == MODE_IGNORED) {
|
||||
return true;
|
||||
} else {
|
||||
synchronized (mLock) {
|
||||
boolean manifestWhitelisted =
|
||||
mPackages.get(packageName).getAutoRevokePermissions()
|
||||
== ApplicationInfo.AUTO_REVOKE_DISALLOWED;
|
||||
return manifestWhitelisted;
|
||||
}
|
||||
}
|
||||
return mode == MODE_IGNORED;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user