Commit Graph

120 Commits

Author SHA1 Message Date
Mady Mellor e07699ae6a Fix an issue where the overflow wouldn't show if the flag was disabled
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - check that optional overflow flag is off and get
               bubbles in bubble bar, overflow should be present
Bug: 358304168
Change-Id: I1eb709003d4dcdde7ae465b837a2c68d40b1a828
2024-10-30 12:30:14 -07:00
Mykola Podolian ddf212523f Merge changes Ibdecabd1,If330dc9e into main
* changes:
  Added scale animation for taskbar pinning transition.
  Animate the bubble bar Y for task bar pinned/unpinned switches.
2024-10-25 19:48:55 +00:00
Mykola Podolian f871e64f3c Merge "Set proper interpolators and durations for the bubble bar animations" into main 2024-10-25 19:48:08 +00:00
mpodolian 92d25cd21d Added scale animation for taskbar pinning transition.
Animate the bubble bar icons size and padding for taskbar change mode
animation.

Bug: 345698412
Test: TaskbarPinningControllerTest
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Ibdecabd1310203dc956f69673dc446a0e7e556a6
2024-10-24 13:45:11 -07:00
Mykola Podolian f85a484a9d Merge "Removed stashing hotseat calls." into main 2024-10-24 20:36:06 +00:00
mpodolian ed7ef84782 Set proper interpolators and durations for the bubble bar animations
Set proper interpolator and duration for bubble bar expansion and
collapsing animation. Also set animation properties for the taskbar
fade in and out animations.

Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Expand / collapse bubble bar when taskbar is pinned and
expanded bubble bar would intersect the task bar.
Fixes: 360821863

Change-Id: Ia83d6aecdae921721a31b45f22400f878040f3d6
2024-10-24 13:14:54 -07: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 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
mpodolian eedc7ab8fd Animate the bubble bar Y for task bar pinned/unpinned switches.
Animate the horizontal position of the bubble bar on taskbar pinned /
unpinned switches.

Bug: 345698412
Test: TaskbarPinningControllerTest
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: If330dc9e5f7b16a588973ad6043a5dc6709e13ab
2024-10-22 11:19:17 -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
Liran Binyamin c33fe5bd56 Update taskbar window size for flyout
This change updates the taskbar window size after the flyout view
has measured itself. This ensure that the taskbar window is tall
enough to display the entire flyout.

When the flyout is removed we reset the taskbar window size.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: builds successfully and tested manually -- code is not wired up
Change-Id: I5e8618e57443212e1c4f19ab20d1542ae2d1b865
2024-10-14 19:59:59 -04:00
Liran Binyamin c25aa0c20f Create container view for bubble bar
The container will be used to inflate the bubble bar flyout view

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: builds successfully -- code is not wired up yet

Change-Id: I3012caa801c73f9e13f26c8803595b59e250ae1e
2024-10-09 11:09:48 -04:00
Liran Binyamin 98ecad0352 Prepare for wiring bubble bar flyout
Implement BubbleBarFlyoutPositioner in BubbleBarViewController

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: builds successfully -- code is not wired up yet
Change-Id: Ib2d9b1f2f6e972f6ce949e10d50334a501c8c805
2024-10-08 16:40:31 -04:00
Ats Jenk 2166749190 Set bubble bar invisible while stashed
Update bubble bar visibility when it is stashed.
Ensures that if alpha is updated, it won't show up.

Bug: 345687278
Test: TransientBubbleStashController
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I603a67a824a5cee0fb35de7c3f2dc98d9d2323ed
2024-10-03 15:33:38 -07:00
Mady Mellor 3e8cc610b3 Fix an issue where bubble bar would collapse when rotating
When the device is rotated, everything gets recreated, in this case,
bubble bar state is typically set to be stashed. However, if taskbar
and bubble bar were unstashed while rotating, bubble bar would be
incorrectly stashed. To fix this, only do the stash if taskbar is
also stashed in this case.

Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - be in an app, unstash bubbles, rotate device
             => observe that bubble bar is unstashed like taskbar
                after rotation
