When the bubble bar is stashed and an icon is dragged from the search
grid towards it, the bubble bar should be un-stashed. Conversely, if the
icon is dragged to the opposite location of the stashed bubble bar, the
handle should teleport out, and the collapsed bubble bar should
teleport in.
This change implements logic that addresses this behavior.
Bug: 399678274
Test: Manual. Drag and drop application icons from the search grid to
the bubble bar drop areas.
Flag: com.android.wm.shell.enable_create_any_bubble
Change-Id: Ief9ef3e5c24f8199b2812fd0adf63ae3f6cf8f32
- Had to bump elevation of drop target so need to bumpe elevation
of dragged views
Flag: com.android.wm.shell.enable_bubble_anything
Test: manual / visual - drag a bubble or drag expanded view and observe
the drop targets
Bug: 403276099
Change-Id: I15a1deb055c590b1f46261fcc307120fcb685c08
Added logic to show and hide the bubble bar drop target on Shell
drag-and-drop events.
Test: Manual. Drag a shortcut or an application icon from the taskbar to
the bubble bar drop zone. Observe that if the bubble bar is showing
bubbles, the background stroke color becomes non-transparent; if there
are no bubbles, the drop zone appears. Drag the app icon to the opposite
side and observe that the bubble bar location is animated or the drop
zone appears on the dragged side. Drop the application icon or shortcut
on any side and observe that a new bubble is added and immediately
expanded. Additionally, the bubble bar remains at the drop location.
expanded.
Bug: 388894910
Flag: com.android.wm.shell.enable_create_any_bubble
Change-Id: I581dddf2c76ac982a5c78bc32d94b79bf63fd2b9
Prior to this change, the bubble bar controller determined which bubble
to select. With this change, the selection is now determined by the
update received from the shell.
Test: Manual. Tested the add overflow and remove bubble flows, add
bubble and remove overflow flows, and add bubble and remove bubble flows
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359952121
Change-Id: I8ec01d6976b1e1cd0129071fd1765041eeb10b83
The AddingAndRemoving animation now uses a newly selected bubble index
and added bubble index arguments.
Test: BubbleAnimatorTest
Test: Manual. Enable optional overflow bubble.
Create a bubble bar with overflow containing a single
bubble. Open the overflow menu and click an overflow bubble icon.
Observe that a new bubble is added and immediately expands while the
overflow bubble is collapsing. Observe that bubbles animation.
Test: Manual. Have few bubbles in the bubble bar. Collapse any bubble.
Observe bubbles are animated correctly.
Video: (slowed down 10 times)
http://recall/-/gx8ASgewUeUS3QYohfrd1J/emOREYETIeV5ktcNZLETYa
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359952121
Change-Id: If2366ec12cb196757ba6439c5c9306959d4191a9
The AddingAndRemoving animation now uses a newly selected bubble index
and added bubble index arguments.
Test: BubbleAnimatorTest
Test: Manual. Enable optional overflow bubble.
Create a bubble bar with overflow containing a single
bubble. Open the overflow menu and click an overflow bubble icon.
Observe that a new bubble is added and immediately expands while the
overflow bubble is collapsing. Observe that the arrow animates to the
new bubble's position.
Test: Manual. Have few bubbles in the bubble bar. Collapse any bubble.
Observe arrow animated correctly to the newly selected bubble position.
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 359952121
Change-Id: I8321e2f532189e7599b029083199e034e38080e3
The new bubble animation now uses a "selected location" argument to
position the pointing arrow.
Test: BubbleAnimatorTest
Test: Manual. Create a bubble bar with overflow. Open the overflow menu
and click an overflow bubble icon. Observe that a new bubble is added
and immediately expands. Observe that the arrow animates to the new
bubble's position.
Test: Manual. Create a bubble bar with overflow. Open any bubble.
Trigger a new bubble notification. Observe that a new bubble is added
but does not expand, so the arrow remains at the currently open bubble.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359952121
Change-Id: I47f5b6c2aad775f2dd3e70f8c544a3711f192342
The scenario where "A bubble was added from the overflow (and now it's
empty/not showing)" lacked a check to verify if bubbles are currently
present. Its absence caused calls to removeOverflowAndAddBubble() of
BubbleBarViewController for any first bubble matching the previously
closed last bubble, not just those added from the overflow.
This CL addresses the issue by adding the missing check.
Test: Manual. Set enable_optional_bubble_overflow flag to true. Create
one bubble, dismiss it, create the same bubble again. Create another
bubble, dismiss it, open overflow and click on dismissed bubble. Observe
the overflow icon disappears.
Video: http://recall/-/gx8ASgewUeUS3QYohfrd1J/eYeyo6cNeUBw4mU6rrkXtN
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 373940143
Change-Id: I4085ce4e922e2b5d65466a00649dda086c14185f
Shift the taskbar to fulfill the 12dp distance if the distance between
the taskbar and the bubble bar is below this threshold.
Fixes: 376929094
Test: TaskbarViewControllerTest
Test: Manual. Test that the transient taskbar shifts properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Moved bubbles side to side, confirming the taskbar
follows. The return-to-home-screen animation to the hotseat plays as
expected from either side.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/bJZ8PclmltZu7IupvBFrLn
Test: Manual. Test that the transient taskbar stashes properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Go to any application. Stash and un-stash the taskbar.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/hCGRhUgIqvcehOrTQ2Ulvj
Test: Manual. Test that the transient taskbar pin/unpin properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Pin/unpin the taskbar.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/f3fy5JKVZAk4wLCpVra4DK
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id4bd713da93053f90d9c2be8503dc93531a03b29
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
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
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
While dragged, bubble bar needs elevation to show up above dismiss view
and dismiss view scrim.
Previously, bubble bar and dismiss view were under the same parent, drag
layer. This allowed us to position bubble bar above dismiss view by
adding elevation to it.
After introducing the bubble bar container, bubble bar is not shown on
top of dismiss view when its elevation changes. Because they are no
longer under the same parent.
Move drag elevation from bubble bar to bubble bar container. The
container and dismiss view are under the same parent.
Bug: 376140375
Test: manual, drag bubble bar or bubble, check they are above dismiss
view and the scrim
Test: receive a new message, check that flyout is shown
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Ie0fb677929bb2413c10b934fc8b362cde7b8cecd
When caculating number of icons to show in taskbar, account for bubble
bar size (the max size when in collapsed state) when bubble bar has
bubbles (even if the bubble bar is stashed). Note that the bubble bar
visibility may change, so max number of icons in the taskbar may change
during the taskbar view lieftime. TaskbarViewController already had a
method called when the bubble bar visibility changed - adapt it to also
reclaculate max number of icons to show in the taskbar, and update the
list of icons shown in the UI if necessary (if the change in the bubble
bar visibility would also cause a change in number of icons shown in the
taskbar).
Bug: 368119679
Test: Launch enough apps for taskbar to enter overflow, open an app that
supports bubbles, and trigger 2 or more bubbles so bubble bar shows up.
Verify that the buble bar does not overlap with taskbar bounds, both
in transient and persistent taskbar. Remove bubbles, and verify the
taskbar bounds expand, allowing more icons to be shown.
Flag: com.android.launcher3.taskbar_overflow
Change-Id: Ifed4e5e5dd64df5256090f5ba55f24203c09e839
Shell can use the location update trigger information for logging
purposes.
Bug: 349845968
Test: manual
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I5af4375f88ea438b1aed9b3b2bd02d0c33fff53f
When a bubble is added or removed while we're collapsed, animate the
badge scale to make sure that only the badge for the top bubble is
visible.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 360652359
Test: manual
- add bubble while collapsed
- observe that badge only shows for top bubble
- remove bubble while collapsed
- observe that badge only shows for top bubble
Change-Id: I91472bb2ddeeeebd33ca64e20e065b2336c08589
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
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
Whenever the location of the bubble bar is changed, the navigation bar
moves with a "teleport" animation to the opposite side.
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: manual. Drag bubble bar from one location to another observe that
navigation is animated to the opposite side.
Video: http://recall/-/gx8ASgewUeUS3QYohfrd1J/g3zFtGYWFpCsBTkoCAhBUH
Change-Id: I6e32bb7ff7be56a0b616fec8485cc6a97d7ac872
Don't set the alpha to 1 in the drag reset method unless the bar
is actually expanded.
When theme changes, everything gets recreated... so the location of
the bubble bar gets set which triggers drag reset which would make
the bar visible when it shouldn't be.
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - have bubbles in app (stashed), change theme, observe
that bubbles are not visible
- test dragging bubbles from left to right via expanded
view, individual bubble, and collapsed stack
Bug: 358304168 (not exact bug but noted in the video of comment#13)
Change-Id: I291cdb206532efe386684e36a78b9d66018f3cb1
The previous behavior positioned the second bubble correctly but all
other bubbles behind the second bubble.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 366254467
Test: manual
- create multiple bubbles in the bubble bar
- expand and collapse the bubble bar and observe bubbles
move correctly from right to left when expanding and from
left to right when collapsing
Change-Id: I1db6daf629826af8d079a27d582e0c7e89fe2289
Implemented nav bar placement update to be located opposite to the
bubble bar.
When bubble bar is moved to the other side of the bar, 3 button nav will
swap sides (without animation).
If taskbar has to be repositioned it does that with the animation.
Test: TaskbarViewControllerTest
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id031706183c60cbd9c67537b01530acb43bae614
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
The runnable to add the overflow was only being run when the view
was animated (i.e. while expanded); not when it was collapsed.
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 358304168
Test: manual - add more than 5 bubbles while collapsed
Change-Id: Ibdea61eaf8ecb1d2e3f9ea4fced679b2826d3f9b
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
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
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
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
We currently only update the width of the bubble bar but the
height is only updated when the icon size changes, so it's often
inaccurate. This affects screenshot testing where the bubble bar
isn't fully visible in the screenshot.
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 355454021
Test: manual
- used the bar normally to make sure it's not broken
Change-Id: If780308e10e7478a3651654e5fc2b3f9c4e36c14
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
After dragging the bubble bar to dismiss, don't reset its alpha
value.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359804931
Test: manual
- Create a bubble in the bubble bar
- Drag bubble bar to dismiss
- Create another bubble
- Observe the new bubble does not flicker
Change-Id: I8d56f71d38ec33acda8efade50735b59254d77d4
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
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