Use std::bitset for tracking pointers in the dispatcher
Convert pointerIds to std::bitset. This will allow us to do
bitwise operations with other fields that already use std::bitset.
Bug: 211379801
Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests
Change-Id: I0347b5e171a0597fc88ba628f40dcf6cd59ea093
diff --git a/services/inputflinger/dispatcher/CancelationOptions.h b/services/inputflinger/dispatcher/CancelationOptions.h
index 512cb6e..48f9f2b 100644
--- a/services/inputflinger/dispatcher/CancelationOptions.h
+++ b/services/inputflinger/dispatcher/CancelationOptions.h
@@ -16,7 +16,8 @@
#pragma once
-#include <utils/BitSet.h>
+#include <input/Input.h>
+#include <bitset>
#include <optional>
namespace android {
@@ -47,7 +48,7 @@
std::optional<int32_t> displayId = std::nullopt;
// The specific pointers to cancel, or nullopt to cancel all pointer events
- std::optional<BitSet32> pointerIds = std::nullopt;
+ std::optional<std::bitset<MAX_POINTER_ID + 1>> pointerIds = std::nullopt;
CancelationOptions(Mode mode, const char* reason) : mode(mode), reason(reason) {}
};