Commit Graph

13382 Commits

Author SHA1 Message Date
minch d00382a09d Hook up mAddDesktopButton with the API createDesktop
Add the `setOnClickListener` for the `mAddDesktopButton`,
it will call the `createDesktop` API inside SystemUiProxy
to create a new Desk inside the display that the button
resides in.

Flag: com.android.window.flags.enable_multiple_desktops_frontend
      com.android.window.flags.enable_multiple_desktops_backend
Fix: 391917345
Test: Manual, make sure the callback function `createDesk` is called
      after clicking the button. No real desk will be created
      for now, as the backend hasn't been implemented yet.
Change-Id: I70417a1ce0963b9b3c109c3f3dffaab808212d23
2025-01-27 21:35:41 +00:00
Treehugger Robot b22158206b Merge "Introduce SingleTask and SplitTask" into main 2025-01-24 02:59:37 -08:00
Treehugger Robot 9bc36997c4 Merge "[CD Taskbar] [CD Taskbar] Refactor TaskbarManager dump" into main 2025-01-23 18:37:03 -08:00
Treehugger Robot 446270599c Merge "Add debugging logs to understand why taskbar root layout would be null" into main 2025-01-23 18:28:18 -08:00
Mykola Podolian 10f4747b69 Merge "IPC for app icons drag events over the Bubble Bar" into main 2025-01-23 17:52:50 -08:00
Sukesh Ram 28b7077a38 Add debugging logs to understand why taskbar root layout would be null
Add debugging logs to understand why taskbar root layout would be null.

Flag: EXEMPT not adding new behavior
Bug: 382378283
Test: Manual
Change-Id: I1140360274667a6c3766f03e1f5f1592c09e13e1
2025-01-23 16:05:07 -08:00
Ahmed Fakhry f87e44376b Introduce SingleTask and SplitTask
See go/refactor-group-task for details. This CL introduces `SingleTask`
and `SplitTask` and makes `GroupTask` abstract.

Bug: 388593902
Test: m
Flag: EXEMPT pure refactor with no behavior change.
Change-Id: I96d0eb0600420ce5cb2fff30ed9d766224b6961e
2025-01-23 23:48:01 +00:00
Cosmin Băieș c48cc53bc2 Merge "Clarify state names for IME Switcher button" into main 2025-01-23 15:42:45 -08:00
Sukesh Ram 7d916904de [CD Taskbar] [CD Taskbar] Refactor TaskbarManager dump
Update debugging logs for TaskbarManager to be display specific.

Flag: EXEMPT not adding new behavior
Bug: 390004132
Test: Manual
Change-Id: I0222e3bce94bee410b3572d1bc820cc71a2c1a68
2025-01-23 14:28:00 -08:00
Jagrut Desai 7efe9257ce Merge "Fix Taskbar existing app launch in DW" into main 2025-01-23 13:49:20 -08:00
Uwais Ashraf c1f65d0d7a Merge "Only cancel CoroutineScope of TaskThumbnailView instead of removing from RV." into main 2025-01-23 12:16:50 -08:00
mpodolian 5d904e0f67 IPC for app icons drag events over the Bubble Bar
Added an IPC call to inform the Bubble Bar in the launcher process
of drag events from the shell.

Bug: 388894910
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Check that events from the shell process successfully
reach the launcher process.

Change-Id: I01615911ce7e4250138aedaa5823f639b9163ff0
2025-01-23 11:10:18 -08:00
Treehugger Robot 9bd2d14fa4 Merge "Add SysUiProxy multiple desktops APIs" into main 2025-01-23 11:08:50 -08:00
Treehugger Robot ed5910ad52 Merge "Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."" into main 2025-01-23 11:02:36 -08:00
Treehugger Robot 4e09250fd5 Merge "Convert TaskViewTouchController to Kotlin." into main 2025-01-23 09:51:04 -08:00
Jagrut Desai c900bda8da Fix Taskbar existing app launch in DW
The issue: we were blocking the opening of existing app in when multi-instance flag was tunred on.

