diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-16 22:37:45 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-16 22:37:45 +0000 |
commit | d3f6644bebfc7b393417f547501b5a501bfa5c39 (patch) | |
tree | 9dbec22740db99bbca8421e8be97cd7e1184d27d | |
parent | 64f189a7a08d7182e68a73db1442b61081d5a2ee (diff) | |
parent | e1dd453c6816d4b33d5c7950e8edc99d9e3836f4 (diff) | |
download | base-d3f6644bebfc7b393417f547501b5a501bfa5c39.tar.gz |
Merge cherrypicks of [7077328, 7074021, 7074022, 7077576, 7077577, 7077578, 7077579] into oc-m8-releaseandroid-8.1.0_r65
Change-Id: Iec63c3117aa78ca05775724fb9afd8d048730755
-rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 5 | ||||
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 1 |
2 files changed, 6 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 566e5f52625e..4baec056f639 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1767,6 +1767,11 @@ public class NotificationManagerService extends SystemService { @Override public boolean areNotificationsEnabledForPackage(String pkg, int uid) { checkCallerIsSystemOrSameApp(pkg); + if (UserHandle.getCallingUserId() != UserHandle.getUserId(uid)) { + getContext().enforceCallingPermission( + android.Manifest.permission.INTERACT_ACROSS_USERS, + "canNotifyAsPackage for uid " + uid); + } return mRankingHelper.getImportance(pkg, uid) != IMPORTANCE_NONE; } diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index aac341c1e6e4..77cb99f64eed 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -7801,6 +7801,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { if (!mHasFeature) { return null; } + enforceManageUsers(); synchronized (this) { List<String> result = null; // If we have multiple profiles we return the intersection of the |