When the pad is stuck down, still allow ttc
That was a prior fix to prevent physical clicks where there are no
fingers present on the pad. This would occur when the case bent and
pressed the button in, so naturally it should count as a physical click.
As soon as a finger was re-introduced to the pad a physical click would
be triggered if the button was still down. As a result, if your case
is bent for a long time (due to a mechanical malfunction or leaning on
the case in a strange way) the behavior is quite strange, because as
a finger might touch the pad many seconds after the click and it will
immediately trigger a button-down event and never trigger a button-up.
This CL prevents this from happening by only allowing a small window of
time after the click for a finger to appear. However, while the button
is down (even with no fingers) tap-to-click is suppressed. So this CL
also modifies this code in the tap-to-click state machine to allow ttc
to still trigger if the button is stuck down in error.
As a result, you should still be able to use the touchpad as expected
when it is stuck in the "clicked down" position.
BUG=chromium:380842
TEST=built on a Pit. First, make sure TTC and phys click work normally,
then press button down with a non-conductive object (a plastic pen) and
confirm it does not click. Then hold the pad down with the object and
confirm that you can still move the cursor as expected and tap-to-click
works as expected. Additionally, a test has been added to the touch-
test suite to check for regressions, and all existing tests still pass.
CQ-DEPEND=I0efc4cd4cd9503e08059e2dbd230d5446d3e5bd1
Change-Id: If00ffd90631abee689b53ad85a4702aea58e64e4
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/206363
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
2 files changed