summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Reynolds <juliacr@google.com> 2016-06-29 15:41:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-06-29 15:41:44 +0000
commit488153094c7fe7830ae6741675e9d73e27ecef00 (patch)
tree1c26e4cc5827d22529070e8761c8e4f1280f44af
parentb71081e4e9655d200a2332ade1fbf8a6c0b6825b (diff)
parent0cd1b789567b60b963fc7b8935e898ea0e61a617 (diff)
Merge "Check uid for notification policy access." into nyc-mr1-dev
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java5
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(