Fix Talkback speak pages for "Wallpapers/Basic colors" tab
- Current design we have setup pages of color options for each tab,
so we don't need to announce color section's view pager. Disable its
announcement to fix that.
- Video:
https://drive.google.com/file/d/1OmlFbFIRTsW_6x5Od_wLfgeaBloHnyrm/
Bug: 219863524
Test: manual
Change-Id: Ib0d33ccbb2b57c7d233cdcc635d43f7ebea50f7f
diff --git a/src/com/android/customization/model/color/ColorSectionController.java b/src/com/android/customization/model/color/ColorSectionController.java
index c3b6825..c1d28ab 100644
--- a/src/com/android/customization/model/color/ColorSectionController.java
+++ b/src/com/android/customization/model/color/ColorSectionController.java
@@ -15,6 +15,7 @@
*/
package com.android.customization.model.color;
+import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO;
import static android.view.View.VISIBLE;
import static com.android.customization.model.color.ColorOptionsProvider.COLOR_SOURCE_HOME;
@@ -123,6 +124,9 @@
mColorSectionViewPager = mColorSectionView.findViewById(R.id.color_section_view_pager);
mColorSectionViewPager.setAdapter(mColorSectionAdapter);
mColorSectionViewPager.setUserInputEnabled(false);
+ if (ColorProvider.themeStyleEnabled) {
+ mColorSectionViewPager.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
+ }
mTabLayout = mColorSectionView.findViewById(R.id.separated_tabs);
mColorSectionAdapter.setNumColors(context.getResources().getInteger(
R.integer.options_grid_num_columns));