Unregister USB permission broadcast receiver on activity destroy
This commit is contained in:
parent
72b68c844d
commit
4b67f41c74
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