summaryrefslogtreecommitdiff
path: root/include/input/PrintTools.h
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-05-03 13:54:30 -0700
committer Siarhei Vishniakou <svv@google.com> 2023-06-27 01:24:57 +0000
commit0836a307028a9719a1c25f9ac044b68d201607d8 (patch)
tree04a6ec4ddb5d2bc4ae612fe272ae0c65cc95c3cd /include/input/PrintTools.h
parentc916f109bf1f7866227228ccb745a127fc741242 (diff)
Store pointers per-device
Previously, input dispatcher assumed that a single input device is active. However, we are trying to add multi-device support. In this CL, store the pointers inside touched windows on a per-device basis. This CL should not cause any behaviour changes. We expect there to be a single device active at a time still. Bug: 211379801 Bug: 281806933 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: I73fc4adcf306bb49e153f3daeed68753e0632c86 Signed-off-by: Siarhei Vishniakou <svv@google.com>
Diffstat (limited to 'include/input/PrintTools.h')
-rw-r--r--include/input/PrintTools.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/input/PrintTools.h b/include/input/PrintTools.h
index 0ca6fa30ce..0e3fbb1982 100644
--- a/include/input/PrintTools.h
+++ b/include/input/PrintTools.h
@@ -27,6 +27,9 @@ namespace android {
template <size_t N>
std::string bitsetToString(const std::bitset<N>& bitset) {
+ if (bitset.none()) {
+ return "<none>";
+ }
return bitset.to_string();
}