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

Commit 6800dde2 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android Git Automerger
Browse files

am 9bc3386e: Merge "Once again, cancel all when notifications canceled for pkg." into jb-mr2-dev

* commit '9bc3386e':
  Once again, cancel all when notifications canceled for pkg.
parents f09993ca 9bc3386e
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -450,11 +450,16 @@ public class NotificationManagerService extends INotificationManager.Stub

    public void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled) {
        checkCallerIsSystem();
        if (true||DBG) {

        Slog.v(TAG, (enabled?"en":"dis") + "abling notifications for " + pkg);
        }

        mAppOps.setMode(AppOpsManager.OP_POST_NOTIFICATION, uid, pkg,
                enabled ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED);

        // Now, cancel any outstanding notifications that are part of a just-disabled app
        if (ENABLE_BLOCKED_NOTIFICATIONS && !enabled) {
            cancelAllNotificationsInt(pkg, 0, 0, true, UserHandle.getUserId(uid));
        }
    }