aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 68ad6536..06ecb22b 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -545,8 +545,9 @@ public class XmppConnectionService extends Service {
refreshAllPresences();
}
break;
- case Intent.ACTION_SCREEN_OFF:
case Intent.ACTION_SCREEN_ON:
+ deactivateGracePeriod();
+ case Intent.ACTION_SCREEN_OFF:
if (awayWhenScreenOff()) {
refreshAllPresences();
}
@@ -3059,6 +3060,12 @@ public class XmppConnectionService extends Service {
sendPresencePacket(account, packet);
}
+ private void deactivateGracePeriod() {
+ for(Account account : getAccounts()) {
+ account.deactivateGracePeriod();
+ }
+ }
+
public void refreshAllPresences() {
for (Account account : getAccounts()) {
if (!account.isOptionSet(Account.OPTION_DISABLED)) {