Commit Graph

20057 Commits

Author SHA1 Message Date
Sunny Goyal d237c9587b Converting LauncherBindableItemsContainer to kotlin
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: I4d2fa18b6b275742d84de16ed604987c2deee6e8
2025-02-27 10:34:37 -08:00
Jagrut Desai 536097dec2 Update Taskbar Icon content description to include state description
This cl inlcudes: while user is in desktop mode, we will add state description(active, minimized) of each app icon to it's content description.

Test: Manual
Bug: 397555157
Flag: EXEMPT bugfix
Change-Id: Iaec18e7099108e8b076b76c637a41e29ed837265
2025-02-27 09:58:31 -08:00
Charlie Anderson 39f902cd84 Make Folder preview items appear as square grid instead of circle
- Eventually we should remove circular geometry from ClippedFolderIconLayoutRule altogether

Bug: 392610664
Test: changing shapes with different size folders
Flag: com.android.launcher3.enable_launcher_icon_shapes
Change-Id: I15c854c19186a3e4262e8d2b40960f3519ec2729
2025-02-27 09:09:10 -08:00
Sunny Goyal 39063bf167 Merging some notification dots implementation
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ie02311afba85f06fbafd265a5015cd23bd356a36
2025-02-27 08:50:26 -08:00
Sunny Goyal d8e5ddb4cd Removing unnecessary isBindingItems method from ActivityContext
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: I06fd1dcc81da5e5502a9fb0751c2701b26fd4621
2025-02-27 08:49:33 -08:00
Alex Chau 3c3d636dc9 Multi property refactor
- Introduced MultiPropertyDelegate to delegate Kotlin var to MultipPropertyFactory, allowing easy creation of var for MultiPropertyFactory
- Introduced KFloatProperty to map any Kotlin var to a FloatProperty, which simplify the code to creaet FloatProperty a lot
- Combined the above to refactor usage of MultipPropertyFactory, use var to simplfiy things, and expose them as FloatProperty directly when needed

Fix: 399635468
Test: Smoke test main flow of enter Overview, task launching etc.
Test: presubmit
Flag: EXEMPT REFACTOR
Change-Id: Ie7dd8b69da7e3bda9026a0ef7b0377c26a78a332
2025-02-27 16:01:32 +00:00
Anushree Ganjam e6065f5a94 Move MainThreadInitializedObject to Launcher3 Go.
Move SandboxContext to a separate class.
Remove all MainThreadInitializedObject references in Launcher3 and tests.
Remove ObjectSandbox interface and make RoboApplication extend
SandboxContext

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I1a8af5e6ae59df44d8ad6732b4d6e949ac402d6c
2025-02-26 16:49:08 -08:00
Treehugger Robot a2af6e4daa Merge "Removing unnecessary ActivityContextDelegate" into main 2025-02-26 13:04:00 -08:00
Sunny Goyal e9355c622d Removing unnecessary ActivityContextDelegate
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ib95b26de000a2fe8204fdbc46c8a9da4f65c7eab
2025-02-26 10:52:10 -08:00
Treehugger Robot d668dd6e30 Merge "Visual updates for PageDotIndicators" into main 2025-02-25 22:33:46 -08:00
Stefan Andonian ae8ab4c403 Visual updates for PageDotIndicators
TODOs have been added for verifying and updating the Outline, right to left mode,
and the entry animation. This CL is complex, and those have been left out on purpose.

