Commit Graph

21539 Commits

Author SHA1 Message Date
Sukesh Ram 00cccdca4c [CD Taskbar] Fix - Make Taskbar Icons Launch
The base TaskbarUIController returns null for recents view.This makes icons on external display's taskbar unable to launch on external displays.

Test: m
Bug: 395954042
Flag: com.android.window.flags.enable_taskbar_connected_displays
Change-Id: I389a0fa102f63ab93b8a29de722cce0a446a2ea1
2025-02-14 12:46:28 -08:00
Treehugger Robot 6191d06684 Merge "launcher3: Improve SimpleBroadcastReceiver." into main 2025-02-12 18:19:35 -08:00
Treehugger Robot c2ef2629cd Merge "Notify with onIsInDesktopModeChanged()" into main 2025-02-12 16:27:38 -08:00
Treehugger Robot 6a039c4465 Merge "Implement isInDesktopMode*()" into main 2025-02-12 15:31:53 -08:00
Adnan Begovic 1b26bb4a74 launcher3: Improve SimpleBroadcastReceiver.
Unless explicitly annotated, parameters in java are by
  default nullable. There are a few cases where a null context
  may be passed to the unregisterReceiverSafely function
  of SimpleBroadcastReceiver.

  To mitigate misuses or incorrect contexts being passed for
  register vs unregister, keep the context as a strong reference
  in the constructor.

  Also added NonNull annotations for any public callsites to
  enforce behavior.

Bug: 395019017, 395966395
Flag: NONE - bug fixed
Test: manual - presubmit
Change-Id: Ie371fa45cadceaf51cf184b446df9123ef27c337
2025-02-12 13:43:34 -08:00
Ahmed Fakhry 2289c28f7f Notify with onIsInDesktopModeChanged()
This CL renamed `onDesktopVisibilityChanged()` to
`onIsInDesktopModeChanged()` and adds a parameter for the display ID
on which the change is taking place.

When the multiple desktops flags are disabled, the behavior should
remain exactly as it is today; `onIsInDesktopModeChanged()` is
triggered only for the `DEFAULT_DISPLAY`, and when the same old
conditions occur.

Bug: 394685645
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I31658b1b7932c787ebd430cee7e5c99bdd01e8c9
2025-02-12 21:18:54 +00:00
Ahmed Fakhry ad6fee6111 Implement isInDesktopMode*()
This CL does the following:
- Adds new methods `isInDesktopMode()` and
  `isInDesktopModeAndNotInOverview()` to `DesktopVisibilityController`.
- These two methods rely on the new multi-desks impl when the flags are
  enabled.
- Makes the existing `areDesktopTasksVisible()` and
  `areDesktopTasksVisibleAndNotInOverview()` private, and migrates all
  the usages to the new methods.
- The new methods uses the old methods if the flags are disabled.

A companion NexusLauncher CL is at ag/31601363.

Bug: 394182435
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I29ff38f984bfe2f68a120f84e1a75fa36b739258
2025-02-12 21:18:51 +00:00
Treehugger Robot 6c33393fe3 Merge "Revert "Refactor all uses of DisplayController singleton INSTANCE"" into main 2025-02-12 12:34:41 -08:00
Pat Manning f49e206f7e Merge "Add additional dampening to neighboring springs the further they are from dragged task." into main 2025-02-12 11:34:03 -08:00
Sunny Goyal c864281f3c Revert "Refactor all uses of DisplayController singleton INSTANCE"
Revert submission 31490053-DisplayControllRefactorForCD

Reason for revert: Leak is displayProvider

Reverted changes: /q/submissionid:31490053-DisplayControllRefactorForCD

Change-Id: Ib65150cdde765be009b5c4ce960f9fe025de9e60
2025-02-12 10:27:18 -08:00
Treehugger Robot 92513ecc7e Merge "Revert "Adding logs to debug test failures"" into main 2025-02-12 10:10:46 -08:00
Pat Manning 58fa42ad13 Add additional dampening to neighboring springs the further they are from dragged task.
Fix: 394513952
Test: TaskGridNavHelperTest
Test: TaplTestsQuickstep#testDismissCancel
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: Ib26a48256e9f14974aa01266c6950d15412683c3
2025-02-12 16:23:15 +00:00
Jordan Silva 55e3fcfb4e Revert "Adding logs to debug test failures"
This reverts commit 4151c1eb9a.

Reason for revert: These logs are no longer necessary.

Change-Id: Ic0c8e8ba148f0103ca8001dfec2b3dc031973dab
2025-02-12 05:56:24 -08:00
Treehugger Robot fb683dff89 Merge "Refactor all uses of DisplayController singleton INSTANCE" into main 2025-02-12 05:47:46 -08:00
Treehugger Robot a6a4b0921a Merge "Pass TransitionInfo from onTasksAppeared() to TransformParams" into main 2025-02-12 04:28:45 -08:00
Treehugger Robot efebae2ef4 Merge "Destroy RecentsDependencies in tests that initialise it." into main 2025-02-12 02:48:35 -08:00
Will Osborn 5f8b6206ce Refactor all uses of DisplayController singleton INSTANCE
And make DisplayController display id aware

