mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[Kobo] Support USBMS exports (#6552)
* \o/ * Make sure the (debug) event log doesn't end up in the fd table of our child processes... Otherwise, it breaks USBMS. * Close suspicious fds in the Wi-Fi scripts To prevent any and all issues w/ USBMS down the road... * Minor USBMS UI tweaks * Always ask for confirmation to start on USBMS session on plug * Bump base https://github.com/koreader/koreader-base/pull/1161 https://github.com/koreader/koreader-base/pull/1162 https://github.com/koreader/koreader-base/pull/1163 https://github.com/koreader/koreader-base/pull/1165 https://github.com/koreader/koreader-base/pull/1167
This commit is contained in:
@@ -155,8 +155,13 @@ function UIManager:init()
|
||||
end
|
||||
self.event_handlers["Charging"] = function()
|
||||
self:_beforeCharging()
|
||||
-- NOTE: Plug/unplug events will wake the device up, which is why we put it back to sleep.
|
||||
if Device.screen_saver_mode then
|
||||
self:suspend()
|
||||
else
|
||||
-- Potentially start an USBMS session
|
||||
local MassStorage = require("ui/elements/mass_storage")
|
||||
MassStorage:start(true)
|
||||
end
|
||||
end
|
||||
self.event_handlers["NotCharging"] = function()
|
||||
|
||||
Reference in New Issue
Block a user