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

Commit 312ef3e0 authored by Beverly's avatar Beverly
Browse files

Allow read-access to notification policy

Test: manual
Change-Id: I2b3c597b56f910b3bcad902e08f6f432493ce768
Fixes: 69358003
parent da701967
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -758,10 +758,10 @@ public class NotificationManager {
    }

    /**
     * Checks the ability to read/modify notification do not disturb policy for the calling package.
     * Checks the ability to modify notification do not disturb policy for the calling package.
     *
     * <p>
     * Returns true if the calling package can read/modify notification policy.
     * Returns true if the calling package can modify notification policy.
     *
     * <p>
     * Apps can request policy access by sending the user to the activity that matches the system
@@ -839,8 +839,6 @@ public class NotificationManager {
     * Gets the current notification policy.
     *
     * <p>
     * Only available if policy access is granted to this package.
     * See {@link #isNotificationPolicyAccessGranted}.
     */
    public Policy getNotificationPolicy() {
        INotificationManager service = getService();
+0 −1
Original line number Diff line number Diff line
@@ -2839,7 +2839,6 @@ public class NotificationManagerService extends SystemService {

        @Override
        public Policy getNotificationPolicy(String pkg) {
            enforcePolicyAccess(pkg, "getNotificationPolicy");
            final long identity = Binder.clearCallingIdentity();
            try {
                return mZenModeHelper.getNotificationPolicy();