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

Commit 96cac7f7 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch
Browse files

Disable no-channel exception, notifications will silently fail

Logs instead in the meantime.

Bug: 36516812
Test: runtest systemui-notification
Change-Id: I03dd46b7357e443c7810cecda9a8ba13c9755f30
parent 1e81b7f1
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -3121,8 +3121,19 @@ public class NotificationManagerService extends SystemService {
                        + " - notification=" + notification);
                return;
            }
            throw new IllegalArgumentException("No Channel found for channelId=" + channelId
                    + ", notification=" + notification);
            final String noChannelStr = "No Channel found for "
                    + "pkg=" + pkg
                    + ", channelId=" + channelId
                    + ", opPkg=" + opPkg
                    + ", callingUid=" + callingUid
                    + ", userId=" + userId
                    + ", incomingUserId=" + incomingUserId
                    + ", notificationUid=" + notificationUid
                    + ", notification=" + notification;
            // STOPSHIP TODO: should throw instead of logging.
            // throw new IllegalArgumentException(noChannelStr);
            Log.e(TAG, noChannelStr);
            return;
        }
        final StatusBarNotification n = new StatusBarNotification(
                pkg, opPkg, id, tag, notificationUid, callingPid, notification,