Commit Graph

1105 Commits

Author SHA1 Message Date
Alex Chau
ed9e3a8701 Merge "Convert TaksView to Kotlin" into main 2024-05-16 14:00:02 +00:00
Eghosa Ewansiha-Vlachavas
c36afd3e26 Merge "[2/n] Unify DesktopModeStatus between Shell and Sysui" into main 2024-05-16 12:43:26 +00:00
Alex Chau
9565667813 Convert TaksView to Kotlin
- PS1: Android Studio conversion (unformatted, cannot compile)
- PS2: Fix compilation issues and formatting
- PS3: First pass ready for review
- PS4: Minor changes (Remove Consumer, remove unnecessary null-checks)
- PS5: Removed check() around taskContainers, which is now lateinit and should always be initiailzed. Also ensure TaskView is bound before adding to parent.
- PS6: Move a bunch of getters to use .property style
- PS8: Refacoted RecentsView.applyLoadPlan bind logic, to avoid inflating TaksView, bind, add then immediatley remove
- PS10: Turned more functions to express functions; added an extension function
- PS11: Re-order functions, no code changes
- PS12: Reverted unit express function back to {} style

Bug: 339787593
Test: Manual
Flag: NONE
Change-Id: I75c06cf29718d8f258a4124997bcb054f5eb056f
2024-05-16 12:33:28 +01:00
Liran Binyamin
0d8b2206af Merge "Deflake BubbleBarViewAnimatorTest" into main 2024-05-14 16:53:28 +00:00
Eghosa Ewansiha-Vlachavas
1c44de9cdb [2/n] Unify DesktopModeStatus between Shell and Sysui
Remove `DesktopModeStatus` from quickstep and instead access through
shell/shared to shell/shared.

Flag: None
Bug: 335401172
Test: atest -c NexusLauncherTests:com.android.quickstep.DesktopSystemShortcutTest

Change-Id: I42f8b6e5f97f13fda22ed34bda4aa712ead53349
2024-05-14 15:26:15 +00:00
Chris Göllner
fa09b12443 Merge "Convert SysUiState flags from int to long" into main 2024-05-14 10:44:40 +00:00
Liran Binyamin
097261619b Deflake BubbleBarViewAnimatorTest
Fix an issue where we were verifying the status of the animator on the
test thread, which may have been modified on the main thread.

100x runs: https://android-build.corp.google.com/abtd/run/L42700030003806035/

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Fixes: 339437686
Test: abtd link above
Change-Id: I7e0d67e6ca4b2f905ff80f317355d8d5ed0a912b
2024-05-14 00:22:00 +00:00
Alex Chau
74804ae560 Merge "Remove unused @ScreenRecord and @Stability for closed bug" into main 2024-05-13 18:03:27 +00:00
Liran Binyamin
3fcdc0a39f Merge "Handle touch on bubble bar while animating" into main 2024-05-13 17:30:40 +00:00
Treehugger Robot
b28f611163 Merge "Removing old workaround" into main 2024-05-13 15:53:22 +00:00
Chris Göllner
0cd995e4ef Convert SysUiState flags from int to long
We already reached the limit of 32 flags for an int. To be able to have
more, changing from int to long.

This is needed, as new flags have to be added.

Flag: NONE
Test: Manually running SysUI and Launcher
Test: Unit tests in CL
Bug: 335625543
Change-Id: Iec1d40218264c7c64c50fd09764aa07c0caa7787
2024-05-13 14:47:33 +01:00
Liran Binyamin
6097a29158 Handle touch on bubble bar while animating
This change handles touches on the bubble bar while the bubble bar is animating.
We now update the taskbar touch region during the animation to make the bubble bar touchable.
When the bubble bar is touched during the animation, we now cancel the animation and allow dragging or clicking to expand.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/gtGS6FCrygN5RKueFtPs5E

