Commit Graph

19912 Commits

Author SHA1 Message Date
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
Treehugger Robot de9b62ed3e Merge "Fix All Apps fallback colors." into main 2025-05-12 14:02:18 -07:00
Treehugger Robot d89bd8d886 Merge "Split BlurStyle and BlurFallbackStyle for All Apps and Overview." into main 2025-05-12 14:02:09 -07:00
Treehugger Robot 8381d839f7 Merge "Use RecentsWindowFlags in DisplayController" into main 2025-05-12 13:58:24 -07:00
Treehugger Robot 70e3cd4b67 Merge "Simplifying startup latency logger by moving everything to a single class" into main 2025-05-12 12:41:47 -07:00
Liam Lee Pong Lam b2f178178e Merge "Remove navigate_to_child_preference flag" into main 2025-05-12 11:41:28 -07:00
Treehugger Robot dbce6aeefb Merge "Reduce combine() usage as it is expensive" into main 2025-05-12 11:15:52 -07:00
Sunny Goyal e40896639b Simplifying startup latency logger by moving everything to a single class
> Moving some latency logic out of Launcher and into logger
> This makes it easier to move the logger completely out of Launcher

Bug: 390572144
Test: atest StartupLatencyLoggerTest
Flag: EXEMPT refactor

Change-Id: I6f6d99e7ed6c77610534c64461ec34200780225f
2025-05-12 09:39:06 -07:00
Ajinkya Chalke 36a811aa57 Use RecentsWindowFlags in DisplayController
- Instead of using enableOverviewOnConnectedDisplays from aconfig
  directly, use WindowManagerProxy to use RecentsWindowFlags so that we
  can use DesktopExperiencesFlags version for dev option.

Bug: 413609179
Test: m
Flag: EXEMPT flag infra
Change-Id: Iaacf068be13282017f94360acce1eea9aa1b0e84
2025-05-12 15:44:08 +00:00
Uwais Ashraf da860e3d46 Reduce combine() usage as it is expensive
Flag: com.android.launcher3.enable_coroutine_threading_improvements
Bug: 416206104
Test: Perfetto trace comparison shows fewer continuations
Test: TaskViewModelTest
Change-Id: Id5c645afff9850453139b85dbcda907cd12c5d26
2025-05-12 12:54:11 +00:00
Brandon Dayauon ab84f60449 Merge "Change PS app behavior when clicking" into main 2025-05-10 03:11:55 -07:00
Treehugger Robot 0a38582ff6 Merge "Use dimen for GridSize_minDeviceWidth/Height" into main 2025-05-09 20:47:49 -07:00
Andy Wickham 58fd27a0cb Fix All Apps fallback colors.
Spec is linked in the bug.

Test: Manual
Fix: 415847439
Flag: com.android.launcher3.all_apps_blur
Change-Id: I805aff19bb3d15d479b7c2c026f041c35585efd2
2025-05-10 01:21:54 +00:00
Andy Wickham 359280ef2c Split BlurStyle and BlurFallbackStyle for All Apps and Overview.
Problem: We don't want to apply the blur style to All Apps if the
all_apps_blur flags are disabled. However, we want to still apply
the relevant colors for Overview when the Overview blur is enabled.

Solution: Split the styles into All Apps and Overview variants.
Unfortunately this creates quite a bit of extra code, but such is
the nature of flag permutations.

This is a more comprehensive color fix compared to ag/33356345,
which is reverted as part of this CL.

Note: enable_overview_background_wallpaper_blur is already broken
when disabled without this change (the live tile gets blurred),
presumably because it's already in nextfood and hasn't been tested
disabled. As such, I focused on testing All Apps blur flags both
enabled and both disabled, with the Overview flag always enabled.

Demo with All Apps flags disabled:
 - Blurs enabled (Overview should blur; All Apps unaffected):
   https://drive.google.com/file/d/1eb882JKSMF-Irc7Ls-iAClYfJIASzzXs/view?usp=drive_link&resourcekey=0-j5EafBfVHIh5oOSFzsYE4g
 - Blurs disabled (Overview should not blur; All Apps unaffected):
   https://drive.google.com/file/d/1toVHYUTj9FjpXCD7m8waeuFIwBbdy_Am/view?usp=drive_link&resourcekey=0-drqPVsELmgJVxhpgxLc-aQ

Demo with All Apps flags enabled:
 - Blurs enabled (Overview and All Apps should blur):
   https://drive.google.com/file/d/1se5yaPDYdDKcoBjZSjDSlqCiSfX0bmHv/view?usp=drive_link&resourcekey=0-U9fBJSVYY9na9r8J5xHXMw
 - Blurs disabled (Overview and All Apps should not blur):
   https://drive.google.com/file/d/1YmqlCdSJDZXGSgpeO5hk16V8Y-6tVpeW/view?usp=drive_link&resourcekey=0-rK4Zy7D8fFyPMA_1XXxwCQ
   (Note: All Apps fallback colors will change with ag/33405653)

Test: Above videos
Fix: 416248709
Flag: com.android.launcher3.all_apps_blur
Flag: com.android.launcher3.all_apps_sheet_for_handheld
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I9b5cf6b0dce4014053b27ea95a91d047262427b2
2025-05-10 01:21:43 +00:00
Treehugger Robot d506f0154b Merge "Adding support for generating a preview bitmap with an optional delay to allow widgets to be rendered" into main 2025-05-09 17:16:29 -07:00
Brandon Dayauon 424d5686e4 Change PS app behavior when clicking
It should show the shortcuts upon tap and not animate like if you were to longpress to shortcuts on a regular app.

bug: 406724060
Test: manually video: https://drive.google.com/file/d/1ldodFhr00lTJ5583VxMe7PasZ0jre6wd/view?usp=sharing
Flag: android.multiuser.enable_moving_content_into_private_space
Change-Id: I5762689290b4078f9b1b4fdfd09fb2cef482744a
2025-05-09 14:59:45 -07:00
Treehugger Robot c9eb3511d2 Merge "Separate blur/fallback styles for all apps and overview" into main 2025-05-09 13:34:51 -07:00
Coco Duan b97962a927 Merge "Show all default widgets in glanceable hub widget picker" into main 2025-05-09 11:48:32 -07:00
Sunny Goyal 63fe0c779e Adding support for generating a preview bitmap with an optional delay to allow widgets to be rendered
> Adding a completionSignal when preview is generated so that callers can wait on it
> Also adding support for proving an optional screen-id for preview

Bug: 400403115
Test: atest GridPreviewTest
Flag: EXEMPT refactor and unused new API

Change-Id: I569e0ab318ad101e4f6dd808f2e1cfc39ba50bda
2025-05-09 10:42:39 -07:00
Uwais Ashraf 1ae9814920 Merge "Create separate worker threads for IO work and lighter BG work" into main 2025-05-09 09:45:40 -07:00
Will Osborn ddbce96536 Merge "Check for null display in DisplayController onDisplayAdded" into main 2025-05-09 05:50:00 -07:00
vinayjoglekar 3997f6ce4a Separate blur/fallback styles for all apps and overview
Fix: 415233763
Test: Manual. go to overview/all apps enable/disable battery saver mode.
Flag: com.android.launcher3.all_apps_blur
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I4fdb672feb34d4b4da74f430eb8ef9a86ec3adf2
2025-05-09 10:17:11 +01:00
Coco Duan cc55afe1fd Show all default widgets in glanceable hub widget picker
Update the predicate condition to correctly use the host's specified
filter for default widgets.

Fixes: b/415899961
Test: verify in hub widget picker on tablet
Test: atest WidgetPickerDataProviderTest
Flag: EXEMPT bugfix
Change-Id: I5a68d49dfda08059de880bca6964ac1620ffff36
2025-05-09 07:18:36 +00:00
Uwais Ashraf c1102750dd Create separate worker threads for IO work and lighter BG work
Documentation largely pulled from Kotlin coroutines docs.

Flag: com.android.launcher3.enable_coroutine_threading_improvements
Bug: 416206104
Test: Presubmits
Change-Id: I89b7222e31680619e311fa9e9986da5c12d80ed4
2025-05-09 06:49:48 +00:00
Liam Lee Pong Lam c061353ad6 Remove navigate_to_child_preference flag
Bug: 409611139
Fix: 409611139
Test: N/A
Flag: EXEMPT cleanup
Change-Id: I32252433d9ee935892ca0b4e793d0be6373ac6c8
2025-05-08 16:14:49 -07:00
Treehugger Robot 2a7a8b5662 Merge "Use setQsbAlpha to update qsb alpha" into main 2025-05-08 13:08:31 -07:00
Treehugger Robot 4f030edec6 Merge "Store startAlignTaskbar in DisplayInfoSpec" into main 2025-05-08 12:47:28 -07:00
Stefan Andonian 4a07ef1019 Merge "Smoothly transition PageIndicatorDot alpha when switching active dots." into main 2025-05-08 11:13:31 -07: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
Ajinkya Chalke f0ec71d325 Store startAlignTaskbar in DisplayInfoSpec
- CD grids should override startAlignTaskbar.
- The DP.toBuilder method should carry forward DisplayInfoSpec instead
  of always recalculating.

