Commit Graph

325 Commits

Author SHA1 Message Date
Suhua Lei
ed4437f152 Update the transparency of AddDesktopButton
Bug: 413461696
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Test: manual
Change-Id: Id2d16c4f0b7065f588bb6d45749c2e3aa2dd0981
2025-06-03 14:30:13 -07:00
Treehugger Robot
17d69d9db5 Merge "Use pixels as breakpoints for non-desktop grid sizes" into main 2025-05-30 17:29:53 -07:00
Vinay Joglekar
7e38e8a089 Update Scrim values for blur
Set foreground color to ScrimView in overview. Added new state property
for foreground.

Fix: 412928191
Test: Go to overview
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: Id4180eaa5501dc11bf7331073edb28dca5c4a13a
2025-05-30 19:20:40 +01:00
Toni Barzic
23fdd4224f Use pixels as breakpoints for non-desktop grid sizes
Effectively reverts CL:33454986 and adds float min device width/height
attributes that specify dimensions as number of dp. Currently, dp
dimensions are only used for desktop devices.

Test: Existing tests
Bug: 375643744
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Change-Id: I8a2bb3b9e6f97987fb25db553fc628d30cd3bf7c
2025-05-29 16:02:03 -07:00
Toni Barzic
3bd1f20e3b Implement spec to configure all apps height
Adds AllAppsSpec support, that can configure all apps height so the
container top aligns with the top of a row in the workspace grid.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual

Change-Id: Ia5c939c7d3b6fed29a9c2f47233348a5e55b570f
2025-05-21 22:04:33 +00:00
Toni Barzic
83b8cc19ca Support workspace cells with two-line labels
Adds `maxLineCount` attribute to CellSpec. The attribute indicates the max
number of lines of text the cell was speced to support. It's used to:
*   enable two-line labels in `BubbleTextViews` for workspace (including
    folder children) items
*   Update cell dimension calculation to inform cell vertical padding

When calculating cell content size the icon text size will be included
`maxLineCount` times, so the cell content gets centered as if it
contains `maxLineCount` lines of text. That way the icon position will
be consistent between cells with text that fits into one line, and cells
that contain two lines of text.

Adds `maxLineCountMatchesWorkspace` attribute to specify that the cell
should inherit `maxLineCount` from workspace cell spec.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual

Change-Id: I150a62f427a0ad755a4746a736d9846d3bea4d2e
2025-05-21 22:04:33 +00:00
Alex Chau
557d8e6d7f Reland "Recreate Launcher activity when blur enabled changes"
- When battery saver changes, WallpaperThemeManager always recreate activity to reapply theme base on wallpaper color hint changes
- Battery saver change can also result in light/dark theme changes, for which WallpaperThemeManager also recreate activity to apply theme changes
- As a result, it'll be much simpler to recreate activity whenever isBlurEnabled changes
- Exposed recreateToUpdateTheme API from WallpaperThemeManager to achieved this
- Greatly simplified Overview styling to read from styles

Reland fix:
- Removed mBlursEnabled in BaseDepthController, and only use `mCrossWindowBlursEnabled` to control swapping between blur style and fallback style
- Temporary variables like `mPauseBlurs` and `hasOpaqueBg` should only affect if blurs are applied, but not result in swapping of blur style, otherwise this cause unnecessary redraw or activity recreate

Reason for revert: reland
Reverted changes: /q/submissionid:33581402-revert-33554447-b/414789280-CTVRJLPLRT
Bug: 414789280
Test: manually toggling battery saver and light/dark theme and WallpaperThemeManagerTest
Test: PressBackFromLaunchedApp.testPressBackFromLaunchedApp
Flag: EXEMPT bugfix

Change-Id: Iac2b0c00811e0e79684da0cf77df76a120c1272a
2025-05-16 12:33:44 +01:00
Alex Chau
38efd382b7 Merge "Revert "Recreate Launcher activity when blur enabled changes"" into main 2025-05-15 13:07:22 -07:00
Priyanka Advani (xWF)
1f891a6b67 Revert "Recreate Launcher activity when blur enabled changes"
Revert submission 33554447-b/414789280

Reason for revert: Droidmonitor created revert due to b/417614196. Will be verifying through ABTD before submission.

Fix: 417614196

Reverted changes: /q/submissionid:33554447-b/414789280

Change-Id: Idf349cd39a3f86910f597f0f9ab4d46fb03e945c
2025-05-15 11:12:05 -07:00
Alex Chau
b7dd7bf1e0 Merge "Recreate Launcher activity when blur enabled changes" into main 2025-05-15 06:07:58 -07:00
Alex Chau
a6fa3db580 Recreate Launcher activity when blur enabled changes
- When battery saver changes, WallpaperThemeManager always recreate activity to reapply theme base on wallpaper color hint changes
- Battery saver change can also result in light/dark theme changes, for which WallpaperThemeManager also recreate activity to apply theme changes
- As a result, it'll be much simpler to recreate activity whenever isBlurEnabled changes
- Exposed recreateToUpdateTheme API from WallpaperThemeManager to achieved this
- Greatly simplified Overview styling to read from styles

Bug: 414789280
Test: manually toggling battery saver and light/dark theme and WallpaperThemeManagerTest
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I90ad724867283fe3c62a9073a6e072491533f774
2025-05-14 17:45:04 +01:00
Ana Salazar
501df846c4 Support desktop device category in grid options
Adds desktop enum value to grid option deviceCategory attribute type.
The device type is used for devices that have
`R.bool.desktop_form_factor` config value set.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual
Change-Id: Ie4747b5bae3e124e914af51445778c9b6285ff66
2025-05-13 04:17:34 +00:00
Toni Barzic
ff16a5912d Use dimen for GridSize_minDeviceWidth/Height
Makes the grid size format more flexible, as it allows the min width and
height to be easily defined either as px, or dp (which may be
preferable for upcoming desktop grids - I noticed that scaling display
size may end up with too tightly packed grid when using pixel sizes
to select the correct grid size).

Test: Existing tests
Bug: 375643744
Flag: EXEMPT cleanup

Change-Id: I09b772ece177fe0539a1ff641ff2391e88d9e289
2025-05-08 10:20:54 -07:00
vinayjoglekar
45cb055158 Apply fallback overview scrim, overviewactions and clearall in battery saver mode.
1. BlurFallbackStyle/BlurStyle will now be applied in Launcher startup.
   When "updateBlurStyle" is called, individual element style's swap
   happens as per blur style.
2. "hasOpaqueBg" background will now be checked in "applyDepthAndBlur"
   for setting the "currentBlur" value.

Bug: 409758306
Test: Manual. go to overview, enable/disable battery saver mode.
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: Ic9030c2b267867b9124705426dd51deb1b30ca55
2025-04-30 17:23:42 +01:00
Andy Wickham
6610425a1d Update blur style for more things.
- Quick Launch highlight (focusHighlight)
 - Drag bar at top of All Apps
 - Divider inside Private Space

Demo (enabling blur via adb in the middle):
https://drive.google.com/file/d/1MjYn1c1mz3m1llmJ-J6kLHUa1j3biv_H/view?usp=drive_link&resourcekey=0-6d1yf_4zDL0W9nTYe6HLNQ

Fix: 413143411
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: I37340759867aba1460fb038269d21c86e8b3c4f6
2025-04-26 01:25:05 +00:00
Andy Wickham
16a024df71 Adds Blur and BlurFallback styles for All Apps.
Technically these styles can be used throughout Launcher, e.g.
Widget Picker and Folders, but this CL only applies it to All Apps.

At a high level, views wishing to apply transparency to show blur
should use these new attr values rather than colors directly.

When blur changes, e.g. starting or stopping battery saver, the
style is re-applied and revelant views are invalidated. For
Launcher, this is handled by DepthController, and for Taskbar it's
handled by a CrossWindowBlurListener.

