mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 01:32:17 -05:00
log reason for not showing notification
This commit is contained in:
parent
85c82d9b3b
commit
37e7175a86
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user