diff options
| author | 2017-04-19 19:07:39 +0000 | |
|---|---|---|
| committer | 2017-04-19 19:07:39 +0000 | |
| commit | cc9245515459bb2d72a35151dc0267d8bac820c7 (patch) | |
| tree | c3edef3aadd50a0de89a3df9360859cbbda28f13 /libs/gui/BufferQueueProducer.cpp | |
| parent | bba4b8a1fdd288d3d638963066209a632347b4fc (diff) | |
| parent | fc333972e92e176ea73b34c5c6c25fc5875140be (diff) | |
Merge "Return error when trying to disconnect twice" into oc-dev
am: fc333972e9
Change-Id: Ief6294b415385e1cf584f1d54cf605c78717c43d
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
| -rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index 9415b33688..f3e4381ad6 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -1268,7 +1268,10 @@ status_t BufferQueueProducer::disconnect(int api, DisconnectMode mode) { mCore->mSidebandStream.clear(); mCore->mDequeueCondition.broadcast(); listener = mCore->mConsumerListener; - } else if (mCore->mConnectedApi != BufferQueueCore::NO_CONNECTED_API) { + } else if (mCore->mConnectedApi == BufferQueueCore::NO_CONNECTED_API) { + BQ_LOGE("disconnect: not connected (req=%d)", api); + status = NO_INIT; + } else { BQ_LOGE("disconnect: still connected to another API " "(cur=%d req=%d)", mCore->mConnectedApi, api); status = BAD_VALUE; |