commit | ccdcb8b60f2c85ad6e81a4e5b053d11952b9d148 | [log] [tgz] |
---|---|---|
author | Yin-Chia Yeh <yinchiayeh@google.com> | Wed May 02 12:20:54 2018 -0700 |
committer | Yin-Chia Yeh <yinchiayeh@google.com> | Wed May 02 12:20:54 2018 -0700 |
tree | 82e0cc8b64d0563ee32334d1350d4ac17abe031f | |
parent | 89802f742382863ea26e7761bf773b0d4824608b [diff] |
Camera: fix first launch api level logic Fall back to sdk_int when first api property is not set. Test: partner device Bug: 79133095 Change-Id: Ice78e42cd25d351586d0d2b16c0b555c504b9d4a
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp index 637e280..baffc78 100644 --- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -1157,6 +1157,9 @@ TEST_F(CameraHidlTest, noHal1AfterP) { constexpr int32_t HAL1_PHASE_OUT_API_LEVEL = 28; int32_t firstApiLevel = property_get_int32("ro.product.first_api_level", /*default*/-1); + if (firstApiLevel < 0) { + firstApiLevel = property_get_int32("ro.build.version.sdk", /*default*/-1); + } ASSERT_GT(firstApiLevel, 0); // first_api_level must exist if (firstApiLevel >= HAL1_PHASE_OUT_API_LEVEL) {