Commit Graph

20478 Commits

Author SHA1 Message Date
mpodolian
f230eee2ff Updated bubble bar position to be center aligned with the hotseat
Added a method to the device profile to calculate the vertical center of
the hotseat icons. Simplified the logic for positioning the bubble bar.

Test: TransientBubbleStashControllerTest
Test: PersistentBubbleStashControllerTest
Test: Visual. Go to home page, check that bubble bar is vertically
center aligned with the hotseat
Bug: 345491493
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I52f1b94de79f6c912f43a88fcc5c884e20e56310
2024-10-23 14:44:40 -07:00
Uwais Ashraf
bea43b0c03 Merge changes I54ea7a71,Ifd9c54fd into main
* changes:
  Set task properties to prevent the task being null. This behaviour is expected by existing callers and was likely broken by ag/28151977
  TaskRepository performance improvement
2024-10-21 22:40:51 +00:00
Treehugger Robot
80d18e0138 Merge "Fixing deadlock in dagger singletons" into main 2024-10-21 22:29:57 +00:00
Treehugger Robot
e6e9cd23c5 Merge "Don't enforce max tasks in KeyboardQuickSwitchView" into main 2024-10-21 20:26:27 +00:00
Sunny Goyal
0b7f4cf1e2 Fixing deadlock in dagger singletons
Bug: 373557167
Flag: EXEMPT dagger
Test: atest DaggerSingletonDeadlockTest

Change-Id: I2304237bfd818c99b82bbfceea8a81ddb136b5a1
2024-10-21 18:09:37 +00:00
Treehugger Robot
d4a04f9de5 Merge "Update removeTaskInternal Desktop case" into main 2024-10-21 16:21:13 +00:00
Uwais Ashraf
36402adaa6 Set task properties to prevent the task being null. This behaviour is expected by existing callers and was likely broken by ag/28151977
Fix: 374339873
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: manual
Change-Id: I54ea7a714174375eb0d7481cab246fbbe9133fb4
2024-10-21 14:44:23 +00:00
Uwais Ashraf
62495bbda7 TaskRepository performance improvement
This CL improves Overview's performance by preventing multiple thumbnail and icon fetches for visible tasks. It introduces manual cancellation and removal of tasks that are no longer visible to prevent fetching and listening to changes in such tasks.
- Renamed 'augmentedTasks' to 'tasks' and updated it to be a MutableStateFlow with a map of Task Id and Task.
- When a new task becomes visible, the task is added to a list of requests along with a Job that fetches the Thumbnail and Icon. Additionally, 'taskVisualChangesDelegated' is added and removed for that task per request.
- When a task becomes invisible, the Job is canceled to prevent fetching the Thumbnail and Icon. The thumbnail and icon are cleared from the list of tasks, and the listener from 'taskVisualChangesDelegated' is unregistered.
- The list of tasks is updated when the list of visible tasks changes and a new thumbnail or icon is updated. This list is also updated when a force fresh from getAllTaskData is requested.

Fix: 373361888
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: Ifd9c54fdfcb85463c043c121fb829dec3e9faedc
2024-10-21 14:34:12 +00:00
Jordan Silva
9dbae036d3 Merge "Fix crash when initiating split with 5 instances of Chrome in Desktop Windowing" into main 2024-10-21 13:55:56 +00:00
Orhan Uysal
ea49585931 Update removeTaskInternal Desktop case
- Pass TaskView directly to removeTaskInternal
- Update the bug id

Bug: 370757235
Test: Manual
Flag: EXEMPT No-op
Change-Id: I0ad0d42541221d1ce6e27c708f469e5c0757b8ef
2024-10-21 13:53:35 +00:00
Jordan Silva
ca034f122a Fix crash when initiating split with 5 instances of Chrome in Desktop Windowing
When opening 5 instances of Chrome in Desktop Windowing, navigating back to Overview and trying to split a new Chrome instance from the Taskbar resulted in a crash.

This happened because SplitSelectStateController searches for the last active task of the app chosen to be in split. Then, it returns its taskId that is used in RecentsView to find the TaskView to be animated to split.

However, after the 5th Chrome instance in opened in Desktop Windowing, the last active taskId is no longer visible in Overview or Desktop Windowing. Then, RecentsView won't find any TaskView with that taskId and mSplitHiddenTaskView will be null. This will result in a crash because we have some if-else conditions assuming that is not null because of mSplitSelectStateController has a task to be dismissed during the split animation.

