From e945f9928bf57a758a9465d72726cd83ebcdcfb8 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Mon, 4 May 2026 18:32:27 +0200 Subject: [PATCH] swap the action order --- .../gatekeeper/IntentBlockNotifier.kt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/gatekeeper/IntentBlockNotifier.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/gatekeeper/IntentBlockNotifier.kt index 0ae5395a..b3cc6315 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/gatekeeper/IntentBlockNotifier.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/gatekeeper/IntentBlockNotifier.kt @@ -50,19 +50,6 @@ object IntentBlockNotifier { .setShowWhen(true) .setTimeoutAfter(TIMEOUT_MS) - builder.addAction( - 0, - "Allow once", - buildActionIntent( - context = appCtx, - action = GatekeeperNotificationActionReceiver.ACTION_ALLOW_ONCE, - packageName = packageName, - blockedIntent = blockedIntent, - notificationId = notificationId, - requestCode = notificationId + 1, - ), - ) - builder.addAction( 0, "Always allow", @@ -76,6 +63,19 @@ object IntentBlockNotifier { ), ) + builder.addAction( + 0, + "Allow once", + buildActionIntent( + context = appCtx, + action = GatekeeperNotificationActionReceiver.ACTION_ALLOW_ONCE, + packageName = packageName, + blockedIntent = blockedIntent, + notificationId = notificationId, + requestCode = notificationId + 1, + ), + ) + val manager = ContextCompat.getSystemService(appCtx, NotificationManager::class.java) ?: return manager.notify(notificationId, builder.build())