summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2023-01-23 23:08:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-01-23 23:08:46 +0000
commit0b50a2b8ecd32c03833e6d3ee40df8b41dc91ba3 (patch)
treeb3b87119968f839d48082b78e03c65f543b0a869
parent2bca4d79c88198e63d8b47eae76fdd1f68b895a7 (diff)
parent28b147a74f068951a49500f8826d7e3d169014d7 (diff)
downloadgoldfish-main-16k-with-phones.tar.gz
Merge "Check stream orientation in `configureStreams`"main-16k-with-phones
-rw-r--r--camera/CameraDeviceSession.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/camera/CameraDeviceSession.cpp b/camera/CameraDeviceSession.cpp
index 25cbf04f..f7f6d58d 100644
--- a/camera/CameraDeviceSession.cpp
+++ b/camera/CameraDeviceSession.cpp
@@ -44,6 +44,7 @@ namespace implementation {
using aidl::android::hardware::camera::common::Status;
using aidl::android::hardware::camera::device::CaptureResult;
using aidl::android::hardware::camera::device::ErrorCode;
+using aidl::android::hardware::camera::device::StreamRotation;
using aidl::android::hardware::camera::device::StreamType;
namespace {
@@ -361,6 +362,10 @@ CameraDeviceSession::configureStreamsStatic(const StreamConfiguration& cfg,
return {FAILURE(Status::ILLEGAL_ARGUMENT), {}, {}};
}
+ if (s.rotation != StreamRotation::ROTATION_0) {
+ return {FAILURE(Status::ILLEGAL_ARGUMENT), {}, {}};
+ }
+
if (s.bufferSize < 0) {
return {FAILURE(Status::ILLEGAL_ARGUMENT), {}, {}};
}