summaryrefslogtreecommitdiffstats
path: root/core/java/android/provider
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-06-04 13:01:42 -0400
committerJohn Spurlock <jspurlock@google.com>2015-06-08 11:53:35 -0400
commit7c74f78a85283912d7239214024ccca702622f21 (patch)
tree226b395ce4cada544a8981c337169c2551dcf274 /core/java/android/provider
parentac2e3886e3f129b0ee94bb514e026fe72951b4a8 (diff)
downloadframeworks_base-7c74f78a85283912d7239214024ccca702622f21.zip
frameworks_base-7c74f78a85283912d7239214024ccca702622f21.tar.gz
frameworks_base-7c74f78a85283912d7239214024ccca702622f21.tar.bz2
Zen: New user flow for requesting DND access.
- User flow is now similar to requesting access to notification content, namely prompting the user to visit a settings page for enabling/disabling apps access. - New ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED intent for apps to listen to this state change. - Removed obsolete request method and associated internal callback aidl. - Added new android.permission.ACCESS_NOTIFICATION_POLICY permission for apps to include as a signal that they want to request this access (and therefore appear in the list on the settings page). - Improve javadocs, outline the user flow in NotificationManager#isNotificationPolicyAccessGranted and link to this method elsewhere. - NoManService now persists the user-enabled package list across reboots and does so per-user. - Rename public settings intent to correspond with the noman api. Bug: 21621663 Change-Id: I72cbc21cd736e6a157b6be5d1d0ba0b4a8e7ef4e
Diffstat (limited to 'core/java/android/provider')
-rw-r--r--core/java/android/provider/Settings.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 37645b5..cac4a53 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -811,14 +811,17 @@ public final class Settings {
/**
* Activity Action: Show Do Not Disturb access settings.
* <p>
- * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
+ * Users can grant and deny access to Do Not Disturb configuration from here.
+ * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more
+ * details.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
- public static final String ACTION_ZEN_ACCESS_SETTINGS = "android.settings.ZEN_ACCESS_SETTINGS";
+ public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS
+ = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS";
/**
* @hide
@@ -5425,7 +5428,7 @@ public final class Settings {
public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled";
/**
- * Names of the packages that the current user has explicitly allowed to
+ * Names of the service components that the current user has explicitly allowed to
* see all of the user's notifications, separated by ':'.
*
* @hide
@@ -5433,6 +5436,15 @@ public final class Settings {
public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
/**
+ * Names of the packages that the current user has explicitly allowed to
+ * manage notification policy configuration, separated by ':'.
+ *
+ * @hide
+ */
+ public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES =
+ "enabled_notification_policy_access_packages";
+
+ /**
* @hide
*/
public static final String ENABLED_CONDITION_PROVIDERS = "enabled_condition_providers";