Skip to content
Snippets Groups Projects
Commit d70f18b8 authored by Charles Lombardo's avatar Charles Lombardo
Browse files

android: Prevent setup fragment crash in background

Sometimes during onSaveInstanceState, the SetupFragment would crash the app in the background if we tried to store the state of a view.
parent ec388622
No related branches found
No related tags found
No related merge requests found
......@@ -295,8 +295,10 @@ class SetupFragment : Fragment() {
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putBoolean(KEY_NEXT_VISIBILITY, binding.buttonNext.isVisible)
outState.putBoolean(KEY_BACK_VISIBILITY, binding.buttonBack.isVisible)
if (_binding != null) {
outState.putBoolean(KEY_NEXT_VISIBILITY, binding.buttonNext.isVisible)
outState.putBoolean(KEY_BACK_VISIBILITY, binding.buttonBack.isVisible)
}
outState.putBooleanArray(KEY_HAS_BEEN_WARNED, hasBeenWarned)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment