Commit Graph

12909 Commits

Author SHA1 Message Date
Brian Isganitis 39837267eb Merge changes Ie1523446,I0263f704 into main
* changes:
  Do not pre-add All Apps icon in phone mode.
  Fix LayoutTransition All Apps divider logic for RTL.
2024-11-22 20:14:37 +00:00
Matt Sziklay 5763a6d0b7 Merge "Move shared logic to new package." into main 2024-11-22 18:53:58 +00:00
Alex Chau ba8bfc97b0 Merge "Swipe up from excludeFromRecents task should be shown left of desktop tasks" into main 2024-11-22 11:59:12 +00:00
Uwais Ashraf 61cff8b686 Move fully visible task logic to more centralised method.
This means that overlay is initialised in all cases, not just some. Also uses pre-existing method for `isTaskViewFullyVisible()`

Fix: 376264918
Test: Manual checking of flows in bug.
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia898a2a869b79fb120a162fa5a3fe7df0fbf9800
2024-11-22 10:59:33 +00:00
Brian Isganitis 6c0cd2278d Do not pre-add All Apps icon in phone mode.
Flag: com.android.launcher3.taskbar_recents_layout_transition
Bug: 343521765
Test: go/testedequals
Change-Id: Ie152344613cf982183c4bb72b8dde138f4f74e37
2024-11-21 23:38:00 +00:00
Brian Isganitis f04ae6b09f Fix LayoutTransition All Apps divider logic for RTL.
We were checking the wrong index (off by one), leading to a crash if the divider is already in the Taskbar at the correct index. However, we do need to add it after the expected index if the divider isn't there, otherwise it will push the icon that is at that position to the right of the divider (it should be to the left).

Flag: com.android.launcher3.taskbar_recents_layout_transition
Bug: 343521765
Bug: 368522274
Test: go/testedequals
Change-Id: I0263f704728286b53da5b45828784b20aaae31ce
2024-11-21 23:38:00 +00:00
Treehugger Robot 423c85a2eb Merge "Remove padding from All Apps and Divider views." into main 2024-11-21 22:07:40 +00:00
mattsziklay 17212c441c Move shared logic to new package.
Bug: 337917761
Test: Manual
Flag: EXEMPT bugfix
Change-Id: I72c6fe4382fbe66de306a5d1d243f1145ccadbce
2024-11-21 21:31:05 +00:00
Treehugger Robot b85a1fdf3d Merge "Do not scale canvas if scale is 1 for predicted app icon animation." into main 2024-11-21 21:23:23 +00:00
Andy Wickham 05958c0d85 Merge "Don't store SettingsCache within ContextualSearchStateManager." into main 2024-11-21 21:07:54 +00:00
Winson Chung f86cdbdd3a Merge "Adjust visibility for legacy top task tracker tasks when home moves to front" into main 2024-11-21 20:10:10 +00:00
Winson Chung 9eb6ed8879 Adjust visibility for legacy top task tracker tasks when home moves to front
- To workaround the fact that TTT does not get full task visibility info,
  we can existing tasks as not-visible whenever the occluding home task
  is moved to front
- Fix an issue where task icons were not loading for running tasks
  due to us skipping updating for running tasks in the recents
  transition (we will continue to skip updating the thumbnail though)
- Also skip updating the same taskview multiple times if the task
  container has multiple tasks that need to be updated

Bug: 372067617
Bug: 280812109
Flag: EXEMPT bugfix
Test: atest TaskThumbnailViewModelTest,TasksRepositoryTest,RecentsViewModelTest
Test: atest TaplTestsQuickstep#testExcludeFromRecents
Change-Id: Ifa33cfe53d44e5fe7778aecd5434abf9c29b3170
2024-11-21 20:09:58 +00:00
Brian Isganitis 852dccdff2 Merge changes from topic "taskbar-layout-transition-prepare" into main
* changes:
  Prepare for LayoutTransition with RTL support.
  Split up hotseat and recents into two methods.
  Filter out unsupported items immediately when updating Taskbar.
2024-11-21 19:39:05 +00:00
Jon Miranda 8981377ac0 Do not scale canvas if scale is 1 for predicted app icon animation.
Was not able to repo the initial bug, but this change leaves the
original path unchanged.

