From 120e6068e255d2ae3cd6d1709f75c8f96e448769 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Tue, 21 Sep 2021 15:20:43 -0700 Subject: [PATCH] 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 --- .../Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9d0dd3c7fcdb6..d590ab112aaea 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 @@ -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()); }