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

Commit 90c7d215 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes NPE in NSSL.getTopOrSectionTop()."

parents 41561126 7c7f8c2c
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -2227,15 +2227,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;
    }