2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
koreader/frontend/device
NiLuJe 4264d915b1
Kobo: Refactor suspend in order to be able to catch input events sent during the 2s window of ntx madness (#12330)
I don't even remember how badly things broke (at least on old devices) without it, despite it making absolutely no sense at all (state-extended just flips a global that dictates whether some things get flagged as wakeup sources or not).

So, don't rock the boat too much: we don't remove it, but instead of using a sleep, we use a task deadline instead, which ensures we'll keep processing input events in the right order in the meantime. We'll already have neutered input by this point, so we'll only process power events anyway.

That means that the only iffy things are potentially *when* and *where* we have to potentially cancel that task. Resume makes sense, of course, and we log an info message to make the log flow clear; but we also do so in suspend... just in case. With a warning log because that probably indicates something fishy went on.

Also cleanup the comments while I'm there, and actually rewrite the wakeup_count stuff properly so it could actually theoretically be used if ntx kernels were actually reliable. Spoiler alert: they're not, this is still horribly broken on at least Mk < 7. Works just fine on a Forma, though, so, yay.

Fix #12325
2024-08-12 03:47:43 +02:00
..
android Add Device:otaModel() (#12014) 2024-06-25 21:35:38 +02:00
cervantes Add Device:otaModel() (#12014) 2024-06-25 21:35:38 +02:00
dummy Clarify our OOP semantics across the codebase (#9586) 2022-10-06 02:14:48 +02:00
generic PowerD: Keep track of frontlight state change by interactive callers for suspend/resume purposes (#12283) 2024-08-06 01:13:14 +02:00
kindle Add Device:otaModel() (#12014) 2024-06-25 21:35:38 +02:00
kobo Kobo: Refactor suspend in order to be able to catch input events sent during the 2s window of ntx madness (#12330) 2024-08-12 03:47:43 +02:00
pocketbook Add Device:otaModel() (#12014) 2024-06-25 21:35:38 +02:00
remarkable Add Device:otaModel() (#12014) 2024-06-25 21:35:38 +02:00
sdl SDL: Return true in NetworkMgr:isConnected on !hasWifiToggle platforms, (#12217) 2024-07-26 02:12:53 +02:00
sony-prstux PRSTux: Disable OTAs 2024-01-21 06:42:09 +01:00
devicelistener.lua ReaderFooter: add page-turn item (#12249) 2024-08-10 10:09:23 +02:00
gesturedetector.lua chore: remove repetitive words (#11785) 2024-05-09 12:10:53 +02:00
input.lua Support screenshots on Non-Touch with ScreenKB as modifier (#11802) 2024-05-20 21:22:27 +02:00
key.lua InputContainer: Fall cleanup ;). 2022-10-29 22:55:20 +02:00
sysfs_light.lua Kobo: Yet another attempt at working around the hangs on the latest NXP boards (#10771) 2023-08-01 23:53:10 +02:00
thirdparty.lua Revert "Hyphenation: add custom hyphenation rules (#7746)" (#7785) 2021-05-31 22:19:24 +02:00
wakeupmgr.lua WakeupMgr: Forward rtc_dev & dodgy_rtc to the backend 2023-10-16 02:59:27 +02:00