From 6a1846a084fd09b3ade3fa80a49c29dcbe7cd60d Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Mon, 13 Jan 2014 15:25:58 -0800 Subject: ProgressBar is important for accessibility by default. If a view does not have callbacks, or content description, or does not draw content, and it is marked as important for accessibility auto, then the system decides it is not important and does not report it. Apparently progress bar draws content that means something and it should be important for accessibility by default. Change-Id: Icd3837fb8b9e208c98b90707f3b195622d71949e (cherry picked from commit 7face75f2c655a371a4dcdf6063886f92c637ce4) --- core/java/android/widget/ProgressBar.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java index 5392a96..6a369a6 100644 --- a/core/java/android/widget/ProgressBar.java +++ b/core/java/android/widget/ProgressBar.java @@ -308,6 +308,11 @@ public class ProgressBar extends View { mMirrorForRtl = a.getBoolean(R.styleable.ProgressBar_mirrorForRtl, mMirrorForRtl); a.recycle(); + + // If not explicitly specified this view is important for accessibility. + if (getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) { + setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); + } } /** -- cgit v1.1