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

Commit 3ba8f5d6 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 4021346 - crash while navigating

Change-Id: Iff60c5f4214c56597f2a1b393982d023866e490e
parent d452dbc2
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -4275,11 +4275,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     *         does not exist within the group
     */
    public View getChildAt(int index) {
        try {
            return mChildren[index];
        } catch (IndexOutOfBoundsException ex) {
        if (index < 0 || index >= mChildrenCount) {
            return null;
        }
        return mChildren[index];
    }

    /**
+3 −2
Original line number Diff line number Diff line
@@ -3019,12 +3019,13 @@ public class ListView extends AbsListView {
                hasOpaqueScrollbars()) || super.isOpaque();
        if (retValue) {
            // only return true if the list items cover the entire area of the view
            final int listTop = mListPadding.top;
            final int listTop = mListPadding != null ? mListPadding.top : mPaddingTop;
            View first = getChildAt(0);
            if (first == null || first.getTop() > listTop) {
                return false;
            }
            final int listBottom = getHeight() - mListPadding.bottom;
            final int listBottom = getHeight() -
                    (mListPadding != null ? mListPadding.bottom : mPaddingBottom);
            View last = getChildAt(getChildCount() - 1);
            if (last == null || last.getBottom() < listBottom) {
                return false;