EventHub: Ensure bit arrays are large enough to store all event codes

We were previously initializing bit arrays with a min size equaling to
the MAX value for the event type (i.e. initialize array of min size
KEY_MAX for EV_KEY). This is incorrect, because the max value could be a
possible valid value, in which case it could not be stored in the array.

The bit arrays should be initialzed with the min size equaling the count
of the values (CNT == MAX + 1; e.g. KEY_CNT).

Bug: 290938220
Test: None
Change-Id: I1fa748f521a8539da444a4ae6e31cc4fb49be138
diff --git a/services/inputflinger/reader/include/EventHub.h b/services/inputflinger/reader/include/EventHub.h
index 8347df8..0bcab42 100644
--- a/services/inputflinger/reader/include/EventHub.h
+++ b/services/inputflinger/reader/include/EventHub.h
@@ -626,16 +626,16 @@
 
         ftl::Flags<InputDeviceClass> classes;
 
-        BitArray<KEY_MAX> keyBitmask;
-        BitArray<KEY_MAX> keyState;
-        BitArray<REL_MAX> relBitmask;
-        BitArray<SW_MAX> swBitmask;
-        BitArray<SW_MAX> swState;
-        BitArray<LED_MAX> ledBitmask;
-        BitArray<FF_MAX> ffBitmask;
-        BitArray<INPUT_PROP_MAX> propBitmask;
-        BitArray<MSC_MAX> mscBitmask;
-        BitArray<ABS_MAX> absBitmask;
+        BitArray<KEY_CNT> keyBitmask;
+        BitArray<KEY_CNT> keyState;
+        BitArray<REL_CNT> relBitmask;
+        BitArray<SW_CNT> swBitmask;
+        BitArray<SW_CNT> swState;
+        BitArray<LED_CNT> ledBitmask;
+        BitArray<FF_CNT> ffBitmask;
+        BitArray<INPUT_PROP_CNT> propBitmask;
+        BitArray<MSC_CNT> mscBitmask;
+        BitArray<ABS_CNT> absBitmask;
         struct AxisState {
             RawAbsoluteAxisInfo info;
             int value;