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
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
When swiping left, a11y focus should move to the bubble shown on left.
Same for swiping right. This should happen regardless of the side bubble
bar is placed on.
Bubble views get added to the container based on recency. The most
recent bubble is placed as child at index 0.
For example if we have bubbles (1)(2)(3)(+) and (1) is the most recent,
then the child index for (1) is 0. This is always the same, regardless
of bubble bar location.
Bubble bar location does affect how bubbles appear on screen. If the bar
is on the left, most recent bubble is shown on the right.
The on screen order for the above bubbles would be: (+)(3)(2)(1).
If the same bubble bar is on the right, bubble order would be:
(1)(2)(3)(+).
For a11y navigation we want to follow the order that bubbles are shown
on the screen. Default navigation order follows how the child views are
added to the parent container. For bubbles the child view order may not
match what is shown on screen. Due to this, we override the default
navigation order. And set up the previous and next elements to navigate
to based on bubble bar location and bubble order.
Bug: 344674605
Flag: com.android.wm.shell.enable_bubble_bar
Test: have bubble bar expanded on the right, swipe left and check that
bubble on the left is selected, swipe right and check that bubble on
the right is selected
Test: have bubble bar expanded on the left, swipe left and check that
bubble on the left is selected, swipe right and check that bubble on
the right is selected
Change-Id: Iae63ac13d5477883952b836f6872e4c7c7fb88c1
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
Removed an outline provider for the BubbleView, so framework shadows are
not drawn. Use BubbleBarBubbleIconsFactory to generate icon with the
shadow so it looks consistent with the taskbar and the hotseat bar.
Fixes: 345490679
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual, screenshot before fix:
https://screenshot.googleplex.com/86ZhQENANboZK87
screenshot after fix:
https://screenshot.googleplex.com/3hNboaSaS9tZ9DS
Change-Id: I9ae3624e652e4f609b29ae0f57a47d4a6d01e94b
The bubble badge now scales together with the expand and collapse
animation of the bubble bar. The badge for the selected bubble is
always kept at full scale.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 349826874
Test: manual
- create some bubbles in the bubble bar
- expand and collapse the bar
- observe badge icons scale accordingly
Change-Id: I04e9174f4a921e404cb3162337f594c16478b16c
The issue was caused by the alpha animation applied to the bubble bar.
Added code to check if the alpha applied to the bubble bar is less than
1 and instruct child bubble views not to provide a shadow outline in
such cases. While this is not a full fix, but rather an improvement,
b/345490679 should introduce a proper fix.
Bug: 345484712
Test: visual - go to any application and stash/unstash bubble bar
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Icb6bdb009f4d5998ec1638f97de89f7a4c9feccf
Add a talkback announcement that tells the user when bubble bar expands
or collapses. The announcement includes the bubble name.
Bug: 344670486
Flag: com.android.wm.shell.enable_bubble_bar
Test: expand bubble bar by tapping on it, hear the announcement
Test: collapse bubble bar by tapping on it, hear the announcement
Test: expand/collapse bubble bar from action menu, hear the announcement
Test: use action menu to move expanded bubble bar from one side to the
other, make sure there is no announcement
Change-Id: I3908bda3eb9e3eb201067fb2c465c3a883ce73d4
The animation is added and the linked bug is fixed.
Removing obsolete TODO.
Bug: 280605790
Change-Id: I54ab56f93794afb7f7c23de4df1a348d30cbbf42
Test: NA
Flag: DOCS_ONLY
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
The notification dot drawing state depends on changes in the bubble
bar, so the bubble bar now directly requests updates to the dot at
specific states.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 351904597
Fixes: 350782375
Test: atest BubbleViewTest
Test: manual basically just hammering on it trying to break it
1. Dot appears for new bubble in all states of the bar
2. Expand bubble bar
- Dot is removed for selected and shows for others
that have a dot
3. After removing bubble while expanded
- Dot is removed from newly selected bubble
4. Collapse bubble bar
- Dot is hidden for all bubbles
5. Dot removed after tapping on a bubble when expanded
Change-Id: I4a940d38a8c77bddaf058b7ef882bab06886bcf4
The bubble's outline was hardcoded with a fixed size. This caused a
shadow to be drawn using the hardcoded outline size, regardless of the
actual bubble view size. The BubbleView logic has been updated to use
the actual bubble size for the outline. The guarding flag has been
removed.
Bug: 340445019
Flag: com.android.wm.shell.enable_bubble_bar
Test: http://recall/-/gx8ASgewUeUS3QYohfrd1J/hqFtAZJnX0tCRONoFpSK3i
Change-Id: Iaa2c2d0bfeee2af9840acbcf11daaf8be2e0b7af
Don't update the dot scale if the bubble bar is not collapsing or
expanding.
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 351904597
Test: manual
- Create 2 bubbles in the bubble bar
- Select both bubbles to clear the dot
- Launch an app to stash the bar
- Send updates to both bubbles
- Observe dot appears during each animation
- Swipe up on the bubble bar
- Observe dot disappears for the selected bubble but remains
for the unselected bubble
Change-Id: I2cb6dd7ded261686ae73e497bd5d4841ebde35ef
Previously the translation x value for bubbles when the bar is
collapsed and on the right was 0 for the first bubble and some
fixed value for the rest of the bubbles. But if only 1 bubble
is visible when the bar is collapsed, as in the case when there
is only 1 bubble and the overflow, this ends up pushing the
overflow too far to the right.
This change updates the translation x value for bubbles when the
bar is collapsed and on the right, so that if only 1 bubble is
visible when collapsed, all bubbles have tx 0, otherwise if 2
bubbles are visible, the first has tx 0 and the rest have the same
tx value.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 350962159
Test: manual
- Add 1 bubble to the bubble bar
- Make sure bubble bar is on the right
- Expand and collapse the bar
- Observe the overflow tx value is correct during the animation
Change-Id: I8401d70fa6f374ace58d9cdbe3302e39e7aedc70
This change stores the bubble that was dismissed by drag temporarily
in BubbleBarView so that when we remove the bubble, we can avoid
updating it as part of the animation.
This is step 1 in this change. Next I'll look into removing the
bubble immediately after dismissing it from the menu, and lastly
update sysui to not send the removal event back to launcher.
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 349826879
Test: manual
- have bubbles in the bubble bar and expand it
- drag a bubble to dismiss it
- observe the bubble does not reappear in the bar during
the animation
Change-Id: I6628ce779db4aac8d82edd4ecf2a25dedf8feef9
The previous behavior relied on a BEHIND_STACK suppression flag to
determine whether the dot should be drawn or not. setBehindStack was
called as part of updating bubble layout properties in BubbleBarView,
which happens at each animation frame of the bubble bar collapsing
and expanding.
Instead of using the suppression flag, we now directly set the dot
scale based on the progress of the collapse and expand animation.
This change also sets the badge visibility directly from BubbleBarView
and cleans up the BEHIND_STACK suppression flag.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 349822532
Test: manual
- have some bubbles and expand bar
- trigger a new bubble X
- observe bubble added with notification dot
- tap on the selected bubble to collapse
- observe the notification dot animates for bubble X
- expand the bar
- observe notification dot animates for bubble X
- tap on bubble X
- observe notification dot animates out
- tap on a different bubble
- observe notification dot does not reappear
Change-Id: I6efe0dfa8b4f73064cee8b45556ff0928f6f7c08
This change creates a BubbleAnimator class that handles animating
both new bubbles in and removed bubbles out.
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/dMHGANplWjGC5HZT6MXyA4
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 345687290
Test: atest BubbleAnimatorTest
Test: see demo
Change-Id: Ie060495f4b1421d1c8af48a861cd3e12dd0adbe8
Added return statement if flag is set to false.
Bug: 335575529
Flag: com.android.wm.shell.animate_bubble_size_change
Test: BubbleBarViewAnimatorTest
Change-Id: I21aaee7b802ace87f68ba6ae84565f925010d673
Added animation for the updates of bubble bar icon sizes and padding
Fixes: 335575529
Flag: com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: BubbleBarViewAnimatorTest
Change-Id: I07d66b3a9d565f4fa6040c3c4bf4866e4d81a3a6
Added outline to the bubble bar background. Updated pointer
appearing/disappearing animation - now pointer moves into the bubble
bar background.
Demo: http://recall/-/gx8ASgewUeUS3QYohfrd1J/e1wZMrFZTILq73ik8wwrwx
Fixes: 345489039
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: Manual. Expand and collapse bubble bar with the light and the
dark theme.
Change-Id: I095fdc12337955aa21ee0eb622a924ad424ef186
When a new bubble is added when the bubble bar is expanded,
we now scale in the new bubble.
This change only handles the case where we're not at the limit.
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hW4pwqpAttscedRMxnu5BN
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 345795791
Test: manual
- Expand bubble bar
- Push a new bubble and verify it scales in
Change-Id: Iafae1d0c8feb8e5a8853d54e7299db261df4ebf4
When the bubble bar collapses, explicitly set the alpha to 1
for bubbles that should not be hidden.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 345283193
Test: manual
- create 3 bubbles in the bar
- tap to expand
- select the last bubble
- tap it again to collapse
- observe it is visible
Change-Id: I1aed310b66433b88b08ccaf760fc8e82923b1b64
Set content description on the bubble bar when it is collapsed. Only
allow focus on the bar itself. In collapsed mode, bubbles in the bar
can't be focused.
Content description for the bar matches what we have in floating mode.
We include the text for the first bubble and then how many bubbles are
there more.
Set content description on bubbles in bubble bar. When bubble bar is
expanded, only the bubbles are focusable.
Bubble content description matches the floating bubbles content
description. Includes the notification title and app name.
Bug: 344670947
Flag: com.android.wm.shell.enable_bubble_bar
Test: enable talkback, focus on bubble bar when it is collapsed, check
that only bubble bar receives focus
Test: enable talkback and expand bubble bar, check that only the bubbles
receive focus
Change-Id: Id931f0360b9ebadd01dd16b05b75546fcc4df803