Commit Graph

42 Commits

Author SHA1 Message Date
fbaron
e4b0b71faa Make hotseat column span responsive
Flag: NONE
Test: DeviceProfileDumpTest, DeviceProfileAlternativeDumpTest, HomeScreenImageTest
Bug: 325084912
Change-Id: Ifa9e8066662a1ab053f66b8800b739d813d2dab8
2024-04-16 06:19:16 +00:00
Federico Baron
719075b56c Merge "Update min next page visible to 48dp" into main 2024-03-14 16:32:39 +00:00
Sebastián Franco
920d333e3a Merge "In the case the gird migration goes to a taller grid keep the grid configuration" into main 2024-03-13 22:26:42 +00:00
Sebastian Franco
2eaf15c37a In the case the gird migration goes to a taller grid keep the grid configuration
For example going from 4x5 to 4x6 it will keep the 4x5 configuration
which fits in the 4x6 grid.

Also, it fixes GridMigrationTest which was flaky because of
how it sorted arrays.

Bug: 325286145
Flag: ACONFIG grid_migration_fix disabled
Test: NA
Change-Id: I6063e3c303320096f7429a3b1d909e107d2ef2a0
2024-03-13 11:13:38 -07:00
Sebastián Franco
ad46eb75f4 Revert^4 "Removing all restored backups except one so we don't have old backups"
To prevent the error I introduce the method restorePreviousState().

This reverts commit 1234090589.

Reason for revert: Fixing presubmit breaks

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
2024-03-12 11:01:26 -07:00
fbaron
a64ce4eb71 Update min next page visible to 48dp
Fix: 326623964
Flag: NONE
Test: HomeScreenEditImageTest DeviceProfileDumpTest
Change-Id: I0a2de73589bf769eb2efb8d66d9ab3836cbee6d2
2024-03-11 22:40:40 +00:00
Sebastián Franco
8a5dd1b3cf Merge "Revert^3 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 20:17:43 +00:00
Sebastián Franco
1234090589 Revert^3 "Removing all restored backups except one so we don't have old backups"
This reverts commit 4b960d1f11.

Reason for revert: Breaking presubmit, no bug number yet 

Change-Id: I0bafad8bf63fae1d9408b65c6c18c79ab5d40d05
2024-03-11 20:15:24 +00:00
Sebastián Franco
37e9aa2504 Merge "Revert^2 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 17:09:21 +00:00
Sebastian Franco
851b1f3b1c Add testing for GridMigration.
Bug: 325286145
Flag: ACONFIG grid_migration_fix disabled
Test: GridMigrationTest
Change-Id: I49fd32be895f3a05204775373b9eec62d9026f3b
2024-03-08 14:46:41 -06:00
Sebastián Franco
4b960d1f11 Revert^2 "Removing all restored backups except one so we don't have old backups"
This reverts commit 3306fa5325.

Reason for revert: Fixing issue that caused b/328782012

Change-Id: Ib6a1bbfeedf608f5f77ac6be500271e811320f32
2024-03-08 18:53:57 +00:00
Sebastián Franco
3306fa5325 Revert "Removing all restored backups except one so we don't have old backups"
This reverts commit bd43b9344f.

Reason for revert: b/328782012

Change-Id: I1666fbd63d82da06ed8c3d9ce58b5ed6b298618b
2024-03-08 18:42:30 +00:00
Sebastian Franco
bd43b9344f Removing all restored backups except one so we don't have old backups
Adding test to make sure this is the case.

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I84c3a92f40598137d5c5c52d34af7583b384122c
2024-03-07 11:23:55 -06:00
Federico Baron
835b9610bc Merge "Update some dimens for portrait edit state" into main 2024-02-29 17:17:19 +00:00
fbaron
3bb6d4bd81 Update some dimens for portrait edit state
Fix: 324133830
Flag: NONE
Test: HomeScreenEditImageTest
Change-Id: I7f42664b63e6981bcef5db2e76129bd3fe567102
2024-02-27 06:57:55 +00:00
Shamali Patwa
9ac01f11da Update dump tests for the bottomsheet top padding alignment.
Bug: 318410881
Test: See screenshots
Flag: N/A
Change-Id: I9d60dd930f06ea404bde90c6b0cf1f61901b1b07
2024-02-12 16:09:42 +00:00
Uwais Ashraf
c2f73d9091 Merge "App chip refactor" into main 2024-02-09 13:43:03 +00:00
Uwais Ashraf
99fdf7a75e App chip refactor
- Adds background outline replacing 2 circles + rect approach. This
enables easier shadow drawing code.
- Simplify structure of AppChipView.
- Adds an anchor View to simplify laying out of menu around app chip

