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

Commit dbe55b72 authored by Bjorn Bringert's avatar Bjorn Bringert Committed by Android (Google) Code Review
Browse files

Merge "Fix exception when a focused item is detached."

parents 5c31583c 1ea68891
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2428,7 +2428,7 @@ public class ListView extends AbsListView {
        if (mItemsCanFocus && (focusResult == null)
                && selectedView != null && selectedView.hasFocus()) {
            final View focused = selectedView.findFocus();
            if (distanceToView(focused) > 0) {
            if (!isViewAncestorOf(focused, this) || distanceToView(focused) > 0) {
                focused.clearFocus();
            }
        }