BubbleBarTest 100x run: https://android-build.corp.google.com/abtd/run/L42600030003675041
Note that in the abtd run above there's a flake but that's for a different test which I'll look into separately.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605790
Bug: 280605846
Bug: 339066271
Fixes: 339244038
Test: See demo
Test: atest BubbleBarViewAnimatorTest
Change-Id: Icb8f4fa46ae4bb8c94ca931193d4a3cc49c5b718
2024-05-13 09:41:23 -04:00
Alex Chau
f1c402ad89 Remove unused @ScreenRecord and @Stability for closed bug
Fix: 309820115
Test: None
Flag: None
Change-Id: I7739c3eccb72e8c20e71ed85f5464e1619f8ea3f
2024-05-13 12:22:28 +01:00
Federico Baron
6619568efd Revert "Add screenrecord for TaplPrivateSpaceTest#testPrivateContainerIsPresent"
This reverts commit 4f836430a7.

Reason for revert: issue resolved

Change-Id: I7174e50c166358634626aa308edbd5987e5cc2fb
2024-05-10 20:43:32 +00:00
Vadim Tryshev
306fa566f9 Removing old workaround
Bug: 165029151
Test: presubmit
Flag: N/A
Change-Id: Id54344f0b0423caa4c23eb574f0764648f49e41a
2024-05-10 13:40:37 -07:00
Uwais Ashraf
2a2be5dfee Merge "Add corner rounding to TaskThumbnailView" into main 2024-05-09 09:44:30 +00:00
Alex Chau
ec547e0c32 Merge "Recycle thumbnailViews in DesktopTaskView" into main 2024-05-08 22:20:22 +00:00
Alex Chau
4205013b0a Recycle thumbnailViews in DesktopTaskView
- Changed mTaskContainers to a List
- Added an XML for TaskThumbnailView to make it compatible with ViewPool
- Removed mSnapshotViews variable, and streamlined DesktopTaskView binding logic to re-use thumbnailvIew from mTaskContainers or ViewPool

Bug: 249371338
Fix: 251586230
Test: manual
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: Iab7575e9c36b8ebf3eb62f19f13d75ba671f9f4f
2024-05-08 22:19:27 +00:00
Treehugger Robot
05f201e8ac Merge "Marking testPrivateSpaceLockingBehaviour as disabled." into main 2024-05-08 20:59:02 +00:00
Jeremy Sim
7d69804e4e Merge "Fix bug with double-relayout of Overview Actions View" into main 2024-05-08 20:24:21 +00:00
Himanshu Gupta
a3da6fc6bd Marking testPrivateSpaceLockingBehaviour as disabled.
Temporarily disabling the test as there are failures
seen.
Will be renabled, once the RCA of errors is found.

Bug: 339179262
Test: NA
Flag: NA
Change-Id: I4e4a0b9f8b7290e5be27770a4ded2355a2cc74de
2024-05-08 16:30:07 +01:00
Uwais Ashraf
9533b0fb27 Add corner rounding to TaskThumbnailView
Fix: 334826840
Test: TaskThumbnailViewModelTest
Flag: ACONFIG com.android.launcher3.enable_refactor_task_thumbnail DEVELOPMENT
Change-Id: Iba4d49d43abc09363f61186c3fcc07f2281b7006
2024-05-08 14:45:44 +00:00
Jeremy Sim
41eadd1a91 Fix bug with double-relayout of Overview Actions View
This CL refactors Overview Actions View so that a separate view, R.id.group_action_buttons, is used for buttons related to grouped tasks. This also changes the way visibility is handled with actions buttons -- instead of all buttons living on one bar and being toggled on and off, sometimes the whole bar is toggled on and off (to change from single task actions to group actions and vice versa).

This prevents the same view from having its visibility changed twice in in one layout and causing the wrong visibility to be rendered.

