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
diff --git a/include/android/input.h b/include/android/input.h
index 7080386..d906af6 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -772,8 +772,17 @@
*/
AMOTION_EVENT_AXIS_GENERIC_16 = 47,
+ /**
+ * Note: This is not an "Axis constant". It does not represent any axis, nor should it be used
+ * to represent any axis. It is a constant holding the value of the largest defined axis value,
+ * to make some computations (like iterating through all possible axes) cleaner.
+ * Please update the value accordingly if you add a new axis.
+ */
+ AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GENERIC_16,
+
// NOTE: If you add a new axis here you must also add it to several other files.
// Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
+ // Update AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE accordingly as well.
};
/**