diff options
| author | 2015-05-26 15:24:18 -0700 | |
|---|---|---|
| committer | 2015-05-26 15:24:18 -0700 | |
| commit | 2232adddc56bb8764a95bbde0c05e0f02f6a1db5 (patch) | |
| tree | 382d00429cd1737e3993b52dab8092768618a5d7 | |
| parent | 9b232f56ff58f161b573fc08433375c3e5c4c0cf (diff) | |
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
| -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 e59560fa1769..89b91f19a741 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(); |