Fixes: 333844287
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_app_pairs NEXTFOOD
Change-Id: I1b6be4637ac8c8d424e7633c437fca376ecdd757
2024-05-07 11:18:24 -07:00
Treehugger Robot
22283fd1b8 Merge "Use TaskContainer as source of truth around Task handling" into main 2024-05-07 15:00:24 +00:00
Liran Binyamin
8f266507fd Merge "Animate the bubble bar for the first bubble" into main 2024-05-07 13:08:21 +00:00
Alex Chau
5b15bfe20b Use TaskContainer as source of truth around Task handling
- Renamed TaskIdAttributeContainer into TaskContainer so it's shorter
- Make mTaskContainers the source of truth for Task handling, removing mTask, mSecondaryTask, mTaskIdContainer and use mTaskContainers to derive all related information
- Remove mTasks/mSnapshotViewMap in DesktopTaskView and replace with mTaskContainers
- Mark methods that assumes a single Task as deprecated e.g. getTask, getItemInfo, getThumbnail to discourage further usage of such methods; "First" is added to the method name to make it explicit only first Task is considered; getTaskContainers is encouraged to access such information

Bug: 249371338
Test: Manual
Flag: None
Change-Id: Ieb15e0e8432913c89dc46c1011f0148095c665f8
2024-05-07 11:51:26 +01:00
Himanshu Gupta
8b0d1fb614 Merge "Adding Tapl test for locking/unlocking Private Space" into main 2024-05-07 09:57:59 +00:00
Liran Binyamin
aa73f595cf Animate the bubble bar for the first bubble
This change animates the bubble bar for the first bubble.
When we're in home -- the bubble bar bounces in and stays visible
When we're in app -- the bubble bar bounces in, then animates to
the stashed handle.
When the bubble bar auto expands, we currently animate the bubble
bar already expanded. In the future we'll time the expansion
until after the bubble bar settles in.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hIGwtb3YKyCT9Ke9adZNgY

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 339066271
Test: atest BubbleBarViewAnimatorTest
Change-Id: I80ce55676b72a50bab23623e0b5c1e602690682f
2024-05-06 20:17:28 -04:00
Himanshu Gupta
bf51b4882e Adding Tapl test for locking/unlocking Private Space
In this test:
1. Private Space is created.
2. Lock Button is clicked, locked view is verified.
3. Unlock Button is clicked, unlocked view is verified.
4. Private Space is removed.

Doc: go/private-space-tapl

Bug: 322882655
Test: TaplPrivateSpaceTest
Flag: NA
Change-Id: I1c399a96ea14a4464113576d31eed8db1caf1f2a
2024-05-06 20:03:23 +01:00
Liran Binyamin
b4b5e79ffe Merge "Interrupt bubble animation on stash change" into main 2024-05-06 16:06:55 +00:00
Liran Binyamin
209c764175 Interrupt bubble animation on stash change
This change handles cancelling the currently running bubble animation when the stash state is changing.

Demo - http://recall/-/bJtug1HhvXkkeA4MQvIaiP/4jnBgnFaIPez6m7fVLSlf

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I34628f8ad741228dd21285ad66e45ef2909fbdab
2024-05-06 09:55:34 -04:00
Federico Baron
aed966daae Merge "Add screenrecord and demote TaplTestsTrackpad#switchToOverview" into main 2024-05-03 23:54:32 +00:00
fbaron
afe67917d1 Add screenrecord and demote TaplTestsTrackpad#switchToOverview
Flag: NONE
Test: TaplTestsTrackpad#switchToOverview
Bug: 336606166
Change-Id: Id0e55f20db2a3cfcdb3e16909f76f3b902b5eeaf
2024-05-03 13:51:39 -07:00
Treehugger Robot
a3009176a9 Merge "Give bubble team owners on the correct launcher bubble dirs" into main 2024-05-02 19:47:20 +00:00
Liran Binyamin
841411d122 Give bubble team owners on the correct launcher bubble dirs
Whoops.

