Handle button state for haptic touchpads
ChromiumOS will put haptic touchpads into host-controlled mode, meaning
we must determine the state of the "physical" button.
In this host-controlled, the touchpad does not perform haptic feedback for
button click, but continues to send button state events. The gesture
library will be responsible for determining the correct button state
based on the force applied to the touchpad. Ozone will then use the
button state to tell the touchpad to perform haptic feedback.
This CL rewrites the incoming button state for haptic touchpads, and
adds a field to outgoing button events to indicate if it was generated
by a tap or physical button.
BUG=b:203458325
TEST=Manual testing with haptic touchpad, unittests
Change-Id: I59632a53bb0473f13e1d55c59084b48cd84aa63f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/3227375
Tested-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Jora Jacobi <jora@google.com>
Reviewed-by: Kenneth Albanowski <kenalba@google.com>
Commit-Queue: Sean O'Brien <seobrien@chromium.org>
27 files changed