[input_reader] Add touchpad to non-legacy mode
Add the Touchpad protocol to non-legacy mode to prevent a
double Read from happening in InputInterpreter::Read.
SCN-1237 #comment
TEST: fx run-image-test input_reader_unittests
Change-Id: I5488c0a887722ab7f939bb66ace7944d380a1825
diff --git a/bin/ui/input_reader/hid_decoder.cc b/bin/ui/input_reader/hid_decoder.cc
index afea27e..72e6808 100644
--- a/bin/ui/input_reader/hid_decoder.cc
+++ b/bin/ui/input_reader/hid_decoder.cc
@@ -12,7 +12,8 @@
bool HidDecoder::use_legacy_mode() const {
Protocol p = protocol();
return p != Protocol::Gamepad && p != Protocol::Buttons &&
- p != Protocol::LightSensor && p != Protocol::Touch;
+ p != Protocol::LightSensor && p != Protocol::Touch &&
+ p != Protocol::Touchpad;
}
} // namespace mozart