Commit Graph

2116 Commits

Author SHA1 Message Date
Stefan Andonian
b7221177b4 Merge "Revert "Migrate IDP_GRID_NAME usage to LauncherPrefs"" into tm-qpr-dev 2023-02-21 18:12:55 +00:00
Stefan Andonian
df11959779 Revert "Migrate IDP_GRID_NAME usage to LauncherPrefs"
This reverts commit 6f9a57186c.

Reason for revert: A Bug where only device preferences were being used, not the main shared preference file.

Bug: 269569568
Test: Verified this on device.
Change-Id: I8422b2d7073537bd46c3a91033bd2281bbd306b7
2023-02-21 18:12:11 +00:00
Robin Lee
aafeb82613 Revert "Refactor the OnUserUnlock code out of RecentsAnimationDeviceState and"
This reverts commit 2a58ddb89f.

Reason for revert: b/266987957

Change-Id: I4a4a1f01a693d703f4dc87e8169fbf374729d274
2023-02-17 19:45:27 +00:00
Sunny Goyal
cc10ed5532 Merge "Using DiffUtil for calculating widget diff instead of a custom implementation" into tm-qpr-dev 2023-02-16 23:28:19 +00:00
TreeHugger Robot
1b7a140693 Merge "Making ReorderWidget test more reliable" into tm-qpr-dev 2023-02-15 22:50:20 +00:00
Stefan Andonian
3a14f1331d Merge "Refactor Workspace Loading / Processing code." into tm-qpr-dev 2023-02-15 22:16:29 +00:00
Stefan Andonian
3788da6285 Merge "Migrate IDP_GRID_NAME usage to LauncherPrefs" into tm-qpr-dev 2023-02-15 18:58:41 +00:00
Stefan Andonian
05ca3a8089 Refactor Workspace Loading / Processing code.
There are no behavioral changes (other than we no longer are recycling
objects while processing workspace items), but this refactor will setup
the next change to load the first workspace page before other workspace
pages.

Bug: 251502424
Test: Workspace, app widgets, and containers loaded properly.
Change-Id: I437aab40000d841d7fcc4380d05ab4a8f5d5c2ad
2023-02-15 17:36:27 +00:00
Thales Lima
0af71f85dd Merge "Create a DeviceProfileDumpTest for nonquickstep" into tm-qpr-dev 2023-02-15 09:46:11 +00:00
Stefan Andonian
6f9a57186c Migrate IDP_GRID_NAME usage to LauncherPrefs
Bug: 251502424
Test: Grid functionality still worked just fine on device when I tested
it locally.

Change-Id: I23676572637f194e1f739e4b39159311870abc32
2023-02-15 06:01:47 +00:00
Sunny Goyal
892fab2c14 Using DiffUtil for calculating widget diff instead
of a custom implementation

This uses the same version as all-apps and avoids whole list refresh
when a widget entry is expanded for the first time

Removing tests which were essentially testing the diffing logic

Bug: 268646258
Test: Verified on device
Change-Id: I4799c66b4674e754547317317e7a63f098fce735
2023-02-14 20:59:29 +00:00
Sebastian Franco
81b82720de Making ReorderWidget test more reliable
In some cases when starting to drag you can go to the next
CellLayout wich end in an error. Now the dragging functions
will move the item to the desired CellLayout no matter what
CellLayout you start in.

Fix: 266116487
Test: atest ReorderWidgets
Change-Id: Ie3ad2ff88f734856e2c66d5d51b7578482877b5a
2023-02-13 11:02:09 -08:00
Thales Lima
69166dd054 Create a DeviceProfileDumpTest for nonquickstep
This makes sure we are still testing non scalable grids as well

Bug: 241386436
Test: DeviceProfileDumpTest
Change-Id: I06b442cf1052a952ee834f98c5005ea8e950c2f0
2023-02-13 17:31:13 +00:00
Sunny Goyal
77e732a1c4 Moving widget background to xml, so that the same constantstate is
used for all entries

This helps reduce launcher memory by avoiding multuple duplicate
drawable generation

Bug: 268646258
Test: Verified on device
Change-Id: I829750f081cfce65063b35a614b903066d9a4bed
2023-02-13 05:49:31 +00:00
Sunny Goyal
62a4932310 Removing unnecessary search header duplication
Bug: 268646258
Test: Verified on device
Change-Id: I33a7df6a523e5600dc6251c3d8feff1236362705
2023-02-10 11:26:05 -08:00
Federico Baron
740541e0a0 Merge "Implement two pane widget picker" into tm-qpr-dev 2023-02-10 17:20:55 +00:00
Federico Baron
4b1a38bb7d Implement two pane widget picker
The widget picker design is currently not optimized for large screen form factor devices.
We resolve that by adding a two pane widget picker like that of the design in go/widget-picker-2023.

