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

Commit a86127fe authored by Mark Lindner's avatar Mark Lindner Committed by Jeff Brown
Browse files

ListView focus bugfix.

resurrectSelection() didn't take into account disabled items
(which shouldn't ever get focus).

Bug: 4967915
Change-Id: I849d2d993ddf93f49108e7b867ff6d24643c07a8
parent da13560d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4653,6 +4653,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                            childrenTop += getVerticalFadingEdgeLength();
                        }
                    }
                    // Don't ever focus a disabled item.
                    if (!mAdapter.isEnabled(i)) continue;

                    if (top >= childrenTop) {
                        // Found a view whose top is fully visisble
                        selectedPos = firstPosition + i;