mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +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.sender = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SENDER);
|
||||||
notificationSpec.subject = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SUBJECT);
|
notificationSpec.subject = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SUBJECT);
|
||||||
notificationSpec.title = intentCopy.getStringExtra(EXTRA_NOTIFICATION_TITLE);
|
notificationSpec.title = intentCopy.getStringExtra(EXTRA_NOTIFICATION_TITLE);
|
||||||
|
if(notificationSpec.title == null) {
|
||||||
|
notificationSpec.title = "";
|
||||||
|
}
|
||||||
notificationSpec.key = intentCopy.getStringExtra(EXTRA_NOTIFICATION_KEY);
|
notificationSpec.key = intentCopy.getStringExtra(EXTRA_NOTIFICATION_KEY);
|
||||||
notificationSpec.body = intentCopy.getStringExtra(EXTRA_NOTIFICATION_BODY);
|
notificationSpec.body = intentCopy.getStringExtra(EXTRA_NOTIFICATION_BODY);
|
||||||
|
if(notificationSpec.body == null) {
|
||||||
|
notificationSpec.body = "";
|
||||||
|
}
|
||||||
notificationSpec.sourceName = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SOURCENAME);
|
notificationSpec.sourceName = intentCopy.getStringExtra(EXTRA_NOTIFICATION_SOURCENAME);
|
||||||
notificationSpec.type = (NotificationType) intentCopy.getSerializableExtra(EXTRA_NOTIFICATION_TYPE);
|
notificationSpec.type = (NotificationType) intentCopy.getSerializableExtra(EXTRA_NOTIFICATION_TYPE);
|
||||||
notificationSpec.attachedActions = (ArrayList<NotificationSpec.Action>) intentCopy.getSerializableExtra(EXTRA_NOTIFICATION_ACTIONS);
|
notificationSpec.attachedActions = (ArrayList<NotificationSpec.Action>) intentCopy.getSerializableExtra(EXTRA_NOTIFICATION_ACTIONS);
|
||||||
|
Loading…
Reference in New Issue
Block a user