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

Commit 2aa919a4 authored by kaiyiz's avatar kaiyiz Committed by Gerrit - the friendly Code Review server
Browse files

Widget: Catch null point exception in AbsListViewAutoScroller

The first view of AbsListView is null, so there is a NullPointerException
happen.

Add a judgement for the first view of AbsListView.

CRs-Fixed: 776294

Change-Id: I7e25d1430b1bab0cff313492163a419fbf5960b5
parent 1fff63c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ public abstract class AutoScrollHelper implements View.OnTouchListener {
                // Are we already showing the entire first item?
                if (firstPosition <= 0) {
                    final View firstView = target.getChildAt(0);
                    if (firstView.getTop() >= 0) {
                    if (firstView == null || firstView.getTop() >= 0) {
                        return false;
                    }
                }