Merge "Fix possible NPE" into sc-v2-dev am: d76f9c199c am: 04b46aed49

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16603090

Change-Id: I28c9bf16b1754aabd5c0ee423a610d44d8923863
This commit is contained in:
Mady Mellor
2022-01-11 18:51:00 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 1 deletions

View File

@@ -231,8 +231,9 @@ public class BubbleFlyoutView extends FrameLayout {
* Fade animation for consecutive flyouts.
*/
void animateUpdate(Bubble.FlyoutMessage flyoutMessage, PointF stackPos,
boolean hideDot, Runnable onHide) {
boolean hideDot, float[] dotCenter, Runnable onHide) {
mOnHide = onHide;
mDotCenter = dotCenter;
final Runnable afterFadeOut = () -> {
updateFlyoutMessage(flyoutMessage);
// Wait for TextViews to layout with updated height.

View File

@@ -2516,6 +2516,7 @@ public class BubbleStackView extends FrameLayout
if (mFlyout.getVisibility() == View.VISIBLE) {
mFlyout.animateUpdate(bubble.getFlyoutMessage(),
mStackAnimationController.getStackPosition(), !bubble.showDot(),
bubble.getIconView().getDotCenter(),
mAfterFlyoutHidden /* onHide */);
} else {
mFlyout.setVisibility(INVISIBLE);