Skip to content
Commit c1de64d6 authored by Matías Hernández's avatar Matías Hernández
Browse files

Clear notifications for packages whose permission is revoked

Previously this was done only on the setNotificationsEnabledForPackage() codepath, called by Settings UI. This meant that notifications would remain if the permission was revoked through other means, such as via permission Backup & Restore or via `adb shell pm revoke` (and possibly others). Now we listen to AppOp mode changes (for `OP_POST_NOTIFICATION`) and react to them, for a more consistent behavior.

This CL also removes some unused or obsolete parameters from cancelAllNotificationsInt, together with the ACTION_QUERY_PACKAGE_RESTART broadcast listener.

MUST_SLEEP: To test the effects of a postDelayed() call.

Test: atest NotificationManagerService + manual
Fixes: 288651621
Change-Id: I6ec1c75f206bc3b3c4252768a433b886b3983be8
parent e6ac1838
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment