From 12c909548013c9dfc72afa62c3509da46b4704f8 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Mon, 6 Apr 2020 12:29:07 -0700 Subject: [PATCH] Fix NPE when bubble being dragged out Test: manual - expand stack and drag / fling each bubble down to dismiss Bug: 153359638 Change-Id: Iae43e102a95c8f83617b51d7fcc989ebe0730741 --- .../bubbles/animation/ExpandedAnimationController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java index ea1abf99a0f3d..a0b49384d49fa 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java @@ -323,6 +323,9 @@ public class ExpandedAnimationController /** Plays a dismiss animation on the dragged out bubble. */ public void dismissDraggedOutBubble(View bubble, Runnable after) { + if (bubble == null) { + return; + } animationForChild(bubble) .withStiffness(SpringForce.STIFFNESS_HIGH) .scaleX(1.1f)