Ignore exceptions while unbinding service

This commit is contained in:
Mygod
2016-07-08 12:58:11 +08:00
parent 197819e725
commit 929b8c94ae
@@ -69,7 +69,9 @@ trait ServiceBoundContext extends Context with IBinder.DeathRecipient {
unregisterCallback
callback = null
if (connection != null) {
unbindService(connection)
try unbindService(connection) catch {
case _: IllegalArgumentException => // ignore
}
connection = null
}
if (binder != null) {