summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2013-03-18 21:53:04 -0400
committerDaniel Sandler <dsandler@android.com>2013-03-21 01:41:20 -0700
commit4b749ef5f2d510b84b99aa269d5c77af22457d04 (patch)
tree1490af32d5ed7a79549b9c87d78c5b49de8985c9 /core/java
parentab7409e6376708cf8958f3cfb8f6fce2e7bfc69c (diff)
Allow whitelisted non-system packages to listen for notifications.
The allowed packages are listed in Settings.Secure.ENABLED_NOTIFICATION_LISTENERS. (Don't let the plural fool you: only one listener will be supported in the UI.) Change-Id: Ia69f2ba05d8e555fd4d40b0cc89c62ed14af3cac
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/INotificationManager.aidl2
-rw-r--r--core/java/android/provider/Settings.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index 14bcc0d7fba4..3d9b2ae83518 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -41,7 +41,7 @@ interface INotificationManager
StatusBarNotification[] getActiveNotifications(String callingPkg);
StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count);
- void registerListener(in INotificationListener listener, int userid);
+ void registerListener(in INotificationListener listener, String pkg, int userid);
void unregisterListener(in INotificationListener listener, int userid);
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index d251ca25e068..4cb1ae84480d 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4039,6 +4039,14 @@ public final class Settings {
public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
/**
+ * Name of a package that the current user has explicitly allowed to see all of that
+ * user's notifications.
+ *
+ * @hide
+ */
+ public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
+
+ /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear