From 78d87b0047db3914f4d3aa62066f25f48bdf5742 Mon Sep 17 00:00:00 2001 From: Joshua Tsuji Date: Mon, 1 Jun 2020 16:38:02 -0400 Subject: Guard against an NPE if a view is removed just after a path animation started. Fixes: 157071931 Test: atest SystemUITests Change-Id: I8daa96267db4c40734f6b8212b9b79e48120f9e6 --- .../android/systemui/bubbles/animation/PhysicsAnimationLayout.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/PhysicsAnimationLayout.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/PhysicsAnimationLayout.java index 942b9a74bb86..98a7cc23c67e 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/PhysicsAnimationLayout.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/PhysicsAnimationLayout.java @@ -1037,6 +1037,11 @@ public class PhysicsAnimationLayout extends FrameLayout { if (view != null) { final SpringAnimation animation = (SpringAnimation) view.getTag(getTagIdForProperty(property)); + + if (animation == null) { + return; + } + final SpringForce animationSpring = animation.getSpring(); if (animationSpring == null) { -- cgit v1.2.3-59-g8ed1b