stop service on log out when UI is not active

This commit is contained in:
Daniel Gultsch 2023-10-19 08:52:25 +02:00
parent d1f648f2e3
commit 2dd8896dc2
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

@ -859,6 +859,9 @@ public class XmppConnectionService extends Service {
return START_STICKY; return START_STICKY;
case ACTION_TEMPORARILY_DISABLE: case ACTION_TEMPORARILY_DISABLE:
toggleSoftDisabled(true); toggleSoftDisabled(true);
if (checkListeners()) {
stopSelf();
}
return START_NOT_STICKY; return START_NOT_STICKY;
} }
manageAccountConnectionStates(action, intent == null ? null : intent.getExtras()); manageAccountConnectionStates(action, intent == null ? null : intent.getExtras());