From 61cfd4bcd88d6ae185356cef0b3dc827c93c02dd Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Fri, 8 Dec 2017 12:42:36 -0800 Subject: [PATCH] Fixed a crash with the top headsup entry Because of an optimization introduced, the topheads up entry could be null, leading to a Nullpointer. Change-Id: Ibba73d652b0b4aac15cc62e57d1dfcf88dc0a647 Fixes: 70386428 Test: manual expand while hun is visible --- .../android/systemui/statusbar/stack/StackScrollAlgorithm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java index 195607dce81fc..7374f115a19be 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -448,7 +448,7 @@ public class StackScrollAlgorithm { childState.height = Math.max(row.getIntrinsicHeight(), childState.height); childState.hidden = false; ExpandableViewState topState = resultState.getViewStateForView(topHeadsUpEntry); - if (!isTopEntry && (!mIsExpanded + if (topState != null && !isTopEntry && (!mIsExpanded || unmodifiedEndLocation < topState.yTranslation + topState.height)) { // Ensure that a headsUp doesn't vertically extend further than the heads-up at // the top most z-position