From e1f00bd64e5217a565c21e9776632542a2d5299b Mon Sep 17 00:00:00 2001 From: Henrique Velloso Date: Thu, 19 Feb 2026 01:36:41 -0300 Subject: [PATCH] hotfix: Removed unnecessary re-launching of the install dialog during watchdog ticks. --- .../app/plugins/AndroidPackageManagerPlugin.kt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/android/app/src/main/kotlin/dev/zapstore/app/plugins/AndroidPackageManagerPlugin.kt b/android/app/src/main/kotlin/dev/zapstore/app/plugins/AndroidPackageManagerPlugin.kt index 8816f87..d626400 100644 --- a/android/app/src/main/kotlin/dev/zapstore/app/plugins/AndroidPackageManagerPlugin.kt +++ b/android/app/src/main/kotlin/dev/zapstore/app/plugins/AndroidPackageManagerPlugin.kt @@ -553,16 +553,11 @@ class AndroidPackageManagerPlugin : val now2 = System.currentTimeMillis() if (now2 < deadline && (hasSession || hasPendingUi || verifyingAlive)) { // Nudge Dart to show the most accurate state (esp. after reconnect). + // NOTE: We do NOT re-launch the dialog here. The initial launch via + // ActivityContext (same task) is reliable, and onStart already handles + // the case where the user backgrounded and returned. Re-launching on + // every watchdog tick caused the dialog to reappear while visible. if (hasPendingUi) { - // Re-launch the dialog in case it was suppressed by user interaction - // or Android's activity stack. The initial launchConfirmDialog may - // have failed silently if the user was actively using the app. - if (isAppInForeground) { - pendingUserActionIntents[appId]?.let { intent -> - Log.d(TAG, "Watchdog: Re-launching install dialog for $appId") - launchConfirmDialog(appId, intent) - } - } emitInstallStatus( appId, InstallStatus.PENDING_USER_ACTION,