Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6bebfc3 authored by Ned Burns's avatar Ned Burns Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE when there are no non-empty sections"

parents 81bc9685 94c80894
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1340,8 +1340,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    @ShadeViewRefactor(RefactorComponent.COORDINATOR)
    private float getAppearStartPosition() {
        if (isHeadsUpTransition()) {
            return mHeadsUpInset
                    + getFirstVisibleSection().getFirstVisibleChild().getPinnedHeadsUpHeight();
            final NotificationSection firstVisibleSection = getFirstVisibleSection();
            final int pinnedHeight = firstVisibleSection != null
                    ? firstVisibleSection.getFirstVisibleChild().getPinnedHeadsUpHeight()
                    : 0;
            return mHeadsUpInset + pinnedHeight;
        }
        return getMinExpansionHeight();
    }