🐛 Prevent ANR
This commit is contained in:
parent
0b432b6a67
commit
9cc07f73ae
@ -28,6 +28,7 @@ import ch.dissem.apps.abit.notification.NetworkNotification.Companion.NETWORK_NO
|
||||
import ch.dissem.apps.abit.util.Preferences
|
||||
import ch.dissem.bitmessage.BitmessageContext
|
||||
import ch.dissem.bitmessage.utils.Property
|
||||
import org.jetbrains.anko.doAsync
|
||||
|
||||
/**
|
||||
* Define a Service that returns an IBinder for the
|
||||
@ -87,7 +88,9 @@ class BitmessageService : Service() {
|
||||
running = false
|
||||
notification.showShutdown()
|
||||
cleanupHandler.removeCallbacks(cleanupTask)
|
||||
doAsync {
|
||||
bmc.cleanup()
|
||||
}
|
||||
unregisterReceiver(connectivityReceiver)
|
||||
stopSelf()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user