1
0
Fork 0

For #220 - Removes feature flag for language picker (#9191)

* For #220 - Removes feature flag for language picker

* For #220 - Updates Android Components
master
Jeff Boek 2020-04-06 14:29:52 -07:00 committed by GitHub
parent 39791a9f42
commit c632b93ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 13 deletions

View File

@ -36,9 +36,9 @@ object FeatureFlags {
val dynamicBottomToolbar = Config.channel.isNightlyOrDebug
/**
* Enables the new language picker
* Enables deleting individual tracking protection exceptions.
*/
val fenixLanguagePicker = Config.channel.isNightlyOrDebug
val deleteIndividualTrackingProtectionExceptions = Config.channel.isNightlyOrDebug
/**
* Integration of push support provided by `feature-push` component into the Gecko engine.

View File

@ -31,7 +31,6 @@ import mozilla.components.concept.sync.OAuthAccount
import mozilla.components.concept.sync.Profile
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.Config
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
@ -116,7 +115,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.preferences, rootKey)
updatePreferenceVisibilityForFeatureFlags()
}
override fun onResume() {
@ -177,12 +175,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
}
}
private fun updatePreferenceVisibilityForFeatureFlags() {
findPreference<Preference>(getPreferenceKey(R.string.pref_key_language))?.apply {
isVisible = FeatureFlags.fenixLanguagePicker
}
}
@Suppress("ComplexMethod", "LongMethod")
override fun onPreferenceTreeClick(preference: Preference): Boolean {
// Hide the scrollbar so the animation looks smoother

View File

@ -15,7 +15,7 @@ import java.util.Locale
*/
fun LocaleManager.getSupportedLocales(): List<Locale> {
val resultLocaleList: MutableList<Locale> = ArrayList()
resultLocaleList.add(0, getSystemDefault() ?: Locale.getDefault())
resultLocaleList.add(0, getSystemDefault())
resultLocaleList.addAll(BuildConfig.SUPPORTED_LOCALE_ARRAY
.toList()
@ -37,7 +37,7 @@ fun LocaleManager.getSelectedLocale(
localeList: List<Locale> = getSupportedLocales()
): Locale {
val selectedLocale = getCurrentLocale(context)?.toLanguageTag()
val defaultLocale = getSystemDefault() ?: Locale.getDefault()
val defaultLocale = getSystemDefault()
return if (selectedLocale == null) {
defaultLocale

View File

@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
object AndroidComponents {
const val VERSION = "38.0.20200406130135"
const val VERSION = "38.0.20200406190117"
}