Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: ignore touchscreen by user request (using a hardware key) #5164

Merged
merged 2 commits into from Aug 2, 2019

Conversation

@pazos
Copy link
Contributor

commented Aug 1, 2019

Requires koreader/koreader-base#939
Requires koreader/android-luajit-launcher#163

Fixes #3978

Right now the behaviour is hardcoded to AKEYCODE_CAMERA but can be changed easily by generating a new event_map.

To test the behaviour, since both the emulator and my phone lack the proper hardware key, I'm using adb shell input keyevent 27

A toast will be shown to give feedback to the user about the new touchscreen state (enabled/disabled).

@Frenzie @NiLuJe @poire-z @robert00s Please feel free to suggest better ways of doing this (including base and luajit-launcher stuff), because my brain is starting to melt-down.

@pazos pazos force-pushed the pazos:android_ignore_touchscreen branch from 3942d5b to 8c294a7 Aug 1, 2019

@Frenzie Frenzie added this to the 2019.08 milestone Aug 1, 2019

@Frenzie Frenzie added the Android label Aug 1, 2019

@Frenzie

Frenzie approved these changes Aug 1, 2019

Copy link
Member

left a comment

I'm inclined to think this belongs in front, so no objections here. My message in #3978 (comment) is just about the couple of strings that may be hardcoded in luajit-launcher.

@pazos

This comment has been minimized.

Copy link
Contributor Author

commented Aug 1, 2019

I'm inclined to think this belongs in front, so no objections here. My message in #3978 (comment) is just about the couple of strings that may be hardcoded in luajit-launcher.

Yup, I got rid of the showToast hardcoded stuff and now the toast is shown via android.notification

@pazos pazos force-pushed the pazos:android_ignore_touchscreen branch from 8c294a7 to 194cfeb Aug 1, 2019

@poire-z

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2019

Please feel free to suggest better ways of doing this

I can't comment much about the android/java infrastucture/code, but looking at your 3 PRs, they all look clean and straightforward. So, can't suggest any better ways :)

@NiLuJe

This comment has been minimized.

Copy link
Member

commented Aug 1, 2019

What he said ;).

@pazos pazos changed the title [wip]: Android ignore touchscreen by user request (using a hardware key) Android ignore touchscreen by user request (using a hardware key) Aug 2, 2019

@pazos pazos changed the title Android ignore touchscreen by user request (using a hardware key) Android: ignore touchscreen by user request (using a hardware key) Aug 2, 2019

@pazos pazos merged commit 1045616 into koreader:master Aug 2, 2019

1 check was pending

ci/circleci Your tests are queued behind your running builds
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.