Revert "Camera: VTS: Require ConstructDefaultSettings for new HAL"

Revert submission 25658204-EnableFeatureCombination

Reason for revert: b/317270728

Reverted changes: /q/submissionid:25658204-EnableFeatureCombination

Change-Id: Id048e9bd5ba08f7856ccf88fd7bfdca06ce0727c
This commit is contained in:
Shuzhen Wang 2023-12-20 22:08:30 +00:00
parent d7f0d0ab4a
commit 7a237d1545
3 changed files with 22 additions and 18 deletions

View file

@ -531,7 +531,11 @@ TEST_P(CameraAidlTest, constructDefaultRequestSettings) {
}
if (ret.isOk()) {
validateDefaultRequestMetadata(reqTemplate, rawMetadata);
const camera_metadata_t* metadata = (camera_metadata_t*)rawMetadata.metadata.data();
size_t expectedSize = rawMetadata.metadata.size();
int result = validate_camera_metadata_structure(metadata, &expectedSize);
ASSERT_TRUE((result == 0) || (result == CAMERA_METADATA_VALIDATION_SHIFTED));
verifyRequestTemplate(metadata, reqTemplate);
} else {
ASSERT_EQ(0u, rawMetadata.metadata.size());
}
@ -542,12 +546,24 @@ TEST_P(CameraAidlTest, constructDefaultRequestSettings) {
ndk::ScopedAStatus ret2 =
device->constructDefaultRequestSettings(reqTemplate, &rawMetadata2);
ASSERT_EQ(ret.isOk(), ret2.isOk());
ASSERT_EQ(ret.getStatus(), ret2.getStatus());
// TODO: Do not allow OPERATION_NOT_SUPPORTED once HAL
// implementation is in place.
if (static_cast<Status>(ret2.getServiceSpecificError()) !=
Status::OPERATION_NOT_SUPPORTED) {
ASSERT_EQ(ret.isOk(), ret2.isOk());
ASSERT_EQ(ret.getStatus(), ret2.getStatus());
ASSERT_EQ(rawMetadata.metadata.size(), rawMetadata2.metadata.size());
if (ret2.isOk()) {
validateDefaultRequestMetadata(reqTemplate, rawMetadata2);
ASSERT_EQ(rawMetadata.metadata.size(), rawMetadata2.metadata.size());
if (ret2.isOk()) {
const camera_metadata_t* metadata =
(camera_metadata_t*)rawMetadata2.metadata.data();
size_t expectedSize = rawMetadata2.metadata.size();
int result =
validate_camera_metadata_structure(metadata, &expectedSize);
ASSERT_TRUE((result == 0) ||
(result == CAMERA_METADATA_VALIDATION_SHIFTED));
verifyRequestTemplate(metadata, reqTemplate);
}
}
}
}

View file

@ -4026,12 +4026,3 @@ void CameraAidlTest::getSupportedDurations(const camera_metadata_t* ch, uint32_t
}
}
}
void CameraAidlTest::validateDefaultRequestMetadata(RequestTemplate reqTemplate,
const CameraMetadata& rawMetadata) {
const camera_metadata_t* metadata = (camera_metadata_t*)rawMetadata.metadata.data();
size_t expectedSize = rawMetadata.metadata.size();
int result = validate_camera_metadata_structure(metadata, &expectedSize);
ASSERT_TRUE((result == 0) || (result == CAMERA_METADATA_VALIDATION_SHIFTED));
verifyRequestTemplate(metadata, reqTemplate);
}

View file

@ -588,9 +588,6 @@ class CameraAidlTest : public ::testing::TestWithParam<std::string> {
static void waitForReleaseFence(
std::vector<InFlightRequest::StreamBufferAndTimestamp>& resultOutputBuffers);
static void validateDefaultRequestMetadata(RequestTemplate reqTemplate,
const CameraMetadata& rawMetadata);
// Map from frame number to the in-flight request state
typedef std::unordered_map<uint32_t, std::shared_ptr<InFlightRequest>> InFlightMap;