Flag: N/A
Test: treehugger
Bug: none
Change-Id: I25df1a161d94bd1acac976bc61217a59b3657074
2024-05-02 15:33:16 -04:00
Treehugger Robot
f7ed35fc87 Merge "Locking the All Apps view before asserting PS components." into main 2024-05-02 19:02:42 +00:00
Jagrut Desai
0fd34b783c Merge "Taskbar in Desktop Windowing Mode" into main 2024-05-01 22:49:48 +00:00
Helen Cheuk
e07207678b Merge "Fix performance issue caused by triggering hover focus animation accidentally" into main 2024-05-01 21:56:26 +00:00
Vinit Nayak
4cb712b8d6 Merge "Allow single root candidate for app pair launch for pip edge case" into main 2024-05-01 18:43:59 +00:00
Himanshu Gupta
3a0f024044 Locking the All Apps view before asserting PS components.
Bug: 334946529
Test: NA
Flag: NA
Change-Id: Id8895a993f61ee22fcef1ba562aaa8baf156d6d7
2024-05-01 18:52:32 +01:00
Jagrut Desai
2e8ca87c21 Taskbar in Desktop Windowing Mode
Test: presubmit
Bug: 330146462
Flag: NONE
Change-Id: Ib33f90704c3010df6a52e2a1c420960b11dbd0d4
2024-05-01 09:29:24 -07:00
helencheuk
ef31d0a35e Fix performance issue caused by triggering hover focus animation accidentally
HoverAnimator and FocusAnimator are triggered unexpectedly on state transition. When it is already disabled, it is disabled again when user swipes to All Apps and triggers animators. Add checking to not trigger animator when the new enable status is the same as the current one.

Bug: 333688227
Test: Ran v2/android-crystalball-eng/health/microbench/systemui/main/systemui-misc-1-jank-suite in ab/
Flag: N/A
Change-Id: I090490f1c78a3427225c24bc536e1767700ec6c3
2024-05-01 17:15:12 +01:00
Treehugger Robot
7f26505f04 Merge "Re-fetch DesktopVisibilityController when needed instead of just once" into main 2024-04-30 17:50:17 +00:00
Gustav Sennton
f74d8b7264 Re-fetch DesktopVisibilityController when needed instead of just once
When creating DesktopTaskbarRunningAppsController the Quickstep Launcher
might not be available, meaning we pass a null
DesktopVisibilityController to DesktopTaskbarRunningAppsController.
With this CL we refetch DesktopVisibilityController whenever needed.

Bug: 338035946
Test: manual, and DesktopTaskbarRunningAppsControllerTest
Flag: ACONFIG com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps DEVELOPMENT
Change-Id: I8b806e2d0addbf8fb5ab6a3d419a4691c445f223
2024-04-30 16:07:13 +00:00
Treehugger Robot
5a8e719b4c Merge "Remove references to FEATURE_PC and related Desktop classes in Launcher" into main 2024-04-30 15:33:30 +00:00
Liran Binyamin
85c50adb91 Merge "Animate the bubble bar to show new bubble" into main 2024-04-30 14:01:09 +00:00
Gustav Sennton
0eaf9ebdaa Remove references to FEATURE_PC and related Desktop classes in Launcher
Also clean up TaskbarRecentAppsController APIs

Flag: NA
Test: DesktopTaskbarRunningAppsControllerTest
Bug: 330551930
Change-Id: Ibd9c3d6aa1d5423b51a48ed0a972196752d5199a
2024-04-30 13:15:28 +00:00
Treehugger Robot
43f65905ab Merge "Replace Contextual Rotation Button with Floating Action Button" into main 2024-04-30 05:34:35 +00:00
Vinit Nayak
23b85ffdba Allow single root candidate for app pair launch for pip edge case
* Shell will launch single task if requested split apps have one of them
already in Pip
* Create a separate method to set animation for launching from the
appPair icon on workspace
* Reuse the animation method for launching an AppPair icon from taskbar
by specifying which windowing mode to look for if we're launching the
actual split pair vs just one in fullscreen

Bug: 323089902
Test: Launches fine visually
Change-Id: I415343a48e980afd7f4e511558d350cf15b97ca1
2024-04-29 18:52:58 -07:00
Sukesh Ram
1187fd817e Replace Contextual Rotation Button with Floating Action Button
When foldable is in 3 button, the rotation button is covered by the device’s camera cutout upon rotation.

This CL replaces Contextual Rotation Button with Floating Action Button for taskbar and navbar.

Flag: NONE
Test: Manually tested on Felix & panther.
Bug: 324070001
Change-Id: I8bd9acdeec8ade4c8183c42056bf67b1c825906c
2024-04-29 22:44:00 +00:00