Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3845228c authored by Ats Jenk's avatar Ats Jenk
Browse files

Check that there is an existing expanded view to switch from

When switching between bubbles, we use the switch animation.
Switch animation expects there to be 2 expanded views: from and to.
If one of these is null, the animation is skipped.

In case of removing a bubble, we do have the previous bubble, but the
expanded view is removed. Since the bubble is still there, we still try
to perform the switch animation. Which fails.
When the switch animation fails, we do not remove the previous bubble
views for the container and leave it on screen. The task view itself is
removed and this leaves only the handle in the container. Which causes a
shadow to remain on screen.

Ensure that there is an expanded view to switch from before attempting
the switch animation. If there is not, fall back to the expand
animation. This also ensures that the previous bubble container is
immediately removed.

Bug: 384059425
Bug: 383613997
Test: have multiple bubbles, dismiss the expanded bubble by:
  - dragging to dismiss target
  - dismiss it from the app handle menu
  - set it to not bubble from the app handle menu
  check that in all instances the bubble is removed and there is no
  shadow on screen, and that a new bubble is opened
Test: atest WMShellMultivalentTestsOnDevice:com.android.wm.shell.bubbles.bar.BubbleBarLayerViewTest
Test: atest WMShellRobolectricTests:com.android.wm.shell.bubbles.bar.BubbleBarLayerViewTest
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I649ed31df9e5ab5796bf80e6fff1b8aab7e98299
parent 54b6d1a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment