Handle taps on the animating bubble
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
This commit is contained in:
@@ -139,6 +139,15 @@ public class BubbleBarViewController {
|
||||
if (bubble == null) {
|
||||
Log.e(TAG, "bubble click listener, bubble was null");
|
||||
}
|
||||
|
||||
if (mBarView.isAnimatingNewBubble()) {
|
||||
mBubbleBarViewAnimator.onBubbleClickedWhileAnimating();
|
||||
mBubbleStashController.showBubbleBarImmediate();
|
||||
setExpanded(true);
|
||||
mBubbleBarController.showAndSelectBubble(bubble);
|
||||
return;
|
||||
}
|
||||
|
||||
final String currentlySelected = mBubbleBarController.getSelectedBubbleKey();
|
||||
if (mBarView.isExpanded() && Objects.equals(bubble.getKey(), currentlySelected)) {
|
||||
// Tapping the currently selected bubble while expanded collapses the view.
|
||||
@@ -214,6 +223,12 @@ public class BubbleBarViewController {
|
||||
return mBarView.getBubbleBarBounds();
|
||||
}
|
||||
|
||||
/** The bounds of the animating bubble, or {@code null} if no bubble is animating. */
|
||||
@Nullable
|
||||
public Rect getAnimatingBubbleBounds() {
|
||||
return mBarView.getAnimatingBubbleBounds();
|
||||
}
|
||||
|
||||
/** The horizontal margin of the bubble bar from the edge of the screen. */
|
||||
public int getHorizontalMargin() {
|
||||
return mBarView.getHorizontalMargin();
|
||||
|
||||
Reference in New Issue
Block a user