From 70283c4740f3d67a10b583bfa749ca73dce7e4e9 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Fri, 3 Sep 2021 12:55:21 +0000 Subject: [PATCH] Group tags by id and transition. Tag Id increments for each additional transition of the same type but resets to zero as each processor is called. This fix groups tags by both id and transition to avoid confusion. Bug: b/198757467 Test: upload a trace with multiple types of transition, where transitions have the same tag id. Change-Id: Idad9c04dc5ac01faf0234d131cbb03364b2ccc36 --- tools/winscope/src/mixins/Timeline.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/winscope/src/mixins/Timeline.js b/tools/winscope/src/mixins/Timeline.js index 90a2d175b..334c8823f 100644 --- a/tools/winscope/src/mixins/Timeline.js +++ b/tools/winscope/src/mixins/Timeline.js @@ -142,10 +142,8 @@ export default { timelineTransitions() { const transitions = []; - //group tags by transition 'id' property - const groupedTags = _.mapValues( - _.groupBy(this.tags, 'id'), clist => clist.map(tag => _.omit(tag, 'id'))) - ; + //group tags by transition and 'id' property + const groupedTags = _.groupBy(this.tags, tag => `"${tag.transition} ${tag.id}"`); for (const transitionId in groupedTags) { const id = groupedTags[transitionId];