Commit Graph

13345 Commits

Author SHA1 Message Date
Uwais Ashraf
a9d5cc877c Destroy dep tree on RecentsView detached. This prevents leaks.
Scenario 1 was already working, this CL fixes scenario 2 and leaves scenario 3 broken.

3 Scenarios:
Scenario 1 (occurs in real usage):
Launcher instance 1 init
Launcher instance 2 init
Launcher instance 1 destroy
Launcher instance 2 destroy

Scenario 2 (occurs in testStressPressHome):
Launcher instance 1 init
Launcher instance 1 destroy
Launcher instance 2 init
Launcher instance 2 destroy

Scenario 3 (does not currently happen):
Launcher instance 1 init
Launcher instance 2 init
Launcher instance 2 destroy
Launcher instance 1 destroy

Fix: 381160061
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaplStartLauncherViaGestureTests#testStressPressHome
Change-Id: I7c82ce97e7a7f0698b9adad38f59e4555f0d1bdc
2024-12-19 06:16:28 -08:00
Treehugger Robot
072c1f469f Merge "[CD Taskbar] Refactor TaskbarManager - Make mAddedWindow display-specifc" into main 2024-12-18 22:57:22 -08:00
randypfohl
b479f10d45 Refactor to use a DisplayModel to host common per display objects
Test: Built and ran locally

Flag: com.android.launcher3.enable_fallback_overview_in_window

Bug:  379746094

Change-Id: I59b644f8905a3ba5af31234c4fb53709209d9d07
2024-12-18 21:52:41 -08:00
Sukesh Ram
fb55f96506 [CD Taskbar] Refactor TaskbarManager - Make mAddedWindow display-specifc
Create SparseBooleanArray to ensure that with connected displays, there is support for multiple RootLayouts, which each a variable tracking whether they have been added to the window or not.

Flag: EXEMPT not adding new behavior
Bug: 384793943
Test: Manual
Change-Id: I18849d033cada181eadf89c86d3c02d87a8ee962
2024-12-18 21:10:57 -08:00
Sunny Goyal
4f20462257 Merge "Removing TisHelper dependency in taskbar Taskbar should be able to access TouchInteractionService directly" into main 2024-12-18 18:58:43 -08:00
minch
304e0f29be Migrate to TaskViewsIterable & TaskViewsIterator - [4/n]
Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Checked that TaskViews layout are correct in below scenarios:
      1. Dismiss the first TaskView
      2. Dismiss the last TaskView
      3. Dismiss a TaskView in the middle
      4. Remove all the TaskViews
Change-Id: I944503e9c1a65cded128efd5572734e887cdb027
2024-12-19 00:46:18 +00:00
Treehugger Robot
ee2e3ba257 Merge "Use DeviceProfile in NavBarGestureHandler and EdgeBackGestureHandler for the display size" into main 2024-12-18 16:09:36 -08:00
mpodolian
226ed8143d Shift transient taskbar to ensure 12dp distance with the bubble bar.
Shift the taskbar to fulfill the 12dp distance if the distance between
the taskbar and the bubble bar is below this threshold.

Fixes: 376929094
Test: TaskbarViewControllerTest
Test: Manual. Test that the transient taskbar shifts properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Moved bubbles side to side, confirming the taskbar
follows. The return-to-home-screen animation to the hotseat plays as
expected from either side.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/bJZ8PclmltZu7IupvBFrLn
Test: Manual. Test that the transient taskbar stashes properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Go to any application. Stash and un-stash the taskbar.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/hCGRhUgIqvcehOrTQ2Ulvj
Test: Manual. Test that the transient taskbar pin/unpin properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Pin/unpin the taskbar.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/f3fy5JKVZAk4wLCpVra4DK
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: Id4bd713da93053f90d9c2be8503dc93531a03b29
2024-12-18 15:51:37 -08:00
Treehugger Robot
1ad0e1555b Merge "Migrate using TaskViewCount as the indices" into main 2024-12-18 15:43:25 -08:00
Sunny Goyal
ddded547bb Removing TisHelper dependency in taskbar
Taskbar should be able to access TouchInteractionService directly

