diff options
| author | 2015-09-28 18:55:41 +0000 | |
|---|---|---|
| committer | 2015-09-28 18:55:41 +0000 | |
| commit | 7581121ba5736b1626109445c90cc1b65bf90da9 (patch) | |
| tree | 7e82df893e77510a2f0fa95feb20e0f8c05a3368 | |
| parent | b487ffeef7e9e6cc2fae08c2ef7ac078cf626bd3 (diff) | |
| parent | 3a0ee8f9639bd3995bc50e7ecc666f3ca0350985 (diff) | |
Merge "Revert "Allow signature apps to modify notification policies.""
3 files changed, 2 insertions, 13 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 148e7c109601..df5e35968af7 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2530,12 +2530,6 @@ android:label="@string/permlab_access_notification_policy" android:protectionLevel="normal" /> - <!-- Allows modification of do not disturb rules and policies. Only allowed for system - processes. - @hide --> - <permission android:name="android.permission.MANAGE_NOTIFICATIONS" - android:protectionLevel="signature" /> - <!-- Allows access to keyguard secure storage. Only allowed for system processes. @hide --> <permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index c895ae1fb724..14a2cbc0e591 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1642,10 +1642,6 @@ public class NotificationManagerService extends SystemService { } private void enforcePolicyAccess(String pkg, String method) { - if (PackageManager.PERMISSION_GRANTED == getContext().checkCallingPermission( - android.Manifest.permission.MANAGE_NOTIFICATION_RULES)) { - return; - } if (!checkPolicyAccess(pkg)) { Slog.w(TAG, "Notification policy access denied calling " + method); throw new SecurityException("Notification policy access denied"); diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java index 9131e5eecbf5..cbe61c3da5af 100644 --- a/services/core/java/com/android/server/notification/ZenModeHelper.java +++ b/services/core/java/com/android/server/notification/ZenModeHelper.java @@ -248,9 +248,8 @@ public class ZenModeHelper { } pw.printf("allow(calls=%s,callsFrom=%s,repeatCallers=%s,messages=%s,messagesFrom=%s," + "events=%s,reminders=%s)\n", - config.allowCalls, ZenModeConfig.sourceToString(config.allowCallsFrom), - config.allowRepeatCallers, config.allowMessages, - ZenModeConfig.sourceToString(config.allowMessagesFrom), + config.allowCalls, config.allowCallsFrom, config.allowRepeatCallers, + config.allowMessages, config.allowMessagesFrom, config.allowEvents, config.allowReminders); pw.print(prefix); pw.print(" manualRule="); pw.println(config.manualRule); if (config.automaticRules.isEmpty()) return; |