Zen: Simplify notification policy api, add zenmode api.

 - Remove the concept of a notification policy management token
   in favor of a simple grant/deny per app.  Currently, all requests
   are immediately granted.
 - Add zen mode getter/setting, limit to apps that have been granted
   policy access.
 - Add intent for zen mode changes.
 - Public name for zen mode = "interruption filter", moved from
   NotificationListenerService to NotificationManager.
 - Add settings metadata for new DND access Settings screen.
 - Add the split sender settings for calls vs messages to the public
   Policy api.
 - This change is meant to finalize the public api, persisting
   granted app status and showing the user-visible dialog will be
   done as followups.

Bug: 18298798
Change-Id: I511be98d69939f057c0c7dc1a6dfe63d1c468193
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index b92c734..6f8e3ca 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -189,6 +189,10 @@
         }
     }
 
+    public boolean isComponentEnabledForPackage(String pkg) {
+        return mEnabledServicesPackageNames.contains(pkg);
+    }
+
     public void onPackagesChanged(boolean queryReplace, String[] pkgList) {
         if (DEBUG) Slog.d(TAG, "onPackagesChanged queryReplace=" + queryReplace
                 + " pkgList=" + (pkgList == null ? null : Arrays.asList(pkgList))