aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-01 21:51:46 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-06-01 21:51:46 +0200
commite43a01159cc511e674ccdfccc3f7fa5f118d4a83 (patch)
tree3435f388cf216a5174fc584a0bfca2d8f512a15e /src/main/java/eu
parent45cc33ca36566ed05691a7bf06cf42193e9a6c5e (diff)
deactive grace period when receiving screen on action
Diffstat (limited to 'src/main/java/eu')
-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)) {