1
0
Fork 0

For #220 - Puts language picker behind a feature flag

master
Jeff Boek 2020-01-16 15:05:01 -08:00
parent 60e3bb3126
commit 6789df55a5
4 changed files with 13 additions and 1 deletions

View File

@ -53,4 +53,9 @@ object FeatureFlags {
* Disables FxA Application Services Pairing feature
*/
const val asFeatureFxAPairingDisabled = false
/**
* Enables the new language picker
*/
val fenixLanguagePicker = Config.channel.isNightlyOrDebug
}

View File

@ -185,6 +185,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
findPreference<Preference>(getPreferenceKey(pref_key_passwords))?.apply {
isVisible = FeatureFlags.logins
}
findPreference<PreferenceCategory>(getPreferenceKey(R.string.pref_key_advanced))?.apply {
isVisible = FeatureFlags.fenixLanguagePicker
}
}
@Suppress("ComplexMethod", "LongMethod")

View File

@ -14,6 +14,7 @@
<string name="pref_key_accessibility_auto_size" translatable="false">pref_key_accessibility_auto_size</string>
<string name="pref_key_accessibility_font_scale" translatable="false">pref_key_accessibility_font_scale</string>
<string name="pref_key_accessibility_force_enable_zoom" translatable="false">pref_key_accessibility_force_enable_zoom</string>
<string name="pref_key_advanced" translatable="false">pref_key_advanced</string>
<string name="pref_key_language" translatable="false">pref_key_language</string>
<string name="pref_key_data_choices" translatable="false">pref_key_data_choices</string>
<string name="pref_key_privacy_link" translatable="false">pref_key_privacy_link</string>

View File

@ -103,7 +103,9 @@
<PreferenceCategory
android:title="@string/preferences_category_advanced"
app:iconSpaceReserved="false">
app:iconSpaceReserved="false"
android:key="@string/pref_key_advanced"
app:isPreferenceVisible="false">
<androidx.preference.Preference
android:icon="@drawable/ic_language"
android:key="@string/pref_key_language"