@@ -32,8 +32,13 @@ interface IAccessibilityServiceConnection {
3232 /**
3333 * Finds an {@link AccessibilityNodeInfo} by accessibility id.
3434 *
35- * @param accessibilityWindowId A unique window id.
36- * @param accessibilityNodeId A unique view id or virtual descendant id.
35+ * @param accessibilityWindowId A unique window id. Use
36+ * {@link com.android.server.accessibility.AccessibilityManagerService#ACTIVE_WINDOW_ID}
37+ * to query the currently active window.
38+ * @param accessibilityNodeId A unique view id or virtual descendant id from
39+ * where to start the search. Use
40+ * {@link com.android.server.accessibility.AccessibilityManagerService#ROOT_NODE_ID}
41+ * to start from the root.
3742 * @param interactionId The id of the interaction for matching with the callback result.
3843 * @param callback Callback which to receive the result.
3944 * @param threadId The id of the calling thread.
@@ -46,57 +51,58 @@ interface IAccessibilityServiceConnection {
4651 /**
4752 * Finds {@link AccessibilityNodeInfo}s by View text. The match is case
4853 * insensitive containment. The search is performed in the window whose
49- * id is specified and starts from the View whose accessibility id is
54+ * id is specified and starts from the node whose accessibility id is
5055 * specified.
5156 *
52- * @param text The searched text.
53- * @param accessibilityWindowId A unique window id.
57+ * @param accessibilityWindowId A unique window id. Use
58+ * {@link com.android.server.accessibility.AccessibilityManagerService#ACTIVE_WINDOW_ID}
59+ * to query the currently active window.
5460 * @param accessibilityNodeId A unique view id or virtual descendant id from
55- * where to start the search. Use {@link android.view.View#NO_ID} to start from the root.
56- * @param interactionId The id of the interaction for matching with the callback result.
57- * @param callback Callback which to receive the result.
58- * @param threadId The id of the calling thread.
59- * @return The current window scale, where zero means a failure.
60- */
61- float findAccessibilityNodeInfosByText (String text , int accessibilityWindowId ,
62- long accessibilityNodeId , int interractionId ,
63- IAccessibilityInteractionConnectionCallback callback , long threadId );
64-
65- /**
66- * Finds {@link AccessibilityNodeInfo}s by View text. The match is case
67- * insensitive containment. The search is performed in the currently
68- * active window and start from the root View in the window.
69- *
61+ * where to start the search. Use
62+ * {@link com.android.server.accessibility.AccessibilityManagerService#ROOT_NODE_ID}
63+ * to start from the root.
7064 * @param text The searched text.
71- * @param accessibilityId The id of the view from which to start searching.
72- * Use {@link android.view.View#NO_ID} to start from the root.
7365 * @param interactionId The id of the interaction for matching with the callback result.
7466 * @param callback Callback which to receive the result.
7567 * @param threadId The id of the calling thread.
7668 * @return The current window scale, where zero means a failure.
7769 */
78- float findAccessibilityNodeInfosByTextInActiveWindow ( String text ,
79- int interactionId , IAccessibilityInteractionConnectionCallback callback ,
70+ float findAccessibilityNodeInfosByText ( int accessibilityWindowId , long accessibilityNodeId ,
71+ String text , int interactionId , IAccessibilityInteractionConnectionCallback callback ,
8072 long threadId );
8173
8274 /**
83- * Finds an {@link AccessibilityNodeInfo} by View id. The search is performed
84- * in the currently active window and starts from the root View in the window.
75+ * Finds an {@link AccessibilityNodeInfo} by View id. The search is performed in
76+ * the window whose id is specified and starts from the node whose accessibility
77+ * id is specified.
8578 *
79+ * @param accessibilityWindowId A unique window id. Use
80+ * {@link com.android.server.accessibility.AccessibilityManagerService#ACTIVE_WINDOW_ID}
81+ * to query the currently active window.
82+ * @param accessibilityNodeId A unique view id or virtual descendant id from
83+ * where to start the search. Use
84+ * {@link com.android.server.accessibility.AccessibilityManagerService#ROOT_NODE_ID}
85+ * to start from the root.
8686 * @param id The id of the node.
8787 * @param interactionId The id of the interaction for matching with the callback result.
8888 * @param callback Callback which to receive the result.
8989 * @param threadId The id of the calling thread.
9090 * @return The current window scale, where zero means a failure.
9191 */
92- float findAccessibilityNodeInfoByViewIdInActiveWindow (int viewId , int interactionId ,
93- IAccessibilityInteractionConnectionCallback callback , long threadId );
92+ float findAccessibilityNodeInfoByViewId (int accessibilityWindowId , long accessibilityNodeId ,
93+ int viewId , int interactionId , IAccessibilityInteractionConnectionCallback callback ,
94+ long threadId );
9495
9596 /**
9697 * Performs an accessibility action on an {@link AccessibilityNodeInfo}.
9798 *
98- * @param accessibilityWindowId The id of the window.
99- * @param accessibilityNodeId A unique view id or virtual descendant id.
99+ * @param accessibilityWindowId A unique window id. Use
100+ * {@link com.android.server.accessibility.AccessibilityManagerService#ACTIVE_WINDOW_ID}
101+ * to query the currently active window.
102+ * @param accessibilityNodeId A unique view id or virtual descendant id from
103+ * where to start the search. Use
104+ * {@link com.android.server.accessibility.AccessibilityManagerService#ROOT_NODE_ID}
105+ * to start from the root.
100106 * @param action The action to perform.
101107 * @param interactionId The id of the interaction for matching with the callback result.
102108 * @param callback Callback which to receive the result.
0 commit comments