Skip to content
Snippets Groups Projects
Commit 29de7f4f authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Stop service when not in use

parent 22fd71a3
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,7 @@ class ChatActivity : ServiceBoundActivity() {
putBoolean(Keys.Status.reconnect, false)
}
backend.value?.disconnect(true)
stopService()
setResult(Activity.RESULT_OK)
finish()
}
......
......@@ -64,4 +64,9 @@ abstract class ServiceBoundActivity : AppCompatActivity() {
super.onStop()
unbindService(connection)
}
protected fun stopService() {
unbindService(connection)
stopService(Intent(this, QuasselService::class.java))
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment