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

Commit bb6159af authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use checkOperation for permission check when starting services."

parents 7e6d1153 ac392735
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2211,7 +2211,7 @@ public final class ActiveServices {
                return new ServiceLookupResult(null, r.permission);
            } else if (r.permission != null && callingPackage != null) {
                final int opCode = AppOpsManager.permissionToOpCode(r.permission);
                if (opCode != AppOpsManager.OP_NONE && mAm.mAppOpsService.noteOperation(
                if (opCode != AppOpsManager.OP_NONE && mAm.mAppOpsService.checkOperation(
                        opCode, callingUid, callingPackage) != AppOpsManager.MODE_ALLOWED) {
                    Slog.w(TAG, "Appop Denial: Accessing service " + r.shortInstanceName
                            + " from pid=" + callingPid