1
0
Fork 0

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

master
Sawyer Blatz 2020-02-07 07:22:37 -08:00 committed by GitHub
parent 29522d29ed
commit 0a6881d470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 23 deletions

View File

@ -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.
*/

View File

@ -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() {

View File

@ -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

View File

@ -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"