summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index d526ef56a345..aa82470506d2 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -1852,6 +1852,10 @@ public class NotificationManagerService extends SystemService {
}
private boolean checkPolicyAccess(String pkg) {
+ if (PackageManager.PERMISSION_GRANTED == getContext().checkCallingPermission(
+ android.Manifest.permission.MANAGE_NOTIFICATIONS)) {
+ return true;
+ }
if (mAudioManagerInternal != null) {
final int vcuid = mAudioManagerInternal.getVolumeControllerUid();
if (vcuid > 0 && Binder.getCallingUid() == vcuid) {
@@ -1952,7 +1956,7 @@ public class NotificationManagerService extends SystemService {
public boolean isNotificationPolicyAccessGrantedForPackage(String pkg) {;
enforceSystemOrSystemUIOrSamePackage(pkg,
"request policy access status for another package");
- return checkPackagePolicyAccess(pkg);
+ return checkPolicyAccess(pkg);
}
@Override