Commit Graph

1591 Commits

Author SHA1 Message Date
Winson Chung
bf84fe574e Merge "Update OHM regions whenever other regions change" into main 2024-11-22 21:23:21 +00:00
Winson Chung
ce1a73829f Update OHM regions whenever other regions change
- Speculative fix, there are some scenarios where we update the swipe
  touch/assistant regions without updating the OHM regions

Bug: 362039326
Flag: EXEMPT bugfix
Test: Manual
Change-Id: If5c558623073e5185827ae17a162dacf322c74a4
2024-11-22 16:53:22 +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
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
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
Liran Binyamin
a673a1b456 Merge "Deflake BubbleBarViewAnimatorTest" into main 2024-11-21 14:53:22 +00:00
Treehugger Robot
ad43c3dbc9 Merge "Fix TaskbarNavButtonControllerTest failure" into main 2024-11-21 09:05:49 +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
Liran Binyamin
d091b42778 Merge "Interrupt bubble animation when IME is visible" into main 2024-11-20 18:45:24 +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
Luca Zuccarini
9639fcc387 Merge "Hand off gesture nav animations to registered remotes." into main 2024-11-20 15:00:15 +00:00
Johannes Gallmann
511f6d5778 Fix TaskbarNavButtonControllerTest failure
Bug: 380036619
Flag: com.android.window.flags.predictive_back_three_button_nav
Test: TaskbarNavButtonControllerTest
Change-Id: I1ef04d8ef17c2eacb6a6bc352a01ec3cbf3a10c4
2024-11-20 15:54:35 +01: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
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
Treehugger Robot
1efaefe9cb Merge "Add unit testing for InputConsumerUtils" into main 2024-11-19 22:31:15 +00:00
Johannes Gallmann
a4b56465ee Disable 3-button-nav buttons during back button hold
Bug: 373544911
Test: TaskbarNavButtonControllerTest
Test: Manual, i.e. verify that pressing buttons in 3-button-nav while the back button is pressed does not have any effect
Flag: com.android.window.flags.predictive_back_three_button_nav
Change-Id: I5abad5f2f74d09c790380a2eeb27aff3b780b925
2024-11-19 22:11:59 +00:00
Schneider Victor-Tulias
df1ac14415 Add unit testing for InputConsumerUtils
Flag: EXEMPT unit testing
Bug: 371020209
Test: InputConsumerUtilsTest
Change-Id: Ia3f9c13dae7650dc0ae37b48b1d75e84cac60142
2024-11-19 15:39:57 -05:00
Brian Isganitis
79809b448c Merge "Add annotation to simulate RTL in tests." into main 2024-11-19 16:30:34 +00:00
Jagrut Desai
a9095ca0c8 Merge "Fix launching app animation from launcher all apps." into main 2024-11-15 22:43:39 +00:00
Brian Isganitis
01eb1e037b Add annotation to simulate RTL in tests.
Flag: TEST_ONLY
Bug: 230027385
Test: go/testedequals
Change-Id: Idc4ca404179359a6dc4fac160b7a865c5709f137
2024-11-15 15:09:37 -05:00
Jagrut Desai
596594c684 Fix launching app animation from launcher all apps.
This cl includes
	- making pinned taskbar animate slide in/out animation from bottom of screen.
        - no icon aligment with hotseat when taksbar is pinned

The solution
	- upon state change applied on TaskbarLauncherStateController. offset taskbar background and icons to bottom of screeen and animate with slide in/out effects.

Test: manual, presubmit
Bug: 314279101
Flag: EXEMPT bugfix

Change-Id: Ife336ebd57eb2f60c2bc33ed6a4527c42111808f
2024-11-14 15:51:50 -08:00
Treehugger Robot
85f34826f1 Merge "4b/ Migrate TopTaskTracker to use visible running tasks from Shell" into main 2024-11-13 23:47:27 +00:00
Treehugger Robot
8a0d3fd363 Merge "Test KQS gets dismissed in certain situations" into main 2024-11-13 23:26:46 +00:00
Toni Barzic
121f6880dd Test KQS gets dismissed in certain situations
Adds tests that verify the KQS gets properly dismissed when user swipes
home while Keyboard Quick Switch UI is shown.

Bug: None

Test: atest TaplTestsKeyboardQuickSwitch
Flag: EXEMPT tests
Change-Id: I6da053f297eedb297c0d40a7414883fbd69b94e5
2024-11-13 21:28:21 +00:00
Treehugger Robot
6f10fb57a4 Merge "Fix test failures in AbsSwipeUpHandlerTestCase" into main 2024-11-13 20:46:09 +00:00
Schneider Victor-Tulias
e7e752e011 Fix test failures in AbsSwipeUpHandlerTestCase
AbsSwipeUpHandlerTestCase caused test failures when running locally on device.

Flag: EXEMPT testing fix
Bug: 371020209
Test: AbsSwipeUpHandlerTestCase
Change-Id: I7b47b5642223e81c6bb9991a7ff271ba8ffff0ba
2024-11-13 13:23:29 -05:00
Liran Binyamin
12d34f8e2a Merge "Make the flyout color animation smooth" into main 2024-11-13 16:14:07 +00:00
Winson Chung
dde53a10e3 4b/ Migrate TopTaskTracker to use visible running tasks from Shell
- When enable_shell_top_task_tracking is enabled, use the shell
  provided signals to keep an up-to-date running (visible) task list
  on the Launcher side, instead of managing the list via to-front
  signals from Core via TaskStackListener.  In doing so, we also
  update CachedTaskInfo to use this visible task list in preparation
  for future refactoring to use the GroupedTaskInfos directly instead.

Bug: 346588978
Flag: EXEMPT adding new flag enable_shell_top_task_tracking
Test: Build SystemUI & Launcher
Test: atest WMShellUnitTests
Change-Id: I16d515243760a17258a727e2502e35387da87589
2024-11-13 07:05:43 +00:00
Mykola Podolian
40cb4bf335 Merge "Fixed bubble bar size for the 3 buttons navigation mode." into main 2024-11-13 00:25:36 +00:00
Schneider Victor-tulias
2e8707dffb Merge "Add debug logs to TaplStartLauncherViaGestureTests" into main 2024-11-12 20:34:46 +00:00
Ats Jenk
d3a4f9f721 Merge "Fix bubble bar position on recreate" into main 2024-11-12 18:11:39 +00:00
Schneider Victor-Tulias
b04492825d Add debug logs to TaplStartLauncherViaGestureTests
Flag: EXEMPT test debug
Bug: 373497052
Test: TaplStartLauncherViaGestureTests
Change-Id: I501f50afac09068db4193da9d98236887fd6e410
2024-11-12 10:59:47 -05:00
Liran Binyamin
09403e7d9a Make the flyout color animation smooth
This change updates the flyout animation interpolator to an
emphasized curve and updates the color animation so that it completes
within a shorter period of time. Speeding up the color animation
makes the color transformation smooth.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378077265
Test: atest BubbleBarViewAnimatorTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: Idd38fc71543f629aeb568d72386a9b9def51c307
2024-11-12 10:49:09 -05:00
Treehugger Robot
9b44959f68 Merge "Move logic onto default dispatcher. Clearing main - stop performance bug" into main 2024-11-12 14:24:21 +00:00
Treehugger Robot
48770752e2 Merge "Register transitions for Desktop app launch + minimize animations" into main 2024-11-12 13:55:29 +00:00
Gustav Sennton
39c006e792 Register transitions for Desktop app launch + minimize animations
In other CLs we pass specific RemoteTransitions to Shell for app
launches and unminimize actions. Those CLs cover Launcher actions like
the keyboard alt-tab shortcut, or launching an app from Taskbar.
This CL covers launches that don't originate from Launcher, e.g.
launches through intents.

Test: DesktopAppLaunchTransitionManagerTest
Bug: 369966416
Flag: com.android.window.flags.enable_desktop_app_launch_transitions
Change-Id: I82fd72f870c1e38efe5a8ce533a60f282c10203c
2024-11-12 09:16:34 +00:00
Ats Jenk
5ad93d97fa Fix bubble bar position on recreate
When device is rotated, taskbar goes through recreate flow.
LauncherTaskbarUIController restores the state for taskbar in-app
display multiprop.
Ensure that bubble bar is positioned within the taskbar bounds.

The multiprop values in LauncherTaskbarUIController for taskbar in-app
display progress can be restored from shared state when the device
rotates. But this means when we receive updates to various indexes, the
progress for that index may not match what is the actual value of the
multiprop. As it relies on the max function.
Make sure we pass along the actual value for in-app display progress
when updating bubble bar and not the value for the index that got
updated.
Also make sure bubble bar translation always updates when updates are
received as this is the only path for bubble bar to receive updates.

Make sure that when we do override bubble bar translation using in-app
display progress, any existing animation for bubble bar translation y is
cancelled. Otherwise the unlock animation was animating the bubble bar
to the incorrect position after unlock.

Bug: 377621110
Flag: com.android.wm.shell.enable_bubble_bar
Test: atest PersistentBubbleStashControllerTest
Test: manual, have bubble bar with 3 button nav, swipe to -1 and rotate
  the device, observe that bubble bar is in the correct position