The Solution:  we don't actually need to do this since, the multiple taskbar icons of the same app are blocked pm TaskbarRecentsAppsController

Test: Manual, Presubmit
Bug: 391143101
Flag: EXEMPT bugfix
Change-Id: Ic2aa7cca4fd18d9b8cf48a2778c6e666241a4f7f
2025-01-23 09:29:36 -08:00
Uwais Ashraf b7a66372ff Only cancel CoroutineScope of TaskThumbnailView instead of removing from RV.
Removing TVs from RV was causing failures of CUJs (only in tests) when enabling TTV flag.

Bug: 390156722
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaplTestsQuickstep.testOverview
Test: TaplTestsKeyboardQuickSwitch.testLaunchOverviewTask_fromHomeAllApps
Change-Id: I0aae99891941c04b543d1e29db9d6d87bc89ed8e
2025-01-23 16:56:13 +00:00
Ahmed Fakhry 1d112be382 Add SysUiProxy multiple desktops APIs
Add two new APIs for multiple desktops:
- `createDesk()`.
- `activateDesk()`.
Currently these APIs are not hooked up yet. This will be done in
follow-up CLs.

Also removes the unused `getVisibleTaskCount()` API.

Bug: 390715986
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Change-Id: I363f0e520f649572156047ebcd4ed6e542d77dc1
2025-01-23 16:41:30 +00:00
Artsiom Mitrokhin 8519be8f3a Merge "Use conditional stroke color for taskbak overflow entrypoint" into main 2025-01-23 08:31:28 -08:00
Treehugger Robot 86864f95c3 Merge "AllApps tray icon tap: use showDesktopApp() for existing Desktop tasks" into main 2025-01-23 03:34:55 -08:00
Pat Manning b426809ced Convert TaskViewTouchController to Kotlin.
Flag the change to use the previous class.

Fix: 391107339
Test: Manual.
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: Icf139fc0d6744766da548f2137597b2b020863c1
2025-01-23 10:57:17 +00:00
Treehugger Robot d32348bddb Merge "Show desktop tasks when taskbar is pinned on home" into main 2025-01-23 02:10:17 -08:00
Gustav Sennton 1427068342 AllApps tray icon tap: use showDesktopApp() for existing Desktop tasks
When tapping an icon in the AllApps tray, before this CL, we would use
the WM Shell API startLaunchIntentTransition() to launch a task for that
app icon. However, this would break the window limit logic since in WM
Shell (startLaunchIntentTransition()) we think we're launching a new
task, when in fact we're just moving an existing one to the front.
With this CL we instead reuse the showDesktopApp() API whenever the app
we're trying to launch has an already visible / minimized Desktop task.

Bug: 391365151
Test: launch visible Desktop app from AllApps - doesn't overtrigger
window limit
Flag: com.android.window.flags.enable_desktop_app_launch_transitions_bugfix

Change-Id: Ia3638012226fe28c853ec6cfd0523a8fb23b8961
2025-01-23 00:46:08 -08:00
Sunny Goyal a5fef475a5 Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."
Revert submission 31416515-revert-31332401-recents-device-state-LXBUANUQFL

Reason for revert: Fixing build breakage and resubmitting

Reverted changes: /q/submissionid:31416515-revert-31332401-recents-device-state-LXBUANUQFL

Change-Id: I3b89356df57f1e7ff1a9e364c0d766578e23798c
2025-01-22 18:31:06 -08:00
Toni Barzic f817372651 Show desktop tasks when taskbar is pinned on home
Updates taskbar and KQS to show (running) desktop tasks when taskbar is
shown on the home screen - adds `shouldShowDesktopTasksInTaskbar` method
to TaskbarDesktopModeController to be used instead of
`areDesktopTasksVisible*()` to determine whether to show desktop tasks
in the taskbar. The method, in addition to desktop tasks visibility,
also considers whether taskbar should be shown on the home screen, and
whether current launcher state is home.

