camera: Configure streams immediately when API2 does configuration
This makes the configuration more eager (no more waiting until the first
request) and also allows any errors to immediately be sent back to the
client.
Bug: 16629195
Change-Id: I0c365bc8f760466916dcc089217a43c43f9f4c9d
diff --git a/services/camera/libcameraservice/device2/Camera2Device.cpp b/services/camera/libcameraservice/device2/Camera2Device.cpp
index d473a76..8caadd6 100644
--- a/services/camera/libcameraservice/device2/Camera2Device.cpp
+++ b/services/camera/libcameraservice/device2/Camera2Device.cpp
@@ -415,6 +415,19 @@
return OK;
}
+status_t Camera2Device::configureStreams() {
+ ATRACE_CALL();
+ ALOGV("%s: E", __FUNCTION__);
+
+ /**
+ * HAL2 devices do not need to configure streams;
+ * streams are created on the fly.
+ */
+ ALOGW("%s: No-op for HAL2 devices", __FUNCTION__);
+
+ return OK;
+}
+
status_t Camera2Device::createDefaultRequest(int templateId,
CameraMetadata *request) {