summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alan Viverette <alanv@google.com> 2011-07-22 16:20:41 -0700
committer Alan Viverette <alanv@google.com> 2011-07-22 16:20:41 -0700
commit326804f81c0710f0ea0d0f871d2f24e6f332a23e (patch)
tree6108952ae28a2eb4a5f8ac0e70b4eb4a70347b5c
parent0f4e81df9942dbea16f803bb795cae057fb085f5 (diff)
Set initial bounds offset to (0,0) so that in-screen bounds reported by AccessibilityNodeInfo are correct
Bug: 5063700 Change-Id: I4814c78eb1d6eae007976a057358377560560363
-rw-r--r--core/java/android/view/View.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 0108ecf17b6d..37479d0b8eb7 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -3903,6 +3903,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
int[] locationOnScreen = mAttachInfo.mInvalidateChildLocation;
getLocationOnScreen(locationOnScreen);
+ bounds.offsetTo(0, 0);
bounds.offset(locationOnScreen[0], locationOnScreen[1]);
info.setBoundsInScreen(bounds);