From e5832ee9faba4d4d0378e2245db5489a8e376ed8 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 6 Nov 2017 14:46:48 -0800 Subject: [PATCH] Fixed a NP when clearing notifications The clipbounds could be null sometimes Change-Id: I5a8e9ca3cdd8d58d350779a9afdbed6df9ad6062 Fixes: 68848476 Test: manual --- .../systemui/statusbar/stack/NotificationStackScrollLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 1e14626d9c997..aeb7ab7fa110a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -3065,7 +3065,7 @@ public class NotificationStackScrollLayout extends ViewGroup } if (!childWasSwipedOut) { Rect clipBounds = child.getClipBounds(); - childWasSwipedOut = clipBounds.height() == 0; + childWasSwipedOut = clipBounds != null && clipBounds.height() == 0; } int animationType = childWasSwipedOut ? AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT