[client] Add sleep state tracking to handle wakeup/sleep events reliably (#4894)

Adds a new NotifyOSLifecycle RPC and server handler to centralize OS sleep/wake handling, introduces Server.sleepTriggeredDown for coordination, updates client UI to call the new RPC, and adjusts the internal sleep event enum zero-value semantics.
This commit is contained in:
Maycon Santos
2025-12-03 11:53:39 +01:00
committed by GitHub
parent a232cf614c
commit e87b4ace11
8 changed files with 954 additions and 454 deletions

View File

@@ -1,8 +1,9 @@
package sleep
var (
EventTypeSleep EventType = 0
EventTypeWakeUp EventType = 1
EventTypeUnknown EventType = 0
EventTypeSleep EventType = 1
EventTypeWakeUp EventType = 2
)
type EventType int