From 8b8a004148f2e6337dbf02ef8046d800bf300e89 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 18 Nov 2011 14:30:20 -0800 Subject: [PATCH] don't report an error when disconnecting from an abandoned surfacetexture this happens often with CPU Surfaces, which disconnect long after their surfacetexture has been abandoned. Change-Id: If49da03b72f99130e01b2b9bcbd444bb38f7ed4e --- libs/gui/SurfaceTexture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 056190916..1bd0a1ce8 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -642,8 +642,9 @@ status_t SurfaceTexture::disconnect(int api) { Mutex::Autolock lock(mMutex); if (mAbandoned) { - ST_LOGE("disconnect: SurfaceTexture has been abandoned!"); - return NO_INIT; + // it is not really an error to disconnect after the surface + // has been abandoned, it should just be a no-op. + return NO_ERROR; } int err = NO_ERROR;