diff options
author | Mady Mellor <madym@google.com> | 2022-01-07 14:21:19 -0800 |
---|---|---|
committer | Mady Mellor <madym@google.com> | 2022-01-10 21:07:31 +0000 |
commit | 0be1b45d64d250965504f1c128c80e59945bf88b (patch) | |
tree | b148f7415a86613574a05030c773d0904e40a62f | |
parent | a70be492947805a2e41e18e1f9b5fa198c881a52 (diff) |
Fix possible NPE
Test: manual - make sure dot works normally / no regression
Bug: 213027822
Change-Id: I819f73cb8c7d613796c3d3bb4b55b80b337c6126
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java | 3 | ||||
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java index 9374da4c4fab..f878a46d26f2 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleFlyoutView.java @@ -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. diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index b40021ec82a7..620c291b357b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -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); |