mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 05:07:40 +00:00
Use getString instead of getCharsequence().toString()
Summary: Depends on D9621 Reviewers: #kde_connect, mtijink, albertvaka Reviewed By: #kde_connect, mtijink, albertvaka Subscribers: #kde_connect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D9622
This commit is contained in:
parent
fdaa632a39
commit
45bac893d9
@ -289,7 +289,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
try {
|
||||
Bundle extras = notification.extras;
|
||||
title = extras.getCharSequence(TITLE_KEY).toString();
|
||||
title = extras.getString(TITLE_KEY);
|
||||
} catch (Exception e) {
|
||||
Log.w("NotificationPlugin", "problem parsing notification extras for " + notification.tickerText);
|
||||
e.printStackTrace();
|
||||
@ -372,7 +372,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
try {
|
||||
Bundle extras = notification.extras;
|
||||
String extraTitle = extras.getCharSequence(TITLE_KEY).toString();
|
||||
String extraTitle = extras.getString(TITLE_KEY);
|
||||
String extraText = null;
|
||||
Object extraTextExtra = extras.get(TEXT_KEY);
|
||||
if (extraTextExtra != null) extraText = extraTextExtra.toString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user