The launcher state is fetched from `TaskbarStashController`, which
already keeps track of this state. This is likely not ideal, but can be
removed in the long term - see http://b/390665752.

Furthermore, updates ReventsModel login not to always filter out desktop
tasks with no non-minimized tasks (which is currently expected behavior
in overview) in `getTasks()`. The filtering is now done by the filter
passed to `getTasks()` method, instead of when processing tasks in the
background. The filter used by default is updated to filter out such
desktop tasks, but callsites from `KeyboardQuickSwitchController` and
`TaskbarRecentAppsController` are updated to use an empty filter, so
they can display desktop tasks when they're all minimized.

Bug: 376711722
Bug: 390665160
Test: Manual on desktop device - verify that taskbar and KQS when shown
on home screen display desktop tasks, including the case all tasks are
minimized.
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays

Change-Id: Iabc22e20bf64aa9a826b4a5952f1edc6ea639cdc
2025-01-22 22:36:02 +00:00
Liana Kazanova (xWF) 9b0a007ae3 Merge "Revert "Migrating RecentsAnimationDeviceState and dependent obje..."" into main 2025-01-22 14:05:04 -08:00
Liana Kazanova (xWF) fa30e3fc0e Revert "Migrating RecentsAnimationDeviceState and dependent obje..."
Revert submission 31332401-recents-device-state

Reason for revert: DroidMonitor: Potential culprit for http://b/391684419 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:31332401-recents-device-state

Change-Id: I3986328ee3aa8ebb822f7ef05b9f80ef68872aef
2025-01-22 13:50:08 -08:00
Vinay Joglekar 75a07a3e2d Merge "Consume callback sent from shell when overview task is entered desktop mode from desktop menu" into main 2025-01-22 13:32:46 -08:00
Treehugger Robot 966e15e7c8 Merge "Remove TEMP_PARAMS and instead create a new FullscreenDrawParams in constructor." into main 2025-01-22 12:22:52 -08:00
Anushree Ganjam efc40ac203 Remove TEMP_PARAMS and instead create a new FullscreenDrawParams in constructor.
Bug: 361850561
Test: Manual
Flag: EXEMPT Dagger
Change-Id: I5d2c289e58ff6151f651a5a6ec6bd8f567cb93d1
2025-01-22 10:16:40 -08:00
Treehugger Robot cfe0dbf1cd Merge "Migrating RecentsAnimationDeviceState and dependent objects to Dagger" into main 2025-01-22 09:34:25 -08:00
Mykola Podolian 1b6238e90a Merge "Fixed Bubble Bar Cutoff After Unlock" into main 2025-01-22 09:22:55 -08:00
Gustav Sennton 826cbf9c81 Merge "Pass empty bundle instead of null to startLaunchIntentTransition()" into main 2025-01-22 01:03:11 -08:00
Sunny Goyal d7bfa76bcc Migrating RecentsAnimationDeviceState and dependent objects to Dagger
Bug: 361850561
Flag: EXEMPT dagger
Test: Presubmit

Change-Id: I2c45ec49a913abb0532e83b09e797012e06eb8c4
2025-01-21 23:53:02 -08:00
Treehugger Robot e3220bec92 Merge "Fix failing tests that are blocking OOM investigation" into main 2025-01-21 23:19:37 -08:00
Treehugger Robot bd3228ef8e Merge "Update usages of icon shapes in Launcher" into main 2025-01-21 20:51:35 -08:00
Federico Baron 0a9a5dc466 Fix failing tests that are blocking OOM investigation
Flag: TEST_ONLY
Bug: 388258969
Test: InstallSessionTrackerTest InstallSessionHelperTest
Change-Id: I539c51c6a253ff0b64113e73764979c5e188bbbb
2025-01-21 19:44:50 -08:00
Charlie Anderson ad8b2ec13b Update usages of icon shapes in Launcher
Bug: 387546051
Test: manual
Flag: com.android.launcher3.enable_launcher_icon_shapes
Change-Id: I33725259b3480f6e3a2976c227ccdffcfd7d6f83
2025-01-22 02:37:08 +00:00
Treehugger Robot bfd58c8c00 Merge "Remove some usages of GroupTask.task1" into main 2025-01-21 17:04:01 -08:00
Treehugger Robot e166210d7a Merge "Update translationX calculation of the AddDesktopButton" into main 2025-01-21 16:29:22 -08:00
mpodolian adeaf908ec Fixed Bubble Bar Cutoff After Unlock
The Bubble Bar was being cut off due to the taskbar window height.
Modified the BubbleBarViewController to rely on the bubble count to
compute the maximum height, rather than the BubbleBarView visibility.