Fix: 416276424
Test: m
Flag: EXEMPT updating recently added logic
Change-Id: I7b1cb8eab5fedc09b29e96a765d1341655474e8a
2025-05-08 17:00:22 +00:00
Sunny Goyal 29b86863f2 Merge "Making workspaceData immutable" into main 2025-05-08 08:06:06 -07:00
Charlie Anderson 2f8156437e Merge "Add logging for preview ContentProvider in GridCustomizationsProxy" into main 2025-05-08 07:43:17 -07:00
Will Osborn 19392fc5cf Check for null display in DisplayController onDisplayAdded
Bug: 415007177
Test: local + presubmit
Flag: EXEMPT bugfix
Change-Id: Ic4e9e6156ed565ed86aa25ebbdeda853fb2d8eda
2025-05-08 12:39:23 +00:00
Matthew Mourgos 2a6553ff9e Merge "Enable right click on items when home screen is shown behind desktop" into main 2025-05-07 20:23:09 -07:00
Matthew Mourgos 5c6ab9a11d Enable right click on items when home screen is shown behind desktop
Remove the hasWindowFocus() check to allow long pressing or right
clicking an icon on the home screen while freeform tasks are open. If
a view can receive touch events, it should handle it properly, leaving
the check for hasWindowFocus() to the touch-dispatcher.

Bug: 375644149
Flag: com.android.window.flags.show_home_behind_desktop
Test: Manually open tasks, then long press items on home to open menu
Change-Id: I7805533a5961e8ec088d43146d4b841f3bc93a50
2025-05-07 17:46:21 -07:00
Sebastián Franco 78ddf0f37c Merge "Log which active controller is handling input in the BaseDragLayer" into main 2025-05-07 17:22:23 -07:00
Charlie Anderson f2d24992e7 Add logging for preview ContentProvider in GridCustomizationsProxy
Bug: 413707700
Test: N/A just logs
Flag: EXEMPT just logs
Change-Id: I626e9f7c3b4abafcf109657b070b4267eebdf166
2025-05-07 20:58:11 +00:00
Sunny Goyal 57a195b790 Making workspaceData immutable
BgDataModel holds a mutable handle of the data, which ensures that all edits go through this class and there is a single place to keep the repository updated

Bug: 390572144
Test: Updated existing model tests
Flag: EXEMPT refactor
Change-Id: I991b707dd21801d1abd00510f676549947285012
2025-05-07 13:21:21 -07:00
Treehugger Robot adde4dd42a Merge "External displays should always be in 3-button nav mode" into main 2025-05-07 12:15:46 -07:00
Stefan Andonian c404171a5b Merge "Implement Jump Scroll Animation" into main 2025-05-07 10:58:21 -07:00
Stefan Andonian bd83a1c75d Smoothly transition PageIndicatorDot alpha when switching active dots.
Bug: 408028262
Test: See https://b.corp.google.com/issues/407711750#comment3 for a screen recording showing this works well.
Flag: com.android.launcher3.enable_launcher_visual_refresh
Change-Id: I76d5551da28fabf7548e15781680b240daaa2e36
2025-05-07 10:28:40 -07:00
Will Osborn f0ed143ab7 External displays should always be in 3-button nav mode
Also changed TouchInteractionService gestureNavMode to be per-display

Bug: 415269541
Flag: EXEMPT bugfix
Test: local + presubmit

Change-Id: I0da978e6fcb29f743b41f1c75c6d0efd8e7231a8
2025-05-07 16:25:49 +00:00
Treehugger Robot 2e6fc30b12 Merge "Use supplied context instead of system for taskbar" into main 2025-05-07 09:09:26 -07:00
Shamali Patwa fce9328959 Merge "Log when a required attribute is missing in the AutoInstall layout." into main 2025-05-07 06:21:12 -07:00
Sunny Goyal aa0b9183da Merge "Using single pass to update both widgets and shortcuts in BgDataModel" into main 2025-05-06 17:48:44 -07:00
Stefan Andonian cb16a98e5e Implement Jump Scroll Animation
This requires a decent sized refactor. Namely, rather than relying on
mCurrentPosition we need to rely more upon mLastPosition and
mFinalPosition for increasing and decreasing dot size. We also need to
delay the animation start if we are mega-moving to have the desired
delayed dot change effect.

Bug: 407711750
Test: Verified this works locally. Please see the bug for a screenrecording that shows this correct behavior working.
Flag: com.android.launcher3.enable_launcher_visual_refresh
Change-Id: I83ef113c17f2197e3c02e85f44cf3f05947d2adb
2025-05-06 17:06:23 -07:00
Ajinkya Chalke 5212ce06f9 Use supplied context instead of system for taskbar
- Use supplied TaskbarActivityContext to evaluate padding in dp instead
  of Resources.getSystem that doesn't seem to provide accurate
  measurement when launcher is initialising.

Fix: 414343355
Test: m
Flag: EXEMPT minor refactor
Change-Id: Ia64a7280ba60534fc949269c5886e9b32a917e03
2025-05-06 23:28:29 +00:00
Sunny Goyal f7fa4cef5b Using single pass to update both widgets and shortcuts in BgDataModel
Bug: 390572144
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I9ead8f7acb9fc3b550f7368474f0402c032dfd12
2025-05-06 15:20:13 -07:00
Treehugger Robot 0b0dd2683a Merge "Reparse all grids for secondary displays for DP" into main 2025-05-06 13:03:00 -07:00
Sunny Goyal 53cc9a7806 Merge "Moving predicted items to ItemIdMap instead of extraItems" into main 2025-05-06 10:29:39 -07:00