mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-28 12:47:43 +00:00
Fixed exception while handling notifications
Summary: An exception occurred while processing non-repliable notifications Test Plan: Send a non-repliable notification, look in log for exception Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: apol, albertvaka, #kde_connect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D6740
This commit is contained in:
parent
c62a4bb4c4
commit
2ffeab0c5e
@ -323,6 +323,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
Boolean reply = false;
|
Boolean reply = false;
|
||||||
|
|
||||||
//works for WhatsApp, but not for Telegram
|
//works for WhatsApp, but not for Telegram
|
||||||
|
if(statusBarNotification.getNotification().actions!=null) {
|
||||||
for (Notification.Action act : statusBarNotification.getNotification().actions) {
|
for (Notification.Action act : statusBarNotification.getNotification().actions) {
|
||||||
if (act != null && act.getRemoteInputs() != null) {
|
if (act != null && act.getRemoteInputs() != null) {
|
||||||
repliableNotification.remoteInputs.addAll(Arrays.asList(act.getRemoteInputs()));
|
repliableNotification.remoteInputs.addAll(Arrays.asList(act.getRemoteInputs()));
|
||||||
@ -335,6 +336,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
repliableNotification.packageName = statusBarNotification.getPackageName();
|
repliableNotification.packageName = statusBarNotification.getPackageName();
|
||||||
|
|
||||||
repliableNotification.tag = statusBarNotification.getTag();//TODO find how to pass Tag with sending PendingIntent, might fix Hangout problem
|
repliableNotification.tag = statusBarNotification.getTag();//TODO find how to pass Tag with sending PendingIntent, might fix Hangout problem
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
Log.w("NotificationPlugin","problem extracting notification wear for " + statusBarNotification.getNotification().tickerText);
|
Log.w("NotificationPlugin","problem extracting notification wear for " + statusBarNotification.getNotification().tickerText);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user