Fix possible NPE

No user report of this but found in CTS.

I haven't been able to repro this, I think the
expanded view needs to be animating when the bubble
is removed but I haven't been able to reproduce this
via the unit tests or manually to confirm.

Bug: 200603814
Test: atest NotificationManagerTest watch logs and make sure there
      isn't an exception
Change-Id: I70c286a67410d4cd6bbd272a4f27562a5ae1cb99
This commit is contained in:
Mady Mellor
2021-09-21 15:20:43 -07:00
parent 7f973b2e6e
commit 120e6068e2

View File

@@ -968,7 +968,7 @@ public class BubbleStackView extends FrameLayout
}
});
mExpandedViewAlphaAnimator.addUpdateListener(valueAnimator -> {
if (mExpandedBubble != null) {
if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
mExpandedBubble.getExpandedView().setTaskViewAlpha(
(float) valueAnimator.getAnimatedValue());
}