Bug: 353884121
Change-Id: Ia37397c62a1a6819c1bd42261f8a9955db511da3
2024-10-02 13:55:55 -07:00
mpodolian bf7a4db0de Unstash hotseat immediately if go out of the launcher home.
When navigation mode is set to 3 buttons, it is possible for user to
click on recent apps button, so for such scenario taskbar should be
immediately un-stashed

Test: Manual
Set 3 buttons navigation mode. Go to Launcher home. Expand bubble bar.
Press recent apps button. Press the home button. Observe hotseat is
visible. Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fX0gSp18Riw8mYYAw0wj8W

Bug: 367488218
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id65fd9add720125a340294311d470f2be50d43f8
2024-09-17 15:47:42 -07:00
Liran Binyamin 69f4974e24 Hide hotseat when bubble bar is expanded.
Added logic to stash the hotseat when on launcher home screen.

Bug: 280494203
Test: Manual:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fjfjUw296LRXUm9uYqXU4K
all tests in com.android.launcher3.taskbar
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I67b298831eaed9c549a2fae7dc5a0d9fae51f7c4
2024-09-16 15:50:28 -07:00
Ats Jenk aad71bc532 Set additional bubble translation during stash
Fixes bubbles stash translation not getting cleared up after stash
animation finishes.

Bubbles are clipped using an outline animator during the stash
animation. They need separate translation applied to keep them within
the bounds of the bubble bar that is also shrinking and moving.

Set the translation for the bubbles in the stash controller so we can
reset the translation after the animation has finished.

Bug: 365829293
Flag: com.android.wm.shell.enable_bubble_bar
Test: TransientBubbleStashControllerTest
Test: have bubbles in bubble bar, trigger a new auto expanding bubble,
  check translation for bubbles
Change-Id: Ic194afdb4d650fcd525355d8bae08dd651d1ea05
2024-09-11 16:29:22 -07:00
Ats Jenk 332828b340 Animate alpha for bubbles and background (3/n)
Use separate timings for bubble icons and bubble bar background when
stashing and unstashing.
Follows alpha timings applied to taskbar background and icons.

Bug: 345488489
Test: TransientBubbleStashControllerTest
Test: stash and unstash bubble bar in app by swiping up from taskbar
Test: expand and collapse bubble bar in app by swiping up on bar
Test: expand and collapse bubble bar on home screen by tapping on it
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I485f6346539cb6c8ea6dd4d15f25a6421021fec1
2024-09-09 15:23:51 -07:00
Ats Jenk 9ca662a7f7 Use a reveal animator for bubble icons (2/n)
Use a similar animation for bubble bar icons as we use for taskbar. When
stashing or unstashing, use a reveal animator to show the icons.
Previously we were scaling the icons to the desired size.
New reveal animator matches what is used for taskbar.

Bug: 345488489
Test: TransientBubbleStashControllerTest
Test: stash and unstash bubble bar in app by swiping up from taskbar
Test: expand and collapse bubble bar in app by swiping up on bar
Test: expand and collapse bubble bar on home screen by tapping on it

Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I24b0c64673d6becfa2ed68993bb95fe78e105670
2024-09-09 15:23:51 -07:00
Ats Jenk 9eadd68e01 Align bubble bar stash anim with taskbar (1/n)
Only scale bubble bar background during stash and unstash animation.
Follows the logic used for taskbar. We scale only the background and
clip the icons separately.

Bug: 345488489
Test: PersistentBubbleStashControllerTest
Test: TransientBubbleStashControllerTest
Test: BubbleBarViewAnimatorTest
Test: stash and unstash bubble bar in app by swiping up from taskbar
Test: expand and collapse bubble bar in app by swiping up on bar
Test: expand and collapse bubble bar on home screen by tapping on it

Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Ifc7922c444f2179fc49643424815e5e7dde519cc
2024-09-09 15:23:48 -07:00
Luca Zuccarini d75eacf30d 3/3 Move some Shell utils to the Shared package.
Bug: 322791067
Flag: EXEMPT move only
Test: NA
Change-Id: Iabc42e4c1d9c13667e9d91be5789cf295f3332e1
2024-09-02 09:23:34 +00:00
Ats Jenk ba6c9f06ed Merge "Scale bubble bar to the width of the handle" into main 2024-08-30 23:06:43 +00:00
Ats Jenk dff855e702 Merge "Update bubble bar stash and unstash animation" into main 2024-08-30 19:30:14 +00:00
Ats Jenk da9e36e4e7 Scale bubble bar to the width of the handle
When animating bubble bar from the stash handle, scale the width to the
handle.
Bubble bar is already almost the size of the handle, but a small scale
is still added.