Also updated the Private Space animation slightly to account for
the translucent decorators (specifically, we can't use the mask
view to cover them when blur is enabled).

Screenshots: https://drive.google.com/drive/folders/1tU472KHotgEBpT-Ec9VOBWPBf_YdVqv2?resourcekey=0-ebf7W8O6iDJ4UVMtRzTABg&usp=sharing
Private Space animations: https://drive.google.com/file/d/1h5pn8Xb17TPcbujr7uSAJNTq8kwNZoIp/view?usp=drive_link&resourcekey=0-TzpaJ16Gg8_QJctBx4oiIg
Private Space QS Tile animations: https://drive.google.com/file/d/1dCuqnqd5z2kSBEakGobMlEkMwFDBWRbJ/view?usp=drive_link&resourcekey=0-qRVFPb-a6OzaZQOf4x86Jw

Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia9f581f50d1adc0830569656bdeb751deb710a9c
2025-04-15 16:42:56 -07:00
Stefan Andonian
71170e9276 Implement Folder Pagination Arrow Hover / Pressed UX
Bug: 394355070
Test: Verified locally that everything works. Check out bug for video test.
Flag: com.android.launcher3.enable_launcher_visual_refresh
Change-Id: Ief4b895d8eb31e6ed53b05aad4b733e8de41e4d9
2025-04-11 16:02:04 -07:00
Federico Baron
dc1e7d004c Remove demo mode layout code
It's no longer used/needed

Bug: 407120123
Flag: EXEMPT internal cleanup
Test: EXEMPT internal cleanup
Change-Id: Ie0ae18b67ed4d7119b7901e652c27c024450da4b
2025-03-28 23:58:50 +00:00
vinayjoglekar
7d27140a59 Fix action buttons visibility in handheld devices with blur enabled(1/n)
Added scrim in overview over blur.

Bug: 404479758
Test: Manual. Enter overview from home with and without tasks in handheld devices.
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: If8cb37099f2e2b1fa8bed1611ed359b49f255d64
2025-03-24 18:10:18 +05:30
Andy Wickham
ccb3a5c25c Adds all_apps_blur flag.
This enables blur both for Taskbar and Launcher, but in slightly
different ways.

For Taskbar All Apps, we apply blur to the overlay window, and
for Launcher All Apps, we utilize the existing DepthController to
blur the wallpaper window. For similicity, we currently fade out
workspace/hotseat to avoid awkward view + window blurs which
don't look that good. This is not the POR, but I think it achieves
most of the effect and will help us get some blur exposure.

Separately I will continue to investigate options such as blurring
workspace in a clever way so it feels blended with the wallpaper,
reusing the Taskbar window and connecting it to LauncherState, or
using a SurfaceView (though I spent quite some time trying this and
it seemed the same as the original issue).

In both cases, we use a 20-30% opacity scrim with a set color, and a
panel that blends 40% opacity of a dark/light color with 10% white.

Also updated some incorrect isTablet checks which really should have
been checking shouldShowAllAppsOnSheet(), which includes the
all_apps_sheet_for_handheld flag.

Demo: https://drive.google.com/file/d/1Ov9Dg3R9YHNfisfxNf97ZIhlDeEA1IWj/view?usp=sharing&resourcekey=0-l_SDpqpS4HtOb10a3b_jNg

Other upcoming improvements: interpolator tweaks, colors of things
inside the app panel (tabs, private space, search results, etc).

Bug: 400827727
Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ic7063cd822f39a5977715b5477f825bf11e57bdf
2025-03-11 23:34:03 +00:00
Federico Baron
72dc958b9f Make sure only old grids show up when the flag is off
XL and large grid icons were showing up with the flag off

