Reset mTopRowIdSet in applyLoadPlan

- All taskViewIds become obsolete after removing and re-adding, so we'll need to reset mTopRowIdSet when removing all taskViews
- OverviewActionsView.updateActionButtonsVisibility can be called before updateDimension (where mDp is set), so a null check is necessary
- Fixed TestStaibilityRule failing when running FallbackRecentsTest alone. FallbackRecentsTest runs with 3P Launcher, in that case launcherPackageName is our test activity, and launcherVersion can be null. This can only occur in a local run, thus return LOCAL in this case.

Fix: 355042336
Test: FallbackRecentsTest and manually testing dismiss
Flag: EXEMPT BUG_FIX
Change-Id: I9125ea38a567deb0d3028e7d7407397d1dc06ade
This commit is contained in:
Alex Chau
2024-08-21 12:28:03 +01:00
parent cafe06f63d
commit 9109b81a95
3 changed files with 9 additions and 1 deletions
@@ -1830,6 +1830,9 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo
// the new set of views are added
int previousCurrentPage = mCurrentPage;
int previousFocusedPage = indexOfChild(getFocusedChild());
// TaskIds will no longer be valid after remove and re-add, clearing mTopRowIdSet.
mAnyTaskHasBeenDismissed = false;
mTopRowIdSet.clear();
removeAllViews();
// If we are entering Overview as a result of initiating a split from somewhere else