diff options
| author | 2020-11-13 16:11:39 +0000 | |
|---|---|---|
| committer | 2020-11-18 10:13:22 +0000 | |
| commit | 5fd822d643ff88670431cb86efef2d2cea40107d (patch) | |
| tree | 6ce91c62ca5519ae13566aa5fb70a018fa70e272 | |
| parent | 16d09068027eb4b1bd18b8fe5089b10ee2a7dea5 (diff) | |
Improve dump: type & touchOcclusionMode
Try to output type name, otherwise fallback to decimal on dump. Also
include occlusion mode.
Test: adb shell dumpsys input, verify output
Change-Id: I401a9b28de2958d5564f928834dfb7e5313a9031
| -rw-r--r-- | services/inputflinger/dispatcher/InputDispatcher.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp index ff5f6d876c..b28bff2241 100644 --- a/services/inputflinger/dispatcher/InputDispatcher.cpp +++ b/services/inputflinger/dispatcher/InputDispatcher.cpp @@ -4490,7 +4490,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { dump += StringPrintf(INDENT3 "%zu: name='%s', id=%" PRId32 ", displayId=%d, " "portalToDisplayId=%d, paused=%s, focusable=%s, " "hasWallpaper=%s, visible=%s, alpha=%.2f, " - "flags=%s, type=0x%08x, " + "flags=%s, type=%s, " "frame=[%d,%d][%d,%d], globalScale=%f, " "applicationInfo=%s, " "touchableRegion=", @@ -4501,7 +4501,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { toString(windowInfo->hasWallpaper), toString(windowInfo->visible), windowInfo->alpha, windowInfo->flags.string().c_str(), - static_cast<int32_t>(windowInfo->type), + NamedEnum::string(windowInfo->type).c_str(), windowInfo->frameLeft, windowInfo->frameTop, windowInfo->frameRight, windowInfo->frameBottom, windowInfo->globalScaleFactor, @@ -4510,11 +4510,13 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { dump += StringPrintf(", inputFeatures=%s", windowInfo->inputFeatures.string().c_str()); dump += StringPrintf(", ownerPid=%d, ownerUid=%d, dispatchingTimeout=%" PRId64 - "ms, trustedOverlay=%s, hasToken=%s\n", + "ms, trustedOverlay=%s, hasToken=%s, " + "touchOcclusionMode=%s\n", windowInfo->ownerPid, windowInfo->ownerUid, millis(windowInfo->dispatchingTimeout), toString(windowInfo->trustedOverlay), - toString(windowInfo->token != nullptr)); + toString(windowInfo->token != nullptr), + toString(windowInfo->touchOcclusionMode).c_str()); windowInfo->transform.dump(dump, "transform", INDENT4); } } else { |