diff options
| author | Alan Viverette <alanv@google.com> | 2015-05-26 15:24:18 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2015-05-26 15:24:18 -0700 |
| commit | 2232adddc56bb8764a95bbde0c05e0f02f6a1db5 (patch) | |
| tree | 382d00429cd1737e3993b52dab8092768618a5d7 /core/java/android/view/ViewRootImpl.java | |
| parent | 9b232f56ff58f161b573fc08433375c3e5c4c0cf (diff) | |
| download | frameworks_base-2232adddc56bb8764a95bbde0c05e0f02f6a1db5.zip frameworks_base-2232adddc56bb8764a95bbde0c05e0f02f6a1db5.tar.gz frameworks_base-2232adddc56bb8764a95bbde0c05e0f02f6a1db5.tar.bz2 | |
Offset accessibility focus rect for view root's scrollY
Previously we were only partially transforming the focus rect into
window coordinates, so it was offset when the window was panned (for
example, when the IME was showing).
Bug: 20113389
Change-Id: I41f5ed20cb1404232b7042d37ca2fc725f9ee476
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index e59560f..89b91f1 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2787,7 +2787,9 @@ public final class ViewRootImpl implements ViewParent, return false; } + // Transform the rect into window-relative coordinates. final AttachInfo attachInfo = mAttachInfo; + bounds.offset(0, attachInfo.mViewRootImpl.mScrollY); bounds.offset(-attachInfo.mWindowLeft, -attachInfo.mWindowTop); bounds.intersect(0, 0, attachInfo.mViewRootImpl.mWidth, attachInfo.mViewRootImpl.mHeight); return !bounds.isEmpty(); |
