Revert "OP_GET_USAGE_STATS should be noted, not checked."

This reverts commit 930aeb0c00.

Reason for revert: ijpedowitz@

Bug: 77662908
Change-Id: I5dd0ad5038df90ea8a80ba6f583ee46fb24600c2
Exempt-From-Owner-Approval: keep tests passing
(cherry picked from commit c6624c7a1a)
This commit is contained in:
Jeff Sharkey
2018-04-16 16:39:55 +00:00
committed by android-build-team Robot
parent a1b82c772a
commit 8b48b7ffc5

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