anselm94 / Torchie-Android

Hold volume buttons to turn on/off torch anytime
https://torchieapp.wordpress.com/
GNU General Public License v2.0
63 stars 26 forks source link

Use timeout when waiting for second Vol button action #19

Closed ronso0 closed 5 years ago

ronso0 commented 6 years ago

Torchie turns on when I press both Vol buttons at once. Though, 'at once' rarely is true, there's always a tiny delay between the two button actions.

Which turns out to be feature, because to toggle your LED: you can slide over the Vol rocker in any direction you can press/release both buttons discretely one after the other, which increases accessibility IMO

..but also a bug: on my device, Torchie appears to wait more than 2min for that second button press, and the LED turned on unnoticed in my pocket quite a few times...and sometimes I could not toggle the LED afterwards

Reproduce: make sure Torchie is turned off lock screen, screen off press Vol + wait up to 2 minutes press Vol -

LED turns on

I think a timeout of a few seconds would fix the bug and also keep the accessibility feature.

htc desire x android 4.1.2 aokp-1.0

anselm94 commented 5 years ago

@ronso0 Thanks for the suggestion. Will look into this enhancement. Sorry for the late reply

CrimsonFork commented 5 years ago

Same on my device, just to confirm. Though after turning on, I can disable it by pressing the first button again.

anselm94 commented 5 years ago

@OffifialMITX @ronso0 This issue is fixed with Torchie 3.2 release. Can you confirm with the latest version in Google Play Store?

CrimsonFork commented 5 years ago

I'll wait for the F-Droid release but thanks for the heads up.

ronso0 commented 5 years ago

I don't use the playstore anymore, either. is there some CI where I can pick up build artifacts/apks?

ronso0 commented 5 years ago

Thx you worked on it! no more unlocking and using the 'quick toggles'