Bug: 345488489
Flag: com.android.wm.shell.enable_bubble_bar
Test: atest TransientBubbleStashControllerTest
Test: slow animations down and unstash and stash bubble bar, observe
  that the width of the bubble bar scales down to the handle
Change-Id: I54dc228fa41d4d494bfb15e191d2ba563c0970c7
2024-08-30 10:17:29 -07:00
Ats Jenk 9ab2b8c785 Update bubble bar stash and unstash animation
Bubble bar should stash and unstash from the handle.
Update the animation to match what is used for the taskbar animation.
Fix the stash handle reveal animation to animate the stash bounds to
bubble bar bounds and back.
This gives the effect of the handle morphing into the bubble bar and
bubble bar morphing back into the handle.

Bug: 345680453
Flag: com.android.wm.shell.enable_bubble_bar
Test: atest TransientBubbleStashControllerTest
Test: have bubbles in bubble bar and be in app, swipe up for taskbar and
  observe the bubble bar handle transforming into the bubble bar
Test: with taskbar and bubbles expanded, check that bubble bar
  transforms into the handle
Change-Id: I8508e9207092774cbdb990e65f7f84e56a924d0c
2024-08-29 22:34:19 -07:00
Mady Mellor cc843823a6 Add some info about the overflow in bubble bar dump
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - add some bubbles to bubble bar, take a BR and look
               at the dump
Bug: 358304168
Change-Id: I91e50591df166e928d06ba9a29f69f923218de71
2024-08-29 14:20:38 -07:00
Liran Binyamin 9720472a8a Merge "Revert^2 "Synchronize bar expansion with WM Shell"" into main 2024-08-26 11:29:31 +00:00
Mady Mellor c15fe691e7 Merge changes I964d213d,I95085fd1 into main
* changes:
  Make an input consumer for bubble bar
  Include bubbles in the dragged items of taskbar UI controller
2024-08-20 21:34:54 +00:00
Liran Binyamin 873fbaaebf Merge "Check bubble count for initial state animation" into main 2024-08-20 14:08:14 +00:00
Mady Mellor 788a6ebb74 Make an input consumer for bubble bar
Instead of unstashing bubble bar in TaskbarUnstashInputConsumer
handle it in its own input consumer instead. This is a nicer
separation of concerns and simplifies the logic in both places.

Additionally, this fixes issues where swiping up the bubble bar
handle might initiate / be handled by gesture nav (or all apps) when
really any events originating on bubble UI should be managed by
bubbles instead.

Adds some mostly mock'd tests to check that the static method used
to indicate if bubbles should take the event or not works correctly.

Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - test swipe up on bubble bar handle in an app
             - test swipe up on bubble bar on home - it should
               open & all apps / launcher transition shouldn't happen
             - longpress to drag bubbles around on home and overview,
               try the collapsed bar & individual bubbles in the
               expanded bar
             - test dragging on the bubble bar after it's revealed
               in an app
Test: atest BubbleBarInputConsumerTest
Bug: 345488529
Change-Id: I964d213d71de15e4350cff5202dfb9343de1af14
2024-08-19 15:26:37 -07:00
Liran Binyamin 02fdb75687 Revert^2 "Synchronize bar expansion with WM Shell"
799802cb7e

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 339683389
Test: atest BubbleBarViewAnimatorTest
Change-Id: Icd853eb76b20ee5ca035bd20c9360f5b60ecc00d
2024-08-15 10:35:36 +00:00
Mady Mellor a7f2d83b61 If we're adding / removing a bubble, don't forget to add the overflow
One case I missed was a bubble being added/removed AND the overflow
showing... this isn't the nicest, but when the add/remove animation
is done, animate the overflow in.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 358304168
Test: manual - don't have the overflow showing, add a 6th bubble,
               observe that the overflow appears
