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

Commit 129a94a5 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge changes Ie06e73e5,I7ac6b5b0

* changes:
  free all buffers when ANativeWindow::disconnect is called
  return correct value from query after connecting a surface
parents beccb75d 820a5096
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -133,7 +133,8 @@ public:
    //
    // This method will fail if the connect was previously called on the
    // SurfaceMediaSource and no corresponding disconnect call was made.
    virtual status_t connect(int api);
    virtual status_t connect(int api,
            uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform);

    // disconnect attempts to disconnect a client API from the SurfaceMediaSource.
    // Calling this method will cause any subsequent calls to other
+5 −1
Original line number Diff line number Diff line
@@ -371,7 +371,8 @@ status_t SurfaceMediaSource::setSynchronousMode(bool enabled) {
    return err;
}

status_t SurfaceMediaSource::connect(int api) {
status_t SurfaceMediaSource::connect(int api,
        uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
    LOGV("SurfaceMediaSource::connect");
    Mutex::Autolock lock(mMutex);
    status_t err = NO_ERROR;
@@ -384,6 +385,9 @@ status_t SurfaceMediaSource::connect(int api) {
                err = -EINVAL;
            } else {
                mConnectedApi = api;
                *outWidth = mDefaultWidth;
                *outHeight = mDefaultHeight;
                *outTransform = 0;
            }
            break;
        default: