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

Commit a2b986e7 authored by Adam Powell's avatar Adam Powell
Browse files

Bug 5151927 - Monkeys should not play with detached lists.

Don't process ListView key events while detached from a window.

Change-Id: Ibf85e081887d47834a467f9fd2cb6a1e39b4857e
parent 28739171
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -635,7 +635,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Track if we are currently attached to a window.
     */
    private boolean mIsAttached;
    boolean mIsAttached;

    /**
     * Track the item count from the last time we handled a data change.
+1 −1
Original line number Diff line number Diff line
@@ -2074,7 +2074,7 @@ public class ListView extends AbsListView {
    }

    private boolean commonKey(int keyCode, int count, KeyEvent event) {
        if (mAdapter == null) {
        if (mAdapter == null || !mIsAttached) {
            return false;
        }