More info in the bug report.

Bug: 372400577
Flag: EXEMPT bugfix
Test: Manual. Steps in the bug report.
Test: Manual. Open 5 windows of Chrome in Desktop Windowing. Go Home. Open a Fullscreen App. Go Overview. Split a new Chrome instance from the Taskbar.
Change-Id: I0f3757e898b606b4e0a180f43c73f1e2d887e996
2024-10-21 13:33:41 +00:00
Jordan Silva
4a08fcc3d9 Merge "Revert "Update OverviewCommandHelper to use Executors.MAIN to reduce the percentage of missed frames"" into main 2024-10-21 13:18:28 +00:00
Alex Chau
5d40236037 Merge "Update comments on createAdjacentPageAnimForTaskLaunch" into main 2024-10-21 12:46:23 +00:00
Liran Binyamin
2c908e2c10 Merge "Wire up flyout to new bubble animation" into main 2024-10-21 12:20:23 +00:00
Jordan Silva
3a4d67b965 Revert "Update OverviewCommandHelper to use Executors.MAIN to reduce the percentage of missed frames"
This CL didn't improve the performance metrics significantly enough to use Executors.MAIN. b/366077002#comment12

This reverts commit 7eae20bcb1.
Reason for revert: 366077002

Change-Id: Ic92b83a65aef7f8cd5c00110fb1ab7343d4b12b6
2024-10-21 10:21:56 +00:00
Alex Chau
758bbeb6eb Update comments on createAdjacentPageAnimForTaskLaunch
- Added comments to clarify pivot/drawBelowRecents is only needed if live tile isn't launching
- Otherwise TaskViewUtils.createRecentsWindowAnimator already take cares of the scrol offset and drawsBelowRecents.

Fix: 361744056
Test: manual
Flag: EXEMPT refactor
Change-Id: I10e7d72daaa13787a9fd19524f7f45c4b0d31642
2024-10-21 10:52:29 +01:00
Toni Barzic
41b48b31ab Don't enforce max tasks in KeyboardQuickSwitchView
The number of tasks to show should not be limited when KQS gets shown in
desktop windowing - instead of enforcing the limit on tasks shown in the
KQS view itself, trust the KeyboardQuickSwitchController to pass in
correctly sized list of tasks to show (KeyboardQuickSwitchController
does limit the task list size passed to the view).

Bug: 374329990
Test: Open 6+ tasks in fullscreen, and in desktop windowing. Verify that
the number of tasks shown in KQS is limited to 6 when shown from a
fullscreen app context, and not limited when shown when in desktop
windowing.
Flag: EXEMPT  bugfix

Change-Id: I245d05239f2fc025ef40085aff4bece694e0f76c
2024-10-18 23:53:35 +00:00
Treehugger Robot
11a4676c92 Merge "Make mAllAppsButtonContainer not Nullable" into main 2024-10-18 20:51:23 +00:00
Jagrut Desai
ed5edb7dee Merge "Enable TaskbarEduTooltipControllerTest" into main 2024-10-18 18:31:54 +00:00
Schneider Victor-tulias
65fb226f29 Merge "Update RecentsWindowSwipeHandler to animate home alpha properly" into main 2024-10-18 18:21:20 +00:00
Toni Barzic
6957a037fe Make mAllAppsButtonContainer not Nullable
Bug: None
Test: None
Flag: EXEMPT cleanup
Change-Id: Iebf2eff8e9657e5960375f80a0f5bc4d46dcead3
2024-10-18 17:14:01 +00:00
Winson Chung
fd91b7be4e Merge "Remove user TIS unlocked runnable when a TIS instance is destroyed" into main 2024-10-18 17:03:55 +00:00
Artsiom Mitrokhin
a182675128 Merge "Open taskbar pinning popup view from anywhere" into main 2024-10-18 16:25:15 +00:00
Jagrut Desai
c1227779a6 Enable TaskbarEduTooltipControllerTest
Test: Presubmit
Bug: 374312336
Flag: EXEMPT enabling ignored test
Change-Id: I606ab909d5d9b366674492855a940a0f6cc77a86
2024-10-18 09:20:41 -07:00
Liran Binyamin
12f77ba713 Wire up flyout to new bubble animation
When a bubble is created or updated we now animate the flyout view
as part of the bar animation.

