Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9c99124 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Incorrect temporary detach of accessibility focused view may lead to a...

Merge "Incorrect temporary detach of accessibility focused view may lead to a crash." into jb-mr1-dev
parents 4d12d5be c8860602
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
    }

+7 −1
Original line number Diff line number Diff line
@@ -2322,7 +2322,13 @@ public final class ViewRootImpl implements ViewParent,
            mAccessibilityFocusedHost.getDrawingRect(bounds);
            if (mView instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) mView;
                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) {