Change-Id: I1a9cec3970f5535e935f3404fa6dbd6de2f69fa5
2024-08-14 16:23:07 -07:00
Liana Kazanova (xWF) 799802cb7e Revert "Synchronize bar expansion with WM Shell"
Revert submission 28703070-bubbles-defer-expand

Reason for revert: DroidMonitor. Potential culprit for b/359765550 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:28703070-bubbles-defer-expand

Change-Id: I5651cc8f740b1f0718abcfa8065e18c174657224
2024-08-14 16:58:12 +00:00
Liran Binyamin 229696a0e4 Check bubble count for initial state animation
With optional overflow, we need to check for actual bubble count
before animating the bubble bar to its initial state.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359403793
Test: manual
       - create first bubble on home
       - observe bubble bar animates correctly to initial state
       - add second bubble
       - observe bubble bar bounces correctly and does not slide
         in from the bottom of the screen
Change-Id: I53a34bc00b24e8a6504bcca0532054755554b9ac
2024-08-14 03:47:35 -04:00
Liran Binyamin 9b559c48a3 Synchronize bar expansion with WM Shell
When a bubble is added and requested to be expanded, notify WM Shell
to show the expanded view when expansion actually starts on the
launcher side.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/cPZuf3STUqX9uFZ4zneRO2

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 339683389
Test: atest BubbleBarViewAnimatorTest
Change-Id: I0ba27acf8bae560a10b754241f8f2d8e3281cef9
2024-08-11 04:36:14 -04:00
Liran Binyamin de9b1df642 Merge "Remove BubbleBarView.mIsAnimatingNewBubble" into main 2024-08-11 08:25:29 +00:00
Mykola Podolian d5af1e7cd5 Merge "Added taskbar in/out animation when the bubble bar is expanded/collapsed" into main 2024-08-09 21:36:51 +00:00
mpodolian 6ba789a98f Added taskbar in/out animation when the bubble bar is expanded/collapsed
Added taskbar icon animation when the bubble bar expansion changes.

If there is enough space to accommodate both bars with spacing in
between, the taskbar remains. If there is not enough space, the taskbar
is animated out and then animated in when the bubble bar is collapsed.

Bug: 346391377
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Set taskbar to persistent mode via 3-button navigation or
through the taskbar itself. Have enough bubbles to cover the taskbar
when the bubble bar is extended. Expand the bubble bar and observe the
taskbar icons animating out. Remove a few bubbles so there is enough
space to accommodate both bars. Expand the bubble bar and observe that
both bars are visible.

Change-Id: I0b03a010c1e49ab39a17934f6629d5496fd66978
2024-08-09 11:10:28 -07:00
Liran Binyamin 09c2ad248b Remove BubbleBarView.mIsAnimatingNewBubble
We now use BubbleBarViewAnimator directly to check if there's a new
bubble animation.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 339683389
Test: presubmit
Change-Id: I5f884095125e6226338aee14d9d08e46b87ff2ec
2024-08-08 07:49:04 -04:00
Liran Binyamin 46111b109e Support expanding the bar while animating
Update the BubbleBarAnimator to handle auto expanding bubbles as
well as expand signals that are received while animating the bubble
bar.

The expansion starts after the bar reaches its peak height. If the
hide animation starts before the expansion signal is received, we
ignore it.

Next step is to delay showing the expanded view until the bubble bar
starts expanding.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 353644484
Fixes: 356415377
Bug: 339683389
Test: atest BubbleBarViewAnimatorTest
Change-Id: I79a63f0b8728abc1ab3345f0116cbfcba2918643
2024-08-08 03:46:07 -04:00
Mady Mellor 8c629fd8b5 Support optional bubble overflow in bubble bar
This is similar to the animations that add / remove a bubble at the
same time -- the overflow is generally added when a bubble is removed.
The overflow is generally removed when a bubble is added (i.e. user
promotes a bubble out of the overflow).

There are a couple of additional cases:
- when bubbles are first added to the bar -- if there were saved
  bubbles in the overflow, the view should be added
- an app could cancel its bubbles / remove its shortcuts and not have
  any in the stack but could have some in the overflow & it could
  become empty without an addition.

Flag: com.android.wm.shell.enable_optional_bubble_overflow
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - add bubbles to the bubble bar for first time
             => observe there is no overflow
             - dismiss a bubble
             => observe the overflow is added, tap on it, tap on the
                bubble in it
             => observe that bubble is added & the overflow disappears
             - dismiss all the bubbles
             - add a bubble
             => observe the overflow is there & has the previously
                dismissed bubbles
             - cancel all the bubbles that are in the overflow via
               adb
             => observe the overflow is remvoed
Bug: 334175587
Change-Id: I2b6e855e65520b4b2b1fde7757d46f00a468b4a6
2024-08-05 12:25:33 -07:00
Mady Mellor 5e8c0d60cc Move bubble icon / content loading into its own controller class
I think this simplifies the BubbleBarController class and makes it
a bit easier to deal with the optional overflow (done in other CLs).

Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - add some bubble to bubble bar, check that the overflow
               is there & can be opened
Bug: 334175587
Change-Id: Ie17fa0279a981a019d5d50b9f71dc87f49d98dee
2024-08-02 10:30:00 -07:00
mpodolian 484ff0fe9c Integrated new BubbleStashControllers into the existing code.
Integrated the PersistentTaskbarStashController and the
TransientTaskbarStashController into the launcher code. Made changes to
the TaskbarInsetsController to set appropriate touchable zones. Updated
the TaskbarUIController to not start the overview transition on clicks
for the collapsed bubble bar.

Bug: 346391377
Fixes: 350065038
Fixes: 355664783
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: com.android.launcher3.taskbar package tests

persistent taskbar and transient taskbar manual testing:
- on launcher home screen expand bubble bar, switch between bubbles,
remove bubble via bubble menu, add bubble, remove bubble with the drug
gesture, add bubble, collapse bubble bar
- repeat previous test on launcher overview screen and inside any
application
- after last test drag expanded bubble view to the opposite side of the
screen

Change-Id: I50f2c510854c4895fdfc9bd453a261c2103286fd
2024-07-30 18:36:05 -07:00
Mykola Podolian 126be5629b Merge "Added BubbleStashController interface" into main 2024-07-23 21:37:31 +00:00
mpodolian 08e98a2c3e Added BubbleStashController interface
Added common BubbleStashController interface and implementation for the
PersistentTaskBarStashController. Added tests for the implementation.

Bug: 346391377
Flag: com.android.wm.shell.enable_bubble_bar
Test: PersistentTaskBarStashControllerTest
Change-Id: I353e5a2cfa2d39e83b0e94980938aee8a1002fd9
2024-07-23 19:32:08 +01:00
Ats Jenk 85d4b8bb72 Create a11y menu for a bubble in bubble bar
A11y that supports the following actions:
- collapse
- dismiss
- move bar to the left or right (depending on current location)

Bug: 347028716
Test: select bubble in expanded bubble bar, open action menu
Test: use action menu to:
  - collapse bubble bar
  - dismiss a bubble, ensure only selected bubble is dismissed
  - move bubble bar to other side
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I70d90877e045abadb1fca4665ce315476d33c713
2024-07-22 15:17:16 -07:00
Ats Jenk 7f3b6c030b Create accessibility menu for bubble bar
Bug: 344670180
Test: open accessibility action menu on bubble bar. use menu to
  - expand bubble bar
  - dismiss bubble bar
Test: when bubble bar is on the right, the action menu has an option to
  move bubble bar to the left only, use menu to move bar to the left
Test: when bubble bar is on the left, the action menu has an option to
  move bubble bar to the right only, use menu to move bar to the right
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id875a43927bc3410a83d1342b9456330c9521085
2024-07-19 13:59:35 -07:00
Mykola Podolian e80618db64 Merge "Prepare BubbleBarViewController to support persistent task bar." into main 2024-07-18 23:16:47 +00:00
Liran Binyamin a2aa555faf Merge "Update bubble notification dot drawing" into main 2024-07-18 18:42:01 +00:00