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

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

Merge "Clear calling identity before getting the current user." into mnc-dev

parents 16fa58cb ea6c4489
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -3615,6 +3615,9 @@ public class NotificationManagerService extends SystemService {

        public ArraySet<String> getGrantedPackages() {
            final ArraySet<String> pkgs = new ArraySet<>();

            long identity = Binder.clearCallingIdentity();
            try {
                final String setting = Settings.Secure.getStringForUser(
                        getContext().getContentResolver(),
                        Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES,
@@ -3632,6 +3635,9 @@ public class NotificationManagerService extends SystemService {
                        pkgs.add(token);
                    }
                }
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
            return pkgs;
        }