mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-22 10:02:20 +00:00
fix(android): restore foreground notification after wake
Avoid leaving transient wake errors in the persistent foreground notification.
This commit is contained in:
parent
7115a0912c
commit
8e4571cb0e
1 changed files with 7 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue