frameworks/base
修订版 | bb88f40e63dfc70fe9c55bbbb4d862ef9a597399 (tree) |
---|---|
时间 | 2019-06-05 18:28:50 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge tag 'android-8.1.0_r65' into oreo-x86
Android 8.1.0 release 65
@@ -1767,6 +1767,11 @@ public class NotificationManagerService extends SystemService { | ||
1767 | 1767 | @Override |
1768 | 1768 | public boolean areNotificationsEnabledForPackage(String pkg, int uid) { |
1769 | 1769 | checkCallerIsSystemOrSameApp(pkg); |
1770 | + if (UserHandle.getCallingUserId() != UserHandle.getUserId(uid)) { | |
1771 | + getContext().enforceCallingPermission( | |
1772 | + android.Manifest.permission.INTERACT_ACROSS_USERS, | |
1773 | + "canNotifyAsPackage for uid " + uid); | |
1774 | + } | |
1770 | 1775 | |
1771 | 1776 | return mRankingHelper.getImportance(pkg, uid) != IMPORTANCE_NONE; |
1772 | 1777 | } |
@@ -7801,6 +7801,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { | ||
7801 | 7801 | if (!mHasFeature) { |
7802 | 7802 | return null; |
7803 | 7803 | } |
7804 | + enforceManageUsers(); | |
7804 | 7805 | synchronized (this) { |
7805 | 7806 | List<String> result = null; |
7806 | 7807 | // If we have multiple profiles we return the intersection of the |