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
It moves some classes form the Nexus package into the launcher package
so it can be used in both projects.
It also adds more test for foldables and test multiple
grids for each test.
Bug: 289584301
Fix: 291346193
Test: ReorderWidgets
Change-Id: I04db5f685d0344b8a3f3d42b429bbde061b3d8ea
Adding 100 different test cases for the ReorderAlgorithm.
The test cases are randomly generated using generateRandomTestCase()
the boards are generated once and then written in the file
reorder_algorithm_test_cases. I will leave the code to generate
the boards in the Test even though is not used anymore in case
we need to generate more boards later on.
Also, I found that the ReorderAlgorithm was not deterministic,
meaning that it could generate two different results with the same
inputs (views positions and view being drag positions), because
it was traversing a map whose has was the object id which is
random. So I sort the views before traversing them.
Bug: 229292911
Test: atest ReorderAlgorithmUnitTestCase
Change-Id: I196eb8f1dafcb57d5259969268c458129ae4f46b
It also adds an assets folder inside of Launcher3 tests.
It also fixes a bug in fullReorder.
Test: atest ReorderWidgets
Flag: none
Bug: 229292911
Change-Id: I7dadd42a3057d353326691163bb7db71a2e9dcc4
We need to change the result of REQUEST_IS_TWO_PANELS when the
flag is on because now we don't have two panels only 1.
Another of the issues is a rounding error when calling
getUnusedHorizontalSpace().
And lastly updating workspaceToBoards so that it maps the coordinate
of workspace items to their right position.
Bug: 270395274
Test: atest ReorderWidgets
Change-Id: I2620e5bf1ba132f984e00d2a6c21081953d259fd