Bug: 256684299
Test: Make sure to be on a tablet in landscape mode.
        1.Turn on flag LARGE_SCREEN_WIDGET_PICKER.
        2. Press and hold on an empty spot in workspace until the popup menu appears.
        3. Click widgets.
        4. Notice the new two pane layout
Change-Id: Ia3ea17dc320f72f9bc5dea52399ff51d9161602b
2023-02-09 16:36:45 -08:00
Brandon Dayauon
fb9c4d25c4 Merge "Method to override feature flag" into tm-qpr-dev 2023-02-09 23:31:47 +00:00
Brandon Dayauon
533e4856b4 Method to override feature flag
- Replaced where it's used in GridSizeMigrationUtilTest.kt

bug: 268094298
test: manually/presubmit and GridSizeMigrationUtilTest photo: https://screenshot.googleplex.com/7cLtFSbBvxnYAFM
Change-Id: Id8e688b95b91b1b6a4962a4e092505cbb79603f7
2023-02-08 17:01:46 -08:00
Thales Lima
1a2d4bd6f4 Create an XML parser for WorkspaceSpecs
Extract DeviceProfileTest to Launcher3 so it can be used in other tests as well, and change name of previous base test to be more descriptive.

Bug: 241386436
Test: WorkspaceSpecsTest
Change-Id: I64613bb5a23c374ed15fb6d936192236a541ab9b
2023-02-08 11:20:14 +00:00
Thales Lima
fcb6a5fc06 Merge "Improvements for All Apps on different display sizes" into tm-qpr-dev 2023-02-08 10:02:17 +00:00
Nicolo' Mazzucato
e8ee34ad8a Move Launcher classes shared between tests and prod in a separate lib
This is necessary because otherwise those are included in several gradle projects. Gradle doesn't support the same files imported in different projects, and it removes them from a random one if it happens, resulting in missing symbols.

This extracts the shared files in a new target, and adds it as dep of the original target.

Test: Build launcher + execute a few tests manually with gradle + verify that Launcher.java can resolve all symbols with gradle config
Bug: 262267728
Change-Id: Ida5b25c45320d517603834112f4699e4d3344c03
2023-02-07 12:03:10 +00:00
TreeHugger Robot
4a2bf3b131 Merge "Update tests to support floating search." into tm-qpr-dev 2023-02-06 23:50:49 +00:00
Andy Wickham
8d004b0f49 Update tests to support floating search.
Tests need to be updated to account for the new placement of the
searchbar because it overlapped with touch events for scrolling:
 - Scroll back to top: Instead of scrolling from the top of the
   container which could overlap status bar in landscape, scroll
   from the bottom of the top-most visible app icon.
 - Scroll down: swipe up from bottom padding to top of top-most
   visible icon.
 - Close all apps: swipe down more quickly from top icon insetad
   of the search bar (more quickly helps it be detected as a
   fling on more cramped devices).

For Launcher3, the floating flag is not fully supported yet, so
there were some layout issues which are now resolved by ignoring
the flag if the searchbar is still at the top.

Fix: 268052768
Test: Ran tests, manual
Change-Id: If54717e2835c7cc4ed1368554bbc493193945c1d
Merged-In: I406fbcbe12acddb1dd4b862a380576a48cabbebc
2023-02-06 13:49:14 -08:00
TreeHugger Robot
a3e61240b1 Merge "Add instruction to put the device into test harness to error message" into tm-qpr-dev 2023-02-06 09:52:06 +00:00
Sebastián Franco
b57479c189 Merge "Adding test to make sure the icons seen when unfolded are the same when folded" into tm-qpr-dev 2023-02-03 20:39:04 +00:00
Sunny Goyal
de15772052 Merge "Exposing method to register content providers in sandbox context" into tm-qpr-dev 2023-02-03 07:34:10 +00:00
Jon Miranda
5903751ee3 Merge "Update notification dot renderer when we update the taskbar icon size." into tm-qpr-dev 2023-02-03 01:34:05 +00:00
Stefan Andonian
6a4e9a34ab Merge "Migrate "isRotationAllowed" setting to LauncherPrefs." into tm-qpr-dev 2023-02-03 00:27:14 +00:00
Sunny Goyal
305cb87891 Exposing method to register content providers in sandbox context
Bug: 263286512
Test: presubmit
Change-Id: I04a8160afec2ea0d153eca113537a8778d8f3514
2023-02-02 15:20:58 -08:00
Jon Miranda
2b25ded506 Update notification dot renderer when we update the taskbar icon size.
Test: swipe to home with an app that has a notification dot
      observe no jump in dot size
Bug: 264709741

