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

Commit 07361759 authored by Rohan Shah's avatar Rohan Shah Committed by android-build-merger
Browse files

Merge "[QS] Disallow TYPE_VIEW_SELECTED events" into pi-dev am: a8464603

am: 548d19e4

Change-Id: I3662346215b8ed11a05cc31c67a029f77ee55e9b
parents 9a179c02 548d19e4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -184,9 +184,15 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
            return;
        }
        boolean selected = mLastExpansion == 1f;

        // Disable accessibility temporarily while we update selected state purely for the
        // marquee. This will ensure that accessibility doesn't announce the TYPE_VIEW_SELECTED
        // event on any of the children.
        setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
        for (int i = 0; i < mPages.size(); i++) {
            mPages.get(i).setSelected(i == getCurrentItem() ? selected : false);
        }
        setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
    }

    public void setPageListener(PageListener listener) {