diff options
| author | Daniel Sandler <dsandler@android.com> | 2013-02-01 18:45:47 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-01 18:46:04 +0000 |
| commit | 9b4a2858bdd206d67d77c80b383bfd776dc88e71 (patch) | |
| tree | 78021c6b27fe17bbccd04025ae34b529cb9b2a1d /core | |
| parent | b06870bf49055721bd43b5bbd742feb8422fc071 (diff) | |
| parent | 4a900acdef4559f9f84ca7e2bce45485215fc130 (diff) | |
| download | frameworks_base-9b4a2858bdd206d67d77c80b383bfd776dc88e71.zip frameworks_base-9b4a2858bdd206d67d77c80b383bfd776dc88e71.tar.gz frameworks_base-9b4a2858bdd206d67d77c80b383bfd776dc88e71.tar.bz2 | |
Merge "Migrate package notification restrictions to AppOps."
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 3 | ||||
| -rw-r--r-- | core/java/android/app/INotificationManager.aidl | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index b1d0305..a1fdef8 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -47,6 +47,7 @@ public class AppOpsManager { public static final int OP_READ_CALENDAR = 8; public static final int OP_WRITE_CALENDAR = 9; public static final int OP_WIFI_SCAN = 10; + public static final int OP_POST_NOTIFICATION = 11; private static String[] sOpNames = new String[] { "COARSE_LOCATION", @@ -60,6 +61,7 @@ public class AppOpsManager { "READ_CALENDAR", "WRITE_CALENDAR", "WIFI_SCAN", + "POST_NOTIFICATION", }; private static String[] sOpPerms = new String[] { @@ -74,6 +76,7 @@ public class AppOpsManager { android.Manifest.permission.READ_CALENDAR, android.Manifest.permission.WRITE_CALENDAR, android.Manifest.permission.ACCESS_WIFI_STATE, + null, // no permission required for notifications }; public static String opToName(int op) { diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl index 62d4962..b4c222f 100644 --- a/core/java/android/app/INotificationManager.aidl +++ b/core/java/android/app/INotificationManager.aidl @@ -32,7 +32,7 @@ interface INotificationManager in Notification notification, inout int[] idReceived, int userId); void cancelNotificationWithTag(String pkg, String tag, int id, int userId); - void setNotificationsEnabledForPackage(String pkg, boolean enabled); - boolean areNotificationsEnabledForPackage(String pkg); + void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); + boolean areNotificationsEnabledForPackage(String pkg, int uid); } |
