Fix Kindle crash on AutoSuspend while charging (#14604)
This commit is contained in:
1 parent
76eeed1cb4
commit
016b3ed6b5
1 file changed
+6
@@ -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