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

Commit 19ad060b authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "[RESTRICT_AUTOMERGE]: Add cross user permission check -...

Merge "[RESTRICT_AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage" into oc-dev am: 2256fd4e
am: 51fee974

Change-Id: I5c0f89e5614901b57880fff5b59a2f6766893903
parents 03cddd85 51fee974
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1767,6 +1767,11 @@ public class NotificationManagerService extends SystemService {
        @Override
        public boolean areNotificationsEnabledForPackage(String pkg, int uid) {
            checkCallerIsSystemOrSameApp(pkg);
            if (UserHandle.getCallingUserId() != UserHandle.getUserId(uid)) {
                getContext().enforceCallingPermission(
                        android.Manifest.permission.INTERACT_ACROSS_USERS,
                        "canNotifyAsPackage for uid " + uid);
            }

            return mRankingHelper.getImportance(pkg, uid) != IMPORTANCE_NONE;
        }