diff options
author | Alex Deymo <deymo@google.com> | 2016-08-25 16:34:26 -0700 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2016-08-25 16:35:42 -0700 |
commit | 2f0410a7d7d45b6d3d281df42a5f1761cddeb24f (patch) | |
tree | 96efa9d86be58b0462b2c42fec401f5189229461 | |
parent | 3382242b298bb171ed3b13cef4e51e92a69f0f25 (diff) | |
download | common-main.tar.gz |
The Status object needs to be converted to a string before printing.
Bug: 31098727
Test: `make dist`
Change-Id: Ic226a95a33edee296198d4bb1ee98a670dbb8b9b
-rw-r--r-- | brillo_camera/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/brillo_camera/main.cpp b/brillo_camera/main.cpp index 081eb4f..0116c25 100644 --- a/brillo_camera/main.cpp +++ b/brillo_camera/main.cpp @@ -164,12 +164,13 @@ int main() { ICameraService::USE_CALLING_UID, &camera_device_user); CHECK(status.isOk()) << "Failed to connect to camera id=" - << camera_id << " error=" << status; + << camera_id << " error=" << status.toString8(); LOG(INFO) << "Obtaining camera info"; CameraMetadata camera_metadata; status = camera_device_user->getCameraInfo(&camera_metadata); - CHECK(status.isOk()) << "Failed to get camera info, error=" << status; + CHECK(status.isOk()) << "Failed to get camera info, error=" + << status.toString8(); LOG(INFO) << "Calculating smallest stream configuration"; camera_metadata_entry streamConfigs = @@ -213,16 +214,16 @@ int main() { LOG(INFO) << "Configuring the camera"; status = camera_device_user->beginConfigure(); CHECK(status.isOk()) << "Failed calling ICameraDeviceUser::beginConfigure()" - << " error = " << status; + << " error = " << status.toString8(); android::OutputConfiguration output_configuration( buffer_producer, CAMERA3_STREAM_ROTATION_0); int32_t stream_id; status = camera_device_user->createStream(output_configuration, &stream_id); CHECK(status.isOk()) << "Failed calling ICameraDeviceUser::createStream()" - << " error = " << status; + << " error = " << status.toString8(); status = camera_device_user->endConfigure(false /* isConstrainedHighSpeed */); CHECK(status.isOk()) << "Failed calling ICameraDeviceUser::endConfigure()" - << " error = " << status; + << " error = " << status.toString8(); LOG(INFO) << "Creating capture_request"; // CaptureRequest doesn't define incStrong, can't be strong pointer. @@ -238,7 +239,7 @@ int main() { SubmitInfo submit_info; status = camera_device_user->submitRequest( *capture_request, false, &submit_info); - CHECK(status.isOk()) << "Got error=" << status + CHECK(status.isOk()) << "Got error=" << status.toString8() << " while submitting capture request."; LOG(INFO) << "Waiting for the camera to take a picture."; |