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();
|
refreshAllPresences();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Intent.ACTION_SCREEN_OFF:
|
|
||||||
case Intent.ACTION_SCREEN_ON:
|
case Intent.ACTION_SCREEN_ON:
|
||||||
|
deactivateGracePeriod();
|
||||||
|
case Intent.ACTION_SCREEN_OFF:
|
||||||
if (awayWhenScreenOff()) {
|
if (awayWhenScreenOff()) {
|
||||||
refreshAllPresences();
|
refreshAllPresences();
|
||||||
}
|
}
|
||||||
|
@ -3059,6 +3060,12 @@ public class XmppConnectionService extends Service {
|
||||||
sendPresencePacket(account, packet);
|
sendPresencePacket(account, packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void deactivateGracePeriod() {
|
||||||
|
for(Account account : getAccounts()) {
|
||||||
|
account.deactivateGracePeriod();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void refreshAllPresences() {
|
public void refreshAllPresences() {
|
||||||
for (Account account : getAccounts()) {
|
for (Account account : getAccounts()) {
|
||||||
if (!account.isOptionSet(Account.OPTION_DISABLED)) {
|
if (!account.isOptionSet(Account.OPTION_DISABLED)) {
|
||||||
|
|
Loading…
Reference in a new issue