Commit Graph

7 Commits

Author SHA1 Message Date
Sunny Goyal
7b9e28f152 Removing all usage of LauncherProvider
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
2023-06-07 12:57:13 -07:00
Sunny Goyal
ee9740462e Simplifying some test utility methods
Bug: 283821111
Test: Presubmit
Flag: N/A
Change-Id: I7b9690bc0cc53d097d26cd4f0ab2dd36ba88e1cb
2023-06-02 13:30:55 +00:00
Sebastián Franco
68f5667338 Merge "Adding the avility to add icons on multiple CellLayouts on tests." into tm-qpr-dev 2023-01-24 20:02:35 +00:00
Sebastian Franco
de1fe14a47 Adding the avility to add icons on multiple CellLayouts on tests.
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
2023-01-16 10:32:40 -06:00
Sebastian Franco
9db35f7a37 Remove unused Throw Throwable from clearHomescreen method
Test: presubmit
Bug: 263802298
Change-Id: I4b81e044eb4f6a84730fb4d61403cbfcadefd282
2023-01-12 10:41:34 -06:00
Sebastian Franco
5434c9d370 Add hotseat icons to TestWorkspaceBuilder and submit everything in a batch
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
2022-09-12 10:54:53 -07:00
Sebastian Franco
314bbf1cba Adding support to add icons in the workspace for tests
Test: atest ReorderWidgets
Bug: 243440737
Change-Id: Ic656cef079be965d17ab1b58d5f73ce955c9374c
2022-08-31 16:29:53 -07:00