Bug: 384896306
Test: Presubmit
Flag: EXEMPT bugfix
Change-Id: I2a32d3a7a2b2071645abff72c62635c6575a48a1
2024-12-18 15:02:44 -08:00
Anushree Ganjam
59137e44e2 Merge "Update the All apps label to "Apps list"" into main 2024-12-18 14:07:36 -08:00
Vinit Nayak
9f4ab8b89a Merge "Hide App Chip for smaller app in 90:10 flex split" into main 2024-12-18 12:00:48 -08:00
minch
55c301add0 Migrate using TaskViewCount as the indices
Do not rely on `getTaskViewCount` as the index information.
- Remove the use of the deprecated function `obtain` as well.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Enabled TalkBack on Tangor and entered overview with multiple
      opened apps, verified the information as below:
      1. The number of children pronounced by TalkBack is the number
         of RecentsView children.
      2. Talkback starts from the leftmost visible TaskView, which
         matches the logic that we added the TaskView in reverse order
         to the accessibility children list.
      3. Scrolled inside RecentsView, and checked the from and end
         indices of the a11 event are the same as before.
Change-Id: Ib3c37422ba940aed6c124a8cc0d4732144783d45
2024-12-18 16:46:46 +00:00
Saumya Prakash
1bcaab81e3 Merge "Close the multi instance menu when other things open" into main 2024-12-18 07:38:26 -08:00
Schneider Victor-Tulias
0b2c37ed72 Use DeviceProfile in NavBarGestureHandler and EdgeBackGestureHandler for the display size
DisplayController caches the display size, so when the user unfolds a foldable, the screen size is incorrect, which messes with the touch handling. Using DeviceProfile instead.

Flag: EXEMPT bug fix
Fixes: 361694048
Test: fold/unfold device during home/back/overview tutorial steps
Change-Id: Ie49f677f97ea5ddb0f91d2e662677edaaa81860a
2024-12-18 10:03:50 -05:00
Uwais Ashraf
7a829e98d8 Merge "Move cancellation of CoroutineScopes to bg thread as it can be slow." into main 2024-12-18 05:36:02 -08:00
Anushree Ganjam
8dae1be563 Update the All apps label to "Apps list"
Set the AccessibilityNodeInfo containerTitle to improve a11y for users
in predictionRow.

See expected behavior suggestion in  https://b.corp.google.com/issues/379640673#comment1

Video
Quickstep launcher: http://recall/-/cOtJfHR6buEyEHnRyCqzVE/eugH3ID7eenOuLwTszaLHk

Pixel launcher: http://recall/-/cOtJfHR6buEyEHnRyCqzVE/fftzwMRCy6N3o7OcwiGMdk

Bug: 379640673
Test: Manual
Flag: EXEMPT a11y bugfix
Change-Id: I23a8a142afb213c0801402a56bc134bc14f0f97d
2024-12-17 16:39:45 -08:00
Uwais Ashraf
2470d3fdf5 Move cancellation of CoroutineScopes to bg thread as it can be slow.
Bug: 381317629
Fix: 383999850
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual - checking perfetto traces for improvement
Test: Performance tests
Change-Id: Ic796fe578f5aa98ce060ac22341a1bcfa68061df
2024-12-17 23:33:55 +00:00
Treehugger Robot
446ea7592f Merge "Let getOffsetToDismissedTask not rely on taskCount" into main 2024-12-17 14:37:52 -08:00
Vinit Nayak
cf332154c1 Hide App Chip for smaller app in 90:10 flex split
Bug: 384110883
Test: Tested with both halves made smaller,
large screen and small (phone has other existing bugs).
Lanscape and portrait.
Flag: com.android.wm.shell.enable_flexible_two_app_split

Change-Id: Ib6508c7b3192cc47fc8406cdf68c826bed29de5f
2024-12-17 13:52:39 -08:00
Mykola Podolian
bd10730a57 Merge "Added an onClick listener to the bubble bar." into main 2024-12-17 10:36:14 -08:00
Will Osborn
2c658324e8 Don't update desktop visibility with final state until state transition has finished.
When exiting Overview, the Launcher.onIdpChange listener is indirectly
triggered by DesktopVisibilityController.onLauncherStateChanged because
with a desktop live tile the mode will have changed out of desktop mode.

onIdpChange is treated as a configuration change and triggers reapplyUi
which cancels currently running animations and causes the Overview->Home
animation not to run.

