Commit Graph

12654 Commits

Author SHA1 Message Date
Mykola Podolian f85a484a9d Merge "Removed stashing hotseat calls." into main 2024-10-24 20:36:06 +00:00
Brandon Dayauon 838a5e9d23 Merge "Add trace logs in Launcher for perfetto to investigate two line issue" into main 2024-10-24 19:35:15 +00:00
Saumya Prakash 747c6b4427 Merge "Prevent Search taskbar edu from showing on home screen." into main 2024-10-24 18:00:24 +00:00
Wen-chien Wang 94fb42cef9 Merge "Add margins to KQS view that is triggered from taskbar" into main 2024-10-24 17:47:37 +00:00
Liran Binyamin abc4b6a137 Merge "Handle taps on bubble bar flyout" into main 2024-10-24 13:26:50 +00:00
Brandon Dayauon 51db65ee49 Add trace logs in Launcher for perfetto to investigate two line issue
bug:375267130
Test manually screenshot:
onIdpChange: https://screenshot.googleplex.com/ASbyGFoAhTXgnWK
statefulActivityOnConfigChange: https://screenshot.googleplex.com/gLqxeJN7TzUURCy
Flag: NONE adding traces to perfetto

Change-Id: Ib2ac49fb8668fdfc91c8e38b91a4afd10127a4c5
2024-10-23 22:59:58 -07:00
Treehugger Robot 388701a031 Merge "Add debugging logs to transition animation" into main 2024-10-24 05:51:18 +00:00
Mykola Podolian 4dc6617988 Merge "Updated bubble bar position to be center aligned with the hotseat" into main 2024-10-24 02:10:43 +00:00
Sihua Ma aa921fa3eb Add debugging logs to transition animation
Test: N/A
Bug: 364465567
Flag: EXEMPT logs only
Change-Id: I8275c43ac44cd4b027fa8ad3d94fe0e84063b8d1
2024-10-24 00:58:58 +00:00
Treehugger Robot 1e4f42ff7f Merge "Account for all apps offset during taskbar layout" into main 2024-10-24 00:10:08 +00:00
Liran Binyamin aa3f772622 Handle taps on bubble bar flyout
Expand the bubble bar when the user taps on the flyout view.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarViewAnimatorTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I156acfa663d6a00bc70dd7bbfc35642643902d83
2024-10-23 19:46:14 -04:00
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
Saumya Prakash 9b60028f99 Prevent Search taskbar edu from showing on home screen.
If a user pins the taskbar and immediately swipes to home, this would
show the taskbar edu tooltip on the home screen. This change checks that
taskbar isn't transitioning to home to prevent that scenario.

Fix: 369061563
Test: Reset Search Taskbar edu, pin taskbar, then swipe to home
immediately. Ensure that the edu doesn't show up on home
Flag: EXEMPT bugfix

Change-Id: I9948189df880b3ed318c4952a8f715cf9a7fa708
2024-10-23 21:38:58 +00:00
Toni Barzic a5b6c155b6 Update taskbar overflow button
Creates a new view for the taskbar overflow button that draws up to 4
recent item previews. The items are stacked on top of each other in
counter clockwise order, with overlapping bounds, recent items closer
to the top. The item icons have a 2 dip ring around them, of the taskbar
background color.

Adjusts logic to calculate which items become part of the overflow
button, so more recent items get shown in the taskbar.

Initial consideration was to usse FolderIcon to represent the overflow
button, but decided against it because:
*    FolderIcon is fairly entangled with the associated folder view
*    item information uses different data structure (ItemInfo) than
     recent items (GroupTasks)
*    item preview layout within the main icon is similar, but
     sufficiently different that using clipped folder layout rules felt
     like hacking around assumptions made for folder icon UI

Bug: 368119679
Test: Keep opening apps until the task bar enters overflow - verify that
overview button shows up, and contains least recent task
representations. Keep adding items, then closing windows, and verify
the icon gets updated accordingly. Done in landscape and portrait, and
ltr and rtl layout.
Flag: com.android.launcher3.taskbar_overflow

Change-Id: I2824cb0db1f7516ebd74361ce00fb8887857325d
2024-10-23 17:05:58 +00:00
Wen-Chien Wang 69ed08ef86 Add margins to KQS view that is triggered from taskbar
Bug: 368119679
Test: open KQS via taskbar and observe the bounds change
Flag: com.android.launcher3.taskbar_overflow
Change-Id: I5060a339cf0cdf70a2a11b57a325767405772ef8
2024-10-23 04:03:50 +00:00
mpodolian f679ba942f Removed stashing hotseat calls.
Removed calls that were stashing and unstashing the hotseat bar.

Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Be on Launcher home, have some bubbles. Expand / collapse
bubble bar. Hotseat remains behind the scream view.
Fixes: 373429249

Change-Id: I1a9ba39c8ca11d49340f217f095d5e872b06105b
2024-10-22 15:25:26 -07:00
Treehugger Robot 08007068d4 Merge "Generalize ActivityTracker to support RecentsWindowManager" into main 2024-10-22 21:26:58 +00:00
Schneider Victor-Tulias 8463dc47eb Generalize ActivityTracker to support RecentsWindowManager
Continued quick switch couldn't work using existing infrastructure until RecentsWindowManager could be properly tracked by ActivityTracker. Refactored ActivityTracker into ContextTracker to support this.

