Don't put a null in a spannablestringbuilder

Test: manual
Fixes: 162869220
Change-Id: Iad00ab417edf2dd5d1b83194c6ade2899fd1350c
This commit is contained in:
Julia Reynolds
2020-08-17 12:02:44 -04:00
parent 1adaa8ba27
commit 7afb1d7a2b

View File

@@ -312,7 +312,7 @@ public class NotificationStation extends SettingsPreferenceFragment {
if (n.extras != null) { if (n.extras != null) {
title = n.extras.getCharSequence(Notification.EXTRA_TITLE); title = n.extras.getCharSequence(Notification.EXTRA_TITLE);
} }
return title == null? null : String.valueOf(title); return title == null? "" : String.valueOf(title);
} }
/** /**
@@ -339,7 +339,7 @@ public class NotificationStation extends SettingsPreferenceFragment {
text = n.extras.getCharSequence(Notification.EXTRA_TEXT); text = n.extras.getCharSequence(Notification.EXTRA_TEXT);
} }
} }
return text == null ? null : String.valueOf(text); return text == null ? "" : String.valueOf(text);
} }
private Drawable loadIcon(HistoricalNotificationInfo info, StatusBarNotification sbn) { private Drawable loadIcon(HistoricalNotificationInfo info, StatusBarNotification sbn) {