Unverified Commit 0a6881d4 authored by Sawyer Blatz's avatar Sawyer Blatz Committed by GitHub
Browse files

For #255: Removes autoplay media feature flag (#8198)

parent 29522d29
......@@ -24,11 +24,6 @@ object FeatureFlags {
*/
const val mediaIntegration = true
/**
* Gives option in Settings to disable auto play media
*/
val autoPlayMedia = Config.channel.isNightlyOrDebug
/**
* Allows Progressive Web Apps to be installed to the device home screen.
*/
......
......@@ -9,7 +9,6 @@ import androidx.navigation.Navigation
import androidx.preference.Preference
import androidx.preference.Preference.OnPreferenceClickListener
import androidx.preference.PreferenceFragmentCompat
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.settings
......@@ -36,18 +35,6 @@ class SitePermissionsFragment : PreferenceFragmentCompat() {
private fun setupPreferences() {
bindCategoryPhoneFeatures()
bindExceptions()
if (FeatureFlags.autoPlayMedia) {
displayAutoplayPreference()
}
}
private fun displayAutoplayPreference() {
findPreference<Preference>(
getPreferenceKey(R.string.pref_key_browser_feature_autoplay)
)?.apply {
isVisible = true
}
}
private fun bindExceptions() {
......
......@@ -22,7 +22,6 @@ import mozilla.components.support.ktx.android.content.longPreference
import mozilla.components.support.ktx.android.content.stringPreference
import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.Config
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.R
import org.mozilla.fenix.browser.browsingmode.BrowsingMode
import org.mozilla.fenix.components.metrics.Event
......@@ -128,10 +127,9 @@ class Settings private constructor(
default = true
)
// If autoPlayMedia is flagged OFF, default to true here
val isAutoPlayEnabled = getSitePermissionsPhoneFeatureAction(
PhoneFeature.AUTOPLAY, Action.BLOCKED
) != Action.BLOCKED || !FeatureFlags.autoPlayMedia
) != Action.BLOCKED
private var trackingProtectionOnboardingShownThisSession = false
......
......@@ -9,8 +9,7 @@
android:icon="@drawable/ic_autoplay_enabled"
android:key="@string/pref_key_browser_feature_autoplay"
android:title="@string/preference_browser_feature_autoplay"
android:summary="@string/preference_option_autoplay_blocked"
app:isPreferenceVisible="false"/>
android:summary="@string/preference_option_autoplay_blocked"/>
<androidx.preference.Preference
android:icon="@drawable/ic_camera_enabled"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment