Commit Graph

218 Commits

Author SHA1 Message Date
Brian Isganitis
002ef1f550 Disable model loading with Sandbox check instead of static boolean.
The static boolean also affects Taskbar within the Launcher process. We
only want this disabled for the Taskbar test Sandbox.

Flag: TEST_ONLY
Bug: 230027385
Test: NexusLauncherTests:com.android.launcher3.taskbar
Change-Id: Ife12e95ab34755d1aec42d79188c15232d8da092
2024-12-10 23:31:36 +00:00
Brian Isganitis
9c0552e09d Merge changes from topic "taskbar-view-recents-changes" into main
* changes:
  Move recents divider if hotseat is set after recents.
  Animate out/in the correct task view when recents change.
  Implement initial LayoutTransition for Taskbar recents.
2024-12-10 02:18:53 +00:00
Treehugger Robot
9bb546953c Merge "Adapt TaskbarOverflow tests to check items added overflow view" into main 2024-12-10 00:21:18 +00:00
Brian Isganitis
c7f6cd6062 Move recents divider if hotseat is set after recents.
Fixes a bug where updateItems is first called with recents and then with hotseat. This causes the Taskbar to first be All Apps, Divider, and then Recents. The layout transition path assumes though that the Divider after All Apps is not for recents in this case, which is wrong. Due to this assumption, it skips over the divider and then adds the hotseat items after it (should be added before). Added a test for this case.

Flag: com.android.launcher3.taskbar_recents_layout_transition
Bug: 343521765
Test: go/testedequals
Change-Id: Ia690c71fe482709e35ab302a7b497bf547eb4478
2024-12-09 15:35:43 -05:00
Brian Isganitis
3c24c421f6 Animate out/in the correct task view when recents change.
Flag: com.android.launcher3.taskbar_recents_layout_transition
Bug: 343521765
Test: go/testedequals
Change-Id: I6c7708ed9f03eff8469b5f2e75ce00e545b03f54
2024-12-09 15:35:43 -05:00
Toni Barzic
7bea1821d4 Adapt TaskbarOverflow tests to check items added overflow view
Adds a step to verify that TaskbarOverflowView items get set to the list
of the least recent tasks. Adds test cases for an edge case where
taskbar hits max number of items event without recent tasks
(b/379774843).
Has a fix for a further edge case where taskbar overflow view could be
created with a single item (in which case we can just show that item
directly).

Bug: 379774843
Flag: com.android.launcher3.taskbar_overflow
Test: atest TaskbarOverflowTest

Change-Id: I004676da3e17f26b8110d14d39589c84a9f384d8
2024-12-06 19:39:47 +00:00
Liran Binyamin
0e14bb8ef9 Merge "Fix bubble bar flicker in initial animation" into main 2024-12-05 22:22:07 +00:00
Liran Binyamin
77827d3167 Fix bubble bar flicker in initial animation
When the first bubble animates in we make the bubble bar visible
before translating it below the screen to prepare for the spring
animation. This change defers updating the visibility letting the
animator notify when it's safe to update visibility.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 382296842
Test: atest BubbleBarViewAnimatorTest
Test: manual
       - dismiss bubble bar
       - send new bubble
       - observe bubble bar does not flicker
Change-Id: Ib611771dd9f315ab57ef00f8f6cb982b8b88ea73
2024-12-04 15:05:22 -05:00
Liran Binyamin
3931b671b4 Reset the bubble bar scale when the animation is interrupted
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 381283214
Test: atest BubbleBarViewAnimatorTest
Test: manual
       - have a bubble in the bubble bar
       - launch an app
       - set animator scale to 5x to slow down animation
       - send a bubble
       - when the bubble bar animates interrupt the animation by
         touching the bubble bar
       - observe the bubble bar scale is reset correctly
Change-Id: I1abd81e3df987ba749a13eb1b7506d5c1d8fdddd
2024-12-02 11:23:35 -05:00
Liran Binyamin
495fe1d255 Merge "Animate the bubble bar on dismiss" into main 2024-12-02 14:28:30 +00:00
Alex Chau
9e52a665a6 Mock UserCache in TaskViewItemInfoTest to avoid NPE
- Also added test for runtimeStatusFlags on regular/private apps

Fix: 381295678
Test: TaskViewItemInfoTest
Flag: EXEMPT BUG_FIX
Change-Id: I928a8f128957885d33ac8001493eef0fd4b23ec7
2024-11-29 12:42:15 +00:00
Liran Binyamin
7e387fa505 Animate the bubble bar on dismiss
When the last remaining bubble is dismissed by drag or from the menu
we now fade out the bubble bar.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 347062801
Test: manual
       - create a single bubble in the bar
       - expand
       - dismiss by drag or from menu
       - observe animation
Change-Id: I86fcaf04c6f5949126744b81e0042b0e58318a13
2024-11-27 16:23:26 -05:00
Mykola Podolian
400fc4ad98 Merge changes I239f9357,I57a32ac5 into main
* changes:
  Update setting taskbar window height
  Set bubble bar aligned to QSB
2024-11-27 20:44:53 +00:00
Treehugger Robot
d7b3369036 Merge "Ignore events that occur between app icons on the taskbar" into main 2024-11-27 20:22:17 +00:00
Liran Binyamin
ed249f0451 Merge "Show the bubble bar edu view" into main 2024-11-27 20:09:07 +00:00
mpodolian
3111daf2f1 Update setting taskbar window height
Updated the logic to set the taskbar window height to accommodate the
bubble bar with its maximum flyout height before the bubble bar
animation begins. The height is reverted to the default value once the
animation is completed.

Fixes: 378400160
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Set 3-button navigation mode and have the QSB placed
above the hotseat. Send a notification that will display a bubble, and
observe the bubble bar animation and final placement aligned with the
QSB.
Next, set gesture navigation mode and repeat the flow above. Observe
that the bubble bar is aligned with the hotseat icons.
Felix video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/gYMVt0sH4si0KOpaBxIPem
Tangor video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fz95MbjcjW3awStnuOl8BJ

Change-Id: I239f935743c3936fed44822c3c62652073ffefe2
2024-11-27 10:19:24 -08:00
mpodolian
28907bcbd6 Set bubble bar aligned to QSB
Change logic to updated bubble bar alignment with the QSB vertical
center for 3 buttons navigation mode.

Fixes: 378400160
Flag: com.android.wm.shell.enable_bubble_bar
Test: PersistentBubbleStashControllerTest
Test: TransientBubbleStashControllerTest
Test: Manual. Set the buttons navigation mode and observe that the
bubble bar is centered with the QSB when the QSB is not aligned with the
hotseat. Then, switch to gestures navigation mode and observe that the
bubble bar is centered with the hotseat when the QSB is not aligned with
the hotseat.

Change-Id: I57a32ac5bde7a7055b54a89727429424e5c0ca4f
2024-11-27 10:15:08 -08:00
Treehugger Robot
02038f4deb Merge "Log various TaskView properties in TaksContainer.itemInfo" into main 2024-11-27 12:59:31 +00:00
Alex Chau
09f2433253 Log various TaskView properties in TaksContainer.itemInfo
- Extracted itemInfo creation in to TaskViewItemInfo and added a test
- Created a standalone atom for TaskView, logging data we want (please refer to the bug)
- Convert TaskView atom to StatsLog data in StatsLogCompatManager
- Simplified DesktopSystemShortcutTest and ExternalDisplaySystemShortcutTest to avoid extra testing on DesktopModeStatus

Fix: 341320349
Test: TaskViewItemInfoTest, DesktopSystemShortcutTest, ExternalDisplaySystemShortcutTest
Flag: EXEMPT logging
Change-Id: Icf04ff2b1670c3f3d5f6a66f99c0d28314efaf21
2024-11-27 10:41:43 +00:00
Liran Binyamin
c48b4ed025 Fix flake in BubbleBarViewAnimatorTest
100x run: http://ab/I70900010339337557

Flag: EXEMPT test only
Fixes: 381093181
Test: http://ab/I70900010339337557
Change-Id: Ifd126156d6e69f885b37487743e06d482c2e3921
2024-11-26 13:44:25 -05:00
Liran Binyamin
16a604fe0c Show the bubble bar edu view
We now show the bubble bar edu view after a request from shell
to show it was received, and as soon as the user performs a touch
gesture on the bubble bar or flyout that causes the bar to be
expanded.

The click listener on the bubble bar is removed with this change
because the input consumer already handles taps. Removing the
listener avoids processing the tap twice which causes the edu view
to not be displayed. Removing the click listener solves the issue
but ideally we should move the edu view to launcher since that
would allow us to manage its state easily.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 374842575
Test: atest PersistentBubbleStashControllerTest
Test: atest BubbleBarSwipeControllerTest
Test: atest TransientBubbleStashControllerTest
Test: manual
       - force show the bar edu view
       - send a bubble
       - tap the bubble bar to expand
       - observe bubble bar edu is visible
       - repeat with swiping on the bar and tapping the flyout
       - launch an app
       - swipe up to show the taskbar
       - observe edu view not visible
       - send a bubble with auto expand
       - observe bubble bar expanded and edu view not visible
Change-Id: I98ec44e6edf6c69d6d47b5709140796c2ecab23e
2024-11-26 10:23:45 -05: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
Artsiom Mitrokhin
7205b24938 Ignore events that occur between app icons on the taskbar
Bug: 297325541
Flag: com.android.launcher3.show_taskbar_pinning_popup_from_anywhere
Test: manual, flip the flag, long-click between taskbar items
Change-Id: If2ee00f31fcd1788bac2c2c0cd78ba1eada86115
2024-11-21 16:38:32 -05: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
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
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
Johannes Gallmann
8f8d29888a Merge "Disable 3-button-nav buttons during back button hold" into main 2024-11-20 08:39:42 +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
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
Brian Isganitis
79809b448c Merge "Add annotation to simulate RTL in tests." into main 2024-11-19 16:30:34 +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
Liran Binyamin
12d34f8e2a Merge "Make the flyout color animation smooth" into main 2024-11-13 16:14:07 +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
Ats Jenk
d3a4f9f721 Merge "Fix bubble bar position on recreate" into main 2024-11-12 18:11:39 +00: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
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
Ats Jenk
e93688f77d Merge "Translate bubble bar when in -1 or all apps" into main 2024-11-08 22:46:40 +00: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
Johannes Gallmann
bc4936fb6b Add predictive back animation for 3-button-nav
Bug: 373544911
Flag: com.android.window.flags.predictive_back_three_button_nav
Test: OverviewProxyServiceTest
Test: TaskbarNavButtonControllerTest
Test: TaskbarScrimViewControllerTest
Change-Id: I04cadc660f38e2d4541b06fcda950098a0768492
2024-11-06 11:02:13 +01:00
Liran Binyamin
65edaf53af Merge "Hide bubble dot after flyout init" into main 2024-10-31 22:46:56 +00:00
Liran Binyamin
0e8093ae92 Hide bubble dot after flyout init
After the flyout initializes to its collapsed state, hide the
notification dot so that the flyout and dot will seem visually as
one.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 376276297
Test: atest BubbleBarFlyoutControllerTest
Change-Id: Ie581ddcd56a26844526f80b2169639c1a7d87500
2024-10-31 15:56:19 -04:00