Fixes: 374579710
Test: N/A
Flag: EXEMPT bugfix
Change-Id: I91e0235571b0736dcbe70c7730d7c90ec949a13e
2024-11-21 11:22:48 -08:00
Sukesh Ram d4fb56f36b Merge "[Taskbar CD] Refactor TaskbarManager for Multiple TaskbarActivityContexts" into main 2024-11-21 18:09:41 +00:00
Brian Isganitis c87f691e04 Prepare for LayoutTransition with RTL support.
Only remove divider when it needs to be removed or moved between All Apps and recents locations. Keep All Apps and QSB in Taskbar at all times. LayoutTransition does not work if views are being removed and then immediately readded (what current code branch does).
Overflow is not supported yet with the LayoutTransition flag.

Test: go/tested-equals
Flag: com.android.launcher3.taskbar_recents_layout_transition
Bug: 368522274, 343521765
Change-Id: I9ae1d7c52e853106cdf86329be6f221213e7cb86
2024-11-21 12:24:13 -05:00
Brian Isganitis 199f860b70 Split up hotseat and recents into two methods.
To support RTL with recents, will need to support calling updateRecents before updateHotseatItems. Splitting into two methods makes this doable.

Test: go/testedequals
Flag: EXEMPT refactor
Bug: 343521765, 368522274
Change-Id: I8756ea23fff1606ef4ab9f72d18dd4b21f135b25
2024-11-21 12:24:13 -05:00
Brian Isganitis 1782af7b6e Filter out unsupported items immediately when updating Taskbar.
Fixes an issue where hotseatItems may not reflect the number of hotseat views in Taskbar. Entries in the array can be null (e.g. no predictions but there is space in the hotseat for them). If these are filtered out immediately, hotseatItems.length will correspond to the number of hotseat views.

Test: go/testedequals
Flag: EXEMPT bugfix
Fix: 379704910
Change-Id: I375d8152fccb6df5a9b783842ecf5dcedf6894c1
2024-11-21 12:24:11 -05:00
Jon Miranda 1d7ac8b8a7 Remove padding from All Apps and Divider views.
Bug: 375661139
Test: confirmed with design team
Flag: EXEMPT bugfix
Change-Id: I0f9cce376d47918e69a65ed288f10143930ee3be
2024-11-21 09:21:57 -08:00
Saumya Prakash a2dea487dc Merge "Fix background of multi instance menu in taskbar" into main 2024-11-21 17:00:31 +00:00
Liran Binyamin a673a1b456 Merge "Deflake BubbleBarViewAnimatorTest" into main 2024-11-21 14:53:22 +00:00
Alex Chau 64ae9bcfe5 Swipe up from excludeFromRecents task should be shown left of desktop tasks
- excludeFromRecents are sometimes added as index 0 after moveRunningTaskToFront, breking the model that fullscreen tasks should be shown after desktop tasks
- Added getRunningTaskExpectedIndex to compute expected runningTask postion in all scenario, and apply this position both when adding the view in showCurrentTask and moveRunningTaskToExpectedPosition

Fix: 380232192
Test: Swipe up from following scenario in phone/tablet, repeat several times
1) 1st fullscreen task
2) 2nd fullscreen task
3) excludeFromRecents task
4) Desktop task
Flag: EXEMPT BUG_FIX

Change-Id: Iec551fb1403a6bb5307b684a50f7ae7d31bd4644
2024-11-21 14:28:58 +00:00
Ikram Gabiyev a13ef72cb5 Merge "[PiP2] Do not setFinishTaskTransaction in PiP2" into main 2024-11-21 03:38:51 +00:00
Sukesh Ram d138ce959b [Taskbar CD] Refactor TaskbarManager for Multiple TaskbarActivityContexts
Refactor the TaskbarManager to support multiple TaskbarActivityContexts.

Flag: EXEMPT not adding new behavior
Bug: 362720616
Test: Manual
Change-Id: I1baa081f6994cb94465f20aa7e0c6b47f5cb7eb8
2024-11-20 18:56:25 -08:00
Andy Wickham 30ad7246ad Don't store SettingsCache within ContextualSearchStateManager.
We can access the static instance as needed without retaining it
in this class.

Bug: 321226611
Test: Manual (test Circle to Search setting works as expected)
Flag: EXEMPT bugfix
Change-Id: I79a22d313bf802b6ea5e388e06269dd9ee5131a4
2024-11-20 18:05:21 -08:00
Ikram Gabiyev d4788e6365 [PiP2] Do not setFinishTaskTransaction in PiP2
PiP2's enter flow is different in that we resolve
TRANSIT_PIP's startWCT in Shell, and PipTransition
will always make sure to set the right alphas
at the start and finish.

