diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-06-28 01:12:41 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-21 12:04:54 -0700 |
commit | 6179ea3196e9306d3f14361fe9ef14191b1edba6 (patch) | |
tree | d821da4d5840aebcddf4a714a3217ec595847bc9 /core/java/android/widget/AdapterView.java | |
parent | ac4159549c10dbe428d42980278c0e43ecc8d93f (diff) | |
download | frameworks_base-6179ea3196e9306d3f14361fe9ef14191b1edba6.zip frameworks_base-6179ea3196e9306d3f14361fe9ef14191b1edba6.tar.gz frameworks_base-6179ea3196e9306d3f14361fe9ef14191b1edba6.tar.bz2 |
Adding accessibility support to the Status Bar.
1. Added content description to pretty much all animals
in the zoo including buttons in the navigation bar,
notifications and status icons for battery, signal,
data, etc.
2. Rectored to avoid ovelaying views since they block
touch exploratino. In general overlaying views
cause trouble for touch exploration and accessibility
in general.
3. Avoid sending accessibility events in case the user is
touching outside of the StatauBAr panels to avoid
confusion.
4. Added records to accessibility events in the places where
this would help the presentation. So the event comes from
a given "leaf" view and its predecessor is adding a record
to the event for itself to provide more cotext. It is up
to the accessiiblity service to choose how to present that.
bug:4686943
Change-Id: I1c1bd123d828fb10911bca92130e9a05c1f020b3
Diffstat (limited to 'core/java/android/widget/AdapterView.java')
-rw-r--r-- | core/java/android/widget/AdapterView.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index 755d4e0..00c75a9 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -902,15 +902,16 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { @Override public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) { - // Add a record for ourselves as well. - AccessibilityEvent record = AccessibilityEvent.obtain(); - record.setSource(this); - // Set the class since it is not populated in #dispatchPopulateAccessibilityEvent - record.setClassName(getClass().getName()); - child.onInitializeAccessibilityEvent(record); - child.dispatchPopulateAccessibilityEvent(record); - event.appendRecord(record); - return true; + if (super.onRequestSendAccessibilityEvent(child, event)) { + // Add a record for ourselves as well. + AccessibilityEvent record = AccessibilityEvent.obtain(); + onInitializeAccessibilityEvent(record); + // Populate with the text of the requesting child. + child.dispatchPopulateAccessibilityEvent(record); + event.appendRecord(record); + return true; + } + return false; } @Override |