Loading services/java/com/android/server/NotificationManagerService.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -889,7 +889,7 @@ public class NotificationManagerService extends INotificationManager.Stub final boolean isSystemNotification = ("android".equals(pkg)); final boolean isSystemNotification = ("android".equals(pkg)); userId = ActivityManager.handleIncomingUser(callingPid, userId = ActivityManager.handleIncomingUser(callingPid, callingUid, userId, true, true, "enqueueNotification", pkg); callingUid, userId, true, false, "enqueueNotification", pkg); final UserHandle user = new UserHandle(userId); final UserHandle user = new UserHandle(userId); // Limit the number of notifications that any given package except the android // Limit the number of notifications that any given package except the android Loading Loading @@ -1287,7 +1287,7 @@ public class NotificationManagerService extends INotificationManager.Stub public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) { public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) { checkCallerIsSystemOrSameApp(pkg); checkCallerIsSystemOrSameApp(pkg); userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId, true, true, "cancelNotificationWithTag", pkg); Binder.getCallingUid(), userId, true, false, "cancelNotificationWithTag", pkg); // Don't allow client applications to cancel foreground service notis. // Don't allow client applications to cancel foreground service notis. cancelNotification(pkg, tag, id, 0, cancelNotification(pkg, tag, id, 0, Binder.getCallingUid() == Process.SYSTEM_UID Binder.getCallingUid() == Process.SYSTEM_UID Loading @@ -1298,7 +1298,7 @@ public class NotificationManagerService extends INotificationManager.Stub checkCallerIsSystemOrSameApp(pkg); checkCallerIsSystemOrSameApp(pkg); userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId, true, true, "cancelAllNotifications", pkg); Binder.getCallingUid(), userId, true, false, "cancelAllNotifications", pkg); // Calling from user space, don't allow the canceling of actively // Calling from user space, don't allow the canceling of actively // running foreground services. // running foreground services. Loading services/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -4575,7 +4575,7 @@ public final class ActivityManagerService extends ActivityManagerNative int callingUid = Binder.getCallingUid(); int callingUid = Binder.getCallingUid(); int origUserId = userId; int origUserId = userId; userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId, userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId, type == ActivityManager.INTENT_SENDER_BROADCAST, true, type == ActivityManager.INTENT_SENDER_BROADCAST, false, "getIntentSender", null); "getIntentSender", null); if (origUserId == UserHandle.USER_CURRENT) { if (origUserId == UserHandle.USER_CURRENT) { // We don't want to evaluate this until the pending intent is // We don't want to evaluate this until the pending intent is Loading Loading
services/java/com/android/server/NotificationManagerService.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -889,7 +889,7 @@ public class NotificationManagerService extends INotificationManager.Stub final boolean isSystemNotification = ("android".equals(pkg)); final boolean isSystemNotification = ("android".equals(pkg)); userId = ActivityManager.handleIncomingUser(callingPid, userId = ActivityManager.handleIncomingUser(callingPid, callingUid, userId, true, true, "enqueueNotification", pkg); callingUid, userId, true, false, "enqueueNotification", pkg); final UserHandle user = new UserHandle(userId); final UserHandle user = new UserHandle(userId); // Limit the number of notifications that any given package except the android // Limit the number of notifications that any given package except the android Loading Loading @@ -1287,7 +1287,7 @@ public class NotificationManagerService extends INotificationManager.Stub public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) { public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) { checkCallerIsSystemOrSameApp(pkg); checkCallerIsSystemOrSameApp(pkg); userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId, true, true, "cancelNotificationWithTag", pkg); Binder.getCallingUid(), userId, true, false, "cancelNotificationWithTag", pkg); // Don't allow client applications to cancel foreground service notis. // Don't allow client applications to cancel foreground service notis. cancelNotification(pkg, tag, id, 0, cancelNotification(pkg, tag, id, 0, Binder.getCallingUid() == Process.SYSTEM_UID Binder.getCallingUid() == Process.SYSTEM_UID Loading @@ -1298,7 +1298,7 @@ public class NotificationManagerService extends INotificationManager.Stub checkCallerIsSystemOrSameApp(pkg); checkCallerIsSystemOrSameApp(pkg); userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId, true, true, "cancelAllNotifications", pkg); Binder.getCallingUid(), userId, true, false, "cancelAllNotifications", pkg); // Calling from user space, don't allow the canceling of actively // Calling from user space, don't allow the canceling of actively // running foreground services. // running foreground services. Loading
services/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -4575,7 +4575,7 @@ public final class ActivityManagerService extends ActivityManagerNative int callingUid = Binder.getCallingUid(); int callingUid = Binder.getCallingUid(); int origUserId = userId; int origUserId = userId; userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId, userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId, type == ActivityManager.INTENT_SENDER_BROADCAST, true, type == ActivityManager.INTENT_SENDER_BROADCAST, false, "getIntentSender", null); "getIntentSender", null); if (origUserId == UserHandle.USER_CURRENT) { if (origUserId == UserHandle.USER_CURRENT) { // We don't want to evaluate this until the pending intent is // We don't want to evaluate this until the pending intent is Loading