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

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

am 8dd0bce6: am 4e65a05f: am ac5f9628: am 7df411d0: Merge "Clear calling...

am 8dd0bce6: am 4e65a05f: am ac5f9628: am 7df411d0: Merge "Clear calling identity before getting the current user." into mnc-dev

* commit '8dd0bce6':
  Clear calling identity before getting the current user.
parents 05b9dc9f 8dd0bce6
Loading
Loading
Loading
Loading
+20 −14
Original line number Original line Diff line number Diff line
@@ -3615,6 +3615,9 @@ public class NotificationManagerService extends SystemService {


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

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