Fix possible NPE

Test: manual - make sure dot works normally / no regression
Bug: 213027822
Change-Id: I819f73cb8c7d613796c3d3bb4b55b80b337c6126
This commit is contained in:
Mady Mellor
2022-01-07 14:21:19 -08:00
parent a70be49294
commit 0be1b45d64
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

@@ -2494,6 +2494,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);