Fix SurfaceView notifies on invalid surfaces.

SurfaceView notifies registered callbacks on invalid
Surfaces.

Change-Id: Iddc9a5cd073fb73a0e7e9b9ca64ff4fac0777ca7
This commit is contained in:
Andreas Röhl
2012-07-02 13:06:26 +02:00
committed by Johan Redestig
parent dfac68eacc
commit f750b8ce3c

View File

@@ -531,7 +531,7 @@ public class SurfaceView extends View {
mSurface.transferFrom(mNewSurface);
if (visible) {
if (visible && mSurface.isValid()) {
if (!mSurfaceCreated && (surfaceChanged || visibleChanged)) {
mSurfaceCreated = true;
mIsCreating = true;