aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/services/NotificationService.java1
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationsActivity.java1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java
index ede62630c..03e51bef8 100644
--- a/src/main/java/de/pixart/messenger/services/NotificationService.java
+++ b/src/main/java/de/pixart/messenger/services/NotificationService.java
@@ -199,7 +199,6 @@ public class NotificationService {
final boolean isScreenOn = mXmppConnectionService.isInteractive();
if (this.mIsInForeground && isScreenOn && this.mOpenConversation == message.getConversation()) {
Log.d(Config.LOGTAG, message.getConversation().getAccount().getJid().asBareJid() + ": suppressing notification because conversation is open");
- mXmppConnectionService.vibrate();
return;
}
if (this.mIsInForeground && isScreenOn) {
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 988f247f0..cf3dd7462 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2124,6 +2124,7 @@ public class XmppConnectionService extends Service {
switchToForeground();
}
this.mOnConversationUpdates.add(listener);
+ Log.d(Config.LOGTAG, "XmppConnectionService setOnConversationListChangedListener(): setIsInForeground = " + (this.mOnConversationUpdates.size() > 0));
this.mNotificationService.setIsInForeground(this.mOnConversationUpdates.size() > 0);
}
}
@@ -2131,6 +2132,7 @@ public class XmppConnectionService extends Service {
public void removeOnConversationListChangedListener(OnConversationUpdate listener) {
synchronized (this) {
this.mOnConversationUpdates.remove(listener);
+ Log.d(Config.LOGTAG, "XmppConnectionService removeOnConversationListChangedListener(): setIsInForeground = " + (this.mOnConversationUpdates.size() > 0));
this.mNotificationService.setIsInForeground(this.mOnConversationUpdates.size() > 0);
if (checkListeners()) {
switchToBackground();
@@ -2321,6 +2323,7 @@ public class XmppConnectionService extends Service {
}
}
}
+ Log.d(Config.LOGTAG, "XmppConnectionService switchToBackground(): setIsInForeground = false");
this.mNotificationService.setIsInForeground(false);
Log.d(Config.LOGTAG, "app switched into background");
}
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
index 686d435bb..590b93d6c 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
@@ -145,6 +145,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
if (performRedirectIfNecessary(true)) {
return;
}
+ Log.d(Config.LOGTAG, "ConversationsActivity onBackendConnected(): setIsInForeground = true");
xmppConnectionService.getNotificationService().setIsInForeground(true);
final Intent FirstStartIntent = getIntent();