summaryrefslogtreecommitdiffstats
path: root/core/java/android/accessibilityservice
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-10-03 17:06:56 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2011-10-21 11:45:44 -0700
commit021078554b902179442a345a9d080a165c3b5139 (patch)
tree504a526474fe904da20d047fba769908517b22d6 /core/java/android/accessibilityservice
parent2b41c2f38c924dbbfdc053c152fcf333f4aeb721 (diff)
downloadframeworks_base-021078554b902179442a345a9d080a165c3b5139.zip
frameworks_base-021078554b902179442a345a9d080a165c3b5139.tar.gz
frameworks_base-021078554b902179442a345a9d080a165c3b5139.tar.bz2
Adding APIs to enable reporting virtual view hierarchies to accessibility serivces.
Added an interface that is the contract for a client to expose a virtual view hierarchy to accessibility services. Clients impement this interface and set it in the View that is the root of the virtual sub-tree. Adding this finctionality via compostion as opposed to inheritance enables apps to maintain backwards compatibility by setting the accessibility virtual hierarchy provider on the View only if the API version is high enough. bug:5382859 Change-Id: I7e3927b71a5517943c6cb071be2e87fba23132bf
Diffstat (limited to 'core/java/android/accessibilityservice')
-rw-r--r--core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
index 7c41082..52d9801 100644
--- a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
+++ b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
@@ -33,14 +33,14 @@ interface IAccessibilityServiceConnection {
* Finds an {@link AccessibilityNodeInfo} by accessibility id.
*
* @param accessibilityWindowId A unique window id.
- * @param accessibilityViewId A unique View accessibility id.
+ * @param accessibilityNodeId A unique node id (accessibility and virtual descendant id).
* @param interactionId The id of the interaction for matching with the callback result.
* @param callback Callback which to receive the result.
* @param threadId The id of the calling thread.
* @return The current window scale, where zero means a failure.
*/
float findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
- int accessibilityViewId, int interactionId,
+ long accessibilityNodeId, int interactionId,
IAccessibilityInteractionConnectionCallback callback, long threadId);
/**
@@ -51,15 +51,15 @@ interface IAccessibilityServiceConnection {
*
* @param text The searched text.
* @param accessibilityWindowId A unique window id.
- * @param accessibilityViewId A unique View accessibility id from where to start the search.
- * Use {@link android.view.View#NO_ID} to start from the root.
+ * @param accessibilityNodeId A unique node id (accessibility and virtual descendant id) from
+ * where to start the search. Use {@link android.view.View#NO_ID} to start from the root.
* @param interactionId The id of the interaction for matching with the callback result.
* @param callback Callback which to receive the result.
* @param threadId The id of the calling thread.
* @return The current window scale, where zero means a failure.
*/
- float findAccessibilityNodeInfosByViewText(String text, int accessibilityWindowId,
- int accessibilityViewId, int interractionId,
+ float findAccessibilityNodeInfosByText(String text, int accessibilityWindowId,
+ long accessibilityNodeId, int interractionId,
IAccessibilityInteractionConnectionCallback callback, long threadId);
/**
@@ -75,7 +75,7 @@ interface IAccessibilityServiceConnection {
* @param threadId The id of the calling thread.
* @return The current window scale, where zero means a failure.
*/
- float findAccessibilityNodeInfosByViewTextInActiveWindow(String text,
+ float findAccessibilityNodeInfosByTextInActiveWindow(String text,
int interactionId, IAccessibilityInteractionConnectionCallback callback,
long threadId);
@@ -96,14 +96,14 @@ interface IAccessibilityServiceConnection {
* Performs an accessibility action on an {@link AccessibilityNodeInfo}.
*
* @param accessibilityWindowId The id of the window.
- * @param accessibilityViewId A unique View accessibility id.
+ * @param accessibilityNodeId A unique node id (accessibility and virtual descendant id).
* @param action The action to perform.
* @param interactionId The id of the interaction for matching with the callback result.
* @param callback Callback which to receive the result.
* @param threadId The id of the calling thread.
* @return Whether the action was performed.
*/
- boolean performAccessibilityAction(int accessibilityWindowId, int accessibilityViewId,
+ boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
int action, int interactionId, IAccessibilityInteractionConnectionCallback callback,
long threadId);
}