Make sure that channelIdToNotification is not null (#1320)
This commit is contained in:
parent
2d5dba1fc0
commit
db09e1376a
1 changed files with 8 additions and 2 deletions
|
|
@ -210,9 +210,15 @@ public class CustomPushNotification extends PushNotification {
|
|||
String summaryTitle = String.format("%s (%d)", title, numMessages);
|
||||
|
||||
Notification.InboxStyle style = new Notification.InboxStyle();
|
||||
List<Bundle> list = new ArrayList<Bundle>(channelIdToNotification.get(channelId));
|
||||
List<Bundle> bundleArray = channelIdToNotification.get(channelId);
|
||||
List<Bundle> list;
|
||||
if (bundleArray != null) {
|
||||
list = new ArrayList<Bundle>(bundleArray);
|
||||
} else {
|
||||
list = new ArrayList<Bundle>();
|
||||
}
|
||||
|
||||
for (Bundle data : list){
|
||||
for (Bundle data : list) {
|
||||
String msg = data.getString("message");
|
||||
if (msg != message) {
|
||||
style.addLine(data.getString("message"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue