mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Fix Kindle crash on AutoSuspend while charging (#14604)
This commit is contained in:
@@ -137,6 +137,12 @@ if Device:isKindle() then
|
||||
return
|
||||
end
|
||||
|
||||
-- Also causes problems when charging.
|
||||
if PowerD:isCharging() and not PowerD:isCharged() then
|
||||
logger.dbg("AutoSuspend: Device is charging, skipping t1 timeout reset")
|
||||
return
|
||||
end
|
||||
|
||||
local now = UIManager:getElapsedTimeSinceBoot()
|
||||
local kindle_t1_reset_seconds = default_kindle_t1_timeout_reset_seconds - time.to_number(now - self.last_t1_reset_time)
|
||||
-- NOTE: Unlike us, powerd doesn't care about charging, so we always use the delta since the last user input.
|
||||
|
||||
Reference in New Issue
Block a user