From 6d59ca2c6a8d9c10ca628a71a835a81e456e0a7d Mon Sep 17 00:00:00 2001 From: zwim <36999612+zwim@users.noreply.github.com> Date: Mon, 27 Jun 2022 21:15:45 +0200 Subject: [PATCH] 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. --- plugins/autosuspend.koplugin/main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/autosuspend.koplugin/main.lua b/plugins/autosuspend.koplugin/main.lua index 04c6b82cb..ae6ce99af 100644 --- a/plugins/autosuspend.koplugin/main.lua +++ b/plugins/autosuspend.koplugin/main.lua @@ -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