Loading src/com/android/launcher3/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -2392,10 +2392,10 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> mDragTargetLayout.visualizeDropLocation(mTargetCell[0], mTargetCell[1], item.spanX, item.spanY, d); } else if ((mDragMode == DRAG_MODE_NONE || mDragMode == DRAG_MODE_REORDER) && !mReorderAlarm.alarmPending() && (mLastReorderX != reorderX || mLastReorderY != reorderY) && targetCellDistance < mDragTargetLayout.getReorderRadius(mTargetCell, item.spanX, item.spanY)) { mReorderAlarm.cancelAlarm(); mLastReorderX = reorderX; mLastReorderY = reorderY; mDragTargetLayout.performReorder((int) mDragViewVisualCenter[0], Loading tests/src/com/android/launcher3/celllayout/ReorderWidgets.java +4 −9 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import com.android.launcher3.widget.LauncherAppWidgetHostView; import org.junit.Assume; import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -145,26 +144,22 @@ public class ReorderWidgets extends AbstractLauncherUiTest { runTestCase(testCaseMap.get(iconGridDimensions)); } @Ignore //b/261178121 @Test public void simpleReorder() throws ExecutionException, InterruptedException { runTestCaseMap(SimpleReorderCase.TEST_BY_GRID_SIZE, SimpleReorderCase.class.getSimpleName()); } @Ignore //b/261178121 @Test public void pushTest() throws ExecutionException, InterruptedException { runTestCaseMap(PushReorderCase.TEST_BY_GRID_SIZE, PushReorderCase.class.getSimpleName()); } @Ignore //b/261178121 @Test public void fullReorder() throws ExecutionException, InterruptedException { runTestCaseMap(FullReorderCase.TEST_BY_GRID_SIZE, FullReorderCase.class.getSimpleName()); } @Ignore //b/261178121 @Test public void moveOutReorder() throws ExecutionException, InterruptedException { runTestCaseMap(MoveOutReorderCase.TEST_BY_GRID_SIZE, Loading tests/src/com/android/launcher3/celllayout/testcases/FullReorderCase.java +22 −1 Original line number Diff line number Diff line Loading @@ -81,8 +81,29 @@ public class FullReorderCase { MOVE_TO_4x4, END_BOARD_STR_4x4); /** 4x4 Test **/ private static final String START_BOARD_STR_4x5 = "" + "xxxx\n" + "22mm\n" + "iimm\n" + "ii11\n" + "ii11"; private static final Point MOVE_TO_4x5 = new Point(0, 3); private static final String END_BOARD_STR_4x5 = "" + "xxxx\n" + "22ii\n" + "mmii\n" + "mm11\n" + "ii11"; private static final ReorderTestCase TEST_CASE_4x5 = new ReorderTestCase(START_BOARD_STR_4x5, MOVE_TO_4x5, END_BOARD_STR_4x5); public static final Map<Point, ReorderTestCase> TEST_BY_GRID_SIZE = Map.of(new Point(5, 5), TEST_CASE_5x5, new Point(6, 5), TEST_CASE_6x5, new Point(4, 4), TEST_CASE_4x4); new Point(4, 4), TEST_CASE_4x4, new Point(4, 5), TEST_CASE_4x5); } Loading
src/com/android/launcher3/Workspace.java +1 −1 Original line number Diff line number Diff line Loading @@ -2392,10 +2392,10 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> mDragTargetLayout.visualizeDropLocation(mTargetCell[0], mTargetCell[1], item.spanX, item.spanY, d); } else if ((mDragMode == DRAG_MODE_NONE || mDragMode == DRAG_MODE_REORDER) && !mReorderAlarm.alarmPending() && (mLastReorderX != reorderX || mLastReorderY != reorderY) && targetCellDistance < mDragTargetLayout.getReorderRadius(mTargetCell, item.spanX, item.spanY)) { mReorderAlarm.cancelAlarm(); mLastReorderX = reorderX; mLastReorderY = reorderY; mDragTargetLayout.performReorder((int) mDragViewVisualCenter[0], Loading
tests/src/com/android/launcher3/celllayout/ReorderWidgets.java +4 −9 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ import com.android.launcher3.widget.LauncherAppWidgetHostView; import org.junit.Assume; import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -145,26 +144,22 @@ public class ReorderWidgets extends AbstractLauncherUiTest { runTestCase(testCaseMap.get(iconGridDimensions)); } @Ignore //b/261178121 @Test public void simpleReorder() throws ExecutionException, InterruptedException { runTestCaseMap(SimpleReorderCase.TEST_BY_GRID_SIZE, SimpleReorderCase.class.getSimpleName()); } @Ignore //b/261178121 @Test public void pushTest() throws ExecutionException, InterruptedException { runTestCaseMap(PushReorderCase.TEST_BY_GRID_SIZE, PushReorderCase.class.getSimpleName()); } @Ignore //b/261178121 @Test public void fullReorder() throws ExecutionException, InterruptedException { runTestCaseMap(FullReorderCase.TEST_BY_GRID_SIZE, FullReorderCase.class.getSimpleName()); } @Ignore //b/261178121 @Test public void moveOutReorder() throws ExecutionException, InterruptedException { runTestCaseMap(MoveOutReorderCase.TEST_BY_GRID_SIZE, Loading
tests/src/com/android/launcher3/celllayout/testcases/FullReorderCase.java +22 −1 Original line number Diff line number Diff line Loading @@ -81,8 +81,29 @@ public class FullReorderCase { MOVE_TO_4x4, END_BOARD_STR_4x4); /** 4x4 Test **/ private static final String START_BOARD_STR_4x5 = "" + "xxxx\n" + "22mm\n" + "iimm\n" + "ii11\n" + "ii11"; private static final Point MOVE_TO_4x5 = new Point(0, 3); private static final String END_BOARD_STR_4x5 = "" + "xxxx\n" + "22ii\n" + "mmii\n" + "mm11\n" + "ii11"; private static final ReorderTestCase TEST_CASE_4x5 = new ReorderTestCase(START_BOARD_STR_4x5, MOVE_TO_4x5, END_BOARD_STR_4x5); public static final Map<Point, ReorderTestCase> TEST_BY_GRID_SIZE = Map.of(new Point(5, 5), TEST_CASE_5x5, new Point(6, 5), TEST_CASE_6x5, new Point(4, 4), TEST_CASE_4x4); new Point(4, 4), TEST_CASE_4x4, new Point(4, 5), TEST_CASE_4x5); }