diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-06-02 20:39:59 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-02 20:39:59 +0200 |
commit | b082f919d73291c0bd832154af9b7b68f7d9f8e0 (patch) | |
tree | aea71ca6d12519135b5cff04fcbff004e9c567b5 /src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | 41d3b019d1618a00f4fe40371b0f339d8cc193d6 (diff) | |
parent | 25211f13b37ecef64d6fa9a382a2c30d212452ae (diff) |
Merge remote-tracking branch 'refs/remotes/siacs/master'
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 9 |
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 b50b8eec7..79f4d51f3 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -540,8 +540,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(); } @@ -3054,6 +3055,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)) { |