From b2294483a8cac42e712277ce80e462b952bfcf63 Mon Sep 17 00:00:00 2001 From: Arturo Mejia Date: Tue, 21 May 2019 11:27:48 -0400 Subject: [PATCH] Updated tracking protectionPolicy to the recommend one. --- CHANGELOG.md | 2 +- app/src/main/java/org/mozilla/fenix/components/Core.kt | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8889801b9d..92e223df0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,5 +55,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #1599 - Fixed a crash creating a bookmark for a custom tab - #1414 - Fixed site permissions settings getting reset in Android 6. - #1994 - Made app state persist better when rotating the screen - +- [AC #2725](https://github.com/mozilla-mobile/android-components/issues/2725) Updated tracking protectionPolicy to [recommend](https://github.com/mozilla-mobile/android-components/blob/master/components/concept/engine/src/main/java/mozilla/components/concept/engine/EngineSession.kt#L156) ### Removed diff --git a/app/src/main/java/org/mozilla/fenix/components/Core.kt b/app/src/main/java/org/mozilla/fenix/components/Core.kt index a8e775ab40..8e6a7273d7 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Core.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -21,6 +21,7 @@ import mozilla.components.browser.storage.sync.PlacesHistoryStorage import mozilla.components.concept.engine.DefaultSettings import mozilla.components.concept.engine.Engine import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy +import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy.Companion.SAFE_BROWSING_ALL import mozilla.components.concept.engine.mediaquery.PreferredColorScheme import mozilla.components.concept.fetch.Client import mozilla.components.feature.session.HistoryDelegate @@ -152,17 +153,13 @@ class Core(private val context: Context) { normalMode: Boolean = Settings.getInstance(context).shouldUseTrackingProtection, privateMode: Boolean = true ): TrackingProtectionPolicy { - val trackingProtectionPolicy = TrackingProtectionPolicy.select( - TrackingProtectionPolicy.AD, - TrackingProtectionPolicy.ANALYTICS, - TrackingProtectionPolicy.SOCIAL - ) + val trackingProtectionPolicy = TrackingProtectionPolicy.recommended() return when { normalMode && privateMode -> trackingProtectionPolicy normalMode && !privateMode -> trackingProtectionPolicy.forRegularSessionsOnly() !normalMode && privateMode -> trackingProtectionPolicy.forPrivateSessionsOnly() - else -> TrackingProtectionPolicy.none() + else -> TrackingProtectionPolicy.select(SAFE_BROWSING_ALL) } }