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

Commit dcb11669 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 213b9805: Merge "Don\'t assume there\'s a selected position in touch mode....

am 213b9805: Merge "Don\'t assume there\'s a selected position in touch mode. Bug #2520743" into froyo

Merge commit '213b9805' into kraken

* commit '213b9805':
  Don't assume there's a selected position in touch mode.
parents 0f3d0d63 213b9805
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1128,11 +1128,13 @@ public class GridView extends AbsListView {
            default:
                if (childCount == 0) {
                    if (!mStackFromBottom) {
                        setSelectedPositionInt(0);
                        setSelectedPositionInt(mAdapter == null || isInTouchMode() ?
                                INVALID_POSITION : 0);
                        sel = fillFromTop(childrenTop);
                    } else {
                        final int last = mItemCount - 1;
                        setSelectedPositionInt(last);
                        setSelectedPositionInt(mAdapter == null || isInTouchMode() ?
                                INVALID_POSITION : last);
                        sel = fillFromBottom(last, childrenBottom);
                    }
                } else {