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:
parent
fdaa632a39
commit
45bac893d9
@ -289,7 +289,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
try {
|
try {
|
||||||
Bundle extras = notification.extras;
|
Bundle extras = notification.extras;
|
||||||
title = extras.getCharSequence(TITLE_KEY).toString();
|
title = extras.getString(TITLE_KEY);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.w("NotificationPlugin", "problem parsing notification extras for " + notification.tickerText);
|
Log.w("NotificationPlugin", "problem parsing notification extras for " + notification.tickerText);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -372,7 +372,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
try {
|
try {
|
||||||
Bundle extras = notification.extras;
|
Bundle extras = notification.extras;
|
||||||
String extraTitle = extras.getCharSequence(TITLE_KEY).toString();
|
String extraTitle = extras.getString(TITLE_KEY);
|
||||||
String extraText = null;
|
String extraText = null;
|
||||||
Object extraTextExtra = extras.get(TEXT_KEY);
|
Object extraTextExtra = extras.get(TEXT_KEY);
|
||||||
if (extraTextExtra != null) extraText = extraTextExtra.toString();
|
if (extraTextExtra != null) extraText = extraTextExtra.toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user