Test: locally tested on Tangor
Flag: EXEMPT refactor
Bug: 392858637

Change-Id: I805cd7323c48a2988c95b9fda7f6cfe4c153860c
2025-02-12 10:46:34 +00:00
Gustav Sennton 57ce690d4e Pass TransitionInfo from onTasksAppeared() to TransformParams
Pass the TransitionInfo of the merging recents-transition through to
TransformParams to allow setting the corner radius of desktop tasks to
zero during the second part of a recents transition.

Bug: 378657004
Flag: com.android.window.flags.enable_desktop_recents_transitions_corners_bugfix
Test: swipe up from fullscreen app to overview, then tap desktop tile

Change-Id: I08f87aa1b9a2feca9e9f8bed2c55279e0ddc1edb
2025-02-12 10:19:14 +00:00
Uwais Ashraf d7007ef6e8 Destroy RecentsDependencies in tests that initialise it.
This prevents unaccounted for destructions which can lead to a leak in tests after these.

Bug: 395214062
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaplStartLauncherViaGestureTests.testStressPressHome
Change-Id: I5cf9214ea9344f7e9d79b61e87269fd6e2c05753
2025-02-12 00:49:00 -08:00
Treehugger Robot 1844db355f Merge "Disable All Apps keyboard shortcut during user setup." into main 2025-02-11 19:58:28 -08:00
Treehugger Robot 4be58b0d75 Merge "Adding logs to debug test failures" into main 2025-02-11 12:46:31 -08:00
Bill Yi 1a8e5c9097 Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2025-02-11 12:18:30 -08:00
Treehugger Robot 48e89f1273 Merge "Let DesktopTaskView.bind() use DesktopTask" into main 2025-02-11 10:52:58 -08:00
Jordan Silva 4151c1eb9a Adding logs to debug test failures
Bug: 395214062
Test: TaplStartLauncherViaGestureTests
Flag: com.android.launcher3.enable_overview_icon_menu
Change-Id: I4bc612bb5b928a251ee2cf80e14bb9408d1d415c
2025-02-11 10:45:39 -08:00
Priyanka Advani (xWF) 77a5341e53 Merge "Revert "Moving TisBinder to its own class"" into main 2025-02-11 10:17:13 -08:00
Treehugger Robot 0703ed2931 Merge "[CD Taskbar] Force 3 Button Mode on External Display by Default" into main 2025-02-11 10:04:22 -08:00
ELIYAZ MOMIN (xWF) 31d6be8891 Revert "Moving TisBinder to its own class"
This reverts commit ce9ad064d6.

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

Change-Id: I12d1eb66ae03e2638a503c103d0b1fa8a863b6b5
2025-02-11 08:18:42 -08:00
Vinit Nayak a4b1d1b8c7 Merge "Reset leashes before starting taskbar app pair launch animation" into main 2025-02-11 07:26:22 -08:00
Sunny Goyal ce9ad064d6 Moving TisBinder to its own class
> Using callback patter for various change events instead of routing it
  via  TIS

Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I95577d6a1c17103cb947ef1200c1c22b68fd1d9c
2025-02-11 00:21:51 -08:00
Anushree Ganjam 743786b66c Merge "Move ContextualSearchHapticManager to Dagger" into main 2025-02-10 19:54:06 -08:00
Treehugger Robot f37f0491b7 Merge "[CD Taskbar] Fix Window Context & Enable External Context adding" into main 2025-02-10 18:33:15 -08:00
Anushree Ganjam 6fada1c0f5 Move ContextualSearchHapticManager to Dagger
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: Id33ef349dc8d793ab7c43d6f420e224a8de515af
2025-02-10 17:17:52 -08:00
Sukesh Ram 0772f1f730 [CD Taskbar] Force 3 Button Mode on External Display by Default
Force 3 Button Mode on External Display by Default.

Test: m
Bug: 383087890
Flag: com.android.window.flags.enable_taskbar_connected_displays
Change-Id: I197be57f2abbaa533fd165d74f14a13774de5bb3
2025-02-10 17:02:50 -08:00
Treehugger Robot c913d5317a Merge "Move RecentsModel to Dagger." into main 2025-02-10 16:25:50 -08:00
Sukesh Ram 47f0f6dc8e [CD Taskbar] Fix Window Context & Enable External Context adding
Use variable constrained within TaskbarManager for primary displays and add external window contexts as new displays are added. Ensures the lifecycle of window context map isn't tied to the required instances of primaryWindowContext.