Bug: 378481525
Test: locally tested on TangorPro
Flag: EXEMPT bugfix
Change-Id: I1629e43d7b2fd960c5b999899b286e918a1e7aa4
2024-12-17 14:54:29 +00:00
minch
7fc34db11b Let getOffsetToDismissedTask not rely on taskCount
This is a preparation to migrate TaskViews iteration that
rely `getTaskViewCount` to the `TaskViewsIterable` and
`TaskViewsIterator`.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Tested on tangor with `adb shell wm density 480` to simulate
      phone layout, and verified overview layout is correct in
      scenarios below:
      1. Dismiss the first TaskView
      2. Dismiss the last TaskView
      3. Dismiss a TaskView in the middle
      4. Click `ClearAll` button to dismiss all the TaskViews
Change-Id: Icbaf1ea706906097fc6ac60ad3e2ab17d2781284
2024-12-16 23:39:24 +00:00
mpodolian
5391e14c3e Added an onClick listener to the bubble bar.
Previously, clicks were not handled because no listener was set on the
bubble bar.

Fixes: 383622825
Test: Manual. Ensure bubbles are on the home screen and set the
navigation mode to 3-button navigation. Click on the collapsed bubble
bar and observe the bar expanding.
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I99e1c20e40a9dd9da97b68817734c8ca1f656baa
2024-12-16 15:16:15 -08:00
Liran Binyamin
6592d90003 Merge "Fix bar visibility after dismissing while stashed" into main 2024-12-16 10:05:39 -08:00
Saumya Prakash
54c6cf7c38 Close the multi instance menu when other things open
This change ensures that if open, the Taskbar multi instance menu will close when
another long press app menu is launched, when a folder is opened, or
when Taskbar all apps is opened.

Fix: 383510315
Test: Open Taskbar multi instance menu and ensure it closes when other
views are opening (Taskbar all apps, a folder, and app long press menu)
Flag: com.android.launcher3.enable_multi_instance_menu_taskbar

Change-Id: Id2d64c86a76978af8db56d3a083dc79a677a1a5d
2024-12-16 08:54:42 -08:00
Johannes Gallmann
c812907eb8 Merge "Add blur effect to predictive back-to-home animation" into main 2024-12-16 05:50:34 -08:00
Gustav Sennton
c66964125c Merge "Revert "Open Task into Desktop Mode when Taksbar is in DesktopMode"" into main 2024-12-16 05:42:38 -08:00
Liran Binyamin
38dc7ef520 Fix bar visibility after dismissing while stashed
When updating the bubble bar visibility, allow it to become visible
if the only hidden bit is the stashed one and we're animating.

This fixes the visibility issue that appears after dismissing the
bar while stashed, and then sending an initial bubble, while still
stashed.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 383620113
Test: manual
       - create bubble
       - launch app
       - dismiss bubble with adb
       - create bubble with adb
       - observe bubble bar is visible during the animation
Change-Id: I7a955de068867829b3ccab11b2b0adc8d8e10239
2024-12-13 20:30:47 -05:00
Wen-chien Wang
ad0b62daad Merge "pin-shortcut: Add pin shortcut to the context menu" into main 2024-12-13 17:00:42 -08:00
Wen-Chien Wang
2badfc7ebc pin-shortcut: Add pin shortcut to the context menu
This cl adds the pin shortcut option to the context menu, where
it works on Home launcher, hotseat, and pinned apps on the
taskbar.
Currently the option is a no-op.

