Removing the Worskapce as a dependency of CellLayout

This will make it easier to test CellLayout, also we should avoid
circular dependencies as much as poisble.

This also allows the CellLayout to be created in other containers
that are not workspace.

Bug: 318417510
Test: creating HotseatReorderUnitTest in follow up cl
Test: TaplReorderWidgets
Test: ReorderAlgorithmUnitTest
Flag: NA
Change-Id: Ic45029a244cb11f8d6775c50b90af9c56f01eaa3
This commit is contained in:
Sebastian Franco
2024-01-25 10:23:39 -08:00
parent 0961a69f61
commit 2986e0b4d1
8 changed files with 102 additions and 36 deletions
@@ -41,7 +41,7 @@ public class CellLayoutTestUtils {
CellPosMapper.CellPos pos = launcher.getCellPosMapper().mapPresenterToModel(
params.getCellX(), params.getCellY(),
launcher.getWorkspace().getIdForScreen(cellLayout), CONTAINER_DESKTOP);
launcher.getWorkspace().getCellLayoutId(cellLayout), CONTAINER_DESKTOP);
int screenId = pos.screenId;
for (int j = boards.size(); j <= screenId; j++) {
boards.add(new CellLayoutBoard(cellLayout.getCountX(), cellLayout.getCountY()));