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

Commit ca2622b8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "ViewRootImpl: Fix child lifetime." into oc-dev

parents 735a5e14 ba29dbc3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -683,7 +683,8 @@ public class SurfaceView extends View {
                    mTranslator.translateRectInAppWindowToScreen(mScreenRect);
                }

                if (!isHardwareAccelerated() || !mRtHandlingPositionUpdates) {
                if (mSurfaceControl != null
                        && (!isHardwareAccelerated() || !mRtHandlingPositionUpdates)) {
                    try {
                        if (DEBUG) Log.d(TAG, String.format("%d updateSurfacePosition UI, " +
                                "postion = [%d, %d, %d, %d]", System.identityHashCode(this),
+12 −3
Original line number Diff line number Diff line
@@ -1249,6 +1249,13 @@ public final class ViewRootImpl implements ViewParent,
        mIsAmbientMode = ambient;
    }

    void setWindowVisibility(int visibility) {
        if (visibility != mAttachInfo.mWindowVisibility) {
            mAttachInfo.mWindowVisibility = visibility;
            mView.dispatchWindowVisibilityChanged(visibility);
        }
    }

    void setWindowStopped(boolean stopped) {
        if (mStopped != stopped) {
            mStopped = stopped;
@@ -1263,6 +1270,7 @@ public final class ViewRootImpl implements ViewParent,
                if (renderer != null) {
                    renderer.destroyHardwareResources(mView);
                }
                mView.dispatchWindowVisibilityChanged(View.GONE);
            }
        }
    }
@@ -1297,7 +1305,8 @@ public final class ViewRootImpl implements ViewParent,
    }

    int getHostVisibility() {
        return (mAppVisible || mForceDecorViewVisibility) ? mView.getVisibility() : View.GONE;
        return (mAppVisible || mForceDecorViewVisibility) && !mStopped
            ? mView.getVisibility() : View.GONE;
    }

    /**
@@ -1654,8 +1663,8 @@ public final class ViewRootImpl implements ViewParent,
        }

        if (viewVisibilityChanged) {
            mAttachInfo.mWindowVisibility = viewVisibility;
            host.dispatchWindowVisibilityChanged(viewVisibility);
            setWindowVisibility(viewVisibility);

            if (viewUserVisibilityChanged) {
                host.dispatchVisibilityAggregated(viewVisibility == View.VISIBLE);
            }