From ee92ca68e847f42fac140d6c5644b516eee930ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fern=C3=A1ndez?= <975883+pazos@users.noreply.github.com> Date: Sun, 20 Jun 2021 15:42:00 +0200 Subject: [PATCH] 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. --- frontend/device/android/device.lua | 8 ++++++-- platform/android/luajit-launcher | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/device/android/device.lua b/frontend/device/android/device.lua index f2a7dfb4e..ecf8e1371 100644 --- a/frontend/device/android/device.lua +++ b/frontend/device/android/device.lua @@ -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 diff --git a/platform/android/luajit-launcher b/platform/android/luajit-launcher index 76effae9d..17eec635b 160000 --- a/platform/android/luajit-launcher +++ b/platform/android/luajit-launcher @@ -1 +1 @@ -Subproject commit 76effae9dcd233cd5930326ebbbd6666e3f4de1e +Subproject commit 17eec635be613bc4232a697d136b621ac407dbcd