mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-04 15:52:34 -08:00
fix: Null when unbind service
This commit is contained in:
1 parent
d46f48f317
commit
68430ef62c
1 file changed
+8
-3
@@ -299,10 +299,15 @@ class DatabaseTaskProvider(
|
||||
* Unbind the service and assign null to the service connection to check if already unbind or not
|
||||
*/
|
||||
private fun unBindService() {
|
||||
serviceConnection?.let {
|
||||
context.unbindService(it)
|
||||
try {
|
||||
serviceConnection?.let {
|
||||
context.unbindService(it)
|
||||
}
|
||||
} catch (e: java.lang.Exception) {
|
||||
Log.e(TAG, "Unable to unbind the database task service", e)
|
||||
} finally {
|
||||
serviceConnection = null
|
||||
}
|
||||
serviceConnection = null
|
||||
}
|
||||
|
||||
fun registerProgressTask() {
|
||||
|
||||
Reference in new issue
Block a user