Bug: 313644427
Bug: 317007147
Fix: 322760765
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TEAMFOOD
Test: OverviewImageTest
Change-Id: I56c2644779863c083ae475a740a84321b1d0c396
2024-02-09 12:09:42 +00:00
fbaron
fc6bbcfed2 Align workspace and hotseat icons in landscape
Fix: 311381639
Test: Verified on device
Flag: NONE
Change-Id: I4e2c74f59e8492042c3c7f8eccc98921d92d685f
2024-02-01 01:04:40 +00:00
Andy Wickham
99d7d4f2cb Better handling of insets for All Apps.
Changes:
 - For tablet, always center All Apps without applying additional
   insets for things like cutouts.
 - For tablet, allow the panel to span the full height of the
   screen (minus system bars), rather than 5.5 app rows. This also
   ensures the panel fully closes even if there are cutouts.
 - Remove additional padding for vertical bar mode (landscape on
   phones). This was double counting the cutout insets, but only
   for some views, so things were not aligned. Now the apps line
   up with the search bar, and the scroll bar still makes room for
   any side insets.

Before and after examples:
https://drive.google.com/drive/folders/1k0vSzisf4ZuGyp-qR-IF0QwM-IcHBFrZ?resourcekey=0-uxjzuVQ1KA3WwOQ4v6Dh2w&usp=drive_link

Bug: 299923399
Bug: 259617884
Fix: 300761324
Test: Manual
Flag: NA
Change-Id: I136d516260a1343b1198693c73fa389fe0e11cc9
2024-01-03 19:21:01 +00:00
fbaron
e69b6f49f7 Align QSB with hotseat and workspace icons
The QSB was a bit wider becuase icons visible size is a bit smaller than their actual size due to b/235886078 so we add a workaround to adjust QSB size based on the visible icon size

Bug: 281587788
Test: atest HomeScreenImageTest
Flag: NONE
Change-Id: I593ca2d588f08b830be0b2ac389c747b6f558b91
2023-12-19 13:52:45 -08:00
Thales Lima
0c9e869a8a Update dump tests
Bug: 309800141
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I75c6a07192f6af94adbea89a6dfdf03984272849
2023-12-08 22:00:51 +00:00
Jordan Silva
21cdba04c3 Update ReorderWidget tests to drag and drop widget inside the board
Fix: 314946012
Flag: N/A
Test: ReorderWidgets
Change-Id: I9e160e76a1fff568af9b21bebc46ef11fb97b962
2023-12-05 10:55:31 -03:00
Thales Lima
09d42d5340 Revert "Make numFolderRows/numFolderColumns accept more values"
Revert submission 25438456-5x5_folder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25438456-5x5_folder

Revert "Use DeviceProfile numFolderRows and numFolderColumns"
Revert submission 25313018-numFolder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25313018-numFolder

Change-Id: I4890016e310c0a2122861f36fcdbf33e98e727c0
2023-11-30 11:47:37 +00:00
Winson Chung
104a4c8b69 Add Launcher support for left-right splits on portrait foldables
Bug: 291018646
Test: Manual
Flag: enable_left_right_split_in_portrait

Change-Id: I92af7ffd83770f7e942c3892a12b1611ff5b50f4
Signed-off-by: Winson Chung <winsonc@google.com>
2023-11-29 20:20:14 +00:00
Thales Lima
07c6b8d96d Use DeviceProfile numFolderRows and numFolderColumns
Invariant hold values that are not related to current DP in use. This is a change needed for IDP to hold more values in the future akin to iconSize.

Bug: 309800141
Change-Id: Iefb388a5f6590d7da3452d2c388c02bd5e9d32bb
Flag: N/A
Test: NexusLauncherTests
2023-11-21 11:47:21 +00:00
Thales Lima
9623aaa470 Merge "Change AllApps padding to use a Rect" into main 2023-11-01 12:21:53 +00:00
Stefan Andonian
7117c55578 Merge "Robustly fixed issue where migration from different versions of DB data tables was causing crashes upon grid size switching." into main 2023-10-31 22:44:06 +00:00
Stefan Andonian
e8b86db34d Robustly fixed issue where migration from different versions of DB data
tables was causing crashes upon grid size switching.

