2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +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:
Nicolas Fella 2018-01-06 16:05:39 +01:00
parent fdaa632a39
commit 45bac893d9

View File

@ -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();