Commit Graph

21104 Commits

Author SHA1 Message Date
Alex Chau e70eda424b Combine RecentsViewStateController with base class
- BaseRecentsViewStateController is only inherited by RecentsViewStateController, remove the base class to simplify code
- Also converted RecentsViewStateController to Kotlin and remove a bunch of warnings

Fix: 387267938
Test: presubmit and manual
Flag: EXEMPT refactor
Change-Id: I18e9c2b186a64a0af39230cb41e3b3f4949107d5
2025-01-03 10:37:57 +00:00
Treehugger Robot 7482e5cbe2 Merge "Fixing prediction ring color not getting updated if the icon changes while the slot animation is running" into main 2024-12-30 14:27:50 -08:00
Treehugger Robot bf5e7e867f Merge "Moving trackpad device tracking to a separate class" into main 2024-12-30 09:52:58 -08:00
Treehugger Robot bf7a0cb976 Merge "Flip set subtraction to produce correct list of tasks to remove." into main 2024-12-30 08:36:52 -08:00
Uwais Ashraf 39682e308f Flip set subtraction to produce correct list of tasks to remove.
Fix: 380067701
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: I26933614241e622a11a440829e89023822c8041b
2024-12-30 14:45:33 +00:00
Uwais Ashraf 7b2c441d45 Store scopeToCancel.
Without this the scope that gets cancelled can be the new one after re-attaching. This results in no flows working - hence blank thumbnails.

Fix: 369590189
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual - visually verified
Change-Id: Ie930d890095c30c4be8e87c795a06383ac06ea9e
2024-12-30 08:34:07 +00:00
Treehugger Robot 70e443cde8 Merge "Removing unnecessary baseContext usage in InputConsumerUtils" into main 2024-12-27 12:04:39 -08:00
Sunny Goyal 5bf0742fc5 Fixing prediction ring color not getting updated if the icon changes
while the slot animation is running

Slot animation is only trigerred through prediction update and it sets
final ring color at that point as part of the animation. If the icon
and the color change due to some other reason (like high-res icon or
a package-update), that color is overriden by the ongoing slot animation.

Bug: 381897614
Test: Verified manually by slowing down animation
Flag: EXEMPT bugfix
Change-Id: Ia3b86330afdb91ba6ff3366e3c8057bd7ec34e5d
2024-12-27 02:54:21 -08:00
Sunny Goyal dff42e04b7 Removing unnecessary baseContext usage in InputConsumerUtils
Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: Ie1ceb513205028e12acefc6bcf8dbf628ce15bc4
2024-12-26 20:43:56 -08:00
Sunny Goyal 4d3683fbfe Moving trackpad device tracking to a separate class
This would eventually lead to breaking apart TIS into smaller classes,
which can be injected using dagger.
This is needed to migrate DisplayController to dagger

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger refactor
Change-Id: Ic15386136bf1705e76c08536cc0790f51e19ab73
2024-12-26 20:32:30 -08:00
Sunny Goyal c2639e464f Replacing some fixed lookup flags with specific constant flag
This would make it easier to customize flags used on desktop icons

Bug: 366237794
Flag: EXEMPT refactor
Test: atest CacheLookupFlagTest
Change-Id: I0f3f04ddbe73abea207a5b58a65714ff172b2726
2024-12-26 20:19:02 -08:00
Treehugger Robot b72f6ae023 Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2024-12-26 11:58:20 -08:00
Liran Binyamin 0e767a2a87 Merge "Fix flake in BubbleBarViewAnimatorTest" into main 2024-12-26 08:37:31 -08:00
Treehugger Robot a2cc47aaf5 Merge "Migrate to TaskViewsIterable & TaskViewsIterator - [n/n]" into main 2024-12-23 14:21:46 -08:00
Mykola Podolian dca789d97d Merge "Fix hotseat QSB squished issue" into main 2024-12-23 14:10:49 -08:00
minch 263bc2d3e8 Migrate to TaskViewsIterable & TaskViewsIterator - [n/n]
Use TaskViewsIterable to iterate all the current TaskViews
inside `RecentsView.updateGridProperties`. Remove all the indices
usage inside this function as well.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Verified that the TaskViews layout is correct in below scenarios:
      1. Swipe up from an fullscreen app or from home
      2. Dismiss the large tile, a TaskView in the middle either in the
         top row or the bottom row, dismiss the last TaskView.
      3. Clear all TaskViews
      4. Swipe up to the right side of the edge to have a normal
         TaskView as the snapped TaskView
      5. Alt+Tab with more than 6 apps to enter Overview, with a
         hidden TaskView from the alt+tab list as the snapped TaskView.
