Merge "Reparent SurfacePackage to null when releasing it" into sc-dev

This commit is contained in:
Vishnu Nair
2021-03-01 20:44:43 +00:00
committed by Android (Google) Code Review

View File

@@ -544,6 +544,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
// recreate this Surface, so only release it when we are fully
// detached.
if (mSurfacePackage != null) {
mTmpTransaction.reparent(mSurfacePackage.getSurfaceControl(), null).apply();
mSurfacePackage.release();
mSurfacePackage = null;
}