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

Commit 88ae2e2a authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am d9c99124: Merge "Incorrect temporary detach of accessibility focused view...

am d9c99124: Merge "Incorrect temporary detach of accessibility focused view may lead to a crash." into jb-mr1-dev

* commit 'd9c99124':
  Incorrect temporary detach of accessibility focused view may lead to a crash.
parents 0a12b8e5 d9c99124
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
@@ -2324,7 +2324,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) {