Commit Graph

555 Commits

Author SHA1 Message Date
Winson Chung abb4483f6f Merge "Add Launcher support for left-right splits on portrait foldables" into main 2023-11-30 05:52:57 +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
Jordan Silva 15cacd54c6 Update where responsive grid cell icon size is defined
This CL changes where the cell icon size, text size and drawable padding is defined to prevent an issue with taskbar.
The transient taskbar updates the DeviceProfile icon size with a different value than used for responsive grids, and this update wasn't working anymore because responsive grid implementation wasn't reading the value from iconSize inside the updateIconSize function, but from the responsive grid spec.

Bug: 313463280
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: manual
Test: NexusLauncherImageTests
Change-Id: I835a90d724c2d1b2d32f483b758b789be7cbdcfe
2023-11-28 14:42:06 +00:00
Thales Lima 24051842c7 Make numFolderRows/numFolderColumns accept more values
Now they can hold values for different configurations, making it akin to iconSize.

Bug: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I9d5cccda88a0311dbe0beecef194cc8d60c5c280
2023-11-24 15:54:56 +00:00
Jordan Silva 999dd2a06f Extract cell size information to responsive grid structure
Bug: 287975993
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: ResponsiveCellSpecsProviderTest
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Change-Id: I26a87d9b690fdfcff1599d862c09e97fe9f9f930
2023-11-24 12:39:36 +00:00
Jordan Silva 2e1b287038 Merge "Use DeviceProfile numFolderRows and numFolderColumns" into main 2023-11-24 12:29:19 +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
Jordan Silva 9a3bd8f109 Fix folder label text size not downsizing to match app icon
Fix: 311350985
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: ResponsiveFolderImageTest
Change-Id: I98103749541dd1e120908ac06e24dfc38cc7aa59
2023-11-16 18:34:35 +00:00
Jordan Silva 8b3fa14ef9 Fix wrong number of columns for AllApps calculation
Fix: 310657769
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Change-Id: Id46c9e4529176b68f6d92d31a71016ed4f8134d1
2023-11-14 10:37:32 +00:00
Jordan Silva 8f7986abae Responsive grid cleanup
This CL renames some of the variables to keep it consistent across the code. It removes workarounds that were made to facilitate easy code reviews without breaking the tests.
It is a cleanup of the responsive grid feature.

Bug: 299889733
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: CalculatedAllAppsSpecTest
Test: CalculatedFolderSpecTest
Test: CalculatedHotseatSpecTest
Test: CalculatedWorkspaceSpecTest
Test: AllAppsSpecsTest
Test: FolderSpecTest
Test: HotseatSpecsTest
Test: WorkspaceSpecsTest
Change-Id: I198fadfbcfc0d1b32a62a3076949b42ee1fbcf33
2023-11-09 22:06:03 +00:00
Jordan Silva 376036a36e Resize icon and text size for AllApps when it doesn't fit the cell
Bug: 287975993
Fix: 309489796
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveFolderImageTest
Test: ResponsiveAllAppsImageTest
Change-Id: I1dda073b558a7f4540d5fe5c438fa796a70b6ddd
2023-11-08 18:05:59 +00:00
Thales Lima 55fcfacd1a Merge "Center AllApps on the screen" into main 2023-11-08 18:02:16 +00:00
Thales Lima d94993ed9e Merge "Use new icon stepping logic for Folders" into main 2023-11-08 15:50:41 +00:00
Thales Lima a25cd90b5e Center AllApps on the screen
AllApps used workspace paddings which are unbalanced in verticalBar. This changes it to always be centered. In dynamic grid AllApps now uses the whole width for the layout. In responsive grid it keeps the cell width and center the layout.

Note that this is centered on the screen but nothing could be done regarding the camera inset at this time, as it would need a refactor of how AllApps QSB is layout as well.

Bug: 269632571
Test: NexusLauncherTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I326d041bcef211d398d1a5c3210958b689414d49
2023-11-08 14:39:52 +00:00
Jordan Silva f2402e25f1 Refactoring Responsive Grid XML specs for more flexibility
It merges portrait and landscape XML specs for responsive grid. This update allows the responsive grid to rely on other properties like aspect ratio and not solely the orientation from resource qualifiers.

Bug: 299889733
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: CalculatedAllAppsSpecTest
Test: CalculatedFolderSpecTest
Test: CalculatedHotseatSpecTest
Test: CalculatedWorkspaceSpecTest
Test: AllAppsSpecsTest
Test: FolderSpecTest
Test: HotseatSpecsTest
Test: WorkspaceSpecsTest
Change-Id: I39ee54d49c9d2a54fcbe91c8a1327a21a8126032
2023-11-07 11:51:28 +00:00
Thales Lima e9b5e14a2b Use new icon stepping logic for Folders
Bug: 307694237
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: ResponsiveFolderImageTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: Ifbfb714e48c2e0851ef55ac60cadafbb6358d074
2023-11-04 17:10:13 +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
Uwais Ashraf 6eb006ed90 Merge "Add margins to top and bottom when grid only overview enabled" into main 2023-10-25 13:53:24 +00:00
Uwais Ashraf aa7fa886d6 Add margins to top and bottom when grid only overview enabled
Fix: 299100244
Test: OverviewImageTest and dump tests
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Change-Id: I22ebced5bf1e27974036d6e2ef72d2b8d63df824
2023-10-24 16:15:39 +00:00
Thales Lima bba07729b2 Remove app labels in isVerticalBar
Bug: 296400197
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Ia508c1b909df3fff5768b39e90275bf914b6f1c4
2023-10-24 13:07:22 +00:00
Thales Lima 24ceca6993 Decrease text size if it doesn't fit the cell
Bug: 293467738
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Ic0b2d3cde1d4b8b9089f93b96c9bb386247603ce
2023-10-24 13:07:22 +00:00
Alex Chau c78c53c22a Migrate ENABLE_OVERVIEW_ICON_MENU to aconfig flag
Bug: 257951354
Change-Id: I47b1c1d422ce3c510ea22ea3e1feff0263ded177
2023-10-12 16:00:14 +00:00
Alex Chau 6ae2c4d77d Merge "Revert "Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag""" into main 2023-10-11 15:38:57 +00:00
Alex Chau 4989f4f36d Revert "Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag""
This reverts commit 7b5472f986.

Reason for revert: aconfig/SetFlagsRule actually works with TAPL tests (http://ag/c/platform/packages/apps/Launcher3/+/24991890/comment/8303a3c6_030ae00b/)
Bug: 270397206

Change-Id: I7529a64c3197e4c2b4d5fb1e46fb29bdea1e52e9
2023-10-11 14:08:22 +00:00
Alex Chau 09d8e2ca57 Merge "Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag"" into main 2023-10-10 12:26:21 +00:00
Alex Chau 7b5472f986 Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag"
This reverts commit 6f264a927b.

Reason for revert: Keeping old flag system so we can test in Tapl tests (b/283246928)
Bug: 270397206

Change-Id: I3e6364ebac8018facc3b22e510615735299a3dad
2023-10-10 10:38:04 +00:00
Alex Chau 2ca7481b04 Merge "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag" into main 2023-10-05 15:40:17 +00:00
Fengjiang Li d31f9080aa Merge "Fix All Apps Icons Count estimation" into main 2023-10-03 21:57:36 +00:00
Fengjiang Li 6c59082697 Fix All Apps Icons Count estimation
We used to estiamte more all apps icons to pre-inflate than needed. This would reduce the post boot memory useage.

Test: Grab heap dump after device boot to verify number of BubbleTextView is reduced
Bug: 297352492
Change-Id: Ice3950b781fe7b5d7df2c0c5c7b7a316b5851bc7
2023-10-03 10:16:30 -07:00
Alex Chau 6f264a927b Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag
Bug: 270397206
Test: OverviewActionsControllerTest
Flag: enableGridOnlyOverview
Change-Id: I1519e0e8d5b8a7e294d2d310c1614e8462649031
2023-10-03 12:58:18 +01: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
Jagrut Desai 3a7d139110 Add isTransientTaskbar as DeviceProfile Builder Property
- Breakout CL part 5
- This is a breakout cl from ag/24272821 to make it more readable and atomic.
- This cl consist of adding isTransientTaskbar as DeviceProfile Builder Poropety
- This cl alos consist a shared pref listener for taskbar pinning to update device profile.

Test: Manual, Visual
Bug: 265170176
Flag: ENABLE_TASKBAR_PINNING
Change-Id: I2ade751ffc8c59bd4b862b56c8ca7eb2aa05b7f2
2023-09-28 12:01:58 -07:00
Brandon Dayauon 3cdb32cc1f Do a vertical check for two line text, if it clips dont show two line.
Added extra 16dp to the cell height in DeviceProfile as per spec: https://docs.google.com/presentation/d/1dSt-zY_wRrOmd9a9nsQG458CIK0RUqVJsHJxLHP_0Nc/edit#slide=id.g237e909075a_2_6
Updated tests andincluded vertical check to see if two line can be fully rendered without being clipped. Otherwise just show one line.
Since existing cell height is 104dp, we add 16dp to be up to spec (120dp)
- Clean up FeatureFlag ENABLE_TWOLINE_ALLAPPS and now use aconfig flag

bug: 270390937
Test: manually - photos
Regular font: https://screenshot.googleplex.com/ArUcgZgHqR4ZWBQ
Bigger font than regular that makes text to one line because it wouldve truncate: https://screenshot.googleplex.com/6s8EdMAbBLsYhLi
Bigger font than regular with predicted app row (twoline):
https://screenshot.googleplex.com/38TEQei5GvPiCc7
Super big font: https://screenshot.googleplex.com/3JUYYprJRQ32Hsq
big display and regular font: https://screenshot.googleplex.com/55rBKVQ8htSe9Vc
big display and bigger than regular font: https://screenshot.googleplex.com/3atzKzJUbfM7YQW
flag: is off

Change-Id: I6998ea5da35d3e00ac75327d16b5ca676fb11c1a
2023-09-26 02:38:16 +00:00
Liran Binyamin 070be25853 Merge "Adjust the hotseat when the bubble bar becomes visible" into main 2023-09-15 17:48:41 +00:00
Uwais Ashraf 3602d1771f Set taskbar heights to 0 when taskbar is not present.
Bug: 289769344
Fixes: 289769344
Test: DeviceProfileDumpTest
Change-Id: I53f8a629c8adc12feb1fdf9f5b40b4a680c97b78
2023-09-15 15:17:07 +00:00
Alex Chau 0f7c0f4a53 Merge "Revert "Add debug log in InvariantDeviceProfile.minCellSize"" into main 2023-09-14 11:35:41 +00:00
Alex Chau 7ecd70cb0d Revert "Add debug log in InvariantDeviceProfile.minCellSize"
Revert submission 24736047-b/298077774_logs

Reason for revert: b/298077774

Reverted changes: /q/submissionid:24736047-b/298077774_logs

Change-Id: I2771484f3537380644c1e8b2d18485b360df5715
2023-09-14 09:59:37 +00:00
Liran Binyamin a833af316b Adjust the hotseat when the bubble bar becomes visible
When the bubble bar becomes visible the space between icons in the
hotseat is now adjusted. This change only does it when the QSB is
above the icons, but this will be changed in the future to be based
on the amount of space between the hotseat and the edge of the screen.

When the hotseat is adjusted, the new width is smaller by the size of
2 icons. The icons are then translated to be evenly spaced within the
boundaries of the new width.

Since the adjustment is only applied when the QSB is above the icons,
it is resized accordingly to the new width.

All visual updates currently snap to the new position, but will be animated
in a follow up.

Demo: https://recall.googleplex.com/projects/3391fc5c-599d-4827-b6f8-d2deb160aa99/sessions/fad1a5c5-e9cf-4586-92e4-1e92df3b002e

Bug: 280494203
Test: Manual (on tangor)
      - Set device to landscape
      - Make the bubble bar visible by adding a bubble
      - Rotate to portrait mode
      - Observe that the hotseat is adjusted
      - Rotate to landscape
      - Observe that the hotseat adjustment is removed
      - Rotate back to portrait
      - Observe that the hotseat is adjusted again
      - Dismiss the bubble to hide he bubble bar
      - Observe the hotseat adjustment is removed

Change-Id: I5b02a60b6cb301ffa2507a6d825c748a782cca18
2023-09-13 17:08:42 -04:00
Alex Chau 2ddd019a4c Merge "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig" into main 2023-09-13 20:57:51 +00:00
Alex Chau e1955fe4b9 Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig
- Keeping FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW for local testing until aconfig is available in FlagFlipper
- Still reference ENABLE_GRID_ONLY_OVERVIEW in tests as aconfig still can't be mocked

Bug: 270397206
Test: manual
Change-Id: I799e05311adc21184a6ad7ce92a3abdab3f25c25
2023-09-13 15:59:01 +01:00
Alex Chau 2014f50515 Add debug log in InvariantDeviceProfile.minCellSize
Bug: 298077774
Test: presubmit
Change-Id: I2a4d0a116a36b28c616ddcd18b3448fb2e2a7897
2023-09-12 19:31:21 +01:00
Thales Lima ec8265f437 Merge "Use transient taskbar check in split screen" into udc-qpr-dev am: a0e0069cbd am: 1a96167f44
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24604848

Change-Id: I267243abb7a270eca7acb6c574ab97e9832faf07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 11:40:26 +00:00
Thales Lima 8e11d531e8 Add new attribute to hotseat specs
Edge padding is used as the space between hotseat and the edge of the screen. In most cases it is used in a height spec, but for vertical bar, i.e. when a handheld is in landscape, it is used a width spec.

Fix: 292204436
Test: CalculatedHotseatSpecTest
Test: HotseatSpecsTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Ib75ffcdd33925ee9ef156dcb70eefd133c9b458b
2023-09-05 16:31:06 +01:00
Thales Lima e95664077c Use transient taskbar check in split screen
The space that should be removed in split screen should check if there is a taskbar or not. Adding the transient taskbar property to DeviceProfile solves that without having to pass context around.

Fix: 289769344
Test: manual
Flag: N/A
Change-Id: Id0c51c4ec9481d3c206eef52d44094ec7a8c98cf
2023-08-30 16:35:12 +01:00
Jordan Silva d92271849c Fix hotseat border space crash GSI
Fix the calculation of the space between the icons for hotseat when the number of spaces needed is 0 or less.

Fix: 285834082
Flag: N/A
Test: HotseatWidthCalculationTest
Change-Id: I73bc1950277c01ac0ae7202c1e08bf45266b59b8
2023-08-17 16:02:01 +01:00
Thales Lima 19c41f5932 Merge "Create specs for hotseat" into udc-qpr-dev 2023-08-10 20:08:38 +00:00
Jordan Silva 3646a1b7e1 Fix workspace and hotseat paddings for responsive grid in landscape
Add paddings for workspace and hotseat when vertical bar is enabled.

Fix: 294033018
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeGridDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: I7358d2eb7b7c53b436756c21bd81d4746ea01801
2023-08-10 14:15:35 +00:00
Thales Lima f8bfb036ba Create specs for hotseat
Some attributes of hotseat change depending on the size of the device. In the future more attributes could be moved to the spec, e.g. hotseat icons.

Fix: 292204436
Test: CalculatedHotseatSpecTest
Test: HotseatSpecsTest
Test: SizeSpecTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I6a4e05d75af819dbf1444a5ca45c2080f55dc203
2023-08-10 10:23:23 +00:00
Andy Wickham bc3bac4113 Revert^3 "Change Overview Actions to round buttons."
Awaiting UX alignment.

Test: N/A
Flag: N/A
Change-Id: I05e9627d8b44ea16d29445e005534af2a1abd439
2023-08-08 12:09:59 -07:00
Alex Chau 5225e83d71 Skip iconScale logic in responsive grid
Fix: 289198168
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: DeviceProfileResponsiveDumpTest, DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: Iefe9ab3986a6d50ac920ba7bf417c0a8f254d878
2023-08-01 16:34:09 +01:00