diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-08 05:59:31 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-08 05:59:31 +0100 |
commit | 9a5a429888409fb4e52432e86f8dca49d4e97cdb (patch) | |
tree | 85ffd05c59b6e7582a39e58c803c6349f8acba37 /src/eu/siacs/conversations/utils/UIHelper.java | |
parent | 02883a7ac43cf5014d0a938e18960d8888795ddb (diff) |
step two towards nicer notifications. mark read if carbon arrives
Diffstat (limited to 'src/eu/siacs/conversations/utils/UIHelper.java')
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index fecfaa61..7ae2b745 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -107,8 +107,8 @@ public class UIHelper { return bitmap; } - public static Notification getUnreadMessageNotification(Context context, - List<Conversation> conversations) { + public static Notification getNotification(Context context, + List<Conversation> conversations, boolean notify) { String targetUuid = ""; List<Conversation> unread = new ArrayList<Conversation>(); @@ -169,9 +169,11 @@ public class UIHelper { mBuilder.setStyle(style); } mBuilder.setSmallIcon(R.drawable.notification); - mBuilder.setLights(0xffffffff, 2000, 4000); - if (ringtone != null) { - mBuilder.setSound(Uri.parse(ringtone)); + if (notify) { + mBuilder.setLights(0xffffffff, 2000, 4000); + if (ringtone != null) { + mBuilder.setSound(Uri.parse(ringtone)); + } } TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); |