parent
9729fd494e
commit
c8af16bd47
|
@ -55,4 +55,9 @@ object FeatureFlags {
|
|||
* Gives option in Settings to Delete Browsing Data on new menu option Quit
|
||||
*/
|
||||
val deleteDataOnQuit = nightly or debug
|
||||
|
||||
/**
|
||||
* Gives option in Settings to disable auto play media
|
||||
*/
|
||||
val autoPlayMedia = nightly or debug
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ 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,6 +37,18 @@ 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() {
|
||||
|
|
|
@ -20,6 +20,7 @@ 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.components.metrics.MozillaProductDetector
|
||||
import org.mozilla.fenix.ext.getPreferenceKey
|
||||
|
@ -118,9 +119,10 @@ class Settings private constructor(
|
|||
default = true
|
||||
)
|
||||
|
||||
// If autoPlayMedia is flagged OFF, default to true here
|
||||
val isAutoPlayEnabled = getSitePermissionsPhoneFeatureAction(
|
||||
PhoneFeature.AUTOPLAY, Action.BLOCKED
|
||||
) != Action.BLOCKED
|
||||
) != Action.BLOCKED || !FeatureFlags.autoPlayMedia
|
||||
|
||||
private var trackingProtectionOnboardingShownThisSession = false
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
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"/>
|
||||
android:summary="@string/preference_option_autoplay_blocked"
|
||||
app:isPreferenceVisible="false"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_camera_enabled"
|
||||
|
|
|
@ -157,7 +157,7 @@ The following metrics are added to the ping:
|
|||
| Name | Type | Description | Data reviews | Extras | Expiration |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| experiments.metrics.active_experiment |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |Records the branch name of the active experiment, if the client is enrolled in the `fenix-test-2019-08-05` experiment. This is intended to validate that the service-experiments library properly matches clients to experiments and can take action based on a multi-branched experiment. This is done by recording the experiment branch name in this string metric which allows the experiment to be transparent and unobtrusive to the user. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1543986#c4)||2019-11-01 |
|
||||
| metrics.campaign |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |A string containing the Adjust campaign id from which the user installed Fenix |[1](https://github.com/mozilla-mobile/fenix/pull/TODO)||2020-03-01 |
|
||||
| metrics.adjust_campaign |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |A string containing the Adjust campaign ID from which the user installed Fenix |[1](https://github.com/mozilla-mobile/fenix/pull/5579)||2020-03-01 |
|
||||
| metrics.default_browser |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Is Fenix the default browser? |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673)||2020-03-01 |
|
||||
| metrics.default_moz_browser |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The name of the default browser on device if and only if it's a Mozilla owned product |[1](https://github.com/mozilla-mobile/fenix/pull/1953/), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 |
|
||||
| metrics.mozilla_products |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |A list of all the Mozilla products installed on device. We currently scan for: Firefox, Firefox Beta, Firefox Aurora, Firefox Nightly, Firefox Fdroid, Firefox Lite, Reference Browser, Reference Browser Debug, Fenix, Focus, and Lockwise. |[1](https://github.com/mozilla-mobile/fenix/pull/1953/), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 |
|
||||
|
|
Loading…
Reference in New Issue
Block a user