Test: m
Bug: 395702003
Bug: 393984037
Bug: 391653300
Flag: com.android.window.flags.enable_taskbar_connected_displays
Change-Id: Idc461b8e6e249060feffac703dff1bf7d5974512
2025-02-10 16:25:16 -08:00
Treehugger Robot c83abcadb7 Merge "Add spring animations for neighboring tasks on dismiss cancel" into main 2025-02-10 15:32:45 -08:00
Hongwei Wang bb3006dfd9 Merge "Update the comment on detach" into main 2025-02-10 15:01:54 -08:00
Bill Yi da1ea63479 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I16e75a8d6f9f882a33059d5d658ac010cadd484d
2025-02-10 13:39:45 -08:00
Pat Manning a82868d7df Add spring animations for neighboring tasks on dismiss cancel
Fix: 389083088
Test: TaplTestsQuickstep#testDismissCancel
Test: TaskGridNavHelperTest
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: I1240519eea499b5839d64e537588bde3cb0a424b
2025-02-10 13:24:19 -08:00
Vinit Nayak ba25fd9523 Reset leashes before starting taskbar app pair launch animation
* This can be launched from desktop windowing, which means the
surfaces of the apps can start in any position/crop.
* Default the leash tasks to start at 0, 0 and let their parent
surfaces determine correct starting position
* Set the stage roots to start at the correct end bounds

Test: Launched from workspace, DW, taskbar
Fixes: 372837890
Flag: EXEMPT bugfix
Change-Id: Ie2cd012e117f645794e5119485cc50d8e1dd9cdf
2025-02-10 13:08:31 -08:00
minch 96308796a6 Let DesktopTaskView.bind() use DesktopTask
Flag: EXEMPT refactor
Fix: 395167255
Test: m

Change-Id: Ia072b4196ce1dc70d8f53c05ee4f793d853a43f7
2025-02-10 20:19:36 +00:00
Treehugger Robot 4c1679fe4f Merge "Re-use existing method to get split root" into main 2025-02-10 11:40:09 -08:00
Anushree Ganjam d158433769 Move RecentsModel to Dagger.
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I0d459ee3fc012e8e371035071f1b32eb2483cdc5
2025-02-10 10:07:20 -08:00
Uwais Ashraf 3dd744a8bd Merge "Updates the app icon based on the TaskData" into main 2025-02-10 07:36:27 -08:00
Jordan Silva e316ea5f85 Merge "Fix empty thumbnail/icon by re-fetching data from cache" into main 2025-02-10 02:56:34 -08:00
Jordan Silva 687862c4a9 Updates the app icon based on the TaskData
- Introduces `setIconState` to manage icon and text updates based on `TaskData`.
- Refactors IconAppChip to use the icon and title provided by TaskViewModel.

Fix: 388486032
Fix: 388490814
Flag: com.android.launcher3.enable_overview_icon_menu
Test: OverviewImageTest
Change-Id: Ibf469743ebc767054eaaabe1891750b7f9de827a
2025-02-10 02:24:52 -08:00
Treehugger Robot bd93d0d4d3 Merge changes If104c67d,Id59fb236 into main
* changes:
  [CD][Alt+Tab] Show apps from all desktops for KQS on CD
  [CD][Alt+Tab] Implement skeleton code for KQS on CD
2025-02-09 13:07:46 -08:00
Ajinkya Chalke 3ef91e087d [CD][Alt+Tab] Show apps from all desktops for KQS on CD
- Even without multiple desktops, apps that are moved to connected display show up in separate desktop task.
- Further changes may be required to launch a desktop after multiple desktops is implemented.

Bug: 382762871
Flag: com.android.launcher3.enable_alt_tab_kqs_on_connected_displays
Test: manually built and run the CUJ
Change-Id: If104c67d95a1ec3de404998b06352edfa02c0f09
2025-02-09 19:06:54 +00:00
Ajinkya Chalke 4078347cbf [CD][Alt+Tab] Implement skeleton code for KQS on CD
- This change will not render KQS on connected display (CD) even with the flag ON as taskbars are not yet created for connected displays.

Bug: 382762871
Change-Id: Id59fb23630aaf0e74c35818f2a4ca56e5ef2e7bb
Flag: com.android.launcher3.enable_alt_tab_kqs_on_connected_displays
Test: manually built and run the CUJ
2025-02-09 19:06:45 +00:00
Jordan Silva 9f56a1f793 Fix empty thumbnail/icon by re-fetching data from cache
Request data for all tasks in `TasksRepository` to prevent stale data. This ensures thumbnails and icons are not replaced and become null due to race conditions. The updated code requests data for all tasks, leveraging the cache for immediate returns.

Fix: 394384233
Flag: com.android.launcher3.enable_overview_icon_menu
Test: OverviewImageTest
Change-Id: I356de13b5e9671f50bb1c2680b54b78478fadc28
2025-02-09 05:29:45 -08:00