Change-Id: Ic01534ed03bcc654d5799f43f0cf659d2c86ca31
2024-12-23 15:55:05 +00:00
Uwais Ashraf 4a87b48d44 Merge "Move TaskThumbnailViewData initialisation to init." into main 2024-12-23 04:15:41 -08:00
Alex Chau 9af2ef3ef0 Merge "Implement TaskViewsIterable using Kotlin Sequence" into main 2024-12-23 03:26:48 -08:00
Mykola Podolian 2a36384351 Merge "Fixes issue with missing overflow bubble" into main 2024-12-21 11:15:40 -08:00
Bill Yi 4aab1552c9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ia8e7529645c0daeb6b2d6d5bd612e305b86604f2
2024-12-20 20:15:58 -08:00
mpodolian 91cf7b3fc4 Fix hotseat QSB squished issue
Added logic to do not adjust hotseat and QSB if the bubble bar is not
visible.

Test: Manual. Unfold foldable device, open bubbles test application,
trigger bubble via adb, wait until bubble bar is stashed, unfold the
device, go back to the home screen. Observe hotseat and QSB are not
squished.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 384903202

Change-Id: Ib03e02d977de6357069470171952afb20c681f20
2024-12-20 15:40:11 -08:00
mpodolian 609e9642bc Fixes issue with missing overflow bubble
The problem had two parts:
1 When BubbleBarViewController removed all views, including the overflow
bubble, it did not update the value of the mOverflowAdded field
2 BubbleBarController removed all views upon receiving an initial update
This CL addresses both issues.

Test: Manual. Ensure the overflow bubble is present in the bubble bar.
Rotate the device and verify that the overflow bubble remains visible.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 380281090

Change-Id: I1810671e6bfc5b8b402433697b07f3de2e612ed7
2024-12-20 15:34:04 -08:00
Uwais Ashraf 84ce6e9e80 Merge "Fix blank recent tasks thumbnails." into main 2024-12-20 12:20:02 -08:00
Uwais Ashraf a08b7c4218 Move TaskThumbnailViewData initialisation to init.
This is because onLayout can be called before onAttachedToWindow so this property needs to be initialised as it is used in onLayout.

Fix:  383733481
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual checking of split select and incorrect orientation for now but will be tested by view screenshot tests.

Change-Id: I40937b8b1b98209e77cb5ee64f5c4342b90faf97
2024-12-20 19:52:05 +00:00
Treehugger Robot 64eb038059 Merge "Moving sysproxy to kotlin" into main 2024-12-20 11:44:23 -08:00
Brian Isganitis 1e6ffc8a08 Merge "Split up tests by actual hardware keyboard status." into main 2024-12-20 11:36:35 -08:00
Mykola Podolian aad6505463 Merge "Fixed optional overflow crash by verifying the presence of bubbles." into main 2024-12-20 09:54:49 -08:00
Alex Chau e5a3ab1c0c Implement TaskViewsIterable using Kotlin Sequence
- Implement TaskViewsIterable in TaksViewUtils using ViewGroup.children Sequence with a filter, this removes the need to write a custom Iterator

Bug: 379942019
Test: manual smoke test and presubmit
Flag: EXEMPT refactor
Change-Id: I2250a4dfbee49dfdb3319514eb0f3e4408606437
2024-12-20 14:09:46 +00:00
Jordan Silva e638b5a25a Fix blank recent tasks thumbnails.
When user navigate back to Overview, getAllTaskData will be called and refresh the list of tasks in the repository which cleans the pre-loaded thumbnails and icons from the previous iteration.

In some cases, this causes the thumbnails to be blank in the recents. When getAllTaskData is called after the taskRequest is completed, the tasks will end up in an invalid state without the thumbnail and icon until the user scrolls through the recent apps list or re-open Overview.

Fix: 380067701
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: Ia15d905a2f5ceb71b87c0b91028ce88894524806
2024-12-20 02:30:39 -03:00
Treehugger Robot ed7a726091 Merge "Removing state from TISBinder" into main 2024-12-19 18:53:35 -08:00
Sunny Goyal 5df843476c Moving sysproxy to kotlin
Bug: 385171800
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I9db2d4a2f7ff6e739e389ce0e076d5ea88adad5c
2024-12-19 17:22:00 -08:00
Treehugger Robot 10d808ffa3 Merge "[CD Taskbar] Set correct window type for TaskbarActivityContext on primary/secondary displays" into main 2024-12-19 16:58:17 -08:00
Mykola Podolian 73553774c2 Merge "Update drag close drop target properties." into main 2024-12-19 16:50:02 -08:00
Treehugger Robot de2e748cc6 Merge "[CD Taskbar] Pass displayId to TouchInteractionService for per-display wallpaper updates" into main 2024-12-19 16:26:54 -08:00
Brian Isganitis 791944ff63 Merge "Disable model loading with Sandbox check instead of static boolean." into main 2024-12-19 15:32:56 -08:00
Treehugger Robot 8e8a3cfb71 Merge "Migrate to TaskViewsIterable & TaskViewsIterator - [4/n]" into main 2024-12-19 15:18:20 -08:00
Sukesh Ram bdd44ef1cc [CD Taskbar] Set correct window type for TaskbarActivityContext on primary/secondary displays
Modified TaskbarActivityContext to be aware of the display it's on (primary or secondary). This allows it to set the correct layoutParams.windowType for the Taskbar view, using TYPE_NAVIGATION_BAR for the primary display (the standard Taskbar) and TYPE_NAVIGATION_BAR_PANEL for secondary displays.

