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

Commit 9eec1c2a authored by Julia Reynolds's avatar Julia Reynolds Committed by Android Git Automerger
Browse files

am 7df411d0: Merge "Clear calling identity before getting the current user." into mnc-dev

* commit '7df411d0':
  Clear calling identity before getting the current user.
parents 2f160d38 7df411d0
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;
        }