Bug: 375648361
Test: Manual. Recording uploaded to buganizer
Flag: com.android.launcher3.enable_pinning_app_with_context_menu
Change-Id: I5d1284a6e909fd75f14e81c3ae713da3cdc01ce3
2024-12-13 22:49:52 +00:00
Treehugger Robot
5849df4002 Merge "[-1] Fix flicker of -1 when swipe up to exit -1 isn't fast enough" into main 2024-12-13 14:02:46 -08:00
Fengjiang Li
b8b16bd288 [-1] Fix flicker of -1 when swipe up to exit -1 isn't fast enough
Fix: 381017761
Flag: NONE - released code
Test: manual - record a video
Change-Id: I5bda4a234cdcc8227d4feb9a92a174d07e46f7a2
2024-12-13 12:11:41 -08:00
Treehugger Robot
9b6c58e6a9 Merge "Do not rely on getTaskViewCount to iterate TaskViews" into main 2024-12-13 11:59:41 -08:00
minch
8cf0df7f96 Do not rely on getTaskViewCount to iterate TaskViews
Using `getChildCount` to iterate TaskViews instead of
`getTaskViewCount` when indices are used. As it is not safe to assume
the TaskView starts from index 0.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Manual
Change-Id: I599b5117f0848e429ebf83fc4b85451e52b4bcab
2024-12-13 10:12:34 -08:00
Treehugger Robot
4d295d0867 Merge "Migrate to TaskViewsIterable & TaskViewsIterator - [2/n]" into main 2024-12-13 09:49:39 -08:00
Treehugger Robot
f340be6e4f Merge "Replacing all int lookup flags and boolean overrides with an object to make it easier to extend options" into main 2024-12-13 06:20:44 -08:00
Alex Chau
fa39d7478d Merge "Pass RecentsView reference to RecentsViewUtils to simplify code" into main 2024-12-13 06:12:31 -08:00
Johannes Gallmann
b5d923f17a Merge "Add depth animation to predictive back to home" into main 2024-12-13 05:43:35 -08:00
Artsiom Mitrokhin
4c7663768d Merge "Add haptics for opening taskbar pinning popup view from anywhere" into main 2024-12-13 05:34:00 -08:00
Gustav Sennton
027a0fb35f Revert "Open Task into Desktop Mode when Taksbar is in DesktopMode"
This reverts commit d87722d396.

Reason for revert: causes b/383976643

Change-Id: Ib862599e84a6f61133819797a1ba51b79fe1f745
2024-12-13 05:13:38 -08:00
Alex Chau
ec1883b261 Pass RecentsView reference to RecentsViewUtils to simplify code
- RecentsViewUtils is owned by RecentsView, it's safe to have an instance of RecentsView to simplify a lot of call sites

Fix: 383999010
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I69f991ea137b30e0297df825b78ad431f6388af8
2024-12-13 12:21:47 +00:00
Johannes Gallmann
8d5fd05718 Add blur effect to predictive back-to-home animation
Bug: 342178850
Flag: com.android.launcher3.predictive_back_to_home_blur
Test: Manual, i.e. testing predictive back-to-home animation on device
Change-Id: I6295353d910ad8597477b722de3a87f93ee0297c
2024-12-13 11:44:07 +00:00
Johannes Gallmann
998e11e0a5 Add depth animation to predictive back to home
Setting the depth when predictive back to home is started. This will be animated to NORMAL state by ScalingWorkspaceRevealAnim on back gesture commit.

Bug: 382453424
Flag: com.android.launcher3.predictive_back_to_home_polish
Test: Manual, i.e. testing predictive back-to-home animation on device
Change-Id: Id33f49d78aae268b7d89035cce58065f6a60a8bf
2024-12-13 11:44:06 +00:00
Johannes Gallmann
9b524b0f60 Merge "Play workspace reveal animation for predictive back-to-home" into main 2024-12-13 02:10:17 -08:00
Sunny Goyal
18e480838a Replacing all int lookup flags and boolean overrides with an object to make it easier to extend options
Bug: 381897614
Bug: 366237794
Flag: EXEMPT refactor
Test: atest CacheLookupFlagTest
Change-Id: Ic89d48dd1c5dc8b0a89b1898cd7b00d9c61d6513
2024-12-12 18:32:55 -08:00
Liran Binyamin
0f0394c597 Merge "Fix bubble bar visibility issue" into main 2024-12-12 15:36:42 -08:00
Liran Binyamin
138dd0bc5f Fix bubble bar visibility issue
Update the bubble bar visibility for the initial bubble if the animation
is suppressed, e.g. if we're creating the bubble when the shade is open.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 382693837
Test: manual
       - enable bubbles
       - remove all conversations from the list of allowed to bubble
       - create notification
       - open shade and click on the bubble button to bubble the notification
       - observe bubble bar becomes visible

Change-Id: If771c28998b2b091f4f1ab38001e9485ed1ed849
2024-12-12 15:36:29 -08:00
Sunny Goyal
daf46a09b2 Merge "Moving WMProxy to dagger" into main 2024-12-12 15:27:19 -08:00
Brandon Dayauon
1d1bffbf0b Merge "Fix unintended scroll in all apps when using external mouse." into main 2024-12-12 11:37:31 -08:00