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

Commit 6d14d39e authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

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

am: a100aafb

* commit 'a100aafb':
  Apps that can change DND state can also pass audiomanager DND policy checks.
parents 6c2af2f2 a100aafb
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