Bug: 380030547
Flag: com.android.wm.shell.enable_pip2
Test: atest NexusLauncherOutOfProcTests:TaplTestsSplitscreen
Change-Id: I7d28ed5dcccecfab71ff324098d5c31653ce1c9f
2024-11-20 16:30:35 -08:00
Treehugger Robot 0fb50e85d5 Merge "Handle edge case where overflow icon is overflowing" into main 2024-11-21 00:18:57 +00:00
Saumya Prakash 1aa57333ca Fix background of multi instance menu in taskbar
This change addresses an issue where the background of the multi
instance menu would sometimes not render in time, leading to a visual
bug.

Fix: 380087041
Bug: 315989246
Test: Manual
Flag: com.android.launcher3.enable_multi_instance_menu_taskbar
Change-Id: I32b746a990e89e954b00a0cdcb0e1bf2fae2537f
2024-11-20 22:36:53 +00:00
Ats Jenk 16c14327ea Merge "Fix bubble bar stash delay" into main 2024-11-20 21:51:37 +00:00
Treehugger Robot 3868d9b73b Merge "Revert "Check if all apps are translucent when finishing recents animation."" into main 2024-11-20 21:06:07 +00:00
Liran Binyamin 2ceb63a94d Deflake BubbleBarViewAnimatorTest
Add a semaphore to block the test until the bubble bar is expanded.

100x run: http://ab/I94900010337166460

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 380023942
Test: ab link above
Change-Id: I473208255ef658ee532f54c2665889ee5c24e39e
2024-11-20 15:52:52 -05:00
Johannes Gallmann 3fa3085242 Merge "Polish back-to-home animation for 3-button-nav" into main 2024-11-20 20:44:34 +00:00
Artsiom Mitrokhin 8ed2ef9029 Merge "Fix the overflow button getting stuck in the dot position" into main 2024-11-20 20:38:12 +00:00
Ats Jenk 3d0f0eb213 Fix bubble bar stash delay
Bubble bar was stashing with a delay compared to taskbar.
This is because taskbar stashing looks at isInLauncher value in addition
to launcher state.
Add this check to the bubble bar in overview condition. And only
consider bubble bar showing in overview if we isInLauncher returns true
and launcher state is overview.

Bug: 371229068
Test: manual, start from home with bubble bar shown, swipe up to
  overview, tap on an app, observe that bubble bar stashes at the same
  time as taskbar
Test: swipe up to home, open all apps, check that bubble bar remains
  visible
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Icedfd29300f739e37d636122bad0fb6e14fa2ced
2024-11-20 11:04:21 -08:00
Liran Binyamin d091b42778 Merge "Interrupt bubble animation when IME is visible" into main 2024-11-20 18:45:24 +00:00
Liran Binyamin c4020486b5 Merge "Fix wrong bar state after swiping home" into main 2024-11-20 18:45:06 +00:00
Jon Miranda 4fd400994a Revert "Check if all apps are translucent when finishing recents animation."
This reverts commit ec111e24e5.

Reason for revert: pip regressions — I'll do a quick revert for now

Change-Id: Ie91bae447acd9813188a5ba0caebeca30db348ea
Fixes: 379800273
Fixes: 379602904
Bug: 354627538
2024-11-20 18:36:21 +00:00
Ats Jenk 2e66e32aba Merge "Apply drag elevation to bubble bar container" into main 2024-11-20 16:53:40 +00:00
Alex Chau 6ce105c269 Merge "Update corner radius calculation in TaskView" into main 2024-11-20 16:18:51 +00:00
Liran Binyamin 05eaeb29aa Interrupt bubble animation when IME is visible
When the IME becomes visible, interrupt the bubble animation if it's
running. This ensures that the flyout doesn't show over the IME and
is more consistent with the behavior of bubble notification when the
IME is visible.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378404363
Test: atest BubbleBarViewAnimatorTest
Test: manual
       - launch app
       - send bubble
       - while bubble is animating launch IME
       - observe flyout not visible over IME
Change-Id: I28390982bb41d8cc9b494395418728ff5fb373b6
2024-11-20 10:36:22 -05:00
Liran Binyamin c3b4263218 Fix wrong bar state after swiping home
Interrupt the animation when the user swipes home.

When there are no bubbles the stashed state now keeps getting
updated so that when a bubble is created we can correctly
detect stash change events.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378967270
Test: manual
       - dismiss bubble bar
       - launch app
       - send bubble
       - swipe home during the animation
       - observe the bar does not stash at the end
