Unverified Commit b3df7adb authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Merge branch 'bug_40100_00' into tor-browser-82.1.1-10.0-1

parents 35e95977 636f214a
......@@ -160,9 +160,11 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
runBlocking { megazordSetup.await(); }
}
GlobalScope.launch(Dispatchers.IO) {
// Give TAS the base Context
Prefs.setContext(applicationContext)
}
}
setupLeakCanary()
startMetricsIfEnabled()
......
......@@ -6,20 +6,24 @@ package org.mozilla.fenix.tor.bootstrap
import android.content.Context
import android.content.SharedPreferences
import android.os.StrictMode
import androidx.annotation.VisibleForTesting
import mozilla.components.support.ktx.android.content.PreferencesHolder
import mozilla.components.support.ktx.android.content.booleanPreference
import org.mozilla.fenix.ext.resetPoliciesAfter
class TorQuickStart(context: Context) : PreferencesHolder {
override val preferences: SharedPreferences = context.getSharedPreferences(
override val preferences: SharedPreferences = StrictMode.allowThreadDiskReads().resetPoliciesAfter {
context.getSharedPreferences(
PREF_NAME_TOR_BOOTSTRAP_KEY,
Context.MODE_PRIVATE
)
}
private var torQuickStart by booleanPreference(TOR_QUICK_START, default = false)
fun quickStartTor() = torQuickStart
fun quickStartTor() = StrictMode.allowThreadDiskReads().resetPoliciesAfter { torQuickStart }
fun enableQuickStartTor() {
torQuickStart = true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment