Skip to content

Commit 7f5bade

Browse files
Amith YamasaniAndroid Git Automerger
authored andcommitted
am 03f7ebf: Merge "Relax permission requirements for posting notifications across users" into jb-mr1-dev
* commit '03f7ebfeaadb3f03c9a9a6405276fb702ad11fe1': Relax permission requirements for posting notifications across users
2 parents 170c8d9 + 03f7ebf commit 7f5bade

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services/java/com/android/server/NotificationManagerService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ public void enqueueNotificationInternal(String pkg, int callingUid, int callingP
889889
final boolean isSystemNotification = ("android".equals(pkg));
890890

891891
userId = ActivityManager.handleIncomingUser(callingPid,
892-
callingUid, userId, true, true, "enqueueNotification", pkg);
892+
callingUid, userId, true, false, "enqueueNotification", pkg);
893893
final UserHandle user = new UserHandle(userId);
894894

895895
// Limit the number of notifications that any given package except the android
@@ -1287,7 +1287,7 @@ boolean cancelAllNotificationsInt(String pkg, int mustHaveFlags,
12871287
public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) {
12881288
checkCallerIsSystemOrSameApp(pkg);
12891289
userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
1290-
Binder.getCallingUid(), userId, true, true, "cancelNotificationWithTag", pkg);
1290+
Binder.getCallingUid(), userId, true, false, "cancelNotificationWithTag", pkg);
12911291
// Don't allow client applications to cancel foreground service notis.
12921292
cancelNotification(pkg, tag, id, 0,
12931293
Binder.getCallingUid() == Process.SYSTEM_UID
@@ -1298,7 +1298,7 @@ public void cancelAllNotifications(String pkg, int userId) {
12981298
checkCallerIsSystemOrSameApp(pkg);
12991299

13001300
userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
1301-
Binder.getCallingUid(), userId, true, true, "cancelAllNotifications", pkg);
1301+
Binder.getCallingUid(), userId, true, false, "cancelAllNotifications", pkg);
13021302

13031303
// Calling from user space, don't allow the canceling of actively
13041304
// running foreground services.

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4575,7 +4575,7 @@ public IIntentSender getIntentSender(int type,
45754575
int callingUid = Binder.getCallingUid();
45764576
int origUserId = userId;
45774577
userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId,
4578-
type == ActivityManager.INTENT_SENDER_BROADCAST, true,
4578+
type == ActivityManager.INTENT_SENDER_BROADCAST, false,
45794579
"getIntentSender", null);
45804580
if (origUserId == UserHandle.USER_CURRENT) {
45814581
// We don't want to evaluate this until the pending intent is

0 commit comments

Comments
 (0)