Bug: 394355070
Test: Verified this behavior looks good in LTR on the workspace.
Flag: com.android.launcher3.enable_launcher_visual_refresh
Change-Id: I8f0192f461d344360572411e1a62921fd65ba600
2025-02-25 20:26:00 -08:00
Charlie Anderson dfb45d9c03 Simplify ShapesProvider and use constants
Bug: 398689048
Bug: 372884380
Test: presubmit and locally
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: I102265ef4b25d84bb7a0b1f9642a9c19a7200e22
2025-02-25 20:17:54 -08:00
Sunny Goyal 998cf2cb7e Adding option to skip animations for testing
Bug: 398894260
Flag: EXEMPT test
Test: atest GridPreviewTest
Change-Id: I9c3a7f6d8dfd63eac46038cc5d769def0392c194
2025-02-25 19:22:12 +00:00
Will Osborn 8bc3268ec4 Merge "DisplayController refactoring for multiple displays" into main 2025-02-25 08:16:52 -08:00
Alex Chau 45c1192fdf Merge "Handle AddDesktopButton's visibility in different launcher states" into main 2025-02-25 03:39:39 -08:00
Will Osborn c47d03f1f9 DisplayController refactoring for multiple displays
Test: locally tested on Tangor
Flag: com.android.launcher3.enable_overview_on_connected_displays
Bug: 392858637
Change-Id: I18c196c977b3731aa09d2cc93ab6341b8f1636c6
2025-02-25 11:29:02 +00:00
Sukesh Ram 3242782931 Merge "[CD Taskbar] Remove legacy all apps button (secondary display)" into main 2025-02-24 23:38:34 -08:00
Treehugger Robot 1799b85186 Merge "Fix grid previewing so it matches the applied layout" into main 2025-02-24 17:00:15 -08:00
Wen-Chien Wang f77c3cac2b pin-shortcut: Tracks hotseat states and adds unpin option for taskbar
This cl adds the unpin option by tracking the hotseat/taskbar state. The
option shown is determined by the following conditions:

1. If the target non-predicted item is on the taskbar, shows
   "Unpin from taskbar"
2. If the taskbar is not full, that is, reaching the limit of the
   available spaces, and the target item is anywhere outside of the
   taskbar, including All apps, shows "Pin to taskbar".
3. If the taskbar is full, simply don't show any shortcut option.

This cl also removes the option that will be shown on Launcher
homescreen or hotseat, as further UX alignment is needed.

One note about why the pin shortcut is not implemented in the
getShortcuts(). The reason is that getShortcuts does not have the
ItemInfo of the triggered item, while the SystemShortcut.Factory doesn't
have the hotseat/taskbar information. The simplest way at this point is
to check all the conditions in the controller and then manually add the
shortcut into the list.

Bug: 375648361
Test: Manual, Recording uploaded to buganizer
Flag: com.android.launcher3.enable_pinning_app_with_context_menu
Change-Id: I7d048bcb1b00f78651e909fbfcd911052a4cd4ef
2025-02-25 00:10:59 +00:00
Jagrut Desai 269fb15e97 Merge "Desktop Mode Taskbar Recreate Animation" into main 2025-02-24 16:00:48 -08:00
Sukesh Ram dc0a634362 [CD Taskbar] Remove legacy all apps button (secondary display)
Remove legacy all apps UI from secondary display. This is a quick temporary fix just to remove the legacy all apps button for aesthetic purposes without breaking secondary display launcher. The button will appear invisible. A more robust removal will be done when secondary launcher is eradicated completely.

Bug: 398196983
Test: m
Flag: com.android.window.flags.enable_taskbar_connected_displays
Change-Id: Ic5bc44efd479f7298e346d9d45fbb6f24dfad5d3
2025-02-24 15:26:56 -08:00
minch b10cedd21c Handle AddDesktopButton's visibility in different launcher states
Introduce [ADD_DESK_BUTTON] in LauncherState and change the button's
visibility across different launcher states. E.g., the button
shouldn't be visible in the quick switch.

Bug: 389209338
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Test: 1. Swipe up from home, the button shown util in overview.
      2. Swipe up from the fullscreen app, the button is invisible
         util release the finger.
      3. The button is invisible in quick switch.
      4. All the above tested with NexusLauncher and Nova launcher,
         which is a 3rd launcher.
      5. Tested with gesture and 3-finger swipe on the touchpad.
      6. Both the ClearAllButton and AddDesktopButton are not
         visibile when in select mode.
Change-Id: I54e11d4d03401be68b5b67a6f591edd737c9ea30
2025-02-24 21:33:36 +00:00
Jagrut Desai cf05d3ec0e Merge "Fix Taskbar Edu accessibility anmimation" into main 2025-02-24 13:27:53 -08:00
Jagrut Desai 8b2e5eff9b Desktop Mode Taskbar Recreate Animation
This Cl includes
       - addition of entry/exit callback methods in DesktopVisibilityController.
       - taskbar manager now listens to desktop mode changes.
       - TaskbarBackrgroundRedererer can now individually animation backgrounds for transient and persistent taskbars
       - new channel for taskbar icon alpha added to TaskbarViewController
       - new animated float to handle background alpha while we are recreating taskbar with animation.

Solution:

we use the callabck we get from DekstopVisibilty for entry/exit to first change logic of when we are considered inDesktopMode. Upon entry/exit we notify display controller for info change.
we also at notify taskbar manager who is now a listener to the desktop mode change and start the recreate process. TaskbarManager first animates existing taskbar out of user view and then follows the original recreate flow.

Test: Presubmit
Bug: 343882478
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib827564cacd194f499e7d9b1965e2bb13e3548ab
2025-02-24 11:59:53 -08:00
Federico Baron 45fe4733fb Fix grid previewing so it matches the applied layout
Bug: 392019771
Flag: com.android.systemui.shared.new_customization_picker_ui
Test: tested manually
Change-Id: If0fdd130d4278222b0b6ec2787aa7d6d56fc4b2f
2025-02-24 11:54:26 -08:00
Sunny Goyal b1fab90e26 Enforcing grid customization permission in manifest instead of code
Bug: 389173244
Test: Updated tests
Flag: EXEMPT manifest change
Change-Id: I0fee57f935156da6b2b5a612259db2c4b3605846
2025-02-24 10:40:43 -08:00
Charlie Anderson d4d526c3b5 Merge "Simplify some package update logic around restoring archived/unarchived shortcuts" into main 2025-02-24 09:58:35 -08:00
Treehugger Robot 332c329276 Merge "Fixing model thread priority getting set to background while loading" into main 2025-02-24 09:40:53 -08:00
Jagrut Desai e49214080f Fix Taskbar Edu accessibility anmimation
This cl include: Allows user to click on lottie animation views to play and pause animations. If user have choosen to remove animations we will honor it and not play the animation from begaining.

Test: Manual, Presubmit
Bug: 378980835
Flag: EXEMPT bugfix
Change-Id: Ieaaf771bc307837f042f6e59d8f02fefb2e8286a
2025-02-24 09:36:22 -08:00
Treehugger Robot 467ab548d9 Merge "Initialize shape with PreviewContext init and remove nullability" into main 2025-02-21 17:17:26 -08:00
Sunny Goyal 362fa9e96a Fixing model thread priority getting set to background while loading
Bug: 396250724
Flag: EXEMPT bugfix
Test: Manual
Change-Id: I587d6c64f75a4fd2b68c4e98c3b1cab30864879c
2025-02-21 16:02:03 -08:00
Jeremy Sim 96da8fc3ec Merge "Refactor SplitBounds to always use creation-time measurements" into main 2025-02-21 15:26:02 -08:00
Charlie Anderson 9e50a01e92 Simplify some package update logic around restoring archived/unarchived shortcuts
- also avoids race condition where unarchived shortcut is not pinned in shortcut service after restore, and then marked as broken

Bug: 375414891
Test: Launcher B&R w/ archiving
Flag: com.android.launcher3.restore_archived_shortcuts
Change-Id: I2b5331117be93d66e4acbded49b65cd5ce9f8f83
2025-02-21 17:04:12 -05:00
Sunny Goyal 7a38a45ca3 Merge "Moving LooperExecutor to kotlin" into main 2025-02-21 14:02:16 -08:00
Stefan Andonian e14ca0d14c Merge "[Memory Leak] Fix leak of LauncherAppWidgetHostView via StateManager.StateListener" into main 2025-02-21 13:02:08 -08:00
Charlie Anderson de15672e6f Initialize shape with PreviewContext init and remove nullability
Bug: 372887760
Bug: 348664593
Flag: com.android.launcher3.enable_launcher_icon_shapes
Test: previewing shapes with flag on/off
Change-Id: I4d7278c54a0d69e38142d31dd7a9605a74db3348
2025-02-21 20:23:49 +00:00
Charlie Anderson aa0f606b9c Merge "Add more checks around archived shortcut restore" into main 2025-02-21 10:46:57 -08:00
Sunny Goyal 7629bc4dcd Merge "Converting LauncherAppState to Dagger" into main 2025-02-21 10:06:01 -08:00
Fengjiang Li e0553d7da3 [Memory Leak] Fix leak of LauncherAppWidgetHostView via StateManager.StateListener
Rather than register a StateListener for each LauncherAppWidgetHostView, just register one StateListener which, upon launcher state is changed to NORMAL, iterate over all child views under Workspace and perform a11y action if view tag is set.

