feat: add JSONRPC event for reboot notification

This commit is contained in:
Adam Shiervani 2025-10-14 16:17:32 +02:00
parent 80ae3f7fb3
commit 53556cb64c
1 changed files with 4 additions and 0 deletions

View File

@ -175,6 +175,10 @@ func rpcGetDeviceID() (string, error) {
func rpcReboot(force bool) error {
logger.Info().Msg("Got reboot request from JSONRPC, rebooting...")
writeJSONRPCEvent("willReboot", nil, currentSession)
// Wait for the JSONRPCEvent to be sent
time.Sleep(1 * time.Second)
nativeInstance.SwitchToScreenIfDifferent("rebooting_screen")
args := []string{}