Merge "Camera: fix camera_metadata address expectation" into oc-dev

am: e812feb56f

Change-Id: I9142f4bb7a55f9c1e6547a038b21f7cbb4e5adba
This commit is contained in:
Yin-Chia Yeh 2017-06-16 19:40:12 +00:00 committed by android-build-merger
commit 1ea71cc4f2

View file

@ -1680,7 +1680,8 @@ TEST_F(CameraHidlTest, getCameraCharacteristics) {
ASSERT_EQ(Status::OK, status);
const camera_metadata_t* metadata = (camera_metadata_t*) chars.data();
size_t expectedSize = chars.size();
ASSERT_EQ(0, validate_camera_metadata_structure(metadata, &expectedSize));
int result = validate_camera_metadata_structure(metadata, &expectedSize);
ASSERT_TRUE(result == 0 || result == CAMERA_METADATA_VALIDATION_SHIFTED);
size_t entryCount = get_camera_metadata_entry_count(metadata);
// TODO: we can do better than 0 here. Need to check how many required
// characteristics keys we've defined.
@ -1997,8 +1998,9 @@ TEST_F(CameraHidlTest, constructDefaultRequestSettings) {
const camera_metadata_t* metadata =
(camera_metadata_t*) req.data();
size_t expectedSize = req.size();
ASSERT_EQ(0, validate_camera_metadata_structure(
metadata, &expectedSize));
int result = validate_camera_metadata_structure(
metadata, &expectedSize);
ASSERT_TRUE(result == 0 || result == CAMERA_METADATA_VALIDATION_SHIFTED);
size_t entryCount = get_camera_metadata_entry_count(metadata);
// TODO: we can do better than 0 here. Need to check how many required
// request keys we've defined for each template