Bug: 395139926
Test: ValidGridOptionsTest
Flag: com.android.launcher3.one_grid_specs
Change-Id: If6b077ce854341563d8c2fbefd741b598b77a7a8
2025-02-11 00:13:21 +00:00
fbaron
9ed02b841b Add grid icon for wallpaper picker
Bug: 384938435
Test: n/a
Flag: com.android.launcher3.one_grid_specs
Change-Id: I3480244d63cd8b4796ff656245a862094a1b5854
2025-01-31 19:26:02 +00:00
Sebastian Franco
f59d3de3c6 Using pixels instead of DPI for selecting the grid size
Fix: 383132640
Bug: 386479043
Test: Screenshot test
Flag: com.android.launcher3.one_grid_specs
Change-Id: Ic3eda69324e03cc6f049cd7d21dac7ab6a22271e
2025-01-07 10:32:07 -08:00
fbaron
d1cd8c2ea6 Add GridDimensionSpecs to fixed landscape and make grid dimension generalized so we can use it to determine row count or col count
Bug: 364711064
Flag: com.android.launcher3.one_grid_specs
Test: HomeScreenImageTest
Change-Id: If1dafedc710ebc483fc7b6b5cd6cae6f70dc3cfc
2024-12-03 02:43:13 +00:00
Treehugger Robot
c4a90de0e9 Merge "Convert px to dp for determining minWidth and minHeight for each row count, and add breakpoints" into main 2024-11-27 21:17:43 +00:00
fbaron
493583435b Convert px to dp for determining minWidth and minHeight for each row count, and add breakpoints
Bug: 364711064
Flag: com.android.launcher3.one_grid_specs
Test: HomeScreenImageTest
Change-Id: I391e001ddee454baccbc0a8f1e002cc815722239
2024-11-26 00:38:19 +00:00
Marcelo Arteiro
bc02103a6a Migrate materialColor* attributes into colors
TLDR:
* This change should not break anything or change any color.
* Simplifies theming and styling while improving developer experience.
* With this  developers can often skip styling for color entirely, while ensuring consistency and preventing accidental overrides.

Bug: 374273611
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: Id19038078e83c73847b1a7c686c3a3df1ecccac2
2024-11-21 13:08:11 +00:00
Sebastián Franco
3448777679 Merge "Changing name of RowCount to GridDimension to be more general" into main 2024-11-19 05:36:43 +00:00
Marcelo Arteiro
fede690863 Merge "Aligning Android color tokens with Material" into main 2024-11-15 14:50:53 +00:00
Sebastian Franco
394a7e64f8 Changing name of RowCount to GridDimension to be more general
Bug: 364711064
Flag: com.android.launcher3.one_grid_specs
Test: HomeScreenImageTest
Change-Id: I7ca46babf0c4ce647a4c98a7dd0326b35450479f
2024-11-14 18:58:16 -08:00
fbaron
6c91ef9191 Add OldGrid field for GridOption so we can properly filter out the old grids when the flag is on
Bug: 364711064
Flag: com.android.launcher3.one_grid_specs
Test: NexusLauncherImageTests, DeviceProfileDumpTest
Change-Id: I8e3ff70d2f3008d1de7c8419290ff44c18c72e70
2024-11-13 11:31:50 -08:00
Marcelo Arteiro
7ddef8f82d Aligning Android color tokens with Material
Original change was reverted because of a flag misplacement. Fixed now.

Script also updated to generate update resource files.

Bug: 376195115
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: Ieefa4a675a1cd140e6e86a51cbca85faa52870c7
2024-11-13 13:58:33 +00:00
ELIYAZ MOMIN (xWF)
a438f7be54 Merge "Revert "Aligning Android color tokens with Material"" into main 2024-11-12 16:35:18 +00:00
ELIYAZ MOMIN (xWF)
866b7e3cee Revert "Aligning Android color tokens with Material"
Revert submission 30126328-material-token-sync

Reason for revert: <Potential culprit for b/378661448  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Reverted changes: /q/submissionid:30126328-material-token-sync

Change-Id: Ifd0490a876081f3e50f674abc504bf5ba9be2df9
2024-11-12 15:12:01 +00:00
Treehugger Robot
76eadb7c5c Merge "Aligning Android color tokens with Material" into main 2024-11-12 12:40:17 +00:00
Marcelo Arteiro
e2a68036b7 Aligning Android color tokens with Material
Script also updated to generate update resource files.

