summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-10-05 17:26:38 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2012-10-05 17:26:49 -0700
commit8d0739da7ff6589101f1dc2d5f579f3bfdefd3b4 (patch)
treed22bb2a6eed249648905fa1e4e837ec9bd00e543 /core/java
parent7ef38ea9e5ee1d2fd58e818f37191a589793e236 (diff)
Accessibility focus not cleared on temporary detach.
1. There was a path for removing a view without clearing its accessibility focus. Then when we try to draw the focused rectangle we get an exception since the accessibility focused view is not attached to the view tree when computing the location of the rectangel to draw. bug:7297191 Change-Id: I81e3c35e830e27cf95e73accb665629d0c456afb
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/ViewGroup.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index db1c00aeccd2..726fa28f2ee3 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3912,6 +3912,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* @see #removeDetachedView(View, boolean)
*/
protected void detachViewFromParent(View child) {
+ child.clearAccessibilityFocus();
removeFromArray(indexOfChild(child));
}
@@ -3933,6 +3934,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
* @see #removeDetachedView(View, boolean)
*/
protected void detachViewFromParent(int index) {
+ getChildAt(index).clearAccessibilityFocus();
removeFromArray(index);
}