Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 929d5ac5 authored by Griff Hazen's avatar Griff Hazen Committed by Android (Google) Code Review
Browse files

Merge "Fix a NPE in NotificationManagerSerivice.cancelNotificationFromListener" into lmp-dev

parents b3ecb72a 335e1f03
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1236,18 +1236,17 @@ public class NotificationManagerService extends SystemService {
                        final int N = keys.length;
                        for (int i = 0; i < N; i++) {
                            NotificationRecord r = mNotificationsByKey.get(keys[i]);
                            if (r == null) continue;
                            final int userId = r.sbn.getUserId();
                            if (userId != info.userid && userId != UserHandle.USER_ALL &&
                                    !mUserProfiles.isCurrentProfile(userId)) {
                                throw new SecurityException("Disallowed call from listener: "
                                        + info.service);
                            }
                            if (r != null) {
                            cancelNotificationFromListenerLocked(info, callingUid, callingPid,
                                    r.sbn.getPackageName(), r.sbn.getTag(), r.sbn.getId(),
                                    userId);
                        }
                        }
                    } else {
                        cancelAllLocked(callingUid, callingPid, info.userid,
                                REASON_LISTENER_CANCEL_ALL, info, info.supportsProfiles());