Commit Graph

146 Commits

Author SHA1 Message Date
mpodolian 5391e14c3e Added an onClick listener to the bubble bar.
Previously, clicks were not handled because no listener was set on the
bubble bar.

Fixes: 383622825
Test: Manual. Ensure bubbles are on the home screen and set the
navigation mode to 3-button navigation. Click on the collapsed bubble
bar and observe the bar expanding.
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I99e1c20e40a9dd9da97b68817734c8ca1f656baa
2024-12-16 15:16:15 -08:00
Liran Binyamin f8b5dec6dc Merge "Fix cropped bubble flyout when animating in app" into main 2024-12-06 01:19:15 +00:00
Liran Binyamin 789a8c7f43 Merge "Don't crop bubble flyout in overview" into main 2024-12-05 22:22:36 +00:00
Liran Binyamin f2161dd8c3 Fix cropped bubble flyout when animating in app
When animating the bubble bar in an app with a stashed handle,
the flyout might not be displayed entirely.

Fix the calculation of the amount of space needed to fully display
the bubble bar and flyout views.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 382513856
Test: manual
       - remove all bubbles
       - launch app
       - send a bubble with a 2-line message
       - observe flyout is fully visible
Change-Id: I7953cb7f619f2c00b04bb4cb08c57a8195ff79fe
2024-12-05 14:35:09 -05:00
Liran Binyamin 77827d3167 Fix bubble bar flicker in initial animation
When the first bubble animates in we make the bubble bar visible
before translating it below the screen to prepare for the spring
animation. This change defers updating the visibility letting the
animator notify when it's safe to update visibility.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 382296842
Test: atest BubbleBarViewAnimatorTest
Test: manual
       - dismiss bubble bar
       - send new bubble
       - observe bubble bar does not flicker
Change-Id: Ib611771dd9f315ab57ef00f8f6cb982b8b88ea73
2024-12-04 15:05:22 -05:00
Liran Binyamin 0de5987efb Don't crop bubble flyout in overview
When switching to overview we set the taskbar window size as part
of the taskbar animation. If a bubble is animating the window size
becomes too small and the bubble flyout gets cropped. This change
avoids updating the window size in the middle of a bubble animation.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 377809168
Test: manual
       - create a bubble and wait for the flyout to show
       - switch to overview
       - observe the flyout is not cropped
Change-Id: Ic0a3f2c0fc534162ae5583e744a7bc400c3d921b
2024-12-04 12:36:56 -05:00
Liran Binyamin 495fe1d255 Merge "Animate the bubble bar on dismiss" into main 2024-12-02 14:28:30 +00:00
Liran Binyamin 7e387fa505 Animate the bubble bar on dismiss
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
2024-11-27 16:23:26 -05:00
Mykola Podolian 400fc4ad98 Merge changes I239f9357,I57a32ac5 into main
* changes:
  Update setting taskbar window height
  Set bubble bar aligned to QSB
2024-11-27 20:44:53 +00:00
mpodolian 3111daf2f1 Update setting taskbar window height
Updated the logic to set the taskbar window height to accommodate the
bubble bar with its maximum flyout height before the bubble bar
animation begins. The height is reverted to the default value once the
animation is completed.

Fixes: 378400160
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Set 3-button navigation mode and have the QSB placed
above the hotseat. Send a notification that will display a bubble, and
observe the bubble bar animation and final placement aligned with the
QSB.
Next, set gesture navigation mode and repeat the flow above. Observe
that the bubble bar is aligned with the hotseat icons.
Felix video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/gYMVt0sH4si0KOpaBxIPem
Tangor video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fz95MbjcjW3awStnuOl8BJ

