summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputCommonConverter.cpp
diff options
context:
space:
mode:
author Yeabkal Wubshit <yeabkal@google.com> 2022-10-06 15:13:34 -0700
committer Yeabkal Wubshit <yeabkal@google.com> 2022-10-07 19:48:06 +0000
commiteee671eb373e06c9ddd9920921fa0c4b60cfff0a (patch)
tree9b4692db7d5e808d099edeb8da414d50dc2e231d /services/inputflinger/InputCommonConverter.cpp
parentd110ab8ea07c197cb849e52130ebde18ce392f1a (diff)
Add MAXIMUM_VALID_AMOTION_EVENT_AXIS_VALUE
This helps to standardize checks for the max possible motion event axis value. Bug: 32830165 Test: static assert added Change-Id: I664ee86b065745720a1af4d07c577eb088525d3d
Diffstat (limited to 'services/inputflinger/InputCommonConverter.cpp')
-rw-r--r--services/inputflinger/InputCommonConverter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/inputflinger/InputCommonConverter.cpp b/services/inputflinger/InputCommonConverter.cpp
index 8aee39fd0b..23b6f57b23 100644
--- a/services/inputflinger/InputCommonConverter.cpp
+++ b/services/inputflinger/InputCommonConverter.cpp
@@ -263,6 +263,8 @@ 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);
+static_assert(static_cast<common::Axis>(AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE) ==
+ static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_16));
static common::VideoFrame getHalVideoFrame(const TouchVideoFrame& frame) {
common::VideoFrame out;