Use real search engine list always when faking the location provider (#205)

* Only use fallback search engine list when location is evantually expected

* Make the forkDebug build work again
pull/216/head
interfect 4 years ago committed by GitHub
parent 7a3cacf7f1
commit 2f22c97ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,12 +9,11 @@ import androidx.preference.PreferenceManager
import leakcanary.AppWatcher
import leakcanary.LeakCanary
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.resetPoliciesAfter
class DebugFenixApplication : FenixApplication() {
override fun setupLeakCanary() {
val isEnabled = StrictMode.allowThreadDiskReads().resetPoliciesAfter {
val isEnabled = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean(getPreferenceKey(R.string.pref_key_leakcanary), true)
}

@ -99,7 +99,7 @@ open class FenixSearchEngineProvider(
// the main one hasn't completed yet
private val searchEngines: Deferred<SearchEngineList>
get() =
if (isRegionCachedByLocationService) {
if (isRegionCachedByLocationService || shouldMockMLS) {
loadedSearchEngines
} else {
fallbackEngines

Loading…
Cancel
Save