Camera: Fix test to use 64 bit pointer in stream use cases

I23a4324602 updated stream use cases to use 64 bit integers. The
`configureStreamUseCases` test was still using a pointer to 32 bit
integer to determine supported use cases. This CL updates how supported
use cases are populated to use a pointer to 64 bit integers instead.

Bug: 226171215
Test: `configureStreamUseCases` which was failing on cuttlefish is  now
      passing
Change-Id: I5b1ef4e8e344e43b10ea5c992afaace03608660d
This commit is contained in:
Avichal Rakesh
2022-03-22 13:52:36 -07:00
parent 5c74cb3ddf
commit e1685a735e

View File

@@ -2989,8 +2989,8 @@ TEST_P(CameraAidlTest, configureStreamsUseCases) {
auto retcode = find_camera_metadata_ro_entry(
staticMeta, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, &entry);
if ((0 == retcode) && (entry.count > 0)) {
supportedUseCases.insert(supportedUseCases.end(), entry.data.i32,
entry.data.i32 + entry.count);
supportedUseCases.insert(supportedUseCases.end(), entry.data.i64,
entry.data.i64 + entry.count);
} else {
supportedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT);
}
@@ -3034,12 +3034,13 @@ TEST_P(CameraAidlTest, configureStreamsUseCases) {
bool combSupported;
ret = cameraDevice->isStreamCombinationSupported(config, &combSupported);
ASSERT_TRUE((ret.isOk()) || (static_cast<int32_t>(Status::OPERATION_NOT_SUPPORTED) ==
ret.getServiceSpecificError()));
if (ret.isOk()) {
ASSERT_EQ(combSupported, useCaseSupported);
if (static_cast<int32_t>(Status::OPERATION_NOT_SUPPORTED) ==
ret.getServiceSpecificError()) {
continue;
}
ASSERT_TRUE(ret.isOk());
ASSERT_EQ(combSupported, useCaseSupported);
std::vector<HalStream> halStreams;
ret = mSession->configureStreams(config, &halStreams);