Note that the flyout is not clickable yet, and that we're not yet
handling bubble notifications interrupting each other.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarViewAnimatorTest
Test: atest BubbleBarFlyoutControllerTest
Test: manual
       - verify flyout view is showing when creating bubble
          - on home
          - in app
          - when bubble bar is empty
Change-Id: I315e46c89a4d20aaaa22972f0d71290a63481d9d
2024-10-18 08:00:05 -04:00
Treehugger Robot
fb172faa7f Merge "Fix split selection translation when focused task is selected for splitscreen" into main 2024-10-18 09:26:05 +00:00
Winson Chung
a9355d4dba Remove user TIS unlocked runnable when a TIS instance is destroyed
- If the TIS instance is destroyed, then we should remove any queued
  user-unlocked runnables to ensure that they do not attempt to run
  again

Flag: EXEMPT bugfix
Bug: 373671447
Test: atest NexusLauncherTests
Change-Id: I8ca3cdfa6f849bce5d347f14038e1ebd6bc6ff06
2024-10-18 04:26:37 +00:00
Treehugger Robot
4d2af8ec6c Merge "Move ContextualSearchHapticManager to MainThreadInitialiedObject" into main 2024-10-18 04:08:21 +00:00
Mykola Podolian
42e6127c2b Merge "Refactored hotseat translation X logic" into main 2024-10-17 23:23:08 +00:00
Sunny Goyal
7966dd785c Move ContextualSearchHapticManager to MainThreadInitialiedObject
It depends on VibratorWrapper, ContextualSearchStateManager and LockedUserState
which needs to be migrated first

Bug: 373557167
Test: Manual (will merge automated tests once all culprits are resolved)
Flag: EXEMPT dagger
Change-Id: Ib078b89a541c179d105ddf8706edc94bcaf6066b
2024-10-17 15:38:11 -07:00
Sunny Goyal
4eaf3df1fe Merge "Moving PluginManager to dagger" into main 2024-10-17 21:47:28 +00:00
Jagrut Desai
0e7ca6c650 Merge "Fix Hotseat stashing on user going to dream" into main 2024-10-17 20:52:31 +00:00
Schneider Victor-tulias
892ad69191 Merge "Improve test isolation in AbstractLauncherUiTests" into main 2024-10-17 19:22:37 +00:00
Artsiom Mitrokhin
ab7220c342 Open taskbar pinning popup view from anywhere
This CL handles both long-press and right-click events anywhere on
pinned taskbar and opens `TaskbarDividerPopupView` correctly
positioning it above the event coordinates.

Bug: 297325541
Flag: com.android.launcher3.show_taskbar_pinning_popup_from_anywhere
Test: manual for now, flip the flag, long-click or right-click
      on empty space on the pinned taskbar
Change-Id: I1849db14f65bf9478ed9f4fd39f95d08987baf8d
2024-10-17 15:00:40 -04:00
Sunny Goyal
9cd3154952 Moving PluginManager to dagger
Multiple singletons depend on Plugin which can cause deadlock
if PluginManager is initialized on main thread

Test: presubmit
Bug: 361850561
Bug: 373557167
Flag: EXEMPT dagger
Change-Id: I79f17ac6b78a2ce60df2d27a6e794b9e4eba1b51
2024-10-17 11:48:38 -07:00
Treehugger Robot
fc4420dc3e Merge "Add animation runner for alt-tab desktop app launch" into main 2024-10-17 18:48:31 +00:00
Treehugger Robot
5572968c0b Merge "Moving SettingsChangeLogger back to MainThreadInitializedObject" into main 2024-10-17 18:33:04 +00:00
Jagrut Desai
36bbc4f18f Fix Hotseat stashing on user going to dream
This cl simply delays the taskbar icon alignment animation and stashing animation by duration of dream animation and plays it off screen with 0 duration.

Test: Manual, Presubmit
Bug: 333989177
Flag: EXEMPT bugfix
Change-Id: I35d26b0cf895f9990fcfd73ceebc15b0f9886476
2024-10-17 09:59:26 -07:00
Sunny Goyal
3c873420e8 Moving SettingsChangeLogger back to MainThreadInitializedObject
SettingsChangeLogger depends on DisplayController which needs to be migrated
first. Otherwise it introduces a deadlock when initializing DisplayController
in constructor

Bug: 373557167
Test: Manual (will merge automated tests once all culprits are resolved)
Flag: EXEMPT dagger
Change-Id: I2386812693e470bcee1a64d5cec49c03fd36f230
2024-10-17 09:51:59 -07:00
mpodolian
1d4e75c777 Refactored hotseat translation X logic
Made retrieval of the hotseat translation X easier to use.

Test: Manual. Set the navigation mode to 3-button. Moved the bubble bar
from one side to the other. Switched the navigation mode to gestures.
Moved the bubble bar from one side to the other again.
Bug: 373422448
Flag: EXEMPT refactoring

Change-Id: Ie69f1ecf178244008e5c752882c4b91a30928756
2024-10-17 09:46:47 -07:00
Jordan Silva
ab23dc8648 Fix split selection translation when focused task is selected for splitscreen
After enabling large tile for desktop windowing, some animations and translations for dismiss were changed. The changes involved to translate the tasks when a large tile (i.e., focused task and desktop window) are dismissed and no other focusedTaskView is selected to replace the previous one. However, when we split a focused task, we don't replace it by another task in the grid. And also triggers the createTaskDismissAnimation, entering the same condition described before (focused task dismissed, nextFocusedTaskView = null), causing the weird and broken animation for split.

To fix this, we skip this animation when is dismissing a task for split selection.

Fix: 374104009
Flag: com.android.launcher3.enable_large_desktop_windowing_tile
Test: Manual. With flag enabled and multiple apps opened in Overview, split the focused task.
Change-Id: Ib79ad5abc0660a0b654f23b22b90f9889c6f7806
2024-10-17 17:41:36 +01:00
Treehugger Robot
b7c471f517 Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2024-10-17 16:19:23 +00:00
Schneider Victor-Tulias
ecaf00a464 Update RecentsWindowSwipeHandler to animate home alpha properly
Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 366022874
Test: Attempted gesture from home and launched app
Change-Id: I553ad200b291f7765bbb026c314ea6652a3b5542
2024-10-17 15:41:01 +00:00
Sam Cackett
072970e1fa Merge "Draw live tile below Overview after launch animation" into main 2024-10-17 13:52:17 +00:00
samcackett
ea788d92be Draw live tile below Overview after launch animation
A fix (see http://go/b320307512_problems) was put in to change layers
when swiping from Desktop Windowing to Overview, so that the blur effect
 didn't apply to the live tile. The result of this change was that the
 tasks now sat on top of Overview and if you didn't launch the task but
 went back to Overview, then you could interact with them and do things
 like resize the task and get into a very broken state.

This fix simply flips the layer ordering back after the animation
completes to ensure Overview sits on top.

Fix: 373400009
Flag: NONE bugfix
Test: Swipe from Desktop to Overview. Swipe down from Overview to launch
 the live tile, but then swipe back to Overview i.e. don't launch
 Desktop. Try to resize the DW window.

Change-Id: I80c8d72f76a8393eb8bd963df81723defd85ed97
2024-10-17 13:51:28 +00:00
Treehugger Robot
c9b444c790 Merge "Fixed the opened folder on taskbar when NotifShade is shown" into main 2024-10-17 02:42:19 +00:00
Randy Pfohl
2ff556131a Merge "Using synthetic recents transitions for Recents in Window" into main 2024-10-17 01:53:35 +00:00
Treehugger Robot
3cac51e141 Merge "Fix RecentsView crash when DesktopTask has only 1 task and it is in split mode" into main 2024-10-17 01:14:38 +00:00
Bill Yi
7cbcaa7b67 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie3e674cb84d50b961c50a5beb5616fbd002957db
2024-10-16 18:08:40 -07:00
Winson Chung
a2dea77229 Using synthetic recents transitions for Recents in Window
Bug: 366021931
Flag: com.android.launcher3.enable_fallback_overview_in_window
Test: manual with enableFallbackOverviewInWindow=true
Change-Id: I26fbc96373b55f0a4a87756fa99347f0e4f4361b
2024-10-16 13:23:17 -07:00