AutoStandby: Always reschedule properly (#9258)

If we attempted to switch to standby with an upcoming task in the near future (< 3), we would forget to re-schedule the standby timer.
This commit is contained in:
zwim
2022-06-27 21:15:45 +02:00
committed by GitHub
parent 6e647a6f4d
commit 6d59ca2c6a

View File

@@ -606,6 +606,10 @@ function AutoSuspend:AllowStandbyHandler()
-- This shouldn't prevent us from actually consuming any pending input events first,
-- because if we were woken up by user input, those events should already be in the evdev queue...
UIManager:consumeInputEarlyAfterPM(true)
else
if not self.going_to_suspend then
self:_start_standby()
end
end
end