Print window flags in dumpsys input

Previously, the flag in dumpsys input would show up like this:
flags=0x21800128
which made it difficult to figure out which flags are actually set on
the window.

Instead, propose to stringify the flags:
flags: NOT_FOCUSABLE | LAYOUT_IN_SCREEN | LAYOUT_NO_LIMITS | LAYOUT_INSET_DECOR |

which would make the window portion of dumpsys input to look like:

Windows:
      0: name='Window{565cbb2 u0 ScreenDecorOverlayBottom}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x21800128, type=0x000007e8, frame=[0,2883][1440,3040], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=<empty>, inputFeatures=0x00000000, ownerPid=4114, ownerUid=10201, dispatchingTimeout=5000.000ms
            flags: NOT_FOCUSABLE | NOT_TOUCH_MODAL | LAYOUT_IN_SCREEN | SPLIT_TOUCH | HARDWARE_ACCELERATED | SLIPPERY |
      1: name='Window{427d84e u0 ScreenDecorOverlay}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x21800128, type=0x000007e8, frame=[0,0][1440,157], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=<empty>, inputFeatures=0x00000000, ownerPid=4114, ownerUid=10201, dispatchingTimeout=5000.000ms
            flags: NOT_FOCUSABLE | NOT_TOUCH_MODAL | LAYOUT_IN_SCREEN | SPLIT_TOUCH | HARDWARE_ACCELERATED | SLIPPERY |
      2: name='Window{66c2ce u0 NavigationBar0}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x21840068, type=0x000007e3, frame=[0,2872][1440,3040], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=<empty>, inputFeatures=0x00000000, ownerPid=4114, ownerUid=10201, dispatchingTimeout=5000.000ms
            flags: NOT_FOCUSABLE | NOT_TOUCH_MODAL | TOUCHABLE_WHEN_WAKING | WATCH_OUTSIDE_TOUCH | SPLIT_TOUCH | HARDWARE_ACCELERATED | SLIPPERY |
      3: name='Window{9de0939 u0 NotificationShade}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=true, hasWallpaper=false, visible=true, canReceiveKeys=true, flags=0x81860060, type=0x000007f8, frame=[0,0][1440,3040], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[-1440,-3040][2880,6080], inputFeatures=0x00000004, ownerPid=4114, ownerUid=10201, dispatchingTimeout=5000.000ms
            flags: NOT_TOUCH_MODAL | TOUCHABLE_WHEN_WAKING | ALT_FOCUSABLE_IM | WATCH_OUTSIDE_TOUCH | SPLIT_TOUCH | HARDWARE_ACCELERATED | DRAWS_SYSTEM_BAR_BACKGROUNDS |

Bug: none
Test: dumpsys input
Change-Id: I7065fda194adb0bf63126c6b3647f3af0f5ca1ba
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index 8942433..a3ec3b0 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -4101,6 +4101,9 @@
                     dump += StringPrintf(", ownerPid=%d, ownerUid=%d, dispatchingTimeout=%0.3fms\n",
                                          windowInfo->ownerPid, windowInfo->ownerUid,
                                          windowInfo->dispatchingTimeout / 1000000.0);
+                    dump += StringPrintf(INDENT4 "    flags: %s\n",
+                                         inputWindowFlagsToString(windowInfo->layoutParamsFlags)
+                                                 .c_str());
                 }
             } else {
                 dump += INDENT2 "Windows: <none>\n";