Change-Id: I5d56fe57e74ed7b094477ecd8727152f3f522042
2023-02-02 23:10:42 +00:00
Nicolo' Mazzucato
bdb4923396 Add instruction to put the device into test harness to error message
Bug: 267601529
Test: Run a test while not in test harness mode.
Change-Id: I8089503e61831e5dde6f4e659e92a8d75ea18e2b
2023-02-02 13:10:52 +00:00
Sebastian Franco
48c7f8e035 Adding test to make sure the icons seen when unfolded are the same when folded
Bug: 188081026
Test: atest FoldableItemsIntegrity
Change-Id: I7e09c03fccb89b1d218bf196433b2fe4ad09d8e0
2023-02-01 13:22:33 -08:00
Stefan Andonian
1d7f703514 Migrate "isRotationAllowed" setting to LauncherPrefs.
This semi-complicated case requires use of a context in order to get the
default value. That is why it was migrated by itself.

Bug: 261635315
Test: Manually tested all the base functionality of the launcher.
Change-Id: I40d8ccd414402b55921a0a224264414d3245871b
2023-02-01 20:26:41 +00:00
TreeHugger Robot
18be12d0dd Merge "Add @ScreenRecord to testPressHomeOnAllAppsContextMenu" into tm-qpr-dev 2023-02-01 18:51:31 +00:00
Thales Lima
e9273ea743 Improvements for All Apps on different display sizes
Bug: 262912817
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I50e980183b4d5c1a46cca8f1c867b866b9eae4b5
2023-02-01 11:34:12 +00:00
Sunny Goyal
669b71f5b3 Introducing CellPosMapper which allows mapping between UI position
and model position

Test: atest CellPosMapperTest
Bug: 188081026
Change-Id: If5c6b3df5ad240317bb535c675f6ead94084238e
2023-01-30 12:17:09 -08:00
hyunyoungs
50b824392a Add @ScreenRecord to testPressHomeOnAllAppsContextMenu
Bug: 264538883
Test: seems to run fin on tm-qpr-dev
Change-Id: If395260ba58496282b651e1938e28f3cef22654f
2023-01-28 18:55:05 -08:00
Becky Qiu
70c9aee083 Merge "Revert "Expose getSearchBox from the HomeAllApps class"" into tm-qpr-dev 2023-01-27 20:52:26 +00:00
Becky Qiu
d5311f6541 Revert "Expose getSearchBox from the HomeAllApps class"
Revert submission 20714047-b_255390519

Reason for revert: broken test b/266169958 (P0 bug) and broken UI for the EDU card

Reverted changes: /q/submissionid:20714047-b_255390519

Change-Id: I250003c1b3d07637dde596225f08a6bd3cb84365
2023-01-27 20:11:26 +00:00
Thales Lima
d852d65693 Create attr for padding between icon and text in cells
Bug: 265210314
Test: DeviceProfileDumpTest
Change-Id: I00af790d0c21c35f1cbce1362e63d3ab8259244a
Merged-In: I00af790d0c21c35f1cbce1362e63d3ab8259244a
2023-01-26 22:50:18 +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
Sunny Goyal
a992ac9e8d Moving all intent receiver register calls to a single place
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places

Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
2023-01-22 05:24:48 +00:00
Ling Wo
38aa60c38f Merge "Expose getSearchBox from the HomeAllApps class" into tm-qpr-dev 2023-01-19 21:29:12 +00:00
Sebastián Franco
48651b2109 Merge "Remove unused Throw Throwable from clearHomescreen method" into tm-qpr-dev 2023-01-18 01:12:23 +00:00
Stefan Andonian
1eb59d6c6a Merge "Expanded LauncherPrefs APIs to Replace Direct Shared Preference Usage." into tm-qpr-dev 2023-01-17 18:23:10 +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
Stefan Andonian
d1b33b311c Expanded LauncherPrefs APIs to Replace Direct Shared Preference Usage.
LauncherPrefs will contain Launcher's shared preference functionality.
It controls optimizations and classifications such as restorable vs
non-restorable data, bootaware vs non-bootaware data, and configurations
such as default values  so the calling code doesn't need to and our code
base can have a single source of truth for items that are used in
multiple places.

The old APIs remain in place, but are deprecated and will be removed
after all Shared Preference usage has been gated by LauncherPrefs in
future CLs.

Bug: 261635315
Test: Manually tested themed icon, Workspace configuration, and app
install functionality.

Change-Id: I29fd516468bc93fda393062e95be26b6d55c816e
2023-01-14 00:54:15 +00:00
Sebastian Franco
877088e6c3 Change the access of cellX/Y of CellLayoutLayoutParams to private
Bug: 188081026
Test: no op change, should compile
Test: ReorderWidgets
Change-Id: I20367974e5a4cead406e18eb66dafd4d59651b2a
Merged-In: I20367974e5a4cead406e18eb66dafd4d59651b2a
2023-01-13 18:25:10 +00: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