Test: Manually tested. Expanded the Bubble Bar in 3-button navigation.
Pressed the power button to lock the screen. Unlocked the screen.
Fixes: 391358222
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I1923fc84df403abea022ba84f23fc66be7dbe7aa
2025-01-21 14:27:19 -08:00
minch 51ae37fd6a Update translationX calculation of the AddDesktopButton
Shift the `mAddDesktopButton` by the `largeTaskWidthAndSpacing`
if the focused task is inserted between the first TaskView
and the `mAddDesktopButton`.

Flag: com.android.window.flags.enable_multiple_desktops_frontend
      com.android.window.flags.enable_multiple_desktops_backend
Fix: 389209772
Test: Manual
Change-Id: Ideafe28496ccb85e1c682606be94c5ef5c4eafdb
2025-01-21 13:54:05 -08:00
Vinit Nayak e7753eb796 Merge "Remove and cleanup AppPairs flag" into main 2025-01-21 12:20:55 -08:00
Gustav Sennton 4b0a5bf3e2 Pass empty bundle instead of null to startLaunchIntentTransition()
Bug: 391309665
Test: manual; launch app from AllApps tray when in Desktop Mode
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ic31ed43f6f2de630b2d235028ebd9643a8a8cf49
2025-01-21 17:23:39 +00:00
Treehugger Robot 399ca5a6f4 Merge "Add kill switch for ViewPool.initPool." into main 2025-01-21 02:22:21 -08:00
Treehugger Robot fd726c7ce8 Merge "Add logging for RDeps lifecycle and ViewPool.initPool to help debugging." into main 2025-01-21 02:20:38 -08:00
Uwais Ashraf 6322c00b70 Add kill switch for ViewPool.initPool.
This fixes an issue where, in fast E2E tests, the test can complete before initPool is completed. This results in the ViewPool continuing to create TaskViews and therefore TaskThumbnailViews after RecentsDeps is destroyed. Doing this causes a crash.

Stopping the ViewPool.initPool thread before destroying RecentsDeps fixes this.

Bug: 390156722
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: fast E2E tests in presubmit e.g. AllAppsImageTest
Change-Id: I0f8801ca75cda383df8ed96077cf1b7178771cb6
2025-01-21 08:06:23 +00:00
Uwais Ashraf e545182223 Add logging for RDeps lifecycle and ViewPool.initPool to help debugging.
Bug: 390156722
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: none - logging only change
Change-Id: I657194e79023598c17ca8b1885f98457f3d773a9
2025-01-21 08:03:54 +00:00
Schneider Victor-Tulias f8fa42be84 Fix test Dagger initialization deadlock in RecentsDisplayModel
WallpaperColorHints is a MainThreadInitializedObject that was causing a deadlock in RecentsDisplayModel initialization. Converting WallpaperColorHints to a dagger singleton.

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/post submit
Change-Id: Ib5b4eab27b4e28baf1208915fa7cf6dbd36bc1f5
2025-01-20 08:08:40 -08:00
Treehugger Robot 92a6a89f49 Merge "Provide reason for moving task to front." into main 2025-01-20 01:50:50 -08:00