diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-06-10 20:51:30 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-06-10 21:10:46 -0700 |
commit | eeee4d2c01d3c4ed99e4891dbc75c7de69a803fa (patch) | |
tree | 316a5bbeb6b5d98029a0996772dca1857fcb9059 /core/java/android/widget/AdapterView.java | |
parent | eaf7ce6067707fcebd58067135376af51858d2e5 (diff) | |
download | frameworks_base-eeee4d2c01d3c4ed99e4891dbc75c7de69a803fa.zip frameworks_base-eeee4d2c01d3c4ed99e4891dbc75c7de69a803fa.tar.gz frameworks_base-eeee4d2c01d3c4ed99e4891dbc75c7de69a803fa.tar.bz2 |
Final polish of the interrogation feature.
1. Added a new event type for notifying client accessibilitiy
services for changes in the layout. The event is fired at
most once for a given time frame and is delivered to clients
only if it originates from the window that can be interrogated.
2. Exposed the findByText functionality in AccessibilityNodeInfo.
This is very useful for an accessibility service since it allows
searching for something the user knows is on the screen thus
avoiding touch exploring the content. Touch exploring is
excellent for learning the apps but knowing them search is
much faster.
3. Fixed a bug causing an accessibiliby service not to receive
the event source in case of more than one service is registered
and one of them does not have paermission to interrogate the window.
The same event was dispatched to multiple services but if one
of them does not have interrogation permission the event is
modified to remove the source causing subsequent serivices not
to get the later.
4. Moved the getSource setSource methods to AccessibilityRecord
instead in AccessibilityEvent.
5. Hiden some protected members in AccessibilityRecod which should
not be made public since getters exist.
6. Added the View absolute coordinates in the screen to AccessibilityNodeInfo.
This is needed for fast computation of relative positions of
views from accessibility - common use case for the later.
7. Fixed a couple of marshalling bugs.
8. Added a test for the object contract of AccessibilityNodeInfo.
Change-Id: Id9dc50c33aff441e4c93d25ea316c9bbc4bd7a35
Diffstat (limited to 'core/java/android/widget/AdapterView.java')
-rw-r--r-- | core/java/android/widget/AdapterView.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index c4d05e9..755d4e0 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -904,8 +904,10 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { 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; |