Camera: Include session parameters for 3.4 devices

To avoid glitches and unexpected behavior, session parameters
should be included in the stream configuration before invoking
capture requests.

Bug: 70560715
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: Id4ecd40533157f1a3299099a984ffab21654548a
This commit is contained in:
Emilian Peev 2018-01-18 20:00:00 +00:00
parent e541981ac2
commit 37e1a5dcfd

View file

@ -3833,6 +3833,13 @@ void CameraHidlTest::configurePreviewStream(const std::string &name, int32_t dev
::android::hardware::camera::device::V3_4::StreamConfiguration config;
config.v3_2 = {streams, StreamConfigurationMode::NORMAL_MODE};
if (session3_4 != nullptr) {
RequestTemplate reqTemplate = RequestTemplate::PREVIEW;
ret = session3_4->constructDefaultRequestSettings(reqTemplate,
[&config](auto status, const auto& req) {
ASSERT_EQ(Status::OK, status);
config.sessionParams = req;
});
ASSERT_TRUE(ret.isOk());
ret = session3_4->configureStreams_3_4(config,
[&] (Status s, device::V3_3::HalStreamConfiguration halConfig) {
ASSERT_EQ(Status::OK, s);