diff options
author | 2016-06-29 15:41:43 +0000 | |
---|---|---|
committer | 2016-06-29 15:41:44 +0000 | |
commit | 488153094c7fe7830ae6741675e9d73e27ecef00 (patch) | |
tree | 1c26e4cc5827d22529070e8761c8e4f1280f44af | |
parent | b71081e4e9655d200a2332ade1fbf8a6c0b6825b (diff) | |
parent | 0cd1b789567b60b963fc7b8935e898ea0e61a617 (diff) |
Merge "Check uid for notification policy access." into nyc-mr1-dev
-rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 21bcacd3e9a7..1206263fb281 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1997,6 +1997,7 @@ public class NotificationManagerService extends SystemService { android.Manifest.permission.MANAGE_NOTIFICATIONS)) { return; } + checkCallerIsSameApp(pkg); if (!checkPolicyAccess(pkg)) { Slog.w(TAG, "Notification policy access denied calling " + method); throw new SecurityException("Notification policy access denied"); @@ -3655,6 +3656,10 @@ public class NotificationManagerService extends SystemService { if (isCallerSystem()) { return; } + checkCallerIsSameApp(pkg); + } + + private static void checkCallerIsSameApp(String pkg) { final int uid = Binder.getCallingUid(); try { ApplicationInfo ai = AppGlobals.getPackageManager().getApplicationInfo( |