From 2dd8896dc2516eb22b09de432d24922e7a5fab12 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 19 Oct 2023 08:52:25 +0200 Subject: [PATCH] stop service on log out when UI is not active --- .../eu/siacs/conversations/services/XmppConnectionService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 4bdc8c7c1..2049f9b95 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -859,6 +859,9 @@ public class XmppConnectionService extends Service { return START_STICKY; case ACTION_TEMPORARILY_DISABLE: toggleSoftDisabled(true); + if (checkListeners()) { + stopSelf(); + } return START_NOT_STICKY; } manageAccountConnectionStates(action, intent == null ? null : intent.getExtras());