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

Commit 52f7fcf8 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE AdapterView#isScrollableForAccessibility does not handle...

Merge "DO NOT MERGE AdapterView#isScrollableForAccessibility does not handle null adapter." into ics-mr0
parents c351ab47 98348517
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -928,10 +928,14 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
    }

    private boolean isScrollableForAccessibility() {
        final int itemCount = getAdapter().getCount();
        T adapter = getAdapter();
        if (adapter != null) {
            final int itemCount = adapter.getCount();
            return itemCount > 0
                && (getFirstVisiblePosition() > 0 || getLastVisiblePosition() < itemCount - 1);
        }
        return false;
    }

    @Override
    protected boolean canAnimate() {