Notify AppOps when notifications are [un]blocked for an app.

Bug: crbug.com/934581
Bug: 129992781
Test: atest NotificationManagerServiceTest NotificationManagerTest
Test: Verified that blocked apps stay blocked on Android on ChromeOS.
Change-Id: Ibb57d295a1c4345d0acc514cbfe9994f8184cc9d
(cherry picked from commit 49d1a012b657668195d75e4fa5972c03a50fae0e)
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 5d0981d..81c72ef 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -3056,6 +3056,8 @@
                         UserHandle.getUserId(uid), REASON_PACKAGE_BANNED, null);
             }
 
+            mAppOps.setMode(AppOpsManager.OP_POST_NOTIFICATION, uid, pkg,
+                    enabled ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED);
             try {
                 getContext().sendBroadcastAsUser(
                         new Intent(ACTION_APP_BLOCK_STATE_CHANGED)