Bug 1820559 - Remove PlacesStorage maintenance feature flag for enabling the feature to all users.

This feature registers a periodic storage maintenance worker that runs to prune and maintain places db.
fenix/112.0
kycn 1 year ago committed by mergify[bot]
parent 6f6279c4ee
commit 0a8baa4914

@ -71,11 +71,4 @@ object FeatureFlags {
* Enables the notification pre permission prompt.
*/
const val notificationPrePermissionPromptEnabled = true
/**
* Enables storage maintenance feature.
*
* Feature flag tracking: https://github.com/mozilla-mobile/fenix/issues/27759
* */
val storageMaintenanceFeature = Config.channel.isNightlyOrDebug || Config.channel.isBeta
}

@ -225,14 +225,14 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
warmBrowsersCache()
initializeWebExtensionSupport()
if (FeatureFlags.storageMaintenanceFeature) {
// Make sure to call this function before registering a storage worker
// (e.g. components.core.historyStorage.registerStorageMaintenanceWorker())
// as the storage maintenance worker needs a places storage globally when
// it is needed while the app is not running and WorkManager wakes up the app
// for the periodic task.
GlobalPlacesDependencyProvider.initialize(components.core.historyStorage)
}
// Make sure to call this function before registering a storage worker
// (e.g. components.core.historyStorage.registerStorageMaintenanceWorker())
// as the storage maintenance worker needs a places storage globally when
// it is needed while the app is not running and WorkManager wakes up the app
// for the periodic task.
GlobalPlacesDependencyProvider.initialize(components.core.historyStorage)
restoreBrowserState()
restoreDownloads()
restoreMessaging()
@ -366,14 +366,12 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
}
fun queueStorageMaintenance() {
if (FeatureFlags.storageMaintenanceFeature) {
queue.runIfReadyOrQueue {
// Make sure GlobalPlacesDependencyProvider.initialize(components.core.historyStorage)
// is called before this call. When app is not running and WorkManager wakes up
// the app for the periodic task, it will require a globally provided places storage
// to run the maintenance on.
components.core.historyStorage.registerStorageMaintenanceWorker()
}
queue.runIfReadyOrQueue {
// Make sure GlobalPlacesDependencyProvider.initialize(components.core.historyStorage)
// is called before this call. When app is not running and WorkManager wakes up
// the app for the periodic task, it will require a globally provided places storage
// to run the maintenance on.
components.core.historyStorage.registerStorageMaintenanceWorker()
}
}

Loading…
Cancel
Save