mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-09 03:37:03 +01:00
Core: handle null-body notifications
This commit is contained in:
parent
701aa99fa1
commit
f19782ef55
@ -836,8 +836,14 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
notificationSpec.sender = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SENDER);
|
||||
notificationSpec.subject = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SUBJECT);
|
||||
notificationSpec.title = intentCopy.getStringExtra(EXTRA_NOTIFICATION_TITLE);
|
||||
if(notificationSpec.title == null) {
|
||||
notificationSpec.title = "";
|
||||
}
|
||||
notificationSpec.key = intentCopy.getStringExtra(EXTRA_NOTIFICATION_KEY);
|
||||
notificationSpec.body = intentCopy.getStringExtra(EXTRA_NOTIFICATION_BODY);
|
||||
if(notificationSpec.body == null) {
|
||||
notificationSpec.body = "";
|
||||
}
|
||||
notificationSpec.sourceName = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SOURCENAME);
|
||||
notificationSpec.type = (NotificationType) intentCopy.getSerializableExtra(EXTRA_NOTIFICATION_TYPE);
|
||||
notificationSpec.attachedActions = (ArrayList<NotificationSpec.Action>) intentCopy.getSerializableExtra(EXTRA_NOTIFICATION_ACTIONS);
|
||||
|
Loading…
Reference in New Issue
Block a user