From 097c45728dd6a44eb68cca6fc2223e18a4cefe8e Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Mon, 20 Sep 2021 19:18:53 +0200 Subject: [PATCH] Add visibility chip to activities For a window to be visible, both the window and activity must be visible. Show the visible chip on the activity to aid debugging Test: yarn run dev and open a wm trace Bug: 183993924 Change-Id: I97e9fbb916ffe95026effc3dfc3c97870949d697 --- tools/winscope/src/flickerlib/windows/Activity.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/winscope/src/flickerlib/windows/Activity.ts b/tools/winscope/src/flickerlib/windows/Activity.ts index 3d6149dc0..60e28cdd8 100644 --- a/tools/winscope/src/flickerlib/windows/Activity.ts +++ b/tools/winscope/src/flickerlib/windows/Activity.ts @@ -16,6 +16,7 @@ import { shortenName } from '../mixin' import { Activity } from "../common" +import { VISIBLE_CHIP } from '../treeview/Chips' import WindowContainer from "./WindowContainer" Activity.fromProto = function (proto: any): Activity { @@ -50,6 +51,7 @@ function addAttributes(entry: Activity, proto: any) { entry.proto = proto; entry.kind = entry.constructor.name; entry.shortName = shortenName(entry.name); + entry.chips = entry.isVisible ? [VISIBLE_CHIP] : []; } export default Activity;