2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Add version check

This commit is contained in:
Nicolas Fella
2019-04-18 01:34:00 +02:00
parent 6f0ed846b8
commit b375d79653

View File

@@ -267,8 +267,14 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
actions.put(key, new LinkedList<>());
JSONArray jsonArray = new JSONArray();
for (Notification.Action action : notification.actions) {
if (null == action.title || (action.getRemoteInputs() != null && action.getRemoteInputs().length > 0))
if (null == action.title)
continue;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH)
if (action.getRemoteInputs() != null && action.getRemoteInputs().length > 0)
continue;
jsonArray.put(action.title.toString());
actions.get(key).add(action);
}