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
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
Stop sending entire bubble bar bounds to shell.
Keeping the bounds in sync was error prone as bubble bar can expand and
collapse. Bubbles can be added/removed.
In each of these cases we had to make sure that shell gets updated.
Shell only needed the full bounds for collapse/expand animation. But
after updating the animation, shell only needs the top coordinate of the
bubble bar.
Bug: 330585402
Flag: com.android.wm.shell.enable_bubble_bar
Test: bubble bar drag
- drag bar from right to left
- expand the bar
- check that expanded view scales in from left edge
- collapse and drag bar back, check the animation
Test: selected bubble drag
- drag expanded bubble from right to left
- check that expanded view scales in from the left edge
- drag the bubble back to right, check animation
Test: other bubble drag
- drag a unselected bubble from right to left
- check that the selected bubble expands in from left edge
- drag the bubble back to right, check animation again
Test: drag bubble from right to left, observe that expanded view
expand animation originates from the bubble bar
Change-Id: Ib66cef8d3c04bce54a69e30e99edd408a31f018f
Translation for bubble after drag release was based on bubble bar translation. TranslationX was adjusted for bubble position. And translationY was reused from bubble bar.
Before ag/27284635 bubble bar translationY just copied over the input translation value. But the cl introduced a fixed translationY applied to bubble bar.
This was getting applied to the bubble as well. And resulted in bubble being out of its target position when releasing drag.
Bug: 330585402
Test: drag a bubble from bubble bar and release it, observe it animates
to its correct position in the bar
Change-Id: I48f2a84b60a9cc6047e9841c254b4035212f3c0e
This change handles touches on the bubble bar while the bubble bar is animating.
We now update the taskbar touch region during the animation to make the bubble bar touchable.
When the bubble bar is touched during the animation, we now cancel the animation and allow dragging or clicking to expand.
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/gtGS6FCrygN5RKueFtPs5E
BubbleBarTest 100x run: https://android-build.corp.google.com/abtd/run/L42600030003675041
Note that in the abtd run above there's a flake but that's for a different test which I'll look into separately.
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605790
Bug: 280605846
Bug: 339066271
Fixes: 339244038
Test: See demo
Test: atest BubbleBarViewAnimatorTest
Change-Id: Icb8f4fa46ae4bb8c94ca931193d4a3cc49c5b718
Revert logic to set translation on each BubbleView and background.
Background translation was set with bounds offset and BubbleView was
using setTranslationX(). This made it hard to synchronise background and
child view translations. And led to flickers.
Applying translation on the BubbleBarView itself, but applying the
reverse of the translation to the dragged BubbleView. This ensures that
the dragged bubble position is not affected by the parent translation.
Introducing a new property for BubbleView that is used to apply
translation during drag. It takes into account the offset of the
BubbleBarView.
Bug: 330585402
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: drag bubble to other side and release before the bubble bar
animation finishes, observe no flickers
Test: drag expanded view to other side and release before the bar
animation finishes, observe no flickers
Change-Id: I1712ed6ac26831f10466dbaf0378f8aabb29629d
Adds support to pin bubble bar to other side of the screen by dragging
from one bubble. The entire bubble bar will move to the other side.
Implements the BaseBubbleBarPinController to handle dragging an
individual BubbleView.
Updates how translation and alpha get applied during BubbleBarView
location animation when a bubble is being dragged.
Dragged bubble is part of the BubbleBarView and when it is being
dragged, and we animate the bubble bar to the other side, we need to
ensure that the animation does not affect the dragged bubble.
Updating the translation and alpha for the BubbleBarView ViewGroup will
affect the dragged bubble as well. Updating how translation and alpha
gets applied to BubbleBarView so that it gets applied to individual
child views and then we can skip applying it to the dragged view.
Bug: 330585402
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: drag bubble from expanded bubble bar to left and right
Change-Id: I1fe2ba9fd466ff97d3b3af763bdcce30c3f98606
Create a new API to animate bubble bar position.
Animating it will not update its laid out location.
To update bubble bar laid out location, BubbleBarUpdate can be used.
Applying a location change from BubbleBarUpdate no longer animates the
change.
Bug: 330585402
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: long press bubble bar and drag it to left and right
Change-Id: I2572da4c063fc8e07cf07c4303778d343baa4ec4
This change updates that animation that plays when a new bubble notification is received. We now animate the entire bubble bar rather than the individual bubble.
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/dwbsZJZlqLwJ2IG7RfJZ7c
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I2dc58ad61b880d76c9eefa462c3aee4e8bbb3584
Made icons elevation animates to flat state while bubble bar is being
expanded and animate to full elevation while bubble bar is being
collapsed.
Test: Visual
Fixes: 295027436
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: I8286cd79904367654e319d6a84a307bd64c28d93
We should first decide how we would like to animate dismissal of the
selected bubble, and than implement arrow animation. The issue exists
because background is shrinked without an animation.
Test: Visual
Fixes: 293350516
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: Ia0cf04671bf9e93c98c45c99a21865055462e6df
Updated bubble bar view pointer to have rounded tip.
Test: BubbleBarViewAnimatorTest
Fixes: 333546362
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: I7875426b06a330bc355a833c51849335f831317e
Make the animating bubble touchable and expand the bubble bar when tapping on it.
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/c4wBVtrT5YIgxL5kVuuoDU
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I09281c2ebc9921750ada42dfc27e95d1ad0bd83b
Made bubble bar icon size adjustable and listen to the task bar
icon size changes. Additionally fixes an issue where the pointer arrow
could be misplaced.
Test: BubbleBarViewAnimatorTest.kt
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 295027436
Fixes: 334781761
Change-Id: Ie4ceee84cc00baa0186a3d5b431080c8495c7285
The stash handle now animates out before the new bubble animates in, and animates back in after the new bubble is hidden.
There's still some additional polish needed :)
Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/z30Ob1rcDUkNEphLAQsgV
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I03449286b01ec96de9834e24a707652ddbe49fb0