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

Commit 7c7f8c2c authored by Gus Prevas's avatar Gus Prevas
Browse files

Fixes NPE in NSSL.getTopOrSectionTop().

Change-Id: Ia2847fb4240d57d321ffbf6be5e0d96b455c845d
Fixes: 122707526
Test: manual
parent c6223792
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -2226,15 +2226,18 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
        int top = 0;
        if (section != null) {
            ActivatableNotificationView firstView = section.getFirstVisibleChild();
            if (firstView != null) {
                // Round Y up to avoid seeing the background during animation
                int finalTranslationY = (int) Math.ceil(ViewState.getFinalTranslationY(firstView));
                if (alreadyAnimating || section.isTargetTop(finalTranslationY)) {
                // we're ending up at the same location as we are now, let's just skip the animation
                    // we're ending up at the same location as we are now, let's just skip the
                    // animation
                    top = finalTranslationY;
                } else {
                    top = (int) Math.ceil(firstView.getTranslationY());
                }
            }
        }
        return top;
    }