Disable no-channel exception, notifications will silently fail

Logs instead in the meantime.

Bug: 36516812
Test: runtest systemui-notification
Change-Id: I03dd46b7357e443c7810cecda9a8ba13c9755f30
This commit is contained in:
Geoffrey Pitsch
2017-03-23 17:57:12 -04:00
parent 1e81b7f166
commit 96cac7f722

View File

@@ -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,