Unregister USB permission broadcast receiver on activity destroy
This commit is contained in:
parent
70eb530599
commit
270b97f2bc
1 changed files with 6 additions and 0 deletions
|
@ -62,6 +62,12 @@ class MainActivity : WizardActivity() {
|
|||
registerReceiver(mUsbReceiver, filter)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
|
||||
unregisterReceiver(mUsbReceiver)
|
||||
}
|
||||
|
||||
override fun goToNewFragment(fragment: WizardFragment) {
|
||||
StateKeeper.currentFragment?.onFragmentRemoving(this)
|
||||
|
||||
|
|
Loading…
Reference in a new issue