Merge "Fixed a crash with the top headsup entry"

This commit is contained in:
Selim Cinek
2017-12-11 17:21:37 +00:00
committed by Android (Google) Code Review

View File

@@ -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