summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputCommonConverter.cpp
diff options
context:
space:
mode:
author Harry Cutts <hcutts@google.com> 2022-12-07 18:16:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-12-07 18:16:24 +0000
commite84bf3ec54f6f555a8294a40e8e98704b2c8de91 (patch)
tree8b6b968fae9d2757850bbcb5680a4cade150daca /services/inputflinger/InputCommonConverter.cpp
parenta9a058feb8814df2e904c645a05b78b9feac628c (diff)
parent6a778e81cd549ed9dfc11b7b59a86f796b33c300 (diff)
Merge "Add asserts for new HAL axes in InputCommonConverter"
Diffstat (limited to 'services/inputflinger/InputCommonConverter.cpp')
-rw-r--r--services/inputflinger/InputCommonConverter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/inputflinger/InputCommonConverter.cpp b/services/inputflinger/InputCommonConverter.cpp
index 628ce6fc9a..b292c09350 100644
--- a/services/inputflinger/InputCommonConverter.cpp
+++ b/services/inputflinger/InputCommonConverter.cpp
@@ -263,7 +263,10 @@ static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_13) == common
static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_14) == common::Axis::GENERIC_14);
static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_15) == common::Axis::GENERIC_15);
static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_16) == common::Axis::GENERIC_16);
-// TODO(hcutts): add GESTURE_X_OFFSET and GESTURE_Y_OFFSET.
+static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GESTURE_X_OFFSET) ==
+ common::Axis::GESTURE_X_OFFSET);
+static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET) ==
+ common::Axis::GESTURE_Y_OFFSET);
// If you added a new axis, consider whether this should also be exposed as a HAL axis. Update the
// static_assert below and add the new axis here, or leave a comment summarizing your decision.
static_assert(static_cast<common::Axis>(AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE) ==