Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b8a0041 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

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
parent 6285c6cf
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;