koreader / android-luajit-launcher

Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI
MIT License
130 stars 83 forks source link

Add Linfiny eNote / Avalue ENT-13T1 / QuirkLogic Papyr #472

Closed davide125 closed 5 months ago

davide125 commented 5 months ago

These are all OEM variations of the same hardware, which itself originates from the Sony DPT-RP1 design that was licensed to Linfiny.

From https://github.com/koreader/koreader/issues/8482#issuecomment-1986743868

Commercial name of the product: QuirkLogic Papyr Android version: 5.1 Device has no lights Freescale/NXT is the only eink driver that works Report: test.log

I tested this on my QuirkLogic Papyr and it seems to work fine.


This change is Reviewable

davide125 commented 5 months ago

Report with this PR applied: test.log

I noticed is says "Lights: generic" despite having set the quirk for no lights, not sure if that's normal or not.

pazos commented 5 months ago

Report with this PR applied: test.log

I noticed is says "Lights: generic" despite having set the quirk for no lights, not sure if that's normal or not.

Yup, the LightsFactory always returns a LightsController. If no match happens the else branch returns a GenericController in https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/device/LightsFactory.kt#L82-L85

What the QUIRK_NO_LIGHTS does is tell the frontend there're no lights, so the program doesn't add an action to the relevant settings in KO.

Given that the setting was never tested by any maintainer I don't recall if gestures are affected (ie: skipped) when a device declares no lights. I think you can test that doing the regular gesture (bright changes by vertical scrolling the left border of the screen).

On a device with lights, like a phone, you'll see it changes the screen brightness and a notification pops up. No idea what happens on your device with no lights.

davide125 commented 5 months ago

Given that the setting was never tested by any maintainer I don't recall if gestures are affected (ie: skipped) when a device declares no lights. I think you can test that doing the regular gesture (bright changes by vertical scrolling the left border of the screen).

On a device with lights, like a phone, you'll see it changes the screen brightness and a notification pops up. No idea what happens on your device with no lights.

I wasn't able to trigger the gesture on my device, so I assume it's being skipped. fwiw there is a brightness slider in the device Settings app under Display, defaulting to around 25%, but it doesn't seem to do anything at all when I change it, so I assume the vendor was just lazy and left it around.