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

Commit 32a73f21 authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Correct request buffer error status

Camera providers can occasionally reach the maximum amount of de-queue
buffers which will fail any further acquire requests.
Return the corresponding native error status so that providers can
handle this corner case accordingly.

Bug: 232562516
Test: Camera CTS
Change-Id: I6986a15cddb951a284f25dd4aabcbbe14224e33f
parent a9c6db92
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -244,6 +244,8 @@ void requestStreamBuffers(RequestBufferStates& states,
                            __FUNCTION__, streamId, strerror(-res), res);
                    if (res == TIMED_OUT || res == NO_MEMORY) {
                        bufRet.val.set<Tag::error>(StreamBufferRequestError::NO_BUFFER_AVAILABLE);
                    } else if (res == INVALID_OPERATION) {
                        bufRet.val.set<Tag::error>(StreamBufferRequestError::MAX_BUFFER_EXCEEDED);
                    } else {
                        bufRet.val.set<Tag::error>(StreamBufferRequestError::UNKNOWN_ERROR);
                    }