From 8e4571cb0e3b5c6cc2f9af0abe3abc71497f4858 Mon Sep 17 00:00:00 2001 From: Amirhossein Akhlaghpour Date: Tue, 28 Apr 2026 18:53:36 +0330 Subject: [PATCH] fix(android): restore foreground notification after wake Avoid leaving transient wake errors in the persistent foreground notification. --- .../src/main/kotlin/com/carriez/flutter_hbb/MainService.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt index 1f8e71bf9..9a2466a23 100644 --- a/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt +++ b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt @@ -292,6 +292,9 @@ class MainService : Service() { } FFI.refreshScreen() + if (wakeNotifiedLocked || wakeNotifiedInputDisabled) { + setTextNotification(null, null) + } wakePendingReason = null } } @@ -313,6 +316,10 @@ class MainService : Service() { if (powerManager.isInteractive) { return } + + // Reset any previous transient status text for a new attempt. + setTextNotification(null, null) + val now = SystemClock.elapsedRealtime() if (now - lastWakeAttemptAt < WAKE_THROTTLE_MS) { Log.i(logTag, "skip wake due to throttle, reason:$reason")