Fix SurfaceView notifies on invalid surfaces.
SurfaceView notifies registered callbacks on invalid Surfaces. Change-Id: Iddc9a5cd073fb73a0e7e9b9ca64ff4fac0777ca7
This commit is contained in:
committed by
Johan Redestig
parent
dfac68eacc
commit
f750b8ce3c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user