SurfaceView only call forceDisconnect if isValid am: 6ba466ff3e

am: 5a0da698a7

Change-Id: I356848f7edb11304d9ab4584dab8e5895ff49762
This commit is contained in:
John Reck
2016-09-30 23:23:17 +00:00
committed by android-build-merger

View File

@@ -598,7 +598,9 @@ 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.
mSurface.forceScopedDisconnect();
if (mSurface.isValid()) {
mSurface.forceScopedDisconnect();
}
}
}