Remove BubbleBarView.mIsAnimatingNewBubble

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
This commit is contained in:
Liran Binyamin committed 2024-08-08 07:49:04 -04:00
1 parent 46111b109e
commit 09c2ad248b
4 files changed
+57 -74

No files matched your search

@@ -124,8 +124,6 @@ public class BubbleBarView extends FrameLayout {
private final BubbleBarBackground mBubbleBarBackground;
private boolean mIsAnimatingNewBubble = false;
/**
* The current bounds of all the bubble bar. Note that these bounds may not account for
* translation. The bounds should be retrieved using {@link #getBubbleBarBounds()} which
@@ -701,16 +699,6 @@ public class BubbleBarView extends FrameLayout {
return mRelativePivotY;
}
/** Notifies the bubble bar that a new bubble animation is starting. */
public void onAnimatingBubbleStarted() {
mIsAnimatingNewBubble = true;
}
/** Notifies the bubble bar that a new bubble animation is complete. */
public void onAnimatingBubbleCompleted() {
mIsAnimatingNewBubble = false;
}
/** Add a new bubble to the bubble bar. */
public void addBubble(BubbleView bubble) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) mIconSize, (int) mIconSize,
@@ -1306,9 +1294,7 @@ public class BubbleBarView extends FrameLayout {
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (mIsAnimatingNewBubble) {
mController.onBubbleBarTouchedWhileAnimating();
}
mController.onBubbleBarTouched();
if (!mIsBarExpanded) {
// When the bar is collapsed, all taps on it should expand it.
return true;
@@ -1316,11 +1302,6 @@ public class BubbleBarView extends FrameLayout {
return super.onInterceptTouchEvent(ev);
}
/** Whether a new bubble is currently animating. */
public boolean isAnimatingNewBubble() {
return mIsAnimatingNewBubble;
}
private boolean hasOverflow() {
// Overflow is always the last bubble
View lastChild = getChildAt(getChildCount() - 1);
@@ -1435,7 +1416,6 @@ public class BubbleBarView extends FrameLayout {
pw.println(" bubble key: " + key);
}
pw.println(" isExpanded: " + isExpanded());
pw.println(" mIsAnimatingNewBubble: " + mIsAnimatingNewBubble);
if (mBubbleAnimator != null) {
pw.println(" mBubbleAnimator.isRunning(): " + mBubbleAnimator.isRunning());
pw.println(" mBubbleAnimator is null");
@@ -1460,8 +1440,8 @@ public class BubbleBarView extends FrameLayout {
/** Returns the translation Y that the bubble bar should have. */
float getBubbleBarTranslationY();
/** Notifies the controller that the bubble bar was touched while it was animating. */
void onBubbleBarTouchedWhileAnimating();
/** Notifies the controller that the bubble bar was touched. */
void onBubbleBarTouched();
/** Requests the controller to expand bubble bar */
void expandBubbleBar();