[QS] Disallow TYPE_VIEW_SELECTED events

QS is announcing all of its items due to setSelected being called on the
TilePage.

Fixed by disable a11y on the page until setSelected is done. This will
cover all fringe cases of setSelected being passed along down the
hierarchy and additional a11y events being sent on child views.

Test: Manually verified that labels aren't announced
Change-Id: I76757b1fb797ba646e8e57ef389f78593aad0f18
Fixes: 80003207
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
index 8cfba2c..ab82269 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
@@ -184,9 +184,15 @@
             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) {