Bug: 385202874
Test: Manual
Flag: EXEMPT not adding behavior
Change-Id: I5addf45b6099d3ddcf8315a541b69d2f67bace7d
2024-12-19 14:57:22 -08:00
Sukesh Ram cb5ce3c3ec [CD Taskbar] Pass displayId to TouchInteractionService for per-display wallpaper updates
Modified TouchInteractionService.updateWallpaperVisibility() to accept a displayId parameter. This allows TaskbarManager to apply wallpaper visibility changes (e.g., dimming) on a per-display basis, ensuring correct behavior with multiple connected displays.

This change addresses the issue where wallpaper dimming was not being applied correctly on secondary displays when the Taskbar was visible.

Bug: 385200423
Test: Manual
Flag: EXEMPT not adding behavior
Change-Id: I72ddeb6df29f84c16f91d5c6de446266bee98342
2024-12-19 14:37:36 -08:00
mpodolian 4bc4e45714 Fixed optional overflow crash by verifying the presence of bubbles.
The scenario where "A bubble was added from the overflow (and now it's
empty/not showing)" lacked a check to verify if bubbles are currently
present. Its absence caused calls to removeOverflowAndAddBubble()  of
BubbleBarViewController for any first bubble matching the previously
closed last bubble, not just those added from the overflow.
This CL addresses the issue by adding the missing check.

Test: Manual. Set enable_optional_bubble_overflow flag to true. Create
one bubble, dismiss it, create the same bubble again. Create another
bubble, dismiss it, open overflow and click on dismissed bubble. Observe
the overflow icon disappears.
Video: http://recall/-/gx8ASgewUeUS3QYohfrd1J/eYeyo6cNeUBw4mU6rrkXtN
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 373940143

Change-Id: I4085ce4e922e2b5d65466a00649dda086c14185f
2024-12-19 13:47:39 -08:00
Sunny Goyal 64dcfcf0c7 Removing state from TISBinder
Making OverviewComponentObserver a singleton

Bug: 384896306
Bug: 337863494
Test: Presubmit
Flag: EXEMPT bugfix
Change-Id: Ic7805ee4f4eef25098ddec4025062135d03c1611
2024-12-19 13:05:42 -08:00
Jagrut Desai 636aba5acb Merge "Don't recreate taskbar in Overview" into main 2024-12-19 13:00:03 -08:00
Liran Binyamin 11323f3b76 Fix flake in BubbleBarViewAnimatorTest
Tried scheduling ABTD multiple times but unfortunately ABTD failed
allocating resources.

Flag: EXEMPT test only
Bug: 384807919
Test: atest BubbleBarViewAnimatorTest

Change-Id: I4c48c034b1bd6c9e8f681fb72cc65a9e0aee2eb7
2024-12-19 12:52:30 -08:00
Jagrut Desai 2f1c1e10de Don't recreate taskbar in Overview
This cl includes
	- when going to overview from Launcher or Desktop Mode don't recreate taskbar and keep it a same variant as the context user was in.
        - user will still be able to pin/unpin taskbar in overview, but it will be recreated to the launcher context.
	- opening app from taskbar context is now aware of if taskbar is in desktop mode and opens app in Desktop Mode when user oepn any app.
        - This cl will not include the animation when taskbar variant is changing between launcher and desktop mode.

Solution
    - if desktop tasks are visible we will open any app from taskbar context into Desktop windowing mode after launching the DesktopTaskView manually. We will launch desktop task from recentview first and upon end of recent animation we will launch the app.

Bug: 343882478
Test: Manual
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib67e1e7150670f901c07c2df188cde81e7d725dc
2024-12-19 10:50:20 -08:00
mpodolian 7991a4489c Update drag close drop target properties.
Updated the colors and adjusted the close icon size of the drop target.

Fixes: 376687679
Test: Manual. Drag bubble bar and observe updated drop target.
Test: Manual. Disable bubble bar. Drag overflow bubble and observe
updated drop target.
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I04a11d8a868ff06fae008f42a591b66e5254f4cd
2024-12-19 10:36:09 -08:00
Treehugger Robot 1ac4d2294f Merge "Destroy dep tree on RecentsView detached. This prevents leaks." into main 2024-12-19 10:14:02 -08:00
Liran Binyamin 8b102fe820 Merge "Fix handle color when interrupting the animation" into main 2024-12-19 10:04:52 -08:00
Randy Pfohl 080fb1e483 Merge "Refactor to use a DisplayModel to host common per display objects" into main 2024-12-19 08:35:27 -08:00
Will Osborn 64464fa257 Merge "Don't update desktop visibility with final state until state transition has finished." into main 2024-12-19 06:49:46 -08:00
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