[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:
NiLuJe
2020-08-25 02:00:59 +02:00
committed by GitHub
parent 9abd92044a
commit 6e3a3e8069
9 changed files with 83 additions and 12 deletions

View File

@@ -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()