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

Commit a100aafb authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Apps that can change DND state can also pass audiomanager DND policy checks." into nyc-dev

parents b8768acd a2d0102b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1852,6 +1852,10 @@ public class NotificationManagerService extends SystemService {
        }

        private boolean checkPolicyAccess(String pkg) {
            if (PackageManager.PERMISSION_GRANTED == getContext().checkCallingPermission(
                    android.Manifest.permission.MANAGE_NOTIFICATIONS)) {
                return true;
            }
            if (mAudioManagerInternal != null) {
                final int vcuid = mAudioManagerInternal.getVolumeControllerUid();
                if (vcuid > 0 && Binder.getCallingUid() == vcuid) {
@@ -1952,7 +1956,7 @@ public class NotificationManagerService extends SystemService {
        public boolean isNotificationPolicyAccessGrantedForPackage(String pkg) {;
            enforceSystemOrSystemUIOrSamePackage(pkg,
                    "request policy access status for another package");
            return checkPackagePolicyAccess(pkg);
            return checkPolicyAccess(pkg);
        }

        @Override