Bug: 376195115
Test: presubmit
Flag: EXEMPT bugfix

Change-Id: I7f0fc8db36d8400559c3d5817e8331b973343dc3
2024-11-11 15:35:24 +00:00
fbaron
c1b68f4f6d Add mounted mode image tests and remove some image tests for OneGrid
Bug: 364711064
Flag: com.android.launcher3.one_grid_specs
Test: HomeScreenImageTest, AllAppsImageTest, FolderImageTest
Change-Id: I1d51596d50d63b00614a2efd342cce72d9a4af8e
2024-11-09 01:21:40 -08:00
Sebastian Franco
9e4c99befd Adding Launcher Mode settings to Launcher settings
Bug: 364711735
Test: NA
Flag: com.android.launcher3.one_grid_specs
Change-Id: Iab688ebdb8449f9258b61f59a0afe97875f82a81
2024-11-07 21:17:10 -08:00
Shamali P
1c173e96be Define the list entry and view holder for the view all button
Child cl updates the adapter & picker to use this list entry type.

Bug: 356127021
Flag: com.android.launcher3.enable_tiered_widgets_by_default_in_picker
Test: Manual
Change-Id: I69e82fb7df24270dac4cc0afd003e98247280552
2024-11-07 14:01:29 +00:00
fbaron
49f7df0444 Fix flag guarding for oneGridRotationHandling
Bug: 364711064
Flag: com.android.launcher3.one_grid_rotation_handling
Test: n/a
Change-Id: Ic0027bf82912bf56470a8abc29880599820b3352
2024-11-05 16:29:26 -08:00
fbaron
ebc10c9ecc OneGrid Grid Option Updates
Bug: 330900048
Flag: com.android.launcher3.one_grid_specs
Test: n/a
Change-Id: I919195dbc7ac78c3be42f0f9d7620193a24d7e99
2024-10-30 11:38:09 -07:00
Marcelo Arteiro
0d6190eb52 Updates many launcher color to new dynamic tokens
Bug: 335442983
Test: Manual
Flag: EXEMPT bugfix
Change-Id: Ic453ae6a717bb274682242f7af5b0551313672a4
2024-07-19 21:31:31 +00:00
Marcelo Arteiro
f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00
Shamali P
2e2d4ff603 Add a 3 dot vertical menu and styles (child cl makes it functional)
Bug: 347288851
Flag: EXEMPT standalone picker
Test: Manual
Change-Id: I99985098034f6336f683b1ff3a47dce2aa8e596a
2024-07-17 22:56:41 +00:00
Shamali P
96ebf67b9f Update the title and description provided by intent params.
Bug: 347288851
Flag: EXEMPT flagged in sys ui
Test: Manual (automated covered in b/339716822)
Change-Id: I71f21bc48fd03dbbe2b3804b7fcade5940606917
2024-07-03 15:49:32 +00:00
Willie Koomson
61dc97ecb2 Update font settings to match POR
Updates font color, size, weight, and line height for text in the widget
picker to match POR and pass a11y test.

Bug: 317948371
Flag: NONE
Test: Accessibility Scanner contrast test
Change-Id: I3c7676c507b81a616876206681972ebb9fefd0c3
2024-05-02 19:55:33 +00:00
Federico Baron
6188ec4157 Merge "Make hotseat column span responsive" into main 2024-04-16 17:17:55 +00:00
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
Jeremy Sim
05617cb11f Update app pair icon colors when switching containers
This CL updates the color for the app pair background, and adds a way for an app pair icon to redraw as a different color when switching containers.

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I615cb95d51f7c4c120ad306246d9491bf4452229
2024-04-04 15:07:30 -07:00
Helen Cheuk
8896580b58 Merge "Change single stroke focus outline to double stroke" into main 2024-03-21 12:09:19 +00:00