mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 01:55:50 +01:00
Fix NPE #603
This commit is contained in:
parent
b2886b81c9
commit
f1d07c83f6
@ -42,7 +42,7 @@ public class NotificationUtils {
|
||||
case CONVERSATIONS:
|
||||
case FACEBOOK:
|
||||
case FACEBOOK_MESSENGER:
|
||||
return notificationSpec.body;
|
||||
return StringUtils.ensureNotNull(notificationSpec.body);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import android.support.annotation.NonNull;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
@NonNull
|
||||
public static String truncate(String s, int maxLength){
|
||||
if (s == null) {
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user