Camera: Retry JPEG capture if buffer is dropped.
Camera api1 doesn't have error notification if JPEG buffer is dropped.
Add retry logic to try again if such error happens.
Bug: 27074407
Change-Id: I646566c6ee5a064896b5a433d8e1797140f0d257
diff --git a/services/camera/libcameraservice/device3/Camera3Stream.cpp b/services/camera/libcameraservice/device3/Camera3Stream.cpp
index 50f7a91..a4714a7 100644
--- a/services/camera/libcameraservice/device3/Camera3Stream.cpp
+++ b/services/camera/libcameraservice/device3/Camera3Stream.cpp
@@ -560,7 +560,7 @@
}
void Camera3Stream::fireBufferListenersLocked(
- const camera3_stream_buffer& /*buffer*/, bool acquired, bool output) {
+ const camera3_stream_buffer& buffer, bool acquired, bool output) {
List<wp<Camera3StreamBufferListener> >::iterator it, end;
// TODO: finish implementing
@@ -568,6 +568,7 @@
Camera3StreamBufferListener::BufferInfo info =
Camera3StreamBufferListener::BufferInfo();
info.mOutput = output;
+ info.mError = (buffer.status == CAMERA3_BUFFER_STATUS_ERROR);
// TODO: rest of fields
for (it = mBufferListenerList.begin(), end = mBufferListenerList.end();