Skip to content

Commit b05bb17

Browse files
committed
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
1 parent 4d71053 commit b05bb17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/gui/SurfaceTexture.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,9 @@ status_t SurfaceTexture::disconnect(int api) {
642642
Mutex::Autolock lock(mMutex);
643643

644644
if (mAbandoned) {
645-
ST_LOGE("disconnect: SurfaceTexture has been abandoned!");
646-
return NO_INIT;
645+
// it is not really an error to disconnect after the surface
646+
// has been abandoned, it should just be a no-op.
647+
return NO_ERROR;
647648
}
648649

649650
int err = NO_ERROR;

0 commit comments

Comments
 (0)