[fenix] For https://github.com/mozilla-mobile/fenix/issues/11875 - Prevent mixup...
commitf085b0fd329e40042b0c145ae43aabd1897aaad3
authorMugurell <Mugurell@users.noreply.github.com>
Mon, 6 Jul 2020 17:06:21 +0000 (6 20:06 +0300)
committerMugurell <Mugurell@users.noreply.github.com>
Mon, 13 Jul 2020 10:41:34 +0000 (13 13:41 +0300)
treef7da061759bcaaa290b44140b37d3ef25bf2a9ba
parent2e8ad98a2c811bdf3cd8fb77a5a9fe9e00d6239a
[fenix] For https://github.com/mozilla-mobile/fenix/issues/11875 - Prevent mixup of region / locale based search engines

We have two search engine types:
- one based on MLS reported region,
- one based only on Locale.

There are multiple steps involved in returning the default search engine for
example and though at each step we could verify if a certain operation is
completed we are still exposed to concurrency issues.
Simplest and most effective way to make sure the MLS engines do not mix with
Locale based engines is to use the same type of engines for the entire duration
of the app. At the next cold start we'll verify again which engines to use.

Using the Locale based engines (fallbacks) is expected to only happen once, at
the first run of the application after being installed.
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/searchengine/FenixSearchEngineProvider.kt