From cccfe2697eaa74e7090ea5a8b9f33080e6cfef4d Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Wed, 21 Jul 2021 12:48:34 +0200 Subject: [PATCH] Display transform on the SF traces The transform flicker object doesn't have a "isNotEmpty" property (return undefined) and was being ignored. Instead check if object.isEmpty === true to allow objects without a isNotEmpty property to be displayed Bug: 176906864 Test: compile winscope, take a SF trace, check if the layers have a trasnform property Change-Id: Ia466dd6b5e9f5e08fad515d31122206b6bd9898a --- tools/winscope/src/flickerlib/ObjectFormatter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/winscope/src/flickerlib/ObjectFormatter.ts b/tools/winscope/src/flickerlib/ObjectFormatter.ts index e23684360..b67bfe608 100644 --- a/tools/winscope/src/flickerlib/ObjectFormatter.ts +++ b/tools/winscope/src/flickerlib/ObjectFormatter.ts @@ -88,7 +88,8 @@ export default class ObjectFormatter { if (value || (this.displayDefaults && value !== undefined && value !== null)) { // flicker obj if (value.prettyPrint) { - if (value.isNotEmpty || this.displayDefaults) { + const isEmpty = value.isEmpty === true; + if (!isEmpty || this.displayDefaults) { result[key] = value.prettyPrint() } } else {