Fix a near instant stats permission check false negative.
The MODE_DEFAULT enforcePermission behavior fell through to the switch default case, even if the calling permission was granted. Bug: 34258237 Test: Manual Change-Id: I823fb4dc3657c15eb1fa3d12d4f4c7e1e9e21cd5
This commit is contained in:
@@ -86,6 +86,7 @@ public class StorageStatsService extends IStorageStatsManager.Stub {
|
||||
case AppOpsManager.MODE_DEFAULT:
|
||||
mContext.enforceCallingPermission(
|
||||
android.Manifest.permission.PACKAGE_USAGE_STATS, TAG);
|
||||
return;
|
||||
default:
|
||||
throw new SecurityException("Blocked by mode " + mode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user