Merge "Fix cropped bubble flyout when animating in app" into main

This commit is contained in:
Liran Binyamin
2024-12-06 01:19:15 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 8 deletions
@@ -581,15 +581,23 @@ public class BubbleBarViewController {
/** Returns maximum height of the bubble bar with the flyout view. */
public int getBubbleBarWithFlyoutMaximumHeight() {
if (!isBubbleBarVisible()) return 0;
if (!isBubbleBarVisible() && !isAnimatingNewBubble()) return 0;
int bubbleBarTopOnHome = (int) (mBubbleStashController.getBubbleBarVerticalCenterForHome()
+ mBarView.getBubbleBarCollapsedHeight() / 2);
int result = (int) (bubbleBarTopOnHome + mBarView.getArrowHeight());
+ mBarView.getBubbleBarCollapsedHeight() / 2 + mBarView.getArrowHeight());
if (isAnimatingNewBubble()) {
// when animating new bubble add the maximum height of the flyout view
result += mBubbleBarFlyoutController.getMaximumFlyoutHeight();
if (mTaskbarStashController.isInApp() && mBubbleStashController.getHasHandleView()) {
// when animating a bubble in an app, the bubble bar will be higher than its
// position on home
float bubbleBarTopDistanceFromBottom =
-mBubbleStashController.getBubbleBarTranslationYForTaskbar()
+ mBarView.getHeight();
return (int) bubbleBarTopDistanceFromBottom
+ mBubbleBarFlyoutController.getMaximumFlyoutHeight();
}
return bubbleBarTopOnHome + mBubbleBarFlyoutController.getMaximumFlyoutHeight();
} else {
return bubbleBarTopOnHome;
}
return result;
}
/**