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

Commit aa565347 authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

AbsListView does not populate accessibility events correctly.

The toIndex of accessibility events fired from a AbsListView
is exclusive but should be inclusive i.e. it was reported one
more that it has to be.

bug:5256286

Change-Id: I496959fdfb6760b0c74899730c4cc558e89234a6
parent 08b997c7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -926,8 +926,10 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
        }
        event.setItemCount(getCount());
        event.setCurrentItemIndex(getSelectedItemPosition());
        event.setFromIndex(mFirstPosition);
        event.setToIndex(mFirstPosition + getChildCount());
        if (getChildCount() > 0) {
            event.setFromIndex(getFirstVisiblePosition());
            event.setToIndex(getLastVisiblePosition());
        }
    }

    @Override