aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-19 11:04:59 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-06-19 11:04:59 +0200
commit37e7175a8681d108e074df9dc893882805cd239a (patch)
tree420771424b8dd782d422c479cf2920d925ba4ca2
parent85c82d9b3bd2cb84522f5b619acbde9136822de7 (diff)
log reason for not showing notification
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java3
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 a71848da..f28bab0d 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) {