diff options
author | Siarhei Vishniakou <svv@google.com> | 2023-12-06 11:23:41 -0800 |
---|---|---|
committer | Siarhei Vishniakou <svv@google.com> | 2023-12-11 17:16:34 +0000 |
commit | 366fb5bfcb2fd14504da9702759b431840bd0caf (patch) | |
tree | 5d2b4878d776ca5e3026807d5b6696ba7235133c /include | |
parent | d28755ab6ca790ba041bfed69a0b28a4375c205f (diff) | |
download | native-366fb5bfcb2fd14504da9702759b431840bd0caf.tar.gz |
InputDispatcher: dump window in a separate function
This makes it more convenient to dump windows from other places during
debugging. For example, this could also be called from setInputWindows
to inspect all of the window flags that might be changing.
Bug: 312714754
Test: adb shell dumpsys input
Change-Id: I2ace23bec1231f3a318e1b6a19f146b588e077b6
Diffstat (limited to 'include')
-rw-r--r-- | include/input/PrintTools.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/input/PrintTools.h b/include/input/PrintTools.h index 63c0e40e4e..83fffa37c6 100644 --- a/include/input/PrintTools.h +++ b/include/input/PrintTools.h @@ -20,6 +20,7 @@ #include <map> #include <optional> #include <set> +#include <sstream> #include <string> #include <vector> @@ -33,6 +34,13 @@ std::string bitsetToString(const std::bitset<N>& bitset) { return bitset.to_string(); } +template <class T> +std::string streamableToString(const T& streamable) { + std::stringstream out; + out << streamable; + return out.str(); +} + template <typename T> inline std::string constToString(const T& v) { return std::to_string(v); |