workaround for Onyx Poke2 nonsense (#7872)

Requires koreader/android-luajit-launcher#320

Also the luajit-launcher bump adds support for Likebook P78 and sanitizes clipboard text.
This commit is contained in:
Martín Fernández
2021-06-20 15:42:00 +02:00
committed by GitHub
parent 901dda8d98
commit ee92ca68e8
2 changed files with 7 additions and 3 deletions

View File

@@ -167,7 +167,9 @@ function Device:init()
end
-- to-do: keyboard connected, disconnected
elseif ev.code == C.APP_CMD_RESUME then
UIManager:broadcastEvent(Event:new("Resume"))
if not android.prop.brokenLifecycle then
UIManager:broadcastEvent(Event:new("Resume"))
end
if external.when_back_callback then
external.when_back_callback()
external.when_back_callback = nil
@@ -206,7 +208,9 @@ function Device:init()
end
end
elseif ev.code == C.APP_CMD_PAUSE then
UIManager:broadcastEvent(Event:new("Suspend"))
if not android.prop.brokenLifecycle then
UIManager:broadcastEvent(Event:new("Suspend"))
end
elseif ev.code == C.AEVENT_POWER_CONNECTED then
UIManager:broadcastEvent(Event:new("Charging"))
elseif ev.code == C.AEVENT_POWER_DISCONNECTED then