am 88ae2e2a: am d9c99124: Merge "Incorrect temporary detach of accessibility focused view may lead to a crash." into jb-mr1-dev
* commit '88ae2e2abeda94f3ec1d87ffad35e7e5d716a94f': Incorrect temporary detach of accessibility focused view may lead to a crash.
This commit is contained in:
@@ -3912,7 +3912,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
* @see #removeDetachedView(View, boolean)
|
||||
*/
|
||||
protected void detachViewFromParent(View child) {
|
||||
child.clearAccessibilityFocus();
|
||||
removeFromArray(indexOfChild(child));
|
||||
}
|
||||
|
||||
@@ -3934,7 +3933,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
* @see #removeDetachedView(View, boolean)
|
||||
*/
|
||||
protected void detachViewFromParent(int index) {
|
||||
getChildAt(index).clearAccessibilityFocus();
|
||||
removeFromArray(index);
|
||||
}
|
||||
|
||||
|
||||
@@ -2324,7 +2324,13 @@ public final class ViewRootImpl implements ViewParent,
|
||||
mAccessibilityFocusedHost.getDrawingRect(bounds);
|
||||
if (mView instanceof ViewGroup) {
|
||||
ViewGroup viewGroup = (ViewGroup) mView;
|
||||
viewGroup.offsetDescendantRectToMyCoords(mAccessibilityFocusedHost, bounds);
|
||||
try {
|
||||
viewGroup.offsetDescendantRectToMyCoords(mAccessibilityFocusedHost, bounds);
|
||||
} catch (IllegalArgumentException iae) {
|
||||
Log.e(TAG, "Temporary detached view that was neither removed not reattached: "
|
||||
+ mAccessibilityFocusedHost);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mAccessibilityFocusedVirtualView == null) {
|
||||
|
||||
Reference in New Issue
Block a user