From 99989cd1d52bda9016d21df8f1d876c569498135 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sat, 17 Jan 2015 23:41:57 -0500 Subject: [PATCH] Add some Android 21 notification features --- .../eu/siacs/conversations/services/NotificationService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index 8c3aff16c..4355dba00 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -203,6 +203,10 @@ public class NotificationService { mBuilder.setSound(Uri.parse(ringtone)); } } + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + mBuilder.setCategory(Notification.CATEGORY_MESSAGE); + mBuilder.setColor(mXmppConnectionService.getResources().getColor(R.color.primary)); + } mBuilder.setSmallIcon(R.drawable.ic_notification); mBuilder.setDeleteIntent(createDeleteIntent()); mBuilder.setLights(0xffffffff, 2000, 4000);