* For #2477 - Removes the feature flag for Force Enable Zoom * For #2477 - Fixes bug where zoom preference doesnt persist between launchesmaster
parent
dba2186e86
commit
54773afb68
|
@ -34,8 +34,6 @@ object FeatureFlags {
|
||||||
*/
|
*/
|
||||||
val progressiveWebApps = Config.channel.isNightlyOrDebug
|
val progressiveWebApps = Config.channel.isNightlyOrDebug
|
||||||
|
|
||||||
val forceZoomPreference = Config.channel.isNightlyOrDebug
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gives option in Settings to see logins and sync logins
|
* Gives option in Settings to see logins and sync logins
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -69,7 +69,8 @@ class Core(private val context: Context) {
|
||||||
automaticFontSizeAdjustment = context.settings().shouldUseAutoSize,
|
automaticFontSizeAdjustment = context.settings().shouldUseAutoSize,
|
||||||
fontInflationEnabled = context.settings().shouldUseAutoSize,
|
fontInflationEnabled = context.settings().shouldUseAutoSize,
|
||||||
suspendMediaWhenInactive = !FeatureFlags.mediaIntegration,
|
suspendMediaWhenInactive = !FeatureFlags.mediaIntegration,
|
||||||
allowAutoplayMedia = context.settings().isAutoPlayEnabled
|
allowAutoplayMedia = context.settings().isAutoPlayEnabled,
|
||||||
|
forceUserScalableContent = context.settings().forceEnableZoom
|
||||||
)
|
)
|
||||||
|
|
||||||
GeckoEngine(context, defaultSettings, GeckoProvider.getOrCreateRuntime(context)).also {
|
GeckoEngine(context, defaultSettings, GeckoProvider.getOrCreateRuntime(context)).also {
|
||||||
|
|
|
@ -8,7 +8,6 @@ import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.SwitchPreference
|
import androidx.preference.SwitchPreference
|
||||||
import org.mozilla.fenix.FeatureFlags
|
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.getPreferenceKey
|
import org.mozilla.fenix.ext.getPreferenceKey
|
||||||
|
@ -29,18 +28,15 @@ class AccessibilityFragment : PreferenceFragmentCompat() {
|
||||||
val forceZoomPreference = findPreference<SwitchPreference>(
|
val forceZoomPreference = findPreference<SwitchPreference>(
|
||||||
getPreferenceKey(R.string.pref_key_accessibility_force_enable_zoom)
|
getPreferenceKey(R.string.pref_key_accessibility_force_enable_zoom)
|
||||||
)
|
)
|
||||||
forceZoomPreference?.isVisible = FeatureFlags.forceZoomPreference
|
|
||||||
|
|
||||||
if (FeatureFlags.forceZoomPreference) {
|
forceZoomPreference?.setOnPreferenceChangeListener<Boolean> { preference, shouldForce ->
|
||||||
forceZoomPreference?.setOnPreferenceChangeListener<Boolean> { preference, shouldForce ->
|
val settings = preference.context.settings()
|
||||||
val settings = preference.context.settings()
|
val components = preference.context.components
|
||||||
val components = preference.context.components
|
|
||||||
|
|
||||||
settings.forceEnableZoom = shouldForce
|
settings.forceEnableZoom = shouldForce
|
||||||
components.core.engine.settings.forceUserScalableContent = shouldForce
|
components.core.engine.settings.forceUserScalableContent = shouldForce
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val textSizePreference = findPreference<TextPercentageSeekBarPreference>(
|
val textSizePreference = findPreference<TextPercentageSeekBarPreference>(
|
||||||
|
|
|
@ -24,9 +24,4 @@
|
||||||
|
|
||||||
<!--suppress CheckTagEmptyBody This is a default value for places where we don't want a string set-->
|
<!--suppress CheckTagEmptyBody This is a default value for places where we don't want a string set-->
|
||||||
<string name="empty_string" translatable="false"></string>
|
<string name="empty_string" translatable="false"></string>
|
||||||
|
|
||||||
<!-- Title for Accessibility Force Enable Zoom Preference -->
|
|
||||||
<string name="preference_accessibility_force_enable_zoom" translatable="false">Zoom on all websites</string>
|
|
||||||
<!-- Summary for Accessibility Force Enable Zoom Preference -->
|
|
||||||
<string name="preference_accessibility_force_enable_zoom_summary" translatable="false">Enable to allow pinch and zoom, even on websites that prevent this gesture.</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1014,6 +1014,10 @@
|
||||||
<string name="logins_warning_dialog_set_up_now">Set up now</string>
|
<string name="logins_warning_dialog_set_up_now">Set up now</string>
|
||||||
<!-- Title of PIN verification dialog to direct users to re-enter their device credentials to access their logins -->
|
<!-- Title of PIN verification dialog to direct users to re-enter their device credentials to access their logins -->
|
||||||
<string name="logins_biometric_prompt_message_pin">Unlock your device</string>
|
<string name="logins_biometric_prompt_message_pin">Unlock your device</string>
|
||||||
|
<!-- Title for Accessibility Force Enable Zoom Preference -->
|
||||||
|
<string name="preference_accessibility_force_enable_zoom">Zoom on all websites</string>
|
||||||
|
<!-- Summary for Accessibility Force Enable Zoom Preference -->
|
||||||
|
<string name="preference_accessibility_force_enable_zoom_summary">Enable to allow pinch and zoom, even on websites that prevent this gesture.</string>
|
||||||
|
|
||||||
<!-- Title of the Add search engine screen -->
|
<!-- Title of the Add search engine screen -->
|
||||||
<string name="search_engine_add_custom_search_engine_title">Add search engine</string>
|
<string name="search_engine_add_custom_search_engine_title">Add search engine</string>
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
android:key="@string/pref_key_accessibility_force_enable_zoom"
|
android:key="@string/pref_key_accessibility_force_enable_zoom"
|
||||||
android:summary="@string/preference_accessibility_force_enable_zoom_summary"
|
android:summary="@string/preference_accessibility_force_enable_zoom_summary"
|
||||||
android:title="@string/preference_accessibility_force_enable_zoom"
|
android:title="@string/preference_accessibility_force_enable_zoom"
|
||||||
app:isPreferenceVisible="false"
|
|
||||||
app:allowDividerAbove="true"
|
app:allowDividerAbove="true"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
Loading…
Reference in New Issue