Merge "Revert "OP_GET_USAGE_STATS should be noted, not checked."" into pi-dev

am: 893abe5d47

Change-Id: I2cc76316bca81c12e56337d6e36d82b0de6d9ded
This commit is contained in:
Jeff Sharkey
2018-04-16 10:07:52 -07:00
committed by android-build-merger

View File

@@ -174,7 +174,7 @@ public final class NetworkStatsAccess {
AppOpsManager appOps = (AppOpsManager) context.getSystemService( AppOpsManager appOps = (AppOpsManager) context.getSystemService(
Context.APP_OPS_SERVICE); Context.APP_OPS_SERVICE);
final int mode = appOps.noteOp(AppOpsManager.OP_GET_USAGE_STATS, final int mode = appOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS,
callingUid, callingPackage); callingUid, callingPackage);
if (mode == AppOpsManager.MODE_DEFAULT) { if (mode == AppOpsManager.MODE_DEFAULT) {
// The default behavior here is to check if PackageManager has given the app // The default behavior here is to check if PackageManager has given the app