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

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

Merge "Fix multiuser access to setNotificationPolicy"

parents b28e95e6 f4d11680
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4674,10 +4674,11 @@ public class NotificationManagerService extends SystemService {
        @Override
        public void setNotificationPolicy(String pkg, Policy policy) {
            enforcePolicyAccess(pkg, "setNotificationPolicy");
            int callingUid = Binder.getCallingUid();
            final long identity = Binder.clearCallingIdentity();
            try {
                final ApplicationInfo applicationInfo = mPackageManager.getApplicationInfo(pkg,
                        0, UserHandle.getUserId(MY_UID));
                        0, UserHandle.getUserId(callingUid));
                Policy currPolicy = mZenModeHelper.getNotificationPolicy();

                if (applicationInfo.targetSdkVersion < Build.VERSION_CODES.P) {