Skip to content
Snippets Groups Projects
Commit 1643c744 authored by clairehurst's avatar clairehurst
Browse files

fixup! TB 40041 [android]: Implement Tor Network Settings

#44042 Debug crash when opening settings too quickly after launching app. Clean up surrounding code
parent 32f432c8
Branches
Tags
1 merge request!1592Bug_44042: Fix debug crash when opening settings too quickly after launching app
Pipeline #300777 failed
......@@ -34,8 +34,10 @@ import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference
import androidx.recyclerview.widget.RecyclerView
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import mozilla.components.browser.state.state.selectedOrDefaultSearchEngine
import mozilla.components.concept.engine.Engine
import mozilla.components.concept.sync.AccountObserver
......@@ -189,8 +191,10 @@ class SettingsFragment : PreferenceFragmentCompat(), UserInteractionHandler {
}
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
runBlocking(context = Dispatchers.IO) {
setPreferencesFromResource(R.xml.preferences, rootKey)
}
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment