Commit Graph

567 Commits

Author SHA1 Message Date
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
Shamali P be55f82fab Fix issue that widget picker is only half of screen in foldable.
Apply the extra top padding only if device is in portrait and aspect
 ratio is beyond 1.5 to keep the original intent of avoiding showing
 a single pane widget picker in super elongated form. In b/214215594,
 a top padding was applied for w720, but in fold, it ended up showing
 the picker only half way up. So, changed it to consider aspect ratio.

In b/315055849 the tablet portrait will use full width two pane picker,
and then, it will also not need this extra top padding. In that change,
we will use the flag to guard applying this extra padding.

See screen/cast/NTYwMjU1MzY4NDI5NTY4MHw3NDIxYzU0Mi1lNg

Test: WidgetPickerImageTest and Manual (screencast above)
Bug: 317013493
Flag: N/A
Change-Id: I90e0c416f0f05460960983588edf0068d99cd1a6
2024-01-16 16:04:00 +00:00
Jordan Silva 07af3b06ac Merge "Update responsive grid spec cell size remainderSpace logic" into main 2024-01-09 12:52:10 +00:00
Jordan Silva 2de6a277b7 Update responsive grid spec cell size remainderSpace logic
Refactoring the cellSize spec of responsive grid to divide the remainder space in code instead of dividing by cols/rows in the spec definition. For example, instead of using 0.2 in the spec for 5x5 grid (1 / number of rows), it is going to use 1 (100% of the remainder space) and divide the percentage by the number of cols or rows in code.

Fix: 313621277
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: CalculatedWorkspaceSpecTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: Ifaec838ac9751562ecedc1fe39b966ee3d092de3
2024-01-08 19:40:01 -03:00
Jordan Silva dd612687cc Step down icon size when isVerticalBarLayout for responsive grids
Fix the icon step down logic to resize the icons to fit when isVerticalBarLayout and the iconSize does not fit inside the cellHeight.

Bug: 316087877
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I3a1fd28b729435eaf2dbbff650e4d13d33d77ff8
2024-01-08 14:09:23 -03: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
Charlie Anderson 97eedb9570 Merge "fix font-scaling from clipping folder child icons" into main 2023-12-14 03:30:55 +00:00
Charlie Anderson 7bb10974d7 fix font-scaling from clipping folder child icons
Bug: 310850491
Test: verify locally and through screenshot tests
Flag: N/A

Change-Id: Iea7319e82ddffed16903e5112848cf089e5d52f2
2023-12-11 20:07:44 +00:00
Thales Lima 1faa4edc42 Make numFolderRows/Columns accept more values
InvariantDeviceProfile hold values that are not related to current DP in use. Now other classes get the value correctly from DeviceProfile, and each posture can hold different values, making it akin to iconSize.

Fix: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I32295738585de67205dcd6c8942d08a3d07d169a
2023-12-08 22:00:48 +00:00
Jordan Silva 3e5688af97 Fix folder icon drawable padding for responsive grid
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I502a112a0c7d1e6ec1de8501efb8d2893436e880
2023-12-05 15:12:29 -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 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