Add touchableRegion to touch occlusion dump
And format type as decimal in case we can't name the enum.
Test: Verify logs
Change-Id: I0674f30597b67e3330f9053c7576fb7bf3dcf6ef
diff --git a/include/input/NamedEnum.h b/include/input/NamedEnum.h
index 42cfb12..1d987fe 100644
--- a/include/input/NamedEnum.h
+++ b/include/input/NamedEnum.h
@@ -115,10 +115,10 @@
// Do not specialize it to a large number to avoid performance issues.
// The recommended maximum enum number to specialize is 64.
template <typename E>
- static const std::string string(E val) {
+ static const std::string string(E val, const char* fallbackFormat = "0x%08x") {
std::string result;
std::optional<std::string_view> enumString = enum_name(val);
- result += enumString ? enumString.value() : base::StringPrintf("0x%08x", val);
+ result += enumString ? enumString.value() : base::StringPrintf(fallbackFormat, val);
return result;
}
};