Move classes inside of CellLayoutBoard to their own file

Previous step for adding unit testing for MultipageCellLayout.

Flag: LEGACY FOLDABLE_SINGLE_PAGE DISABLED
Bug: 270395274
Test: ReorderAlgorithmUnitTest
Change-Id: Ia5ca0b10481d7a21883594434b3406fb3a5ccf0b
This commit is contained in:
Sebastian Franco committed 2023-11-20 17:58:24 -06:00
1 parent 9739ad2ec8
commit d30100eaa9
12 files changed
+134 -135

No files matched your search

@@ -31,6 +31,9 @@ import androidx.test.filters.SmallTest;
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.celllayout.board.CellLayoutBoard;
import com.android.launcher3.celllayout.board.IconPoint;
import com.android.launcher3.celllayout.board.WidgetRect;
import com.android.launcher3.util.ActivityContextWrapper;
import com.android.launcher3.views.DoubleShadowBubbleTextView;
@@ -112,12 +115,12 @@ public class ReorderAlgorithmUnitTest {
// The views have to be sorted or the result can vary
board.getIcons()
.stream()
.map(CellLayoutBoard.IconPoint::getCoord)
.map(IconPoint::getCoord)
.sorted(Comparator.comparing(p -> ((Point) p).x).thenComparing(p -> ((Point) p).y))
.forEach(p -> addViewInCellLayout(cl, p.x, p.y, 1, 1, false));
board.getWidgets().stream()
.sorted(Comparator.comparing(CellLayoutBoard.WidgetRect::getCellX)
.thenComparing(CellLayoutBoard.WidgetRect::getCellY))
.sorted(Comparator.comparing(WidgetRect::getCellX)
.thenComparing(WidgetRect::getCellY))
.forEach(widget -> addViewInCellLayout(cl, widget.getCellX(), widget.getCellY(),
widget.getSpanX(), widget.getSpanY(), true));