Commit Graph

919 Commits (master)

Author SHA1 Message Date
ElimGarak1 ed885a79b2
[PocketBook] Add PB-Verse_(PB629) and PB-Verse Pro_(PB634) (#10938)
Closes #10913.
7 months ago
NiLuJe 55ea10655f
Revert "Kobo: Disable HW inversion on MTK (#10841)" (#10928)
This reverts commit e7e0d2edb6.

Whatever's actually going on with nightmode, this isn't it.
This was independently confirmed to behave as expected,
and the issue that prompted this was *not* fixed by this commit.
8 months ago
NiLuJe 34ba2fab30
NetworkMgr: Handle non-blocking turnOnWifi implementations better (#10863)
* Device: Add a `hasSeamlessWifiToggle` devcap to complement `hasWifiToggle`, to denote platforms where we can toggle WiFi without losing focus, as this has obvious UX impacts, and less obvious technical impacts on some of the NetworkMgr innards...
* Android: Mark as `!hasSeamlessWifiToggle`, as it requires losing focus to the system settings. Moreover, `turnOnWifi` returns *immediately* and we *still* run in the background during that time, for extra spiciness...
* NetworkMgr: Ensure only *one* call to `turnOnWifi` will actually go on when stuff gets re-scheduled by the `beforeWifiAction` framework.
* NetworkMgr: Ensure the `beforeWifiAction` framework will not re-schedule the same thing *ad vitam aeternam* if a previous connection attempt is still ongoing. (i.e., previously, on Android, if you backed out of the system settings, you entered the Benny Hill dimension, as NetworkMgr would keep throwing you back into the system settings ;p). This has a few implications on callbacks requested by subsequent connection attempts, though. Generally, we'll try to honor *explicitly interactive* callbacks, but `beforeWifiAction` stuff will be dropped (only the original cb is preserved). That's what prevents the aforementioned infinite loop, as the `beforeWifiAction` framework was based on the assumption that `turnOnWifi` somewhat guaranteed `isConnected` to be true on return, something which is only actually true on `hasWifiManager` platforms.
* NetworkMgr: In `prompt` mode, the above implies that the prompt will not even be shown for concurrent attempts, as it's otherwise extremely confusing (KOSync on Android being a prime example, as it has a pair of Suspend/Resume handlers, so the initial attempt trips those two because of the focus switch >_<").
* NetworkMgr: Don't attempt to kill wifi when aborting a connection attempt on `!hasSeamlessWifiToggle` (because, again, it'll break UX, and also because it might run at very awkward times (e.g., I managed to go back to KOReader *between* a FM/Reader switch at one point, which promptly caused `UIManager` to exit because there was nothing to show ;p).
* NetworkMgr: Don't drop the connectivity callback when `beforeWifiAction` is set to prompt and the target happens to use a connectivity check in its `turnOnWifi` implementation (e.g., on Kindle).
* Android: Add an `"ignore"` `beforeWifiAction` mode, that'll do nothing but schedule the connectivity check with its callback (with the intent being the system will eventually enable wifi on its own Soon(TM)). If you're already online, the callback will run immediately, obviously. If you followed the early discussions on this PR, this closely matches what happens on `!hasWifiToggle` platforms (as flagging Android that way was one of the possible approaches here).
* NetworkMgr: Bail out early in `goOnlineToRun` if `beforeWifiAction` isn't `"turn_on"`. Prompt cannot work there, and while ignore technically could, it would serve very little purpose given its intended use case.
* KOSync: Neuter the Resume/Suspend handlers early on `CloseDocument`, as this is how focus switches are handled on Android, and if `beforeWifiAction` is `turn_on` and you were offline at the time, we'd trip them because of the swap to system settings to enable wifi.
* KOSync: Allow `auto_sync` to be enabled regardless of the `beforeWifiAction` mode on `!hasSeamlessWifiToggle` platforms. Prompt is still a terrible idea, but given that `goOnlineToRun` now aborts early if the mode is not supported, it's less of a problem.
8 months ago
NiLuJe 2b13cd7dcb
Device: Make sure `input_no_key_repeat` survives a suspend/resume cycle (#10904)
I somehow assumed the repeat state snapshot used for restore was taken *after* disabling repeat, but obviously not ;o).

Fix #10902
8 months ago
NiLuJe 4d620d9fd2
Device: Try harder to properly setup the charging LED on plug/unplug (#10855)
By debouncing the call and delaying it some more.
8 months ago
zwim bedd422669
AutoSuspend: Handle a few corner-cases better (#10797)
* Enforce a minimal standby timer for the first standby after a resume.
* On Kobo, sleep a bit before standby.

This aims to alleviate race conditions causing visible refresh glitches on sunxi, especially when using an extremely low standby timer (i.e., below the defaults).
8 months ago
NiLuJe e7e0d2edb6
Kobo: Disable HW inversion on MTK (#10841)
Apparently, that doesn't quite work...

Followup to #10719
9 months ago
NiLuJe 21de1a832e Main: Move the G_reader_settings flush to Device:exit
I don't trust PB's input.closeAll not to be doing something wonky that
would trip an early abort.
9 months ago
NiLuJe d1bbdb5dad PocketBook: Run Generic:exit *last*
Makes more sense this way.

Re: #10828

Also clarify the UIManager "no dialogs left" message, and drop the
return value, as it's meaningless, we just want to break & return.
9 months ago
NiLuJe 5146358605 NetworkManager: Allow backends to report connection failures early
As early as turnOnWifi.
Implement it on hasWifiManager platforms, preventing useless
connectivity checks to run when they're obviously never going to work
because you're out of range of your AP.

Also implemented a flag to notify the backend if the connection attempt
was interactive or not.
Right now, interactive is extremely restricted, it basically means the
menu checkmark, or a gesture.
The intent being that for stuff like the beforeWifiAction framework, we
don't want the backend to spawn extra UI.
Specifically, for hasWifiManager platforms, we no longer spawn the AP
scan list on failure unless the caller was interactive.

TL;DR: beforeWifiAction is now much less obnoxious when you're obviously
not able to connect.
9 months ago
NiLuJe 22678ee5ff Misc: Review pass on the previous commits
* Unbreak the Device test
* Rename a few things
* Tweak a few comments
9 months ago
NiLuJe f44f92a864 Kobo: Run Generic:init dead last, like every other platform
This is semantically more correct, and should prevent platform-specific
weirdness if an ordering concern ever comes up (e.g., like it did for
the viewport stuff).
9 months ago
NiLuJe 71378b0b50 Startup: Move Device ctor/dtor shenanigans to the actual Device
constructors and destructors

No need to leak implementation details in there.
9 months ago
NiLuJe e9a84ca434 Reader: Move the "print exit code in a file" hack to the PB
implementation, where this mess belongs.

No other platform relies on this (because, spoiler alert, InkView \o/).
9 months ago
NiLuJe f4aca567ef Kobo: Allow disabling key repeats
Re #10743

Note that this only makes faulty switches slightly less annoying: for a
stuck switch, instead of a string of page turns, you'll get a single
missed page turn on the tap that actually releases the stuck contact...
9 months ago
NiLuJe 0db7509fe2
Kobo: Fix the input translation on the Elipsa 2E (#10802)
Apparently it mirrors on the Y axis. Or the panel vs. touch rotations are wonkier than expected or ...something.
9 months ago
zwim ac143ca9d6
Add forgotten f:close() (#10796) 9 months ago
yparitcher f3fc2ac353 do not allow clipboard to be nil
we use it as text anyway and test if it is the empty string also.

this fixes a crash in viewhtml when holding a selector with an empty clipboard, we try to contcate getClipboardText which is nil (on !SDL & !Android)
9 months ago
NiLuJe 9c8e55b3e5
Kobo: Yet another attempt at working around the hangs on the latest NXP boards (#10771)
* Notification: Drop the fencing from #10083; it never actually helped, and had subtle side-effects we could do without.
* VirtualKeyBoard: Flash on close, otherwise, some of the fast refresh glitches may be burned into the working buffer until a flash. Making sure we flash ourselves prevent it from sticking around on the page ;).
* util: Move `writeToSysfs` to base (i.e., `ffi/util`), as we need it there (and it actually makes more sense there anyway ;p).
* Bump base for https://github.com/koreader/koreader-base/pull/1645, which is where the actual workaround (hopefully) lives.

Re #8414, #9806, #10558
9 months ago
NiLuJe 689d9e2976
Kobo: Initial Elipsa 2E support (#10719)
Untested, but mostly everything should be there ;p.

Bumps base for MTK support (https://github.com/koreader/koreader-base/pull/1642)
9 months ago
NiLuJe 9ceb07a4c6
Kobo: Unbreak Aura One support (#10758)
Regression since #10728, Fix #10757
9 months ago
NiLuJe 21949c5521 Kobo: Apply the AW99703 smooth ramp off fix to all affected devices
e.g., at least the Clara 2E features the same controller & driver,
but it is likely found on a few other models.
10 months ago
NiLuJe f5e871d4ed NetworkInfo: Never show the token index
Now that I've seen it in action on a device, it's mostly useless, and,
if anything, confusing, because it's not static.
10 months ago
hasezoey 618f065de4
DeviceListener:onToggleFrontlight: add notification of "unchanged" (#10727) 10 months ago
hasezoey b1109a729e
Android: call "_decideFrontlightState" to keep "is_fl_on" in sync (#10731) 10 months ago
hasezoey 14347f0c18
Android - lights: return to previous level on cancel (#10726) 10 months ago
NiLuJe 17bdd56e02 Never export LD_LIBRARY_PATH
It's been made redundant by the RPATH changes

The only platform that gets the dubious honor of actually needing an
LD_LIBRARY_PATH is PocketBook, because of InkView.

Co-authored-by: Benoit Pierre <benoit.pierre@gmail.com>

Bump base to pull in the aforementioned RPATH changes ;).

https://github.com/koreader/koreader-base/pull/1638
10 months ago
Christian Kilb 6d7dccda13
[PocketBook]Add support for InkPad Color 2 (#10685)
Co-authored-by: Christian Kilb <christian.kilb@gmail.com>
10 months ago
NiLuJe d57325aaf6
NetworkManager: Enable "before wifi" action support on every hasWifiToggle platform (#10669)
* Enable before_wifi_action & after_wifi_action on hasWifiToggle platforms (which is basically all of 'em except naked SDL).
* Decouple restoreWifiAsync from hasWifiManger, because we can do that on other platforms (namely, Kindle. Probably PB, too, but WiFi is already a mess there, and I can't test it).
* Implement restoreWifiAsync on Kindle.
* Properly flag rM as hasWifiManager & hasFastWifiStatusQuery, because it is actually both of those (it uses our wpa_supplicant backend).
* Update the KOSync checks to take these changes into account, to properly disable auto_sync if necessary.
* Really made the Network* event signaling consistent. For realz this time.
* In an effort to make the whole beforeWifiAction framework somewhat usable there, we now assume connectivity is always available on !hasWifiToggle platforms...
10 months ago
NiLuJe 4194244951
GestureDetector: Make two_finger pans & swipes report the same sort of data than their standard brethren (#10649)
Namely, that swipes report the gesture's *starting* coordinates as `pos` (for hit-detection purposes), while pans (and basically everything else) use the *lift* coordinates (as well as provide a relative vector).

In each case, we now also provide a separate `start_pos`/`end_pos`, in case handlers need finer-grained data (e.g., anchoring UI elements to a swipe's lift coordinates).
10 months ago
ElimGarak1 4b475bee04
Recognize PocketBook InkPad 4 with new firmware (PB743G)/(PB743g) (#10655)
Extended addition of PocketBook InkPad 4 with firmware later U743g.6.8.885 (PB743G) because its device ID was corrected from PB743g to PB743G by firmware U743g.6.8.1719.
10 months ago
Martín Fernández 5336e2f11d
[ota]: deprecation check & notice (#10639) 10 months ago
Alistair Francis fc89b1affa
Remarkable: support the mainline touchscreen (#10585) 10 months ago
NiLuJe 08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
10 months ago
NiLuJe 752f23c85e
Input: Be more through in resetState (#10612)
Drop the actual slot data storage, in addition to the active references
10 months ago
NiLuJe 5c8143d9ac SDL: Fix initial position & size
Also keep sdl_window in sync with enforced dimensions on the emu.
10 months ago
NiLuJe 55869b82cb
PowerD: Unbreak frontlight toggle notifications outside of Kobo (#10597)
Fix #10588
Regression since #10305

While we're there, rejig the FL toggle callback shenanigans so that implementation details don't leak through to *other* implementations.
(i.e., leave the Kobo mess in Kobo land, with only a minimal impact on the public API and its implementation).
11 months ago
Frans de Jonge 64f778d97d
PocketBook: add alternative definition for PB840 (#10582)
Cf. #10579.
11 months ago
Benoit Pierre bb7ae20697
kindle: show require error trace (#10569) 11 months ago
zwim 1ce1fe1780
[plugin] AutoWarmth: Fix resume and frontlight issue (#10557)
Fixes a regression introduced in #10426, when suspending during night and resuming during daylight.
11 months ago
NiLuJe 2797a74a96
Kobo: Handle the newer Nia HW revision (#10520)
Fix #9590, closes #9591
11 months ago
yparitcher 8034858180 WakeupMgr: kinde: use a 90 sec proximity
sometimes my kindle fires the rtc alarm a tad too late so use a more generous timeout

the real fix would be to have validateWakeupAlarmByProximity return differently if the alarm is past or in the future, but i am too lazy
11 months ago
ElimGarak1 a18afc24b8
PB: Fix Inkpad 4 device id (#10481)
Turns out it's a lowercase G, and that matters ;).
12 months ago
roshavagarga d54c5acc11
PB: Add Inkpad 4 (#10468)
Fix #10444
12 months ago
NiLuJe 7e98b9de4b
PM: Minor refactor to suspend/resume code flow (#10426)
Make sure we only send Suspend/Resume events when we *actually* suspend/resume. This is done via the Device `_beforeSuspend`/`_afterResume` methods, and those were called by the *input handlers*, not the PM logic; which means they would fire, while the PM logic could actually take a smarter decision and *not* do what the event just sent implied ;).

(i.e., sleep with a cover -> suspend + actual suspend, OK; but if you then resume with a button -> input assumes resume, but PM will actually suspend again!).

Existing design issue made more apparent by #9448 ;).

Also fixes/generalizes a few corner-cases related to screen_saver_lock handling (e.g., don't allow USBMS during a lock).

And deal with the fallout of the main change to the Kobo frontlight ramp behavior ;).
12 months ago
NiLuJe fdea39c2d6
Input: Leave EV_SDL mostly alone in inhibitInput (#10430)
It's mostly not used for actual input, but sideband stuff that we don't want to miss.

Fix #10427
12 months ago
hrdl 552787db89
SDL: use render buffer size instead of window size (#10428)
Related to koreader/koreader-base#1610. Not sure if this is actually
needed, but for consistency the render buffer size should be used.
1 year ago
yparitcher 1102c030fa
Kindle: toggle cover events
Allow disabling the hall efect sensor via the sysfs knob, so the kindle system wont sleep & wake the device

for those of use that stay in koreader, are caseless and have get spurious wakeups
1 year ago
kpopconnoisseur 0533ec46d8
kindle voyage: no framework: whispertouch button activation
kindle: "no framework" voyage page turn buttons
kindle: update device tests
1 year ago
zwim 00b3594d44
Kobo: Refactor frontlight toggle ramp behavior (#10305)
* Rewrite the loop mechanism to use scheduled tasks instead of a single blocking-ish subprocess.
* Change the actual logic to be more pleasing to the eye, especially on newer devices, as those *may* natively ramp on set; and fix a bad interaction with that behavior that could lead to no ramp at all on ramp down.
* Simplify Generic's Suspend handling to deal with the refresh ordering in a saner manner. The screensaver might be visible a tad longer than before this change before the frontlight actually ramps off.
1 year ago
nairyo 65031ae14f
Dictionary lookup window: use from/to language to determine glyph form (#10184)
For example, to determine whether the Japanese or Chinese form should be shown.

* Dictionaries.lua - use iso3 codes everywhere
readerdictionary.lua - convert iso to bcp tag, to construct ifo_lang
isolanguage.lua - map from iso3 to full language name, map from iso3 to bcp language tag

* Make the full language names translatable

* Store ifo information from dictionaries.lua in downloaded dictionaries
1 year ago
NiLuJe 9f37863f00
rM: Handle input shenanigans on mainline kernels (#10168)
Add a dedicated handler to handle mixed pen + panel, when panel sends both mt + st and stylus only st
Don't stomp on panel slots in the Wacom protocol handler
Get rid of a few superfluous nil guards
Return early in the EV_KEY handler for touch-related events (i.e., BTN_)
1 year ago
NiLuJe d0b78c01aa
Hotfix followup to #10139 (#10151)
Don't blow up if we fall back to exec'ing ping
Fix https://github.com/koreader/koreader/pull/10139#issuecomment-1437678458
1 year ago
NiLuJe 5330c24b77
Device: Handle network info data gathering ourselves (#10139)
i.e., we now query routes, interfaces, wireless extensions & ping ourselves, dropping the dependency on specific CLI tools altogether.
1 year ago
NiLuJe 203094d47d Device:retrieveNetworkInfo: Drop the "HWaddr" bit from the parsed output
i.e., just display "ifname MAC"
1 year ago
NiLuJe 6dc41fe02a Device:retrieveNetworkInfo: Make "Default gateway" translatable
re: #8739
1 year ago
Andrej Shadura 328670b515
Device:retrieveNetworkInfo: Add a fallback to net-tools (#8739)
Some devices don't ship with iproute2 compatible tools, but may ship
with net-tools compatible ones.

Unify code w/ SDL's similar codepaths for its NetworkMgr:isConnected
implementation
1 year ago
yparitcher 706c8c5610 fix broken escaping 1 year ago
NiLuJe 15b236e3e9
Kobo: Mimic Nickel's poweroff behavior on sunxi (#10122)
It goes through init, unlike on other models.

Re: #10121
1 year ago
NiLuJe 96850c23a0
NetworkMgr: Refine isConnected check (#10098)
Much easier to deal with thanks to the cleanup work done in #10062 ;).

* `carrier` is set to 1 as soon as the device is *administratively* up (in practice, as soon as we run `ifconfig up`). This is perfectly fine for `isWifiOn`, but absolutely not for `isConnected`, because we are not, actually, connected to *anything*, no attempt at associating has even been made at that point. Besides being semantically wrong, in practice, this will horribly break the connectivity check, because it expects that `isConnected` means we can talk to at least the LAN.
* Delving into the Linux docs reveals that `operstate` looks like a better candidate, as it reflects *operational status*; for Wi-Fi, that means associated and successfully authenticated. That's... closer, but still not it, because we still don't have an IP, so we technically can't talk to anything other than the AP.
* So, I've brought out the big guns (`getifaddrs`), and replicated a bit of code that I already use in the USBNetwork hack on Kindle, to detect whether we actually have an IP assigned. (Other approaches, like `/proc/net/route`, may not be entirely fool-proof, and/or get complicated when IPv6 enters the fray (which it does, on Kobo, Mk. 8+ devices are IPv6-enabled)).

TL;DR: Bunch of C via ffi, and `isConnected` now returns true only when the device is operationally up *and* we have an IP assigned.

Pulls in https://github.com/koreader/koreader-base/pull/1579 & https://github.com/koreader/lj-wpaclient/pull/10
1 year ago
NiLuJe b1c30a7b1e
Input: Don't set unnecessary input translations when viewports are involved (#10104) 1 year ago
yparitcher 0e53631f48 NetworkManager: isWifiOn isConnected consistent usage.
cervantes kindle kobo remarkable: use sysfs carrier file to determine connection state

cleanup hasWifiManager checks

gateway check: use ip if available

Fixes: #10087
Closes: #10092
1 year ago
zwim 50ab620da1
Screen Warmth: Fix a bug with syncing screen warmth on start (#10066) 1 year ago
Sargun Vohra 15fb73384f
EInk: Add a setting to toggle flashing on pages with images (#10049)
With minor code cleanups along the way ;).
1 year ago
yparitcher 747c3eaf9d
Kindle: NetworkMgr: isWifiOn isConnected (#10059)
isWifiOn for kindle currently returns if the interface is connected, change this to doing what is says isWifiOn the file is only present if the wireless interface is up.

isConnected pings the gateway, rely on the kernel for a more reliable check.

Whan connecting to my android phone's wifi hotspot to remote debug from my phone, the network is connected yet the phone(gateway) does not respond to pings leading koreader to shut down the connection thinking it is unsuccessful
1 year ago
Jej 198a84a772
Minor updates in comments (#10038) 1 year ago
NiLuJe bb900aa9a7
WakeupMgr: Explicitly invalidate the current alarm in unsetWakeupAlarm (#10032)
Apparently, toggling the rtc interrupt doesn't quite work on some boards? (fix #10031)

(Drive-by tweak to UIManager: Less confusing logging when quit gets tripped both via quit
and _gated_quit (i.e., on poweroff))
1 year ago
NiLuJe 16fb32d5a4
Kobo: Unbreak a slew of devices (#10019)
Fix #10020, Regression since #10008

(hasMultiTouch is set by `Generic.init`, but we use it before that;
so just set it properly ourselves in our superclass, because we don't
actually need to rely on Generic's autodetection).
1 year ago
NiLuJe f74921724a Android: Don't pile on event hooks to handle viewport changes
Untested, hopefully sane :s
1 year ago
NiLuJe 64af750c6c Kobo: Unbreak input translation when a viewport is active
Generic is responsible for setting up the translation via input hooks;
since our own input hooks involve swapping or mirroring X/Y, we need to
run our own hooks *first*, so that the viewport translation actually
does the right thing...

Probably broken for a good long while, I'd just assumed the inaccuracies
on the H2O were due to the IR grid... :/.

Reported @ https://www.mobileread.com/forums/showthread.php?t=351340
1 year ago
NiLuJe 5c1305719a
Kobo: Unbreak automagic_sysfs on the Libra 2 (#9998)
Regression since #9902, because I'd forgotten that the default Kobo block *does* set those...
Reported by @ptrm on Gitter, thanks!

Take two, essentially revert 8a16518918
We have defaults for most of those in the Kobo superclass, so these can never really be `nil`.
1 year ago
NiLuJe 8d133507ad Device: Handle screen_saver_lock + WiFi corner-cases
If Wi-Fi is restored on resume, going back to suspend while the
screensaver is shown via the screen_saver_lock flag would have attempted
to suspend *without* killing Wi-Fi first.

This implodes on the vast majority of NTX boards, so take the usual
precautions.
1 year ago
NiLuJe 144706654d Device: Drop unused device capabilities 1 year ago
Robert-Jan de Dreu c9df3a000f
PB: Implement GSensor support for more moderm devices (#9873)
(Bumps base for https://github.com/koreader/koreader-base/pull/1566)
1 year ago
NiLuJe 788ccac561
Input/Device: Refactor Gyro events handling (#9935)
* Get rid of the `canToggleGSensor` Device cap, it's now mandatory for `hasGSensor` devices. (This means Kindles can now toggle the gyro, fix #9136).
* This also means that `Device:toggleGSensor` is now implemented by `Generic`.
* Update the Screen & Gyro rotation constants to be clearer (c.f., https://github.com/koreader/koreader-base/pull/1568) (/!\ This might conceivably break some `rotation_map` user-patches).
* Input: Move the platform-specific gyro handling to Device implementations, and let Input only handle a single, custom protocol (`EV_MSC:MSC_GYRO`).
* Input: Refine the `rotation_map` disable method implemented in 43b021d37c. Instead of directly poking at the internal field, use a new method, `disableRotationMap` (/!\ Again, this might break some `rotation_map` user-patches).
* Input: Minor tweaks to event adjust hooks to make them more modular, allowing the Kobo implementation to build and use a single composite hook. API compatibility maintained with wrappers.
1 year ago
Frans de Jonge 99df719562
[i18n] Make gateway strings translateable (#9933)
See <https://www.mobileread.com/forums/showthread.php?p=4282773#post4282773>.
1 year ago
NiLuJe 9b936d3f3c AutoSuspend: On Kindle, periodically reset the system's timeout so that
our own timeout can actually be honored.

Fix #7874, fix #9868
1 year ago
NiLuJe 3a8d94ad56 Kindle: Unbreak ScreenSaver tracking on SO devices
Fix #9883, regression since c7f5bfb72a
1 year ago
NiLuJe 8a16518918 Kobo: Only probe necessary entries in automagic_sysfs codepath
e.g., on the Sage, only the power_dev stuff changes between HW revs,
the rest of the hardcoded stuff is still relevant, so skip probing
those.
1 year ago
Robert-Jan de Dreu 9a573ae812
PocketBook: remove old input selection global (#9871) 1 year ago
charlesangus cad4c24118
Kobo: Handle power button input device on new Sage HW revision (#9896)
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: NiLuJe <ninuje@gmail.com>
1 year ago
zwim d1cd2a1c8d
Restart KOReader: add a ConfirmBox instead of a plain InfoMessage (#9853) 1 year ago
Robert-Jan de Dreu f953f041ea
PocketBook: use inkview to adjust image colors to look more bright (#9756)
Adjust image colors for PocketBook color devices to supply
brighter image colors. Make it a config option so we can
adjust it to a sensible default for all devices later.
Also enable HW Dithering for color devices: the dithering
flag allows us to figure out if what is viewed is an
image or text. This way we can enable color rendering
or not based on the dithering flag.
1 year ago
NiLuJe 3a92f3385c PB: Handle KEY_HOME
It possibly historically never made it out of InkView in the past, but
apparently that's no longer the case and/or every other key behaves the
same way anyway, so it's harmless at worst.

Fix #9791
1 year ago
NiLuJe c5700b718d Android: Get rid of the Camera key hack
Unnecessary now that we have a standard mechanism to disable touch input
;).
2 years ago
NiLuJe 58ba4076a8 Kobo: Detect the original Touch "A" variant properly.
Because, of course, it has different input quirks than the B...

Fix #9742
2 years ago
NiLuJe c7f5bfb72a ScreenSaver: Handle Power button presses properly if the screensaver
lock is enabled

Fix #9744
2 years ago
NiLuJe 47734eefef DeviceListener: Unify Notification usage 2 years ago
zwim a1256f6758
Fix regression (introduced in #9657) (#9759)
This should fix #9741.
2 years ago
zwim cd69382934
[plugin] AutoWarmth: fix frontlight toggle during day (#9735) 2 years ago
NiLuJe 9863a9c0bb ExternalKeyboard: Use the evdev number passed along by base to avoid sweeping the full list of input devices
This required some... creative thinking to avoid complexifying common
Input/UIManager codepaths ;p.
2 years ago
NiLuJe c740ee3174 Kindle: Make sure Device:untar actually works
The fuse proxy strikes again... Fix #9704
2 years ago
NiLuJe 5cb358f653 PocketBook: Move low-level input event type translation to the low-level
input modules.

There was a weird mix of touch being handled there, and key/msc here,
which was weird and made the logs extremely confusing to read.
2 years ago
NiLuJe 3dd87a38b3 Kindle: Oh, hey, turns out that was the new Basic
I'd completely forgotten they'd announced one ;o).
2 years ago
NiLuJe 43b021d37c Input: Allow disabling rotation_map entirely
(This involves moving it to the instance object to avoid inheritance).

Pocketbook: Disable rotation_map on the Era (fix #9556)
It would appear that InkView handles the translation for us, now...
2 years ago
NiLuJe 9470d473da Kindle: Lower some PM log messages to debug 2 years ago
NiLuJe b1504ea718 Kobo: Downgrade some suspend logging messages to debug, and *all*
standby logging messages to debug (except for warnings/errors, of course).
2 years ago
NiLuJe cac37ad018 Kobo: Flag all the boards similar to the Libra 2 as unreliable (Clara 2E
& Nia).

And also disable the jump marker on those, like we did for the Libra 2.
2 years ago
NiLuJe bf574bfaaf GestureDetector: Only show the final adjustGesCoordinate log if the gesture actually was adjusted. 2 years ago
NiLuJe b523c2e8b9 InputContainer: Fall cleanup ;).
Get rid of the doc & seqtext fields, as they are not actually used (nor
are they particularly useful, the event handler's name should be pretty
self-explanatory).

Also, tweak the key_events documentation to highlight the quirks of the
API, especially as far as array nesting is involved...

Random drive-by cleanup of the declarations of key_events & ges_events
to re-use the existing instance object (now that we know they're sane
;p) for tables with a single member (less GC pressure).
2 years ago