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

Commit 1efc95f5 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Don't switch layout modes in AbsListView#onTouchModeChanged() Don't...

Merge "Don't switch layout modes in AbsListView#onTouchModeChanged() Don't stomp mResurrectToPosition for LAYOUT_SPECIFIC in AbsListView#hideSelector()"
parents 29274dc3 ab3e1052
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1960,7 +1960,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            if (getHeight() > 0 && getChildCount() > 0) {
                // We do not lose focus initiating a touch (since AbsListView is focusable in
                // touch mode). Force an initial layout to get rid of the selection.
                mLayoutMode = LAYOUT_NORMAL;
                layoutChildren();
            }
        } else {
@@ -3118,7 +3117,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te

    void hideSelector() {
        if (mSelectedPosition != INVALID_POSITION) {
            if (mLayoutMode != LAYOUT_SPECIFIC) {
                mResurrectToPosition = mSelectedPosition;
            }
            if (mNextSelectedPosition >= 0 && mNextSelectedPosition != mSelectedPosition) {
                mResurrectToPosition = mNextSelectedPosition;
            }