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

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

Merge "SurfaceView: Release Surfaces where SurfaceControl are released."

parents 28997fef 172bdbc5
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -675,6 +675,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                mTmpTransaction.remove(mBackgroundControl);
                mTmpTransaction.remove(mBackgroundControl);
                mBackgroundControl = null;
                mBackgroundControl = null;
            }
            }
            mSurface.release();
            mTmpTransaction.apply();
            mTmpTransaction.apply();
        }
        }
    }
    }
@@ -962,7 +963,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                } finally {
                } finally {
                    mIsCreating = false;
                    mIsCreating = false;
                    if (mSurfaceControl != null && !mSurfaceCreated) {
                    if (mSurfaceControl != null && !mSurfaceCreated) {
                        mSurface.release();
                        releaseSurfaces();
                        releaseSurfaces();
                    }
                    }
                }
                }
@@ -1143,6 +1143,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                    mRtTransaction.remove(mBackgroundControl);
                    mRtTransaction.remove(mBackgroundControl);
                    mSurfaceControl = null;
                    mSurfaceControl = null;
                    mBackgroundControl = null;
                    mBackgroundControl = null;
                    mSurface.release();
                }
                }
                mRtHandlingPositionUpdates = false;
                mRtHandlingPositionUpdates = false;
            }
            }