Merge "Camera: Flush in-flight requests during device detach"

gugelfrei
Treehugger Robot 6 years ago committed by Gerrit Code Review
commit c8a6745ac7

@ -1677,9 +1677,12 @@ void CameraDeviceClient::detachDevice() {
// WORKAROUND: HAL refuses to disconnect while there's streams in flight
{
mDevice->clearStreamingRequest();
int64_t lastFrameNumber;
status_t code;
if ((code = mDevice->flush(&lastFrameNumber)) != OK) {
ALOGE("%s: flush failed with code 0x%x", __FUNCTION__, code);
}
if ((code = mDevice->waitUntilDrained()) != OK) {
ALOGE("%s: waitUntilDrained failed with code 0x%x", __FUNCTION__,
code);

Loading…
Cancel
Save