Skip to content

Commit d1cdfb3

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Does not compile!!!"
2 parents 46b05cc + 99e3459 commit d1cdfb3

File tree

18 files changed

+252
-325
lines changed

18 files changed

+252
-325
lines changed

Android.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ LOCAL_SRC_FILES += \
143143
core/java/android/view/accessibility/IAccessibilityManager.aidl \
144144
core/java/android/view/accessibility/IAccessibilityManagerClient.aidl \
145145
core/java/android/view/IApplicationToken.aidl \
146-
core/java/android/view/IInputFilter.aidl \
147-
core/java/android/view/IInputFilterHost.aidl \
148146
core/java/android/view/IOnKeyguardExitResult.aidl \
149147
core/java/android/view/IRotationWatcher.aidl \
150148
core/java/android/view/IWindow.aidl \

core/java/android/view/AccessibilityInteractionController.java

Lines changed: 68 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private boolean isShown(View view) {
141141
}
142142

143143
public void findAccessibilityNodeInfoByAccessibilityIdClientThread(
144-
long accessibilityNodeId, int interactionId,
144+
long accessibilityNodeId, int windowLeft, int windowTop, int interactionId,
145145
IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
146146
long interrogatingTid) {
147147
Message message = mHandler.obtainMessage();
@@ -153,6 +153,12 @@ 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+
156162
message.obj = args;
157163

158164
// If the interrogation is performed by the same thread as the main UI
@@ -177,6 +183,11 @@ private void findAccessibilityNodeInfoByAccessibilityIdUiThread(Message message)
177183
final IAccessibilityInteractionConnectionCallback callback =
178184
(IAccessibilityInteractionConnectionCallback) args.arg1;
179185

186+
SomeArgs moreArgs = (SomeArgs) args.arg2;
187+
mViewRootImpl.mAttachInfo.mActualWindowLeft = moreArgs.argi1;
188+
mViewRootImpl.mAttachInfo.mActualWindowTop = moreArgs.argi2;
189+
190+
mPool.release(moreArgs);
180191
mPool.release(args);
181192

182193
List<AccessibilityNodeInfo> infos = mTempAccessibilityNodeInfoList;
@@ -209,8 +220,9 @@ private void findAccessibilityNodeInfoByAccessibilityIdUiThread(Message message)
209220
}
210221

