Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe054b77 authored by Junyu Lai's avatar Junyu Lai
Browse files

[MS25.1] Remove AppOpsManager.OP_GET_USAGE_STATS dependency

Replaced by public interface.

Test: TH
Bug: 204830222
Change-Id: If7d17879b0ffdb6300373bc581cb07252fccfc7a
parent 94a24370
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -192,8 +192,8 @@ public final class NetworkStatsAccess {
            AppOpsManager appOps = (AppOpsManager) context.getSystemService(
                    Context.APP_OPS_SERVICE);

            final int mode = appOps.noteOp(AppOpsManager.OP_GET_USAGE_STATS,
                    callingUid, callingPackage);
            final int mode = appOps.noteOp(AppOpsManager.OPSTR_GET_USAGE_STATS,
                    callingUid, callingPackage, null /* attributionTag */, null /* message */);
            if (mode == AppOpsManager.MODE_DEFAULT) {
                // The default behavior here is to check if PackageManager has given the app
                // permission.