Change NamedEnum unknow enum string format from hexical to decimal.
Test: atest libinput_tests
Change-Id: I80ee324805ed6ae8e1aea13f2fccc81a681d3336
diff --git a/include/input/NamedEnum.h b/include/input/NamedEnum.h
index 1d987fe..6562348 100644
--- a/include/input/NamedEnum.h
+++ b/include/input/NamedEnum.h
@@ -115,7 +115,7 @@
// 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, const char* fallbackFormat = "0x%08x") {
+ static const std::string string(E val, const char* fallbackFormat = "%02d") {
std::string result;
std::optional<std::string_view> enumString = enum_name(val);
result += enumString ? enumString.value() : base::StringPrintf(fallbackFormat, val);