Test: manual, repeat same test with all apps open, observe that bubble
  bar has correct position after rotation
Test: manual, with gesture navigation, observe that bubble bar has
  correct position on home screen, -1 and all apps after rotation
Change-Id: I66138e003c4b371299e40558fdadc142fbdbbcd5
2024-11-11 23:21:30 -08:00
mpodolian
5f7785a4d4 Fixed bubble bar size for the 3 buttons navigation mode.
Change logic to updated bubble properties even we do not have any
bubbles.

Fixes: 376141825
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Set 3 button navigation mode, rotate the device.
Change-Id: Ide6df73b3b24c628a0f9e6db6582d4e2ddadfc04
2024-11-11 18:05:48 -08:00
Treehugger Robot
d89f2f14f7 Merge "Fix some tests in TaskbarScrimViewController for bubble bar" into main 2024-11-11 21:03:49 +00:00
Mady Mellor
1d1e50d33b Fix some tests in TaskbarScrimViewController for bubble bar
When taskbar is in pinned mode with bubble bar expanded, in some
scenarios, we hide taskbar contents (i.e. when bubbles overlaps with
taskbar) and the scrim still shows.

One of the existing tests in TaskbarScrimViewController checks that
the scrim would be 0 when taskbar is not visible, however, in the
bubble bar case this isn't always true... I think there probably are
cases where taskbar isn't visible for other reasons (e.g. shade is
pulled down, but there are other tests specific to that). I'm
setting this test to only run when bubble bar isn't running, because
in that case bubbles never impacts taskbar visibility.

I added a test case to ensure scrim is hidden when pinned BUT bubble
bar is on home -- in this case we shouldn't show the scrim.

When adding the enableFlag/disableFlag I saw some NPEs in onDestroy
methods of some controllers so I protect against those as well.

Flag: EXEMPT test change
Test: atest NexusLauncherTest:TaskbarScrimViewControllerTest
      atest NexusLauncherRoboTest:TaskbarScrimViewControllerTest
Bug: 377764181
Change-Id: I71001222aa8a4393b341dd2b43a4b2e46e617a70
2024-11-11 11:03:58 -08:00
Uwais Ashraf
36e0c2521a Move logic onto default dispatcher. Clearing main - stop performance bug
Bug: 377437341
Fix: 374061907
Fix: 357542211
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual - checking slowed down videos of performance
Change-Id: Idab5bd0728395413159a7aafbba8faec62e520a3
2024-11-11 13:39:46 +00:00
Ats Jenk
e93688f77d Merge "Translate bubble bar when in -1 or all apps" into main 2024-11-08 22:46:40 +00:00
Sunny Goyal
5ad2d9f53c Moving some tests off TAPL
Bug: 377772352
Test: Presubmit
Flag: EXEMPT test refactor
Change-Id: I679ae043d617b74a61a682d802c38cc904d2d0c5
2024-11-08 11:09:59 -08:00
Ats Jenk
72d176c407 Translate bubble bar when in -1 or all apps
When persistent taskbar is used, bubbles align with hotseat when
launcher state is home. But when user navigates to the -1 page or all
apps, we show the persistent taskbar instead of hotseat.
3 button navigation container shifts in this case. Apply the same shift
to bubble bar.

Bug: 376141984
Flag: com.android.wm.shell.enable_bubble_bar
Test: atest PersistentBubbleStashControllerTest
Change-Id: I2765936e0bac43a790b628e7df2a1b4ddad32cae
2024-11-08 10:23:18 -08:00
Treehugger Robot
7347a81e41 Merge "Handle Desktop app launches from Taskbar/AllApps icon clicks." into main 2024-11-08 01:04:15 +00:00
Gustav Sennton
da2c2c0f7f Handle Desktop app launches from Taskbar/AllApps icon clicks.
- Provide both launch and minimize animations from
  DesktopAppLaunchTransition
- Add support to TaskbarRecentAppsController to check whether an app is
  visible vs. minimized vs. not showing at all in Desktop Mode
- Use DesktopAppLaunchTransition when clicking a Taskbar/AllApps app
  icon (when in Desktop Mode and the app is not visible) to animate the
  app launch
- The animation / transition is passed to Shell through ActivityOptions

Note: this CL does not add animations for launching managed/work
profile apps. That will be handled in b/376819104.

Test: launch apps in Desktop from Taskbar/AllApps
Bug: 327428659
Flag: com.android.window.flags.enable_desktop_app_launch_transitions
Change-Id: I44be96b9c53718b2082d2f630e1921356785fc4b
2024-11-07 23:06:24 +00:00