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

Commit 6ba466ff authored by John Reck's avatar John Reck
Browse files

SurfaceView only call forceDisconnect if isValid

Change-Id: I683c2f937f44d8b3d912839a3e91cbd5b5c7f437
Fixes: 31778946
Test: Manual, launch Cookie Jam then tap recents
parent 38652db8
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -598,9 +598,11 @@ public class SurfaceView extends View {
                            // surfaceDestroyed and surfaceCreated, we force a disconnect,
                            // surfaceDestroyed and surfaceCreated, we force a disconnect,
                            // so the next connect will always work if we end up reusing
                            // so the next connect will always work if we end up reusing
                            // the surface.
                            // the surface.
                            if (mSurface.isValid()) {
                                mSurface.forceScopedDisconnect();
                                mSurface.forceScopedDisconnect();
                            }
                            }
                        }
                        }
                    }


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