From b798c4f4715a5117463d69b6a04c0e624d138bd3 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 24 Jun 2025 15:16:58 +0200 Subject: [PATCH] update deps --- app/android/settings.gradle | 2 +- packages/flutter_mozilla_components/android/build.gradle | 2 +- .../eu/weblibre/flutter_mozilla_components/Components.kt | 7 +++++++ .../addons/WebExtensionPromptFeature.kt | 5 +++-- .../flutter_mozilla_components/components/Services.kt | 1 - .../flutter_mozilla_components/services/DownloadService.kt | 2 ++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/android/settings.gradle b/app/android/settings.gradle index 9c6cad42..4b2a2ac1 100644 --- a/app/android/settings.gradle +++ b/app/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version '8.10.0' apply false + id "com.android.application" version '8.10.1' apply false id "org.jetbrains.kotlin.android" version "2.1.20" apply false } diff --git a/packages/flutter_mozilla_components/android/build.gradle b/packages/flutter_mozilla_components/android/build.gradle index 45d33cce..3aac0653 100644 --- a/packages/flutter_mozilla_components/android/build.gradle +++ b/packages/flutter_mozilla_components/android/build.gradle @@ -3,7 +3,7 @@ version = "1.0-SNAPSHOT" buildscript { ext.kotlin_version = "2.1.20" - ext.mozillaComponentsVersion = '139.0.4' + ext.mozillaComponentsVersion = '141.0b1' repositories { google() diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/Components.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/Components.kt index 69032a26..9384bf42 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/Components.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/Components.kt @@ -16,7 +16,10 @@ import eu.weblibre.flutter_mozilla_components.pigeons.GeckoTabContentEvents import eu.weblibre.flutter_mozilla_components.pigeons.ReaderViewController import mozilla.components.concept.engine.EngineView import mozilla.components.concept.engine.selection.SelectionActionDelegate +import mozilla.components.feature.downloads.DateTimeProvider +import mozilla.components.feature.downloads.DefaultDateTimeProvider import mozilla.components.feature.downloads.DefaultFileSizeFormatter +import mozilla.components.feature.downloads.DownloadEstimator import mozilla.components.feature.downloads.FileSizeFormatter import mozilla.components.support.base.android.NotificationsDelegate @@ -46,4 +49,8 @@ class Components(private val context: Context, } val fileSizeFormatter: FileSizeFormatter by lazy { DefaultFileSizeFormatter(context) } + + val dateTimeProvider: DateTimeProvider by lazy { DefaultDateTimeProvider() } + + val downloadEstimator: DownloadEstimator by lazy { DownloadEstimator(dateTimeProvider = dateTimeProvider) } } \ No newline at end of file diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt index ed2d81bb..deffaafb 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt @@ -165,8 +165,9 @@ class WebExtensionPromptFeature( addon = addon, permissions = permissions, origins = origins, + dataCollectionPermissions = emptyList(), forOptionalPermissions = forOptionalPermissions, - onPositiveButtonClicked = { _, privateBrowsingAllowed -> + onPositiveButtonClicked = { _, privateBrowsingAllowed, _ -> handlePermissions( promptRequest, granted = true, @@ -195,7 +196,7 @@ class WebExtensionPromptFeature( private fun tryToReAttachButtonHandlersToPreviousDialog() { findPreviousDialogFragment()?.let { dialog -> - dialog.onPositiveButtonClicked = { addon, privateBrowsingAllowed -> + dialog.onPositiveButtonClicked = { addon, privateBrowsingAllowed, _ -> store.state.webExtensionPromptRequest?.let { promptRequest -> if (promptRequest is WebExtensionPromptRequest.AfterInstallation.Permissions && addon.id == promptRequest.extension.id diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/components/Services.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/components/Services.kt index f9943c59..91dd2b63 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/components/Services.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/components/Services.kt @@ -23,7 +23,6 @@ class Services( val appLinksInterceptor by lazy { AppLinksInterceptor( context, - interceptLinkClicks = true, launchInApp = { prefs.getBoolean(context.getPreferenceKey(R.string.pref_key_launch_external_app), false) }, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/services/DownloadService.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/services/DownloadService.kt index 37314f9d..ec4a8b05 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/services/DownloadService.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/services/DownloadService.kt @@ -3,6 +3,7 @@ package eu.weblibre.flutter_mozilla_components.services import eu.weblibre.flutter_mozilla_components.GlobalComponents import mozilla.components.browser.state.store.BrowserStore import mozilla.components.feature.downloads.AbstractFetchDownloadService +import mozilla.components.feature.downloads.DownloadEstimator import mozilla.components.feature.downloads.FileSizeFormatter import mozilla.components.support.base.android.NotificationsDelegate @@ -15,4 +16,5 @@ class DownloadService : AbstractFetchDownloadService() { override val store: BrowserStore by lazy { components.core.store } override val notificationsDelegate: NotificationsDelegate by lazy { components.notificationsDelegate } override val fileSizeFormatter: FileSizeFormatter by lazy { components.fileSizeFormatter } + override val downloadEstimator: DownloadEstimator by lazy { components.downloadEstimator } } \ No newline at end of file