Bug: 304687723
Test: Verified behavior through unit test. Also manually tested that
factory resetting device -> adding shortcuts to the workspace ->
changing the grid size didn't cause any issues and resulted in normal
behavior.

Change-Id: I1945004d2c9a2d6f2b74d9597b39763ed4962e7b
2023-10-31 20:27:26 +00:00
Thales Lima
b433c9c312 Change AllApps padding to use a Rect
AllApps uses different values for left and right padding in some places (e.g. ActivityAllAppsContainerView uses workspacePadding.left/right), and this change is the first step into moving those values into DeviceProfile.

Bug: 269632571
Test: NexusLauncherTest
Flag: NONE
Change-Id: I14c4edf55ca74f256b1aaa336fff246a0c78e25d
2023-10-31 16:19:40 +00:00
Brandon Dayauon
617db544da ENABLE_TWOLINE_ALLAPPS to true
Need to use old way of changing FeatureFlag flag values in tests since this feature
also uses FeatureFlag.java flag value.

bug: 270390937
Test: presubmit/locally - https://screenshot.googleplex.com/4nCVDPb2yRwW7rh
Flag: turning to ENABLED (been in teamfood in aconfig)
Change-Id: I392de84c6fb84b7a217b953f2335160056b4ecc3
2023-10-16 10:02:06 -07:00
Stefan Andonian
865898e303 Delete App Icons from Test Data Assets
Previously, the test assets were being pulled into the release APK.
Unfortunately, it isn't possible to build the Release APK from within
SysUi Studio. Since the tests don't test the image loading, I am opting
to simply delete the large image strings, rather than try to figure out
why the release APK is including these test assets.

Bug: 301105199
Test: The tests still pass. That being said, it is difficult to test
this other than see if the APK size doesn't get flagged for growing too
large. It should be ok though, since the test assets are now WAY
smaller.

Change-Id: Ic52bede8296624740e4ca1573955494c3b94bf87
2023-10-05 03:51:54 +00:00
Stefan Andonian
18fe81864f Reapply "Add unit tests for LoaderTask"
This reverts commit e4735d77f1.

Bug: 301105199
Test: This already passed presubmit before.
Change-Id: I97ab28186ba1d4da4abe82686fe1a11d5e51c4b3
2023-10-05 03:51:44 +00:00
Pat Manning
1695cc724c Create icon app chip menu for overview tasks.
Fix: 257951354
Test: TaplTestsQuickstep
Test: TaplTestsSplitscreen
Flag: ENABLE_OVERVIEW_ICON_MENU
Change-Id: Id8a14b1970ae42bcc74e95419caeaf52ef63638b
2023-10-02 12:51:56 +00:00
Stefan Andonian
7f1b5d0a70 Merge "Revert "Add unit tests for LoaderTask"" into main 2023-09-25 17:07:23 +00:00
Stefan Andonian
e4735d77f1 Revert "Add unit tests for LoaderTask"
This reverts commit 4c7d7d6749.

Reason for revert: New Test assets were getting pulled into the release APK, making the APK size growth too much. I will re-upload when I figure out how to avoid this.

Change-Id: I738eb6c26632eeee30be4098d0225836d283b218
2023-09-22 18:23:22 +00:00
Stefan Andonian
4fc16ab256 Merge "Add unit tests for LoaderTask" into main 2023-09-19 16:02:50 +00:00
Stefan Andonian
4c7d7d6749 Add unit tests for LoaderTask
Bug: 298715109
Test: It, itself, is the test.
Change-Id: I33208ad333947662d0874eb0e2f046ba405930ab
2023-09-13 23:19:45 +00:00
Thales Lima
1f19c95d95 Create new hotseat spec tests
Refactor DeviceProfileDumpTest to use files instead of inline strings.

Fix: 292204436
Test: DeviceProfileDumpTest
Test: CalculatedHotseatSpecTest
Test: HotseatSpecsTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I5aa2891c4c68033a4dd28f84f9dd5478be17b1d8
2023-09-05 16:31:06 +01:00
Sebastian Franco
a99e1d2a14 Ensure the reorder test runs on the foldable devices
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
2023-08-03 16:35:29 -07:00
Sebastian Franco
45b39b50e5 Adding unit test to ReorderAlgorithm
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
2023-05-03 11:22:09 -06:00
Sebastian Franco
e7c3d3d4ce Parsing test boards from text files to be able to add more and bigger tests
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
2023-04-13 17:14:51 +00:00