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())