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

Commit 2256fd4e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

Merge "[RESTRICT_AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage" into oc-dev
parents 652a6665 bed6193b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1631,6 +1631,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;
        }