diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-06-19 11:04:59 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-20 21:03:28 +0200 |
commit | 5fe94d45dec1f34e50fb9039d90fbe8ae5b714ff (patch) | |
tree | 60913412d329868faf2c43cccfa732206fc861b6 | |
parent | 5f5cdd8696098a5a1d0fd7bc95dbb6995152e0ac (diff) |
log reason for not showing notification
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/NotificationService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index f9da1ee95..9e6f12dbc 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -16,6 +16,7 @@ import android.support.v4.app.NotificationCompat.Builder; import android.support.v4.app.TaskStackBuilder; import android.text.Html; import android.util.DisplayMetrics; +import android.util.Log; import org.json.JSONArray; import org.json.JSONObject; @@ -136,10 +137,12 @@ public class NotificationService { public void push(final Message message) { mXmppConnectionService.updateUnreadCountBadge(); if (!notify(message)) { + Log.d(Config.LOGTAG,message.getConversation().getAccount().getJid().toBareJid()+": suppressing notification because turned off"); return; } final boolean isScreenOn = mXmppConnectionService.isInteractive(); if (this.mIsInForeground && isScreenOn && this.mOpenConversation == message.getConversation()) { + Log.d(Config.LOGTAG,message.getConversation().getAccount().getJid().toBareJid()+": suppressing notification because conversation is open"); return; } synchronized (notifications) { |