Fix: 397978703
Test: presubmit
Flag: EXEMPT bug fix
Change-Id: I044d012b74eaa5356196c5503318fa8ab389ec46
2025-02-20 22:05:02 -08:00
Sunny Goyal c9f697aeb5 Converting LauncherAppState to Dagger
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I336a233d2703c23a7e9065474bde471786886144
2025-02-20 19:13:49 -08:00
Sunny Goyal 4742d62285 Moving LooperExecutor to kotlin
> Will improve priority changes in a followup cl

Bug: 396250724
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ic9646e9b1b8faf80996f6e63159e8abbf00fc0b7
2025-02-20 18:58:33 -08:00
Shamali Patwa e532fc86b4 Merge "Update widgetsModel to return pickable vs all widgets separately." into main 2025-02-20 17:42:32 -08:00
Treehugger Robot aea16bd093 Merge "Expose icon scale to properly shape themed icons" into main 2025-02-20 17:30:46 -08:00
Treehugger Robot 6787617f73 Merge "Log LPNH abandon times at least 200ms." into main 2025-02-20 17:16:15 -08:00
Charlie Anderson cf37c5ba7e Add more checks around archived shortcut restore
Bug: 375414891
Test: Launcher B&R and WorkspaceItemProcessorTest
Flag: com.android.launcher3.restore_archived_shortcuts

Change-Id: I58332dcee9563bb6c87aeff7255c8a9e2a8ca2c7
2025-02-20 19:15:41 -05:00
Andy Wickham 8fabc6d111 Log LPNH abandon times at least 200ms.
Restricting to 200ms+ to reduce the spamminess of these logs.

The idea is to log the latency of LPNH abandons to see the effect
of prewarming at x ms.

Bug: 397484410
Flag: EXEMPT logging
Test: Manual and updated NavHandleLongPressInputConsumerTest.
Change-Id: I93f94ed0757508b68fcb48d61bdd194564dcc573
2025-02-20 22:14:37 +00:00
Shamali P f6efa25a49 Update widgetsModel to return pickable vs all widgets separately.
Earlier wallpaper preview was reading widgets that were eligible for
displaying in picker, which means widgets that are marked as hidden in
picker wouldn't show up in wallpaper preview.

This fix updates widgets model to maintain map of all widgets (instead of just pickable widgets like before), so that the existing `getWidgetsByComponentKey` function used by wallpaper preview can see all widgets. And, updates picker specific methods to use separate functions (suffixed `forPicker` that filter out picker ineligible widgets when read by picker code).

Bug: 385695615
Test: WidgetsModelTest, WidgetsPredictionUpdateTaskTest and demo
Flag: EXEMPT BUGFIX
Change-Id: I59efe38be0ce1f8a956ba4be42fb6e8b48b5d323
2025-02-20 14:13:16 -08:00
Treehugger Robot 54a002db43 Merge "Moving grid customization provider to Dagger" into main 2025-02-20 13:07:33 -08:00
Charlie Anderson c0fda71c36 Expose icon scale to properly shape themed icons
Bug: 394902299
Test: tested with themed/forced-themed icons on and off
Flag: com.android.launcher3.enable_launcher_icon_shapes
Change-Id: I5b189b8dcfefe195e42b8cfad1bda9e18fd80a29
2025-02-20 21:06:28 +00:00
Jeremy Sim b392f61ced Refactor SplitBounds to always use creation-time measurements
In flexible split ratios like 90:10 and 10:90, we hide the Overview icon of the smaller app completely (ag/30949010). However, there was an unintentional side effect where one of the icons would disappear when rotating the display.

This happened (basically) because SplitBounds is not recalculated on device rotation, so fields like leftTaskPercent and topTaskPercent should not be used directly when the rotation state is not known. I added an API to SplitBounds that hopefully makes it harder to write bugs like this in the future.

Fixes: 395783367
Flag: com.android.wm.shell.enable_flexible_two_app_split
Test: Icons do not disappear on rotation. When app chip menus are enabled, the (existing) correct behavior is not changed.
Change-Id: I2c1b38f4bd9a76dfb127b7bbf230897d747d3c49
2025-02-20 12:45:33 -08:00