summaryrefslogtreecommitdiffstats
path: root/mobile/android
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-20 04:02:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-20 04:02:43 +0000
commit8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd (patch)
tree16a27151176f80644677f4007d17dbd5f4d0f204 /mobile/android
parentReleasing progress-linux version 127.0-1~progress7.99u1. (diff)
downloadfirefox-8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd.tar.xz
firefox-8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd.zip
Merging upstream version 127.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt14
-rw-r--r--mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt17
-rw-r--r--mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt14
-rw-r--r--mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt23
-rw-r--r--mobile/android/fenix/app/src/main/res/values/static_strings.xml2
-rw-r--r--mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml5
-rw-r--r--mobile/android/version.txt2
7 files changed, 18 insertions, 59 deletions
diff --git a/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt b/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt
index b30f8b0f4b..9784d9e79e 100644
--- a/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt
+++ b/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt
@@ -22,16 +22,10 @@ internal class FxSuggestIngestionWorker(
private val logger = Logger("FxSuggestIngestionWorker")
override suspend fun doWork(): Result {
- logger.info("Ingesting new suggestions")
- val storage = GlobalFxSuggestDependencyProvider.requireStorage()
- val success = storage.ingest()
- return if (success) {
- logger.info("Successfully ingested new suggestions")
- Result.success()
- } else {
- logger.error("Failed to ingest new suggestions")
- Result.retry()
- }
+ // Disable periodic ingestion until we figure out
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1900837
+ logger.info("Skipping ingesting new suggestions")
+ return Result.success()
}
internal companion object {
diff --git a/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt b/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt
index 84df98f78e..54c1e1dd67 100644
--- a/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt
+++ b/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt
@@ -18,6 +18,7 @@ import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.Mockito.never
import org.mockito.Mockito.verify
@RunWith(AndroidJUnit4::class)
@@ -43,19 +44,9 @@ class FxSuggestIngestionWorkerTest {
val result = worker.startWork().await()
- verify(storage).ingest(any())
+ // Ingestion is disabled until we figure out
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1900837
+ verify(storage, never()).ingest(any())
assertEquals(ListenableWorker.Result.success(), result)
}
-
- @Test
- fun workShouldRetry() = runTest {
- whenever(storage.ingest(any())).thenReturn(false)
-
- val worker = TestListenableWorkerBuilder<FxSuggestIngestionWorker>(testContext).build()
-
- val result = worker.startWork().await()
-
- verify(storage).ingest(any())
- assertEquals(ListenableWorker.Result.retry(), result)
- }
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
index cd367fa467..6d0d37f0a5 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
@@ -377,11 +377,15 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
// new search suggestions. The worker requires us to have called
// `GlobalFxSuggestDependencyProvider.initialize`, which we did before
// scheduling these tasks. When disabled we stop the periodic work.
- if (settings().enableFxSuggest) {
- components.fxSuggest.ingestionScheduler.startPeriodicIngestion()
- } else {
- components.fxSuggest.ingestionScheduler.stopPeriodicIngestion()
- }
+
+ // Disable periodic ingestion until we figure out
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1900837
+ //
+ // Note: we will still ingest once for a fresh DB because of
+ // the `runStartupIngestion()` call below. This should be okay, the
+ // performance issues only happen when reingesting after a successful
+ // initial ingestion.
+ components.fxSuggest.ingestionScheduler.stopPeriodicIngestion()
}
components.core.fileUploadsDirCleaner.cleanUploadsDirectory()
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
index c50cbe6a1c..d65133b81d 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
@@ -5,7 +5,6 @@
package org.mozilla.fenix.settings
import android.os.Bundle
-import androidx.core.content.edit
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import androidx.preference.EditTextPreference
@@ -16,7 +15,6 @@ import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
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.tabstrip.isTabStripEligible
import org.mozilla.fenix.debugsettings.data.DefaultDebugSettingsRepository
@@ -83,27 +81,6 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
onPreferenceChangeListener = SharedPreferenceUpdater()
}
- requirePreference<SwitchPreference>(R.string.pref_key_enable_fxsuggest).apply {
- isVisible = FeatureFlags.fxSuggest
- isChecked = context.settings().enableFxSuggest
- onPreferenceChangeListener = object : Preference.OnPreferenceChangeListener {
- override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
- val newBooleanValue = newValue as? Boolean ?: return false
- val ingestionScheduler =
- requireContext().components.fxSuggest.ingestionScheduler
- if (newBooleanValue) {
- ingestionScheduler.startPeriodicIngestion()
- } else {
- ingestionScheduler.stopPeriodicIngestion()
- }
- requireContext().settings().preferences.edit {
- putBoolean(preference.key, newBooleanValue)
- }
- return true
- }
- }
- }
-
requirePreference<SwitchPreference>(R.string.pref_key_should_enable_felt_privacy).apply {
isVisible = true
isChecked = context.settings().feltPrivateBrowsingEnabled
diff --git a/mobile/android/fenix/app/src/main/res/values/static_strings.xml b/mobile/android/fenix/app/src/main/res/values/static_strings.xml
index 6ed8c8901c..d5339548dd 100644
--- a/mobile/android/fenix/app/src/main/res/values/static_strings.xml
+++ b/mobile/android/fenix/app/src/main/res/values/static_strings.xml
@@ -78,8 +78,6 @@
<string name="preferences_debug_settings_compose_top_sites" translatable="false">Enable Compose Top Sites</string>
<!-- Label for enabling the menu redesign -->
<string name="preferences_debug_settings_menu_redesign" translatable="false">Enable Menu Redesign</string>
- <!-- Label for enabling Firefox Suggest -->
- <string name="preferences_debug_settings_fxsuggest" translatable="false">Enable Firefox Suggest</string>
<!-- Label for enabling Toolbar Redesign incomplete portions -->
<string name="preferences_debug_settings_toolbar_redesign" translatable="false">Enable Toolbar Redesign incomplete portions</string>
<!-- Label for enabling Felt Privacy -->
diff --git a/mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml
index a1774c1204..c1bc03395e 100644
--- a/mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml
+++ b/mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml
@@ -36,11 +36,6 @@
android:title="@string/preferences_debug_settings_toolbar_redesign"
app:iconSpaceReserved="false" />
<SwitchPreference
- android:defaultValue="false"
- android:key="@string/pref_key_enable_fxsuggest"
- android:title="@string/preferences_debug_settings_fxsuggest"
- app:iconSpaceReserved="false" />
- <SwitchPreference
android:key="@string/pref_key_should_enable_felt_privacy"
app:iconSpaceReserved="false"
android:title="@string/preferences_debug_felt_privacy"
diff --git a/mobile/android/version.txt b/mobile/android/version.txt
index 4aea959bf8..29810a755b 100644
--- a/mobile/android/version.txt
+++ b/mobile/android/version.txt
@@ -1 +1 @@
-127.0
+127.0.1