From 96cac7f7225ffb011d9a22b32d97b9a370357d6c Mon Sep 17 00:00:00 2001 From: Geoffrey Pitsch Date: Thu, 23 Mar 2017 17:57:12 -0400 Subject: [PATCH] Disable no-channel exception, notifications will silently fail Logs instead in the meantime. Bug: 36516812 Test: runtest systemui-notification Change-Id: I03dd46b7357e443c7810cecda9a8ba13c9755f30 --- .../notification/NotificationManagerService.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 3727a5b794401..07dad6bd2c5fa 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -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,