mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[feat] Kindle suspend using lipc (#4825)
Fixes problems with making Kindle go to sleep using menu or gesture manager action.
This commit is contained in:
@@ -89,4 +89,10 @@ function KindlePowerD:afterResume()
|
||||
end
|
||||
end
|
||||
|
||||
function KindlePowerD:toggleSuspend()
|
||||
if self.lipc_handle then
|
||||
self.lipc_handle:set_int_property("com.lab126.powerd", "powerButton", 1)
|
||||
end
|
||||
end
|
||||
|
||||
return KindlePowerD
|
||||
|
||||
@@ -1109,7 +1109,7 @@ function UIManager:suspend()
|
||||
if Device:isCervantes() or Device:isKobo() or Device:isSDL() or Device:isSonyPRSTUX() then
|
||||
self.event_handlers["Suspend"]()
|
||||
elseif Device:isKindle() then
|
||||
self.event_handlers["IntoSS"]()
|
||||
Device.powerd:toggleSuspend()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user