Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into homeActivityTestRuleLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 14, 2024
2 parents e57d9fb + 4b64f85 commit 02330b3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// These lines are generated by android-components/automation/application-services-nightly-bump.py
val VERSION = "125.20240313050306"
val VERSION = "125.20240314050318"
val CHANNEL = ApplicationServicesChannel.NIGHTLY

object ApplicationServicesConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object Gecko {
/**
* GeckoView Version.
*/
const val version = "125.0.20240313213325"
const val version = "125.0.20240314092545"

/**
* GeckoView channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

package org.mozilla.fenix.helpers

import android.util.Log
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.helpers.Constants.TAG
import org.mozilla.fenix.helpers.ETPPolicy.CUSTOM
import org.mozilla.fenix.helpers.ETPPolicy.STANDARD
import org.mozilla.fenix.helpers.ETPPolicy.STRICT
Expand Down Expand Up @@ -68,11 +70,15 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper {
override var composeTopSitesEnabled: Boolean by updatedFeatureFlags::composeTopSitesEnabled

override fun applyFlagUpdates() {
Log.i(TAG, "applyFlagUpdates: Trying to apply the updated feature flags: $updatedFeatureFlags")
applyFeatureFlags(updatedFeatureFlags)
Log.i(TAG, "applyFlagUpdates: Applied the updated feature flags: $updatedFeatureFlags")
}

override fun resetAllFeatureFlags() {
Log.i(TAG, "resetAllFeatureFlags: Trying to reset the feature flags to: $initialFeatureFlags")
applyFeatureFlags(initialFeatureFlags)
Log.i(TAG, "resetAllFeatureFlags: Performed feature flags reset to: $initialFeatureFlags")
}

override var isDeleteSitePermissionsEnabled: Boolean by updatedFeatureFlags::isDeleteSitePermissionsEnabled
Expand Down Expand Up @@ -122,9 +128,14 @@ internal fun getETPPolicy(settings: Settings): ETPPolicy {

private fun setETPPolicy(policy: ETPPolicy) {
when (policy) {
STRICT -> settings.setStrictETP()
STRICT -> {
Log.i(TAG, "setETPPolicy: Trying to set ETP policy to: \"Strict\"")
settings.setStrictETP()
Log.i(TAG, "setETPPolicy: ETP policy was set to: \"Strict\"")
}
// The following two cases update ETP in the same way "setStrictETP" does.
STANDARD -> {
Log.i(TAG, "setETPPolicy: Trying to set ETP policy to: \"Standard\"")
settings.preferences.edit()
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
Expand All @@ -139,8 +150,10 @@ private fun setETPPolicy(policy: ETPPolicy) {
true,
)
.commit()
Log.i(TAG, "setETPPolicy: ETP policy was set to: \"Standard\"")
}
CUSTOM -> {
Log.i(TAG, "setETPPolicy: Trying to set ETP policy to: \"Custom\"")
settings.preferences.edit()
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
Expand All @@ -155,19 +168,23 @@ private fun setETPPolicy(policy: ETPPolicy) {
true,
)
.commit()
Log.i(TAG, "setETPPolicy: ETP policy was set to: \"Custom\"")
}
}
}

private fun getHomeOnboardingVersion(): Int {
Log.i(TAG, "getHomeOnboardingVersion: Trying to get the onboarding version")
return FenixOnboarding(appContext)
.preferences
.getInt(FenixOnboarding.LAST_VERSION_ONBOARDING_KEY, 0)
}

private fun setHomeOnboardingVersion(version: Int) {
Log.i(TAG, "setHomeOnboardingVersion: Trying to set the onboarding version to: $version")
FenixOnboarding(appContext)
.preferences.edit()
.putInt(FenixOnboarding.LAST_VERSION_ONBOARDING_KEY, version)
.commit()
Log.i(TAG, "setHomeOnboardingVersion: Onboarding version was set to: $version")
}

0 comments on commit 02330b3

Please sign in to comment.