fix(android): restore foreground notification after wake

Avoid leaving transient wake errors in the persistent foreground notification.
This commit is contained in:
Amirhossein Akhlaghpour 2026-04-28 18:53:36 +03:30
commit 8e4571cb0e
No known key found for this signature in database
GPG key ID: D7A35F11FB70A961

View file

@ -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")