Commit 30c8c7e6 authored by Mygod's avatar Mygod

Fix wrong thread error in binderDied

parent dadeffa9
...@@ -172,11 +172,11 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe ...@@ -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, (_ => 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) if (state == State.STOPPED) app.editor.putBoolean(Key.isNAT, false).apply()): View.OnClickListener)
override def binderDied() { override def binderDied(): Unit = handler.post(() => {
detachService() detachService()
app.crashRecovery() app.crashRecovery()
attachService(callback) attachService(callback)
} })
override def onActivityResult(requestCode: Int, resultCode: Int, data: Intent): Unit = resultCode match { override def onActivityResult(requestCode: Int, resultCode: Int, data: Intent): Unit = resultCode match {
case Activity.RESULT_OK => bgService.use(app.profileId) case Activity.RESULT_OK => bgService.use(app.profileId)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment