Loading tests/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -33,8 +33,8 @@ filegroup { filegroup { name: "launcher-image-tests-src", srcs: [ "src/com/android/launcher3/celllayout/TestWorkspaceBuilder.java", "src/com/android/launcher3/celllayout/CellLayoutBoard.java", "src/com/android/launcher3/celllayout/board/*.java", "src/com/android/launcher3/celllayout/board/*.kt", "src/com/android/launcher3/celllayout/FavoriteItemsTransaction.java", "src/com/android/launcher3/ui/AbstractLauncherUiTest.java", "src/com/android/launcher3/ui/PortraitLandscapeRunner.java", Loading tests/src/com/android/launcher3/celllayout/CellLayoutTestUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.view.View; import com.android.launcher3.CellLayout; import com.android.launcher3.Launcher; import com.android.launcher3.celllayout.board.CellLayoutBoard; import com.android.launcher3.views.DoubleShadowBubbleTextView; import java.util.ArrayList; Loading tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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)); Loading tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTestCase.java +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package com.android.launcher3.celllayout; import com.android.launcher3.celllayout.board.CellLayoutBoard; import java.util.Iterator; /** Loading tests/src/com/android/launcher3/celllayout/ReorderTestCase.java +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.launcher3.celllayout; import android.graphics.Point; import com.android.launcher3.celllayout.board.CellLayoutBoard; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; Loading Loading
tests/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -33,8 +33,8 @@ filegroup { filegroup { name: "launcher-image-tests-src", srcs: [ "src/com/android/launcher3/celllayout/TestWorkspaceBuilder.java", "src/com/android/launcher3/celllayout/CellLayoutBoard.java", "src/com/android/launcher3/celllayout/board/*.java", "src/com/android/launcher3/celllayout/board/*.kt", "src/com/android/launcher3/celllayout/FavoriteItemsTransaction.java", "src/com/android/launcher3/ui/AbstractLauncherUiTest.java", "src/com/android/launcher3/ui/PortraitLandscapeRunner.java", Loading
tests/src/com/android/launcher3/celllayout/CellLayoutTestUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.view.View; import com.android.launcher3.CellLayout; import com.android.launcher3.Launcher; import com.android.launcher3.celllayout.board.CellLayoutBoard; import com.android.launcher3.views.DoubleShadowBubbleTextView; import java.util.ArrayList; Loading
tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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)); Loading
tests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTestCase.java +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package com.android.launcher3.celllayout; import com.android.launcher3.celllayout.board.CellLayoutBoard; import java.util.Iterator; /** Loading
tests/src/com/android/launcher3/celllayout/ReorderTestCase.java +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.launcher3.celllayout; import android.graphics.Point; import com.android.launcher3.celllayout.board.CellLayoutBoard; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; Loading