Use std::vector when sending keyCodes

We are currently sending a raw pointer to keyCodes and a size. The size
is also used for outFlags, but it's not well-documented anyways.

Eventually, we may want to just return the flags instead of returning
the boolean.

For now, though, just change the incoming parameter to a vector to make
it less errorprone.

Bug: 228005926
Test: atest libinput_tests inputflinger_tests
Change-Id: I6cc2f5d9b3b7b7c3c120a779ea4cfb4b06e27d1e
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
index 637b1cb..d6b72ed 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
@@ -4021,10 +4021,11 @@
     return AKEY_STATE_UNKNOWN;
 }
 
-bool TouchInputMapper::markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
-                                             const int32_t* keyCodes, uint8_t* outFlags) {
+bool TouchInputMapper::markSupportedKeyCodes(uint32_t sourceMask,
+                                             const std::vector<int32_t>& keyCodes,
+                                             uint8_t* outFlags) {
     for (const VirtualKey& virtualKey : mVirtualKeys) {
-        for (size_t i = 0; i < numCodes; i++) {
+        for (size_t i = 0; i < keyCodes.size(); i++) {
             if (virtualKey.keyCode == keyCodes[i]) {
                 outFlags[i] = 1;
             }