211222
public void findAccessibilityNodeInfoByViewIdClientThread(long accessibilityNodeId,
212-
int viewId, int interactionId, IAccessibilityInteractionConnectionCallback callback,
213-
int flags, int interrogatingPid, long interrogatingTid) {
223+
int viewId, int windowLeft, int windowTop, int interactionId,
224+
IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
225+
long interrogatingTid) {
214226
Message message = mHandler.obtainMessage();
215227
message.what = PrivateHandler.MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_VIEW_ID;
216228
message.arg1 = flags;
@@ -221,6 +233,11 @@ public void findAccessibilityNodeInfoByViewIdClientThread(long accessibilityNode
221233
args.argi2 = interactionId;
222234
args.arg1 = callback;
223235

236+
SomeArgs moreArgs = mPool.acquire();
237+
moreArgs.argi1 = windowLeft;
238+
moreArgs.argi2 = windowTop;
239+
args.arg2 = moreArgs;
240+
224241
message.obj = args;
225242

226243
// If the interrogation is performed by the same thread as the main UI
@@ -245,6 +262,11 @@ private void findAccessibilityNodeInfoByViewIdUiThread(Message message) {
245262
final IAccessibilityInteractionConnectionCallback callback =
246263
(IAccessibilityInteractionConnectionCallback) args.arg1;
247264

265+
SomeArgs moreArgs = (SomeArgs) args.arg2;
266+
mViewRootImpl.mAttachInfo.mActualWindowLeft = moreArgs.argi1;
267+
mViewRootImpl.mAttachInfo.mActualWindowTop = moreArgs.argi2;
268+
269+
mPool.release(moreArgs);
248270
mPool.release(args);
249271

250272
AccessibilityNodeInfo info = null;
@@ -278,19 +300,25 @@ private void findAccessibilityNodeInfoByViewIdUiThread(Message message) {
278300
}
279301

280302
public void findAccessibilityNodeInfosByTextClientThread(long accessibilityNodeId,
281-
String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
282-
int flags, int interrogatingPid, long interrogatingTid) {
303+
String text, int windowLeft, int windowTop, int interactionId,
304+
IAccessibilityInteractionConnectionCallback callback, int flags,
305+
int interrogatingPid, long interrogatingTid) {
283306
Message message = mHandler.obtainMessage();
284307
message.what = PrivateHandler.MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT;
285308
message.arg1 = flags;
286309

287310
SomeArgs args = mPool.acquire();
288311
args.arg1 = text;
289-
args.arg2 = callback;
290312
args.argi1 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
291313
args.argi2 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
292314
args.argi3 = interactionId;
293315

316+
SomeArgs moreArgs = mPool.acquire();
317+
moreArgs.arg1 = callback;
318+
moreArgs.argi1 = windowLeft;
319+
moreArgs.argi2 = windowTop;
320+
args.arg2 = moreArgs;
321+
294322
message.obj = args;
295323

296324
// If the interrogation is performed by the same thread as the main UI
@@ -310,11 +338,17 @@ private void findAccessibilityNodeInfosByTextUiThread(Message message) {
310338

311339
SomeArgs args = (SomeArgs) message.obj;
312340
final String text = (String) args.arg1;
313-
final IAccessibilityInteractionConnectionCallback callback =
314-
(IAccessibilityInteractionConnectionCallback) args.arg2;
315341
final int accessibilityViewId = args.argi1;
316342
final int virtualDescendantId = args.argi2;
317343
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);
318352
mPool.release(args);
319353

320354
List<AccessibilityNodeInfo> infos = null;
@@ -375,9 +409,9 @@ private void findAccessibilityNodeInfosByTextUiThread(Message message) {
375409
}
376410
}
377411

378-
public void findFocusClientThread(long accessibilityNodeId, int focusType, int interactionId,
379-
IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
380-
long interrogatingTid) {
412+
public void findFocusClientThread(long accessibilityNodeId, int focusType, int windowLeft,
413+
int windowTop, int interactionId, IAccessibilityInteractionConnectionCallback callback,
414+
int flags, int interogatingPid, long interrogatingTid) {
381415
Message message = mHandler.obtainMessage();
382416
message.what = PrivateHandler.MSG_FIND_FOCUS;
383417
message.arg1 = flags;
@@ -389,6 +423,11 @@ public void findFocusClientThread(long accessibilityNodeId, int focusType, int i
389423
args.argi3 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
390424
args.arg1 = callback;
391425

426+
SomeArgs moreArgs = mPool.acquire();
427+
moreArgs.argi1 = windowLeft;
428+
moreArgs.argi2 = windowTop;
429+
args.arg2 = moreArgs;
430+
392431
message.obj = args;
393432

394433
// If the interrogation is performed by the same thread as the main UI
@@ -414,6 +453,11 @@ private void findFocusUiThread(Message message) {
414453
final IAccessibilityInteractionConnectionCallback callback =
415454
(IAccessibilityInteractionConnectionCallback) args.arg1;
416455

456+
SomeArgs moreArgs = (SomeArgs) args.arg2;
457+
mViewRootImpl.mAttachInfo.mActualWindowLeft = moreArgs.argi1;
458+
mViewRootImpl.mAttachInfo.mActualWindowTop = moreArgs.argi2;
459+
460+
mPool.release(moreArgs);
417461
mPool.release(args);
418462

419463
AccessibilityNodeInfo focused = null;
@@ -472,9 +516,9 @@ private void findFocusUiThread(Message message) {
472516
}
473517
}
474518

475-
public void focusSearchClientThread(long accessibilityNodeId, int direction, int interactionId,
476-
IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
477-
long interrogatingTid) {
519+
public void focusSearchClientThread(long accessibilityNodeId, int direction, int windowLeft,
520+
int windowTop, int interactionId, IAccessibilityInteractionConnectionCallback callback,
521+
int flags, int interogatingPid, long interrogatingTid) {
478522
Message message = mHandler.obtainMessage();
479523
message.what = PrivateHandler.MSG_FOCUS_SEARCH;
480524
message.arg1 = flags;
@@ -486,6 +530,11 @@ public void focusSearchClientThread(long accessibilityNodeId, int direction, int
486530
args.argi3 = interactionId;
487531
args.arg1 = callback;
488532

533+
SomeArgs moreArgs = mPool.acquire();
534+
moreArgs.argi1 = windowLeft;
535+
moreArgs.argi2 = windowTop;
536+
args.arg2 = moreArgs;
537+
489538
message.obj = args;
490539

491540
// If the interrogation is performed by the same thread as the main UI
@@ -511,6 +560,11 @@ private void focusSearchUiThread(Message message) {
511560
final IAccessibilityInteractionConnectionCallback callback =
512561
(IAccessibilityInteractionConnectionCallback) args.arg1;
513562

563+
SomeArgs moreArgs = (SomeArgs) args.arg2;
564+
mViewRootImpl.mAttachInfo.mActualWindowLeft = moreArgs.argi1;
565+
mViewRootImpl.mAttachInfo.mActualWindowTop = moreArgs.argi2;
566+
567+
mPool.release(moreArgs);
514568
mPool.release(args);
515569

516570
AccessibilityNodeInfo next = null;

core/java/android/view/IInputFilter.aidl

Lines changed: 0 additions & 32 deletions
This file was deleted.

core/java/android/view/IInputFilterHost.aidl

Lines changed: 0 additions & 28 deletions
This file was deleted.

core/java/android/view/IWindowManager.aidl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import android.content.res.CompatibilityInfo;
2323
import android.content.res.Configuration;
2424
import android.graphics.Bitmap;
2525
import android.graphics.Point;
26-
import android.graphics.Rect;
2726
import android.os.IRemoteCallback;
2827
import android.view.IApplicationToken;
2928
import android.view.IOnKeyguardExitResult;
@@ -34,7 +33,6 @@ import android.view.InputEvent;
3433
import android.view.MotionEvent;
3534
import android.view.InputChannel;
3635
import android.view.InputDevice;
37-
import android.view.IInputFilter;
3836

3937
/**
4038
* System private interface to the window manager.
@@ -210,24 +208,4 @@ interface IWindowManager
210208
* Lock the device immediately.
211209
*/
212210
void lockNow();
213-
214-
/**
215-
* Gets the token for the focused window.
216-
*/
217-
IBinder getFocusedWindowToken();
218-
219-
/**
220-
* Gets the frame on the screen of the window given its token.
221-
*/
222-
boolean getWindowFrame(IBinder token, out Rect outBounds);
223-
224-
/**
225-
* Gets the compatibility scale of e window given its token.
226-
*/
227-
float getWindowCompatibilityScale(IBinder windowToken);
228-
229-
/**
230-
* Sets an input filter for manipulating the input event stream.
231-
*/
232-
void setInputFilter(in IInputFilter filter);
233211
}

core/java/android/view/View.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4760,6 +4760,30 @@ void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
47604760
}
47614761
}
47624762

4763+
/**
4764+
* Returns the delta between the actual and last reported window left.
4765+
*
4766+
* @hide
4767+
*/
4768+
public int getActualAndReportedWindowLeftDelta() {
4769+
// if (mAttachInfo != null) {
4770+
// return mAttachInfo.mActualWindowLeft - mAttachInfo.mWindowLeft;
4771+
// }
4772+
return 0;
4773+
}
4774+
4775+
/**
4776+
* Returns the delta between the actual and last reported window top.
4777+
*
4778+
* @hide
4779+
*/
4780+
public int getActualAndReportedWindowTopDelta() {
4781+
// if (mAttachInfo != null) {
4782+
// return mAttachInfo.mActualWindowTop - mAttachInfo.mWindowTop;
4783+
// }
4784+
return 0;
4785+
}
4786+
47634787
/**
47644788
* Computes whether this view is visible to the user. Such a view is
47654789
* attached, visible, all its predecessors are visible, it is not clipped
@@ -17117,6 +17141,20 @@ public void setPooled(boolean isPooled) {
1711717141
*/
1711817142
int mWindowTop;
1711917143

17144+
/**
17145+
* Left actual position of this view's window.
17146+
*
17147+
* TODO: This is a workaround for 6623031. Remove when fixed.
17148+
*/
17149+
int mActualWindowLeft;
17150+
17151+
/**
17152+
* Actual top position of this view's window.
17153+
*
17154+
* TODO: This is a workaround for 6623031. Remove when fixed.
17155+
*/
17156+
int mActualWindowTop;
17157+
1712017158
/**
1712117159
* Indicates whether views need to use 32-bit drawing caches
1712217160
*/

0 commit comments

Comments
 (0)