diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-01-13 15:25:58 -0800 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2014-03-06 19:31:19 +0000 |
commit | 6a1846a084fd09b3ade3fa80a49c29dcbe7cd60d (patch) | |
tree | 4be20b5fccdc7dc127f219910cd31c0ff2fad8ed /core/java | |
parent | 617e715a40e2867c0b30d1bae38c20815ee30071 (diff) | |
download | frameworks_base-6a1846a084fd09b3ade3fa80a49c29dcbe7cd60d.zip frameworks_base-6a1846a084fd09b3ade3fa80a49c29dcbe7cd60d.tar.gz frameworks_base-6a1846a084fd09b3ade3fa80a49c29dcbe7cd60d.tar.bz2 |
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)
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/widget/ProgressBar.java | 5 |
1 files changed, 5 insertions, 0 deletions
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); + } } /** |