Also fixing a race condition in model when an item update/delete task
gets queued and executed after the model has reloaded (making the old
data obsolete)
Bug: 277345535
Bug: 263079498
Test: Presubmit
Flag: N/A
Change-Id: Ibd4bdbb3eece05b38b73a22a4be5f368df3754f0
I needed to change the code so that you can pass the CellX/Y
position to the drag function instead of the pixel coordinates
and we can pass X position bigger than one CellLayout.
Also, I notice that getCellCenter only worked for 1x1 items
so I added the option to specify the widget size.
Fix: 262431878
Test: atest ReorderWidgets#multipleCellLayoutsSimpleReorder
Change-Id: I3b09de770e8f99aa10cae8cea32e7e6bc02c7b8b
Now TestWorkspaceBuilder has the logic to add hotseat icons and
the operations to add items to the Workspace is done in batches
which is faster and more stable. To submit everything in batches
it uses the FavoriteItemsTransaction.
This improves the design because TestWorkspaceBuilder and
HomeScreenImageTest belong to the Test layer and they should
only deal with the logic to run a test and TestWorkspaceBuilder
is the Model layer and holds all the logic to interact with the
Launcher model/data, so this separates the concern of each class.
Also, chagned the name from CellLayoutBoardBuilder to
TestWorkspaceBuilder to make it clearer.
Bug: 243440737
Bug: 235518637
Bug: 242323136
Test: atest HomeScreenImageTest
Test: atest ReorderWidgets
Change-Id: I14eef064fade153b8362537743b061958bb3071d