@@ -141,7 +141,7 @@ private boolean isShown(View view) {
141141 }
142142
143143 public void findAccessibilityNodeInfoByAccessibilityIdClientThread (
144- long accessibilityNodeId , int windowLeft , int windowTop , int interactionId ,
144+ long accessibilityNodeId , int interactionId ,
145145 IAccessibilityInteractionConnectionCallback callback , int flags , int interrogatingPid ,
146146 long interrogatingTid ) {
147147 Message message = mHandler .obtainMessage ();
@@ -153,12 +153,6 @@ public void findAccessibilityNodeInfoByAccessibilityIdClientThread(
153153 args .argi2 = AccessibilityNodeInfo .getVirtualDescendantId (accessibilityNodeId );
154154 args .argi3 = interactionId ;
155155 args .arg1 = callback ;
156-
157- SomeArgs moreArgs = mPool .acquire ();
158- moreArgs .argi1 = windowLeft ;
159- moreArgs .argi2 = windowTop ;
160- args .arg2 = moreArgs ;
161-
162156 message .obj = args ;
163157
164158 // If the interrogation is performed by the same thread as the main UI
@@ -183,11 +177,6 @@ private void findAccessibilityNodeInfoByAccessibilityIdUiThread(Message message)
183177 final IAccessibilityInteractionConnectionCallback callback =
184178 (IAccessibilityInteractionConnectionCallback ) args .arg1 ;
185179
186- SomeArgs moreArgs = (SomeArgs ) args .arg2 ;
187- mViewRootImpl .mAttachInfo .mActualWindowLeft = moreArgs .argi1 ;
188- mViewRootImpl .mAttachInfo .mActualWindowTop = moreArgs .argi2 ;
189-
190- mPool .release (moreArgs );
191180 mPool .release (args );
192181
193182 List <AccessibilityNodeInfo > infos = mTempAccessibilityNodeInfoList ;
@@ -220,9 +209,8 @@ private void findAccessibilityNodeInfoByAccessibilityIdUiThread(Message message)
220209 }
221210
222211 public void findAccessibilityNodeInfoByViewIdClientThread (long accessibilityNodeId ,
223- int viewId , int windowLeft , int windowTop , int interactionId ,
224- IAccessibilityInteractionConnectionCallback callback , int flags , int interrogatingPid ,
225- long interrogatingTid ) {
212+ int viewId , int interactionId , IAccessibilityInteractionConnectionCallback callback ,
213+ int flags , int interrogatingPid , long interrogatingTid ) {
226214 Message message = mHandler .obtainMessage ();
227215 message .what = PrivateHandler .MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_VIEW_ID ;
228216 message .arg1 = flags ;
@@ -233,11 +221,6 @@ public void findAccessibilityNodeInfoByViewIdClientThread(long accessibilityNode
233221 args .argi2 = interactionId ;
234222 args .arg1 = callback ;
235223
236- SomeArgs moreArgs = mPool .acquire ();
237- moreArgs .argi1 = windowLeft ;
238- moreArgs .argi2 = windowTop ;
239- args .arg2 = moreArgs ;
240-
241224 message .obj = args ;
242225
243226 // If the interrogation is performed by the same thread as the main UI
@@ -262,11 +245,6 @@ private void findAccessibilityNodeInfoByViewIdUiThread(Message message) {
262245 final IAccessibilityInteractionConnectionCallback callback =
263246 (IAccessibilityInteractionConnectionCallback ) args .arg1 ;
264247
265- SomeArgs moreArgs = (SomeArgs ) args .arg2 ;
266- mViewRootImpl .mAttachInfo .mActualWindowLeft = moreArgs .argi1 ;
267- mViewRootImpl .mAttachInfo .mActualWindowTop = moreArgs .argi2 ;
268-
269- mPool .release (moreArgs );
270248 mPool .release (args );
271249
272250 AccessibilityNodeInfo info = null ;
@@ -300,25 +278,19 @@ private void findAccessibilityNodeInfoByViewIdUiThread(Message message) {
300278 }
301279
302280 public void findAccessibilityNodeInfosByTextClientThread (long accessibilityNodeId ,
303- String text , int windowLeft , int windowTop , int interactionId ,
304- IAccessibilityInteractionConnectionCallback callback , int flags ,
305- int interrogatingPid , long interrogatingTid ) {
281+ String text , int interactionId , IAccessibilityInteractionConnectionCallback callback ,
282+ int flags , int interrogatingPid , long interrogatingTid ) {
306283 Message message = mHandler .obtainMessage ();
307284 message .what = PrivateHandler .MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT ;
308285 message .arg1 = flags ;
309286
310287 SomeArgs args = mPool .acquire ();
311288 args .arg1 = text ;
289+ args .arg2 = callback ;
312290 args .argi1 = AccessibilityNodeInfo .getAccessibilityViewId (accessibilityNodeId );
313291 args .argi2 = AccessibilityNodeInfo .getVirtualDescendantId (accessibilityNodeId );
314292 args .argi3 = interactionId ;
315293
316- SomeArgs moreArgs = mPool .acquire ();
317- moreArgs .arg1 = callback ;
318- moreArgs .argi1 = windowLeft ;
319- moreArgs .argi2 = windowTop ;
320- args .arg2 = moreArgs ;
321-
322294 message .obj = args ;
323295
324296 // If the interrogation is performed by the same thread as the main UI
@@ -338,17 +310,11 @@ private void findAccessibilityNodeInfosByTextUiThread(Message message) {
338310
339311 SomeArgs args = (SomeArgs ) message .obj ;
340312 final String text = (String ) args .arg1 ;
313+ final IAccessibilityInteractionConnectionCallback callback =
314+ (IAccessibilityInteractionConnectionCallback ) args .arg2 ;
341315 final int accessibilityViewId = args .argi1 ;
342316 final int virtualDescendantId = args .argi2 ;
343317 final int interactionId = args .argi3 ;
344-
345- SomeArgs moreArgs = (SomeArgs ) args .arg2 ;
346- final IAccessibilityInteractionConnectionCallback callback =
347- (IAccessibilityInteractionConnectionCallback ) moreArgs .arg1 ;
348- mViewRootImpl .mAttachInfo .mActualWindowLeft = moreArgs .argi1 ;
349- mViewRootImpl .mAttachInfo .mActualWindowTop = moreArgs .argi2 ;
350-
351- mPool .release (moreArgs );
352318 mPool .release (args );
353319
354320 List <AccessibilityNodeInfo > infos = null ;
@@ -409,9 +375,9 @@ private void findAccessibilityNodeInfosByTextUiThread(Message message) {
409375 }
410376 }
411377
412- public void findFocusClientThread (long accessibilityNodeId , int focusType , int windowLeft ,
413- int windowTop , int interactionId , IAccessibilityInteractionConnectionCallback callback ,
414- int flags , int interogatingPid , long interrogatingTid ) {
378+ public void findFocusClientThread (long accessibilityNodeId , int focusType , int interactionId ,
379+ IAccessibilityInteractionConnectionCallback callback , int flags , int interogatingPid ,
380+ long interrogatingTid ) {
415381 Message message = mHandler .obtainMessage ();
416382 message .what = PrivateHandler .MSG_FIND_FOCUS ;
417383 message .arg1 = flags ;
@@ -423,11 +389,6 @@ public void findFocusClientThread(long accessibilityNodeId, int focusType, int w
423389 args .argi3 = AccessibilityNodeInfo .getVirtualDescendantId (accessibilityNodeId );
424390 args .arg1 = callback ;
425391
426- SomeArgs moreArgs = mPool .acquire ();
427- moreArgs .argi1 = windowLeft ;
428- moreArgs .argi2 = windowTop ;
429- args .arg2 = moreArgs ;
430-
431392 message .obj = args ;
432393
433394 // If the interrogation is performed by the same thread as the main UI
@@ -453,11 +414,6 @@ private void findFocusUiThread(Message message) {
453414 final IAccessibilityInteractionConnectionCallback callback =
454415 (IAccessibilityInteractionConnectionCallback ) args .arg1 ;
455416
456- SomeArgs moreArgs = (SomeArgs ) args .arg2 ;
457- mViewRootImpl .mAttachInfo .mActualWindowLeft = moreArgs .argi1 ;
458- mViewRootImpl .mAttachInfo .mActualWindowTop = moreArgs .argi2 ;
459-
460- mPool .release (moreArgs );
461417 mPool .release (args );
462418
463419 AccessibilityNodeInfo focused = null ;
@@ -516,9 +472,9 @@ private void findFocusUiThread(Message message) {
516472 }
517473 }
518474
519- public void focusSearchClientThread (long accessibilityNodeId , int direction , int windowLeft ,
520- int windowTop , int interactionId , IAccessibilityInteractionConnectionCallback callback ,
521- int flags , int interogatingPid , long interrogatingTid ) {
475+ public void focusSearchClientThread (long accessibilityNodeId , int direction , int interactionId ,
476+ IAccessibilityInteractionConnectionCallback callback , int flags , int interogatingPid ,
477+ long interrogatingTid ) {
522478 Message message = mHandler .obtainMessage ();
523479 message .what = PrivateHandler .MSG_FOCUS_SEARCH ;
524480 message .arg1 = flags ;
@@ -530,11 +486,6 @@ public void focusSearchClientThread(long accessibilityNodeId, int direction, int
530486 args .argi3 = interactionId ;
531487 args .arg1 = callback ;
532488
533- SomeArgs moreArgs = mPool .acquire ();
534- moreArgs .argi1 = windowLeft ;
535- moreArgs .argi2 = windowTop ;
536- args .arg2 = moreArgs ;
537-
538489 message .obj = args ;
539490
540491 // If the interrogation is performed by the same thread as the main UI
@@ -560,11 +511,6 @@ private void focusSearchUiThread(Message message) {
560511 final IAccessibilityInteractionConnectionCallback callback =
561512 (IAccessibilityInteractionConnectionCallback ) args .arg1 ;
562513
563- SomeArgs moreArgs = (SomeArgs ) args .arg2 ;
564- mViewRootImpl .mAttachInfo .mActualWindowLeft = moreArgs .argi1 ;
565- mViewRootImpl .mAttachInfo .mActualWindowTop = moreArgs .argi2 ;
566-
567- mPool .release (moreArgs );
568514 mPool .release (args );
569515
570516 AccessibilityNodeInfo next = null ;
0 commit comments