mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
android: handle onDestroy (#6811)
* handle onDestroy we need it if killed by the system (ie: battery optimizations or OOM) we need it to exit the lua VM when we call finish() from Kotlin This prevents us for being trapped into a zombie state
This commit is contained in:
2
base
2
base
Submodule base updated: 5f9e9b7eb3...afdd59b204
@@ -134,6 +134,8 @@ function Device:init()
|
||||
logger.dbg("Android application event", ev.code)
|
||||
if ev.code == C.APP_CMD_SAVE_STATE then
|
||||
return "SaveState"
|
||||
elseif ev.code == C.APP_CMD_DESTROY then
|
||||
UIManager:quit()
|
||||
elseif ev.code == C.APP_CMD_GAINED_FOCUS
|
||||
or ev.code == C.APP_CMD_INIT_WINDOW
|
||||
or ev.code == C.APP_CMD_WINDOW_REDRAW_NEEDED then
|
||||
|
||||
Reference in New Issue
Block a user