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

Commit 5a0da698 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

SurfaceView only call forceDisconnect if isValid

am: 6ba466ff

Change-Id: I890142436b2442cced212550ac916bedf1306bc9
parents 896ee296 6ba466ff
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -598,9 +598,11 @@ public class SurfaceView extends View {
                            // surfaceDestroyed and surfaceCreated, we force a disconnect,
                            // so the next connect will always work if we end up reusing
                            // the surface.
                            if (mSurface.isValid()) {
                                mSurface.forceScopedDisconnect();
                            }
                        }
                    }

                    mSurface.transferFrom(mNewSurface);
                    if (visible && mSurface.isValid()) {