mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
deactive grace period when receiving screen on action
This commit is contained in:
parent
45cc33ca36
commit
e43a01159c
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user