Fixing issue where certain activities not tracked

Summary:
The root view resolver will always find all root views but there was a bug in the listrootviews method. The code was very complex and most of the code seemed to be unneeded. Its now working. The listrootviews method now just returns teh contents of the observable array.

The reason we needed this is that Certain activities dont seem to tracked by the listener we add to `registerActivityLifecycleCallbacks` Its as if there is a floating decor with no activity. One example in FB4a is clicking on a notification in the notifications panel

Reviewed By: lblasa

Differential Revision: D41522791

fbshipit-source-id: b49b0104ddf758f097e1fd3f9ac6588de2d3646e
This commit is contained in:
Luke De Feo
2022-12-05 07:07:44 -08:00
committed by Facebook GitHub Bot
parent 29e0794ff4
commit 00334acb2b
5 changed files with 77 additions and 145 deletions

View File

@@ -174,7 +174,7 @@ function Visualization2DNode({
//if there is an active child don't draw the other children
//this means we don't draw overlapping activities / tabs etc
if (node.activeChildIdx) {
if (node.activeChildIdx && node.activeChildIdx < node.children.length) {
nestedChildren = [node.children[node.activeChildIdx]];
} else {
nestedChildren = node.children;