Merge changes from topics "ms25-appops", "ms28-service-fix" am: 7b8430e17e am: dde5e7bf33

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934458

Change-Id: I788b74dbe1928d6d8841efae981fe8181f94d0c7
This commit is contained in:
Treehugger Robot
2022-01-03 23:17:47 +00:00
committed by Automerger Merge Worker

View File

@@ -192,8 +192,8 @@ 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.noteOp(AppOpsManager.OPSTR_GET_USAGE_STATS,
callingUid, callingPackage); callingUid, callingPackage, null /* attributionTag */, null /* message */);
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
// permission. // permission.