Store coords and properties as vector in args

Before this CL, NotifyMotionArgs stored PointerCoords and
PointerProperties in a fixed-size array. Upon creation of a new object,
some of that data typically remained uninitialized.

At the same time, the copy assignment operator was defaulted, which
meant that the uninitialized data was getting accessed in order to copy
the object.

The sanitizers identify this as a problem and crash.

To fix this, store these objects inside vectors.

Bug: 271455682
Test: atest inputflinger_tests
Change-Id: I9dba29f75df59a21f8ed7fd0f46fd1f6d45f2eef
diff --git a/services/inputflinger/InputDeviceMetricsCollector.cpp b/services/inputflinger/InputDeviceMetricsCollector.cpp
index 2319d51..220de8f 100644
--- a/services/inputflinger/InputDeviceMetricsCollector.cpp
+++ b/services/inputflinger/InputDeviceMetricsCollector.cpp
@@ -128,10 +128,10 @@
 }
 
 std::set<InputDeviceUsageSource> getUsageSourcesForMotionArgs(const NotifyMotionArgs& motionArgs) {
-    LOG_ALWAYS_FATAL_IF(motionArgs.pointerCount < 1, "Received motion args without pointers");
+    LOG_ALWAYS_FATAL_IF(motionArgs.getPointerCount() < 1, "Received motion args without pointers");
     std::set<InputDeviceUsageSource> sources;
 
-    for (uint32_t i = 0; i < motionArgs.pointerCount; i++) {
+    for (uint32_t i = 0; i < motionArgs.getPointerCount(); i++) {
         const auto toolType = motionArgs.pointerProperties[i].toolType;
         if (isFromSource(motionArgs.source, AINPUT_SOURCE_MOUSE)) {
             if (toolType == ToolType::MOUSE) {