stop the service in time

This commit is contained in:
Max Lv
2014-02-24 12:41:14 +08:00
parent 4bbbc6b730
commit a21a4d24fa
5 changed files with 44 additions and 4 deletions
@@ -326,6 +326,11 @@ class Shadowsocks
override def onServiceDisconnected(name: ComponentName) {
switchButton.setEnabled(false)
try {
bgService.unregisterCallback(callback)
} catch {
case ignored: RemoteException => // Nothing
}
bgService = null
}
}