Change-Id: I239f935743c3936fed44822c3c62652073ffefe2
2024-11-27 10:19:24 -08:00
mpodolian 28907bcbd6 Set bubble bar aligned to QSB
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
2024-11-27 10:15:08 -08:00
Liran Binyamin 16a604fe0c Show the bubble bar edu view
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
2024-11-26 10:23:45 -05:00
Liran Binyamin d091b42778 Merge "Interrupt bubble animation when IME is visible" into main 2024-11-20 18:45:24 +00:00
Ats Jenk 2e66e32aba Merge "Apply drag elevation to bubble bar container" into main 2024-11-20 16:53:40 +00:00
Liran Binyamin 05eaeb29aa Interrupt bubble animation when IME is visible
When the IME becomes visible, interrupt the bubble animation if it's
running. This ensures that the flyout doesn't show over the IME and
is more consistent with the behavior of bubble notification when the
IME is visible.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378404363
Test: atest BubbleBarViewAnimatorTest
Test: manual
       - launch app
       - send bubble
       - while bubble is animating launch IME
       - observe flyout not visible over IME
Change-Id: I28390982bb41d8cc9b494395418728ff5fb373b6
2024-11-20 10:36:22 -05:00
Ats Jenk 9830496276 Apply drag elevation to bubble bar container
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
2024-11-19 16:00:00 -08:00
Liran Binyamin 232db796aa Fix bubble animation when swiping home
When swiping home during the bubble animation, and if the show edu
view state field is on, we try to show the bubble bar as part of
preparing to show the edu view. This updates the stash state and
prevents the animation from getting interrupted.

The expected behavior around showing the edu view is to store the
request when it is received and show the view later after the user
taps on the bubble bar or the flyout to expand it. We shouldn't
attempt to show the bubble bar at that point.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378967270
Bug: 374842575
Test: manual
    - force show the edu: adb shell settings put secure force_show_bubbles_user_education 1
    - launch an app and send a bubble
    - while the bubble animates, swipe to go home
    - observe the flyout is removed correctly, and we don't end up in stashed state
Change-Id: I478b06ac5f6f9d398cd143bcc0b3f796d9ad8a49
2024-11-18 17:05:12 -05:00
Treehugger Robot a8440279bf Merge "Account for bubble bar bounds for taskbar overflow" into main 2024-11-13 19:23:22 +00:00
Toni Barzic 28ebd1bacd Account for bubble bar bounds for taskbar overflow
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
2024-11-12 18:40:40 +00:00
Liran Binyamin 4785a5e24e Merge "Animate the bubble notification in overview" into main 2024-11-11 23:08:03 +00:00
Liran Binyamin 8f9c2cc020 Animate the bubble notification in overview
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 378095516
Test: manual
       - swipe to overview
       - send bubble notification
       - observe bubble animation
Change-Id: I9e52f1f7c7ddcc19b075af662d79ee9327b89fdb
2024-11-08 14:26:31 -05:00
Ats Jenk 5140e8ca7e Send bubble bar location update source to shell
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
2024-11-07 09:24:32 -08:00
Liran Binyamin 65edaf53af Merge "Hide bubble dot after flyout init" into main 2024-10-31 22:46:56 +00:00
Mykola Podolian db427334f2 Merge "Preserve bubble bar state." into main 2024-10-31 20:57:36 +00:00
Liran Binyamin 0e8093ae92 Hide bubble dot after flyout init
After the flyout initializes to its collapsed state, hide the
notification dot so that the flyout and dot will seem visually as
one.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 376276297
Test: atest BubbleBarFlyoutControllerTest
Change-Id: Ie581ddcd56a26844526f80b2169639c1a7d87500
2024-10-31 15:56:19 -04:00
mpodolian 647266f298 Preserve bubble bar state.
Added logic to save and then restore existing bubbles in the
TaskbarSharedState object.

Bug: 375482371
Test: Manual. Switch between pinned and unpinned taskbar. Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/d8hVHxksAokx85J8P7etoC
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I34f580f1c652859f427385edc0ccadd447e1400f
2024-10-31 11:50:46 -07:00
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