From 45bac893d9ab7c70bc8d74d87a0505dc42a60804 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sat, 6 Jan 2018 16:05:39 +0100 Subject: [PATCH] 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 --- .../Plugins/NotificationsPlugin/NotificationsPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java index 0d1db1a9..dc1989bf 100644 --- a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java +++ b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java @@ -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();