summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2011-11-18 14:30:20 -0800
committer Mathias Agopian <mathias@google.com> 2011-11-18 14:32:35 -0800
commitb05bb17eebe631637cf9fa3af00758e8159d6e8d (patch)
tree86c9b59ecf5d806e34f2e7a39aaf37c3b1b80fbe
parent4d71053b0728b248d80d7d5a098df459722e2be0 (diff)
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
-rw-r--r--libs/gui/SurfaceTexture.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 056190916414..1bd0a1ce872b 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;