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

Commit 76c785b5 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "The volume controller has notification policy access." into nyc-dev

am: 5ee99c4f

* commit '5ee99c4f':
  The volume controller has notification policy access.
parents 80e30a0f 5ee99c4f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1852,6 +1852,12 @@ public class NotificationManagerService extends SystemService {
        }

        private boolean checkPolicyAccess(String pkg) {
            if (mAudioManagerInternal != null) {
                final int vcuid = mAudioManagerInternal.getVolumeControllerUid();
                if (vcuid > 0 && Binder.getCallingUid() == vcuid) {
                    return true;
                }
            }
            return checkPackagePolicyAccess(pkg) || mListeners.isComponentEnabledForPackage(pkg);
        }