Fix wrong thread error in binderDied

This commit is contained in:
Mygod
2017-01-24 16:58:55 +08:00
parent dadeffa903
commit 30c8c7e6eb
@@ -172,11 +172,11 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
private def addDisableNatToSnackbar(snackbar: Snackbar) = snackbar.setAction(R.string.switch_to_vpn, (_ =>
if (state == State.STOPPED) app.editor.putBoolean(Key.isNAT, false).apply()): View.OnClickListener)
override def binderDied() {
override def binderDied(): Unit = handler.post(() => {
detachService()
app.crashRecovery()
attachService(callback)
}
})
override def onActivityResult(requestCode: Int, resultCode: Int, data: Intent): Unit = resultCode match {
case Activity.RESULT_OK => bgService.use(app.profileId)