mirror of
https://github.com/ironfox-oss/IronFox.git
synced 2026-04-19 22:47:39 -04:00
ironfox-oss/IronFox!109 ____ ## Changes - [Added missing Gecko icons/branding assets](90e371ec7c). - Added a toggle in settings that forces the browser to *always* use private mode *(similar to Firefox on Desktop)*. The setting is *disabled* by default, and is located at `Settings` -> `IronFox` -> `IronFox settings` -> `Privacy` -> **`Always use private browsing`**. - [Disabled Mozilla's new `Unified Trust Panel` by default](2eaa0c7c9a), as it prevents users from being able to control the cookie banner blocker on a per-site basis. - [Enabled Mozilla's new redesign for private browsing mode](43661d10a7) by default. - Fixed [an issue with `BankID` authentication](https://gitlab.com/ironfox-oss/IronFox/-/issues/213) on certain websites *(Thanks to [rajtsic](https://gitlab.com/rajtsic)!)*. - [Removed Mozilla's new `Clear Key` CDM](f9a0a07793). - Updated cbindgen to [`0.29.2`](https://docs.rs/crate/cbindgen/0.29.2). - Updated to Firefox [`146.0`](https://firefox.com/firefox/android/146.0/releasenotes/). - [Various tweaks to improve and refine the build process, as well as other minor changes, tweaks, and fixes](https://gitlab.com/ironfox-oss/IronFox/-/merge_requests/109/diffs). MR-author: celenity <celenity@celenity.dev> Co-authored-by: Weblate <hosted@weblate.org> Co-authored-by: techaddict <20232669-techaddict@users.noreply.gitlab.com> Co-authored-by: user <user@localhost.localdomain> Co-authored-by: Akash Yadav <itsaky01@gmail.com> Approved-by: Akash Yadav <itsaky01@gmail.com> Merged-by: celenity <celenity@celenity.dev>
236 lines
10 KiB
Diff
236 lines
10 KiB
Diff
diff --git a/components/logins/android/src/main/java/mozilla/appservices/logins/DatabaseLoginsStorage.kt b/components/logins/android/src/main/java/mozilla/appservices/logins/DatabaseLoginsStorage.kt
|
|
index 20d615e..70b41a0 100644
|
|
--- a/components/logins/android/src/main/java/mozilla/appservices/logins/DatabaseLoginsStorage.kt
|
|
+++ b/components/logins/android/src/main/java/mozilla/appservices/logins/DatabaseLoginsStorage.kt
|
|
@@ -159,12 +159,12 @@ enum class KeyRegenerationEventReason {
|
|
|
|
fun recordKeyRegenerationEvent(reason: KeyRegenerationEventReason) {
|
|
// Avoid the deprecation warning when calling `record()` without the optional EventExtras param
|
|
- @Suppress("DEPRECATION")
|
|
+/* @Suppress("DEPRECATION")
|
|
when (reason) {
|
|
KeyRegenerationEventReason.Lost -> LoginsStoreMetrics.keyRegeneratedLost.record()
|
|
KeyRegenerationEventReason.Corrupt -> LoginsStoreMetrics.keyRegeneratedCorrupt.record()
|
|
KeyRegenerationEventReason.Other -> LoginsStoreMetrics.keyRegeneratedOther.record()
|
|
- }
|
|
+ } */
|
|
}
|
|
|
|
/**
|
|
@@ -177,14 +177,14 @@ fun recordKeyRegenerationEvent(reason: KeyRegenerationEventReason) {
|
|
* This is a convenience wrapper to measure the two in one shot.
|
|
*/
|
|
class LoginsStoreCounterMetrics(
|
|
- val count: CounterMetricType,
|
|
- val errCount: LabeledMetricType<CounterMetricType>,
|
|
+// val count: CounterMetricType,
|
|
+// val errCount: LabeledMetricType<CounterMetricType>,
|
|
) {
|
|
inline fun <U> measure(callback: () -> U): U {
|
|
- return measureIgnoring({ false }, callback)
|
|
+ return callback()
|
|
}
|
|
|
|
- @Suppress("ComplexMethod", "TooGenericExceptionCaught")
|
|
+/* @Suppress("ComplexMethod", "TooGenericExceptionCaught")
|
|
inline fun <U> measureIgnoring(
|
|
shouldIgnore: (Exception) -> Boolean,
|
|
callback: () -> U,
|
|
@@ -215,5 +215,5 @@ class LoginsStoreCounterMetrics(
|
|
}
|
|
throw e
|
|
}
|
|
- }
|
|
+ } */
|
|
}
|
|
diff --git a/components/nimbus/android/src/main/java/org/mozilla/experiments/nimbus/Nimbus.kt b/components/nimbus/android/src/main/java/org/mozilla/experiments/nimbus/Nimbus.kt
|
|
index 98019e4..5705af9 100644
|
|
--- a/components/nimbus/android/src/main/java/org/mozilla/experiments/nimbus/Nimbus.kt
|
|
+++ b/components/nimbus/android/src/main/java/org/mozilla/experiments/nimbus/Nimbus.kt
|
|
@@ -26,10 +26,10 @@ import kotlinx.coroutines.runBlocking
|
|
import kotlinx.coroutines.withContext
|
|
import mozilla.appservices.remotesettings.RemoteSettingsConfig
|
|
import mozilla.appservices.remotesettings.RemoteSettingsServer
|
|
-import mozilla.telemetry.glean.Glean
|
|
+// import mozilla.telemetry.glean.Glean
|
|
import org.json.JSONObject
|
|
-import org.mozilla.experiments.nimbus.GleanMetrics.NimbusEvents
|
|
-import org.mozilla.experiments.nimbus.GleanMetrics.NimbusHealth
|
|
+// import org.mozilla.experiments.nimbus.GleanMetrics.NimbusEvents
|
|
+// import org.mozilla.experiments.nimbus.GleanMetrics.NimbusHealth
|
|
import org.mozilla.experiments.nimbus.internal.AppContext
|
|
import org.mozilla.experiments.nimbus.internal.AvailableExperiment
|
|
import org.mozilla.experiments.nimbus.internal.EnrolledExperiment
|
|
@@ -93,7 +93,7 @@ open class Nimbus(
|
|
|
|
private val metricsHandler = object : MetricsHandler {
|
|
override fun recordEnrollmentStatuses(enrollmentStatusExtras: List<EnrollmentStatusExtraDef>) {
|
|
- for (extra in enrollmentStatusExtras) {
|
|
+/* for (extra in enrollmentStatusExtras) {
|
|
NimbusEvents.enrollmentStatus.record(
|
|
NimbusEvents.EnrollmentStatusExtra(
|
|
branch = extra.branch,
|
|
@@ -104,38 +104,38 @@ open class Nimbus(
|
|
conflictSlug = extra.conflictSlug,
|
|
),
|
|
)
|
|
- }
|
|
+ } */
|
|
}
|
|
|
|
override fun recordFeatureActivation(event: FeatureExposureExtraDef) {
|
|
- NimbusEvents.activation.record(
|
|
+/* NimbusEvents.activation.record(
|
|
NimbusEvents.ActivationExtra(
|
|
experiment = event.slug,
|
|
branch = event.branch,
|
|
featureId = event.featureId,
|
|
),
|
|
- )
|
|
+ ) */
|
|
}
|
|
|
|
override fun recordFeatureExposure(event: FeatureExposureExtraDef) {
|
|
- NimbusEvents.exposure.record(
|
|
+/* NimbusEvents.exposure.record(
|
|
NimbusEvents.ExposureExtra(
|
|
experiment = event.slug,
|
|
branch = event.branch,
|
|
featureId = event.featureId,
|
|
),
|
|
- )
|
|
+ ) */
|
|
}
|
|
|
|
override fun recordMalformedFeatureConfig(event: MalformedFeatureConfigExtraDef) {
|
|
- NimbusEvents.malformedFeature.record(
|
|
+/* NimbusEvents.malformedFeature.record(
|
|
NimbusEvents.MalformedFeatureExtra(
|
|
experiment = event.slug,
|
|
branch = event.branch,
|
|
featureId = event.featureId,
|
|
partId = event.part,
|
|
),
|
|
- )
|
|
+ ) */
|
|
}
|
|
}
|
|
|
|
@@ -212,11 +212,11 @@ open class Nimbus(
|
|
try {
|
|
nimbusClient.getFeatureConfigVariables(featureId)?.let { JSONObject(it) }
|
|
} catch (e: NimbusException.DatabaseNotReady) {
|
|
- NimbusHealth.cacheNotReadyForFeature.record(
|
|
+/* NimbusHealth.cacheNotReadyForFeature.record(
|
|
NimbusHealth.CacheNotReadyForFeatureExtra(
|
|
featureId = featureId,
|
|
),
|
|
- )
|
|
+ ) */
|
|
null
|
|
} catch (e: Throwable) {
|
|
reportError("getFeatureConfigVariablesJson", e)
|
|
@@ -292,9 +292,9 @@ open class Nimbus(
|
|
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
|
internal fun fetchExperimentsOnThisThread() = withCatchAll("fetchExperiments") {
|
|
try {
|
|
- NimbusHealth.fetchExperimentsTime.measure {
|
|
- nimbusClient.fetchExperiments()
|
|
- }
|
|
+ nimbusClient.fetchExperiments()
|
|
+// nimbusClient.fetchExperiments()
|
|
+// }
|
|
updateObserver {
|
|
it.onExperimentsFetched()
|
|
}
|
|
@@ -329,7 +329,7 @@ open class Nimbus(
|
|
val time = measureTimeMillis {
|
|
events = nimbusClient.applyPendingExperiments()
|
|
}
|
|
- NimbusHealth.applyPendingExperimentsTime.accumulateSingleSample(time)
|
|
+// NimbusHealth.applyPendingExperimentsTime.accumulateSingleSample(time)
|
|
recordExperimentTelemetryEvents(events!!)
|
|
// Get the experiments to record in telemetry
|
|
postEnrolmentCalculation()
|
|
@@ -514,19 +514,19 @@ open class Nimbus(
|
|
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
|
internal fun recordExperimentTelemetry(experiments: List<EnrolledExperiment>) {
|
|
// Call Glean.setExperimentActive() for each active experiment.
|
|
- experiments.forEach { experiment ->
|
|
+/* experiments.forEach { experiment ->
|
|
// For now, we will just record the experiment id and the branch id. Once we can call
|
|
// Glean from Rust, this will move to the nimbus-sdk Rust core.
|
|
Glean.setExperimentActive(
|
|
experiment.slug,
|
|
experiment.branchSlug,
|
|
)
|
|
- }
|
|
+ } */
|
|
}
|
|
|
|
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
|
internal fun recordExperimentTelemetryEvents(enrollmentChangeEvents: List<EnrollmentChangeEvent>) {
|
|
- enrollmentChangeEvents.forEach { event ->
|
|
+/* enrollmentChangeEvents.forEach { event ->
|
|
when (event.change) {
|
|
EnrollmentChangeEventType.ENROLLMENT -> {
|
|
NimbusEvents.enrollment.record(
|
|
@@ -574,7 +574,7 @@ open class Nimbus(
|
|
)
|
|
}
|
|
}
|
|
- }
|
|
+ } */
|
|
}
|
|
|
|
// The exposure event should be recorded when the expected treatment (or no-treatment, such as
|
|
diff --git a/components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt b/components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt
|
|
index 7d69d6a..11732fa 100644
|
|
--- a/components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt
|
|
+++ b/components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt
|
|
@@ -349,7 +349,7 @@ class PlacesWriterConnection internal constructor(conn: UniffiPlacesConnection,
|
|
|
|
@Suppress("MagicNumber")
|
|
override fun runMaintenance(dbSizeLimit: UInt) {
|
|
- val pruneMetrics = PlacesManagerMetrics.runMaintenanceTime.measure {
|
|
+/* val pruneMetrics = PlacesManagerMetrics.runMaintenanceTime.measure {
|
|
val pruneMetrics = PlacesManagerMetrics.runMaintenancePruneTime.measure {
|
|
this.conn.runMaintenancePrune(dbSizeLimit, 12U)
|
|
}
|
|
@@ -367,7 +367,7 @@ class PlacesWriterConnection internal constructor(conn: UniffiPlacesConnection,
|
|
}
|
|
pruneMetrics
|
|
}
|
|
- PlacesManagerMetrics.dbSizeAfterMaintenance.accumulateSamples(listOf(pruneMetrics.dbSizeAfter.toLong() / 1024))
|
|
+ PlacesManagerMetrics.dbSizeAfterMaintenance.accumulateSamples(listOf(pruneMetrics.dbSizeAfter.toLong() / 1024)) */
|
|
}
|
|
|
|
override fun deleteEverything() {
|
|
@@ -932,13 +932,13 @@ data class HistoryMetadataKey(
|
|
* This is a convenience wrapper to measure the two in one shot.
|
|
*/
|
|
class PlacesManagerCounterMetrics(
|
|
- val count: CounterMetricType,
|
|
- val errCount: LabeledMetricType<CounterMetricType>,
|
|
+// val count: CounterMetricType,
|
|
+// val errCount: LabeledMetricType<CounterMetricType>,
|
|
) {
|
|
- @Suppress("ComplexMethod", "TooGenericExceptionCaught")
|
|
+// @Suppress("ComplexMethod", "TooGenericExceptionCaught")
|
|
inline fun <U> measure(callback: () -> U): U {
|
|
- count.add()
|
|
- try {
|
|
+ return callback()
|
|
+/* try {
|
|
return callback()
|
|
} catch (e: Exception) {
|
|
when (e) {
|
|
@@ -965,6 +965,6 @@ class PlacesManagerCounterMetrics(
|
|
}
|
|
}
|
|
throw e
|
|
- }
|
|
+ } */
|
|
}
|
|
}
|