Also refactored ActivityInitListener into ContextInitListener to fit the updated pattern.

Flag: com.android.launcher3.enable_fallback_overview_in_window
Fixes: 366023051
Test: RecentsWindowSwipeHandlerTestCase; Attempted continued quick switch from home and launched app
Change-Id: Ic38ebf3611ef22fbfd1ddeb79d72d8a3621940a0
2024-10-22 15:29:59 -04:00
Treehugger Robot 08f950245e Merge "Fix swipe up from Desktop Tasks is updated does not show focused task" into main 2024-10-22 16:40:34 +00:00
Jordan Silva a48efb33f2 Fix swipe up from Desktop Tasks is updated does not show focused task
Fixes the condition that defines which task should be the focused task when grid-only is enabled and desktop windowing is the running task.

In some cases, when the user adds or removes a task from Desktop Window, the DesktopTaskView does not get updated with the new list of tasks. This causes a mismatch of tasks that are inside the DesktopTaskView and the actual Desktop Windowing. So, RecentsView can't match the previous DesktopTaskView with the current running tasks, entering a specific condition to update the runningTaskViewId. The method called in this condition (showCurrentTask) also updates the focusedTaskViewId for some situations. This CL fixes the conditions which focusedTaskViewId is set to prevent it to replace the focused task id when it's not needed.

Fix: 370736395
Flag: com.android.launcher3.enable_large_desktop_windowing_tile
Test: Manual
Change-Id: I25f5bd67ee0486f6754673eec404832779fc0498
2024-10-22 15:38:49 +01:00
Mykola Podolian 18b3171980 Merge "Revert "Made the taskbar touchable during animation to home."" into main 2024-10-22 03:59:13 +00:00
Mykola Podolian 164b832ec4 Revert "Made the taskbar touchable during animation to home."
This reverts commit d89732ef85.

Reason for revert: b/374080485
Flag: NONE
Change-Id: I56236f539957efaaa4caa30a4b887d017037709f
2024-10-21 17:36:49 -07:00
Artsiom Mitrokhin 76fa57f418 Merge "Update popup and arrow positioning logic" into main 2024-10-21 23:55:14 +00: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
Toni Barzic 9a5941ab91 Account for all apps offset during taskbar layout
When laying out its contents, TaskBarView generally lays the icons so
they get centered in the task bar - this is done by calculating the
total size of all icons during layout (this will generally be transient
taskbar icon sizes), and substracting extra margins that get removed
from the divider view. After initial layout, `TaskbarViewController`
adjusts the icon view positions to match expected icon sizes (it
offsets icons horizontally reducing margins between icons to match
intended icon sizes for the taskbar type). Additionally,
`TaskbarViewController` translates all apps button container - this
transformation is asymetric, and causes the task bar contents to become
off-center. To account for this, update taskbar layout to reduce the
total icon size used for centering icons by the amount all apps button
is offset. This makes the taskbar off-center after initial layout, but
by the amount by which all apps button is eventually offset (resulting
in centered taskbar content).

This alone worked for left-to-right UI direction, but not right-to-left.
To fix this, correct the reference point from which
TaskBarViewController offsets icon positions. The offset used to be
calculated by distance of an icon index from half of the icon count -
instead offset needs to be calculated relative to mid-index.
For example, icon at index i needs to be offset by
(mid_index - i) * difference_in_icon_size: ((n-1) / 2 - i) * diff).
Code used to work for LTR UI layout because the list of icons contained
invisible qsb view, which incresed both n and indices by 1, so
(n' / 2 - i') * diff_in_icon_size worked fine, as it evaluated to
((n + 1) / 2 - i - 1) * diff = ((n - 1) / - i) * diff

Bug: 372567501
Test: Verify that taskbar icons are centered when it needs to be, both
with ltr and rtl language UI.
Flag: EXEMPT bugfix

Change-Id: Ic06873cc225a4361d9140d72c055db23f446a1ad
2024-10-21 20:49:05 +00:00
Treehugger Robot e6e9cd23c5 Merge "Don't enforce max tasks in KeyboardQuickSwitchView" into main 2024-10-21 20:26:27 +00:00
Artsiom Mitrokhin ade96d0199 Update popup and arrow positioning logic
1) By default, it's centered relative to the event position
   https://screenshot.googleplex.com/5Wri2CX3vASCxWt
2) It becomes left or right aligned near edges of the screen
   https://screenshot.googleplex.com/9AEQxWcmYX63jTv
   https://screenshot.googleplex.com/39KMeG2eWKr2QC6
3) And never goes beyond the minimum padding
   https://screenshot.googleplex.com/5LiPHiXiJSyGdx5
   https://screenshot.googleplex.com/86KQnKXa38NoYpM

Bug: 297325541
Flag: com.android.launcher3.show_taskbar_pinning_popup_from_anywhere
Test: manual, flip the flag, open popup from different positions
Change-Id: I06cf0c0352da946da7a62413144c304623557216
2024-10-21 14:32:00 -04: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
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
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