stop service on log out when UI is not active

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 3 
1 file changed, 3 insertions(+)

Detailed changes

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());