Change-Id: I2f054b7110af68f9637a4011a378ba35776b3771
2024-11-20 10:35:05 -05:00
Luca Zuccarini 9639fcc387 Merge "Hand off gesture nav animations to registered remotes." into main 2024-11-20 15:00:15 +00:00
Luca Zuccarini afd0d288e0 Merge "Animation takeovers in Predictive Back." into main 2024-11-20 14:16:25 +00:00
Alex Chau a2c1dbc611 Update corner radius calculation in TaskView
TaskThumbnailView
- Set cornerRadius directly from TaskView instead of calulating and listening from ViewModel
- Use onSizeChagned/width/height for OutlineProvider bounds, to be consistent with DesktopTaskContentView

DesktopTaskView
- Moved backgroundView inside DesktopTaskContentView, so its outline can be determiend by OutlineProvider in DesktopTaskContentView
- Update DesktopTaskContentView's cornerRadius when it changes in TaskView

Model/Data chagnes
- Removed TaskViewModel/TaskViewData and scale from RecentsViewData

TaskView
- Add a onBind method to be called after bind, for common post bind handling (e.g. update cornerRadius)

TaskViewSimualtor
- Use DesktopFullscreenDrawParams for desktop task, and moved setIsDesktopTask to CTOR so related fields can be final

Bug: 372237039
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.window.flags.enable_desktop_windowing_mode
Test: TaskThumbnailViewScreenshotTest, OverviewDesktopTaskImageTest
Test: DesktopFullscreenDrawParamsTest, FullscreenDrawParamsTest, TaskThumbnailViewModelImplTest
Change-Id: If3d195ef6596aa28fce4d4875cf45423cb71811c
2024-11-20 13:55:32 +00:00
Luca Zuccarini 33dfe5e7b3 Hand off gesture nav animations to registered remotes.
This is in support of long-lived return animations in the Animation
library. Sometimes we want the home gesture to minimize the
foreground app into a custom view other than the default Launcher
behavior.

For example, ongoing call will minimize to the status bar chip, even if
the app icon is on Home. This is guaranteed to be handled is the
takeover handler is not null, and only happens in this case (which means
a custom animation has been registered and is ready to run).

Bug: 323863002
Bug: 202516970
Flag: com.android.systemui.shared.return_animation_framework_library
Flag: com.android.systemui.shared.return_animation_framework_long_lived
Test: manual and unit test included
Change-Id: Id7cd1f6e92ad3cbe3c259b3f80c753c91472b455
2024-11-20 10:31:28 +00:00
Johannes Gallmann 8f8d29888a Merge "Disable 3-button-nav buttons during back button hold" into main 2024-11-20 08:39:42 +00:00
Treehugger Robot 3186a14fb4 Merge "Add unit tests for taskbar overflow" into main 2024-11-20 06:30:48 +00:00
Toni Barzic dfed7c8338 Handle edge case where overflow icon is overflowing
In certain situations, space in taskbar may be restricted so even the
overflow icon for running apps is technically overflowing available
space (i.e. not fully within intended margins). In such cases the
overflow icon was not rendered, as the size of the overflown icons was
larger than the number of running app icons, so the list of icons for
overflow icon was never fully initialized.
Handle this case by capping the number of items to add to overflow icon
to the number of available running apps.

Bug: 379774843
Test: Enable three button navigation, increase the display scaling (to
effectively reduce available space), and enter desktop session in
portrait orientation. Verify the taskbar overflow icon shows up.
Flag: com.android.launcher3.taskbar_overflow

Change-Id: I06371637d1b01e99eaf30aec98ae0920aa248652
2024-11-20 01:53:31 +00:00
Toni Barzic 7a0191e753 Add unit tests for taskbar overflow
The tests verify that number of icons in the task bar does not go beyond
the intended max number, that the taskbar remains centered as it hits
max number of icons, and maintains a minimal margin to the display
edges.
Also, has a test that the max naumber of icons and the taskbar margins
adapt as bubble bar visibility chages.

Adds a TestRule to mock the recents model in the taskbar window sandbox.
The mocked recents model is used to add fake running app icons to the
taskbar.

Bug: 368119679
Test: atest TaskbarOverflowTest
Flag: EXEMPT test only

Change-Id: I8d033c3e95d7c0a4b139502cd7d70882482117c0
2024-11-20 01:48:54 +00:00
Liran Binyamin eb28585e54 Merge "Show the dot after the flyout is interrupted" into main 2024-11-20 00:17:39 +00:00