Support specifying network interface

Fix #15.
This commit is contained in:
Mygod
2018-06-02 07:29:46 +08:00
parent 8e335fec1b
commit da9bf4867e
14 changed files with 326 additions and 173 deletions

View File

@@ -115,9 +115,8 @@ class TetheringFragment : Fragment(), ServiceConnection {
}
override fun onServiceDisconnected(name: ComponentName?) {
val context = requireContext()
tetheringBinder?.fragment = null
(tetheringBinder ?: return).fragment = null
tetheringBinder = null
context.unregisterReceiver(receiver)
requireContext().unregisterReceiver(receiver)
}
}