The expanded view was misplaced due to a race condition. This occurred
because the BubbleBarController.onBubbleBarBoundsChanged() method was
invoked while
LauncherTaskbarUIController.onTaskbarInAppDisplayProgressUpdate() was in
progress (e.g. inAppDisplayOverrideProgress value was slightly higher
than 0). The latter method is also used to shift the three navigation
buttons for IME open/collapse events.
This concurrent execution led to an incorrect bubbleBarTranslationY
value being used in the BubbleBarView.getTopToScreenBottom() method,
ultimately causing the misplacement of the expanded view.
Fixes: 416158567
Flag: EXEMPT bugfix
Test: Manual.
- Long Press Chrome icon select "bubble" adds
- Press search bar inside Chrome app bubble to show IME
- Hide IME
- Press Chrome bubble
- Press search bar inside Chrome app bubble to show IME
- Hide IME
Change-Id: I44431f0eb47c3e9e0bea0274624e5b1db0aa15c9
We previously sent the top coordinate of the bubble bar to shell.
However when the screen height changes, launcher takes a bit longer
to update than shell. So instead of calculating the top coordinate
on the launcher side, we now send the amount of space between the
bubble bar and the bottom of the screen to shell, where we can offset
that as needed.
Bug: 392893178
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual
- send some bubbles
- launch app
- expand
- swipe to home
- fold and unfold
Change-Id: I57b96db49dab1e2304fde8dc55a99eaaf85e40f8
When we restore bubbles after taskbar is recreated, we should not modify
the bubble bar state as part of restoring the bubble views. Bubble bar
state is restored separately.
Create new helper method to restore bubbles without affecting bubble bar
state.
Bug: 357115534
Test: have bubble bar expanded on top of an app, rotate device multiple
times back and forth, check that bubble bar remains expanded
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Ifc9c391a1a367535daa3b83283fe145824294bcc
Bubbles that are restored with initial update should not be animated in.
If we restore the bubble bar after rotation, we need to show it
immediately. Attempting to animate the bubbles from initial update
causes the UI to flicker.
Bug: 357115534
Test: on home screen, have bubble bar expanded, rotate device, check
bubble bar bubbles do not flicker after rotation
Test: have no bubbles in bubble bar, trigger a bubble, check it is
animated
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I3da2bc22588c0f5d2dd9c7a3adfcd2c19c339809
Initial state for bubble bar does not need to be animated.
Especially if it is sent after rotation. In that case we do not want it
to animate.
When launcher is rotated, taskbar is recreated. After getting recreated,
we receive the initial state from WMShell for the bubbles again. Part of
the initial state is whether bubble bar is expanded or not.
Bug: 357115534
Flag: com.android.wm.shell.enable_bubble_bar
Test: rotate device
Change-Id: I859b73597c8f286069f384dcdea0e3a5296e0073
Rename methods in BubbleBarViewController and BubbleBarView that set the
expanded state.
These will update the state using an animation.
Update the name to highlight this.
Enables us to create methods to set the state without animation.
Bug: 357115534
Test: refactor, presubmit
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I9d2c46ab1640ab0b19f54103ab8cdb37a5d19dbb
Added logic to enable BubbleBarView to notify BubbleBarViewController
of expanded state change. Also updated all the test that uses
BubbleBarView to pass empty Controller.
Fixes: 411304392
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Go to any app. Swipe up to show the taskbar. Trigger any
bubble. Observe taskbar is stashed on bubble bar expanded.
Change-Id: I88ad167eb0ed444629716df3672bbb06ca8adcc4
TaskbarActivityContext should store displayId and return a cached value to avoid unnessary binder calls.
Flag: com.android.window.flags.enable_taskbar_connected_displays
Bug: 406019031
Test: m
Change-Id: I808352e7098ee731abc7362b2f8f1b7a675457f9
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
When a bubble is dragged to full screen, pass the x and y coordinates
of where the bubble was released to wm shell. The coordinates are used
as a starting point for expanding the full screen task.
Flag: com.android.wm.shell.enable_bubble_to_fullscreen
Bug: 388858013
Test: treehugger
Change-Id: I28bb10bdfb00786e43b350239cfdeb3df20b4a6f
Bubble bar drop targets have been added to the TaskbarDragController
used in the TaskbarOverlayContext. This enables dragging taskbar icons
to the bubble bar drop zone from the search view on the overview screen.
Bug: 399678274
Flag: com.android.wm.shell.enable_create_any_bubble
Test: Manual. Go to the overview screen. Click the search icon. Drag any
application icon from the grid to the bubble bar drop zone. Drop the
application icon.
Change-Id: I33eb13785d8837fefc717a95a6566d3091ec855b
Added logic to check the bubble bar stash state and perform appropriate
animations based on that state.
Bug: 399678274
Test: Manual: Have bubbles in the bubble bar. Go to an application.
Swipe up the taskbar handle so the taskbar is shown. Click the search
icon in the taskbar. Start a drag on any icon in the grid. The bubble
bar stashes immediately on drag start. When the icon is dragged over the
bubble bar drop zone, the bubble bar unstashes and is shown at the
dragged location.
Flag: com.android.wm.shell.enable_create_any_bubble
Change-Id: I9663a03a7daacdfaba071d5e35d5b7404cefed4e
The gesture handle still persists in conjunction with the three buttons. In addition to being forced into three button mode, the taskbar on external displays needs to never enter transient mode. More info and before/after images on bug.
Flag: com.android.window.flags.enable_taskbar_connected_displays
Bug: 399718805
Test: Manual
Change-Id: Iff5c297c8ac4823fa24e7a8e4becd0447224cac0
This change wires bubble bar dragging as well as bubble dragging to
full screen behind a flag. Note that when the bubble is dragged to
full screen we remove the bubble from the bubble bar and notify
sysui but on the sysui side the bubble doesn't yet get converted.
Flag: com.android.wm.shell.enable_bubble_to_fullscreen
Bug: 388858013
Test: manual
- with flag off
- verify existing dragging works
- with flag on
- verify bubble bar can be dragged across
- verify bubble is removed when bubble dragged to full screen zone
Change-Id: I9e4d8ee3d2ba9dffff3dd4ba91dfce1a5c723d68
This change leverages a bubble bar location parameter when an app icon
is dropped and displays the shell expanded view drop target when an icon
is dragged over the bubble bar drop zone.
Fixes: 397459664
Flag: com.android.wm.shell.enable_create_any_bubble
Test: Manual.
Drag a taskbar app icon to the same side as the bubble bar. Confirm that
the expanded view from shell is displayed.
Continue dragging to the opposite side of the bubble bar location drop
zone. Confirm that the expanded view drop target is displayed on the
opposite side.
Release the dragged icon in the drop zone. Confirm that the bubble bar
expands at the new location.
Change-Id: I956d66b81810abce074b10e012cf5c873003d84c
Added logic to track whether the drop target handled the app icon drop,
in order to prevent the fly-back animation in those cases.
Bug: 397459664
Flag: com.android.wm.shell.enable_create_any_bubble
Test: Manual. Drop a taskbar icon onto the bubble bar. Observe that no
fly-back animation is performed for the dropped icon.
Change-Id: If439d7280fe9f713c181531ac899ac8ad37ed481
A drop target for the BubbleBarLocation has been added. This
implementation enables the Launcher process to handle application
drag-and-drop actions onto the bubble bar.
Known issues:
1) Upon dropping, the dragged icon animates back to its original taskbar
position from the top-left corner.
2) The expanded view drop target is not presented.
3) When an icon is dropped on the opposite side of the bubble bar, the
resulting location does not change, even though the drop target is
correctly displayed.
Bug: 397459664
Flag: com.android.wm.shell.enable_create_any_bubble
Test: Manual. Navigate to the overview screen, drag a taskbar icon to
the left or right side, targeting the bubble bar drop zone. Verify the
drop target's appearance. Then, drop the icon and observe that a new
application bubble is added.
Change-Id: I0f64a664620959f2503ac3fd711476b354a09348
Handle new bubble notification while drag is in progress. Updated logic
to react to new bubble notifications arriving during drag operations
before a drop occurs.
Bug: 388894910
Flag: com.android.wm.shell.enable_create_any_bubble
Test: BubbleBarViewAnimatorTest
Test: Manual. Go to some application and have no bubbles. Start
dragging the taskbar icon over the bubble bar drop zone. Trigger new
bubble with the bubbles test application. Observe drop target is
hidden and new bubble is animated in, followed by flyout. When flyout
disappears, bubble bar remains on the screen. Release icon over the
bubble bar. Observe newly added application bubble is expanded. Repeat
same test, but drag the taskbar icon to the opposite side.
Test: Manual. Go to some application, but have bubbles. Start
dragging the taskbar icon over the bubble bar drop zone. Trigger new
bubble with the bubbles test application. Observe new bubble is added
and the flyout is shown. When flyout disappears, bubble bar remains on
the screen. Release icon over the bubble bar. Observe newly added
application bubble is expanded. Repeat same test, but drag the taskbar
icon to the opposite side.
Change-Id: I6fe1139ef56f4ad40d36a804016d23a9b34abf5f
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
The Bubble Bar was being cut off due to the taskbar window height.
Modified the BubbleBarViewController to rely on the bubble count to
compute the maximum height, rather than the BubbleBarView visibility.
Test: Manually tested. Expanded the Bubble Bar in 3-button navigation.
Pressed the power button to lock the screen. Unlocked the screen.
Fixes: 391358222
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I1923fc84df403abea022ba84f23fc66be7dbe7aa
* changes:
Take bubble selection from the shell update.
Fix bubbles animation when the new bubble added and old bubble removed.
Fix arrow animation when the new bubble added and old bubble removed.
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
hasBubbles() was checking if there is a selected bubble. If there was one, it returned true.
Update it to return true when bubble bar has bubble views.
This aligns it with the name of the method and the javadoc.
Bug: 385928447
Change-Id: If3dafb7608f71b8600dbac064b08a7f7114a361f
Test: check that bubble bar is tappable
Test: check that bubble bar is shown next to QSB on foldable
Test: check bubble bar position with 3 button nav
Flag: com.android.wm.shell.enable_bubble_bar
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 problem had two parts:
1 When BubbleBarViewController removed all views, including the overflow
bubble, it did not update the value of the mOverflowAdded field
2 BubbleBarController removed all views upon receiving an initial update
This CL addresses both issues.
Test: Manual. Ensure the overflow bubble is present in the bubble bar.
Rotate the device and verify that the overflow bubble remains visible.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 380281090
Change-Id: I1810671e6bfc5b8b402433697b07f3de2e612ed7
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
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
When updating the bubble bar visibility, allow it to become visible
if the only hidden bit is the stashed one and we're animating.
This fixes the visibility issue that appears after dismissing the
bar while stashed, and then sending an initial bubble, while still
stashed.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 383620113
Test: manual
- create bubble
- launch app
- dismiss bubble with adb
- create bubble with adb
- observe bubble bar is visible during the animation
Change-Id: I7a955de068867829b3ccab11b2b0adc8d8e10239
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
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
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
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
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
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