diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2023-01-23 23:08:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-01-23 23:08:46 +0000 |
commit | 0b50a2b8ecd32c03833e6d3ee40df8b41dc91ba3 (patch) | |
tree | b3b87119968f839d48082b78e03c65f543b0a869 | |
parent | 2bca4d79c88198e63d8b47eae76fdd1f68b895a7 (diff) | |
parent | 28b147a74f068951a49500f8826d7e3d169014d7 (diff) | |
download | goldfish-main-16k-with-phones.tar.gz |
Merge "Check stream orientation in `configureStreams`"main-16k-with-phones
-rw-r--r-- | camera/CameraDeviceSession.cpp | 5 |
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), {}, {}}; } |