Merge "ViewRootImpl: Call surface destroy callback after layout pass" into rvc-dev am: 276abcb6b3 am: 15f0a2590a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12108557

Change-Id: I346b0ff2ef76aa176d5a1f21cf8e98c29a88049a
This commit is contained in:
TreeHugger Robot
2020-07-09 16:55:11 +00:00
committed by Automerger Merge Worker

View File

@@ -2725,7 +2725,6 @@ public final class ViewRootImpl implements ViewParent,
mAttachInfo.mThreadedRenderer.isEnabled()) { mAttachInfo.mThreadedRenderer.isEnabled()) {
mAttachInfo.mThreadedRenderer.destroy(); mAttachInfo.mThreadedRenderer.destroy();
} }
notifySurfaceDestroyed();
} else if ((surfaceReplaced } else if ((surfaceReplaced
|| surfaceSizeChanged || windowRelayoutWasForced || colorModeChanged) || surfaceSizeChanged || windowRelayoutWasForced || colorModeChanged)
&& mSurfaceHolder == null && mSurfaceHolder == null
@@ -2956,6 +2955,10 @@ public final class ViewRootImpl implements ViewParent,
} }
} }
if (surfaceDestroyed) {
notifySurfaceDestroyed();
}
if (triggerGlobalLayoutListener) { if (triggerGlobalLayoutListener) {
mAttachInfo.mRecomputeGlobalAttributes = false; mAttachInfo.mRecomputeGlobalAttributes = false;
mAttachInfo.mTreeObserver.dispatchOnGlobalLayout(); mAttachInfo.mTreeObserver.dispatchOnGlobalLayout();