diff options
| author | 2020-10-23 15:40:20 +0000 | |
|---|---|---|
| committer | 2020-10-23 15:40:20 +0000 | |
| commit | e6bebfc3558e8010e69fed70b53c08b361246ef4 (patch) | |
| tree | 19b855c1a455582dbb93bf257a91182d8b1303bf | |
| parent | 81bc96857988571d849fe9ea3f2123e8ea399914 (diff) | |
| parent | 94c80894d22281646a1e81018bcd52317e11f727 (diff) | |
Merge "Fix NPE when there are no non-empty sections"
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 93204995c5b0..5cee5bd0cc4e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -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(); } |