Remove odd screen ids when isTwoPanels is true

We where adding more CellLayouts but they where later
removed by removeExtraEmptyScreenDelayed but when rotated
the pagination animation is created before they are removed.

With this change the extra CellLayouts won't be added in the first
place.

Fix: 291822492
Test: RoerderWidgets
Test: FoldableItemsIntegrity
Change-Id: I561d2ce961a7ecc50f7a8c99c4acc44262b2e211
This commit is contained in:
Sebastian Franco
2023-07-26 15:09:10 -07:00
parent 173cf33ac1
commit ddd0450f6b
4 changed files with 41 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ public class CellLayoutTestUtils {
params.getCellX(), params.getCellY(),
launcher.getWorkspace().getIdForScreen(cellLayout), CONTAINER_DESKTOP);
int screenId = pos.screenId;
if (screenId > boards.size() - 1) {
for (int j = boards.size(); j <= screenId; j++) {
boards.add(new CellLayoutBoard(cellLayout.getCountX(), cellLayout.getCountY()));
}
CellLayoutBoard board = boards.get(screenId);