Skip hal v1 check after p on low ram devices

Bug: 116546417
Test: vts-tradefed run commandAndExit vts
-m VtsHalCameraProviderV2_4Target
-t VtsHalCameraProviderV2_4Target#CameraHidlTest.noHal1AfterP

Change-Id: I28782b560975b49e20d6b42d599d689f819a9383
This commit is contained in:
Ng Zhi An
2018-09-27 16:55:47 -07:00
committed by Zhi An Ng
parent 23874c7ae9
commit a0eb7e415c

View File

@@ -1172,6 +1172,14 @@ TEST_F(CameraHidlTest, noHal1AfterP) {
}
ASSERT_GT(firstApiLevel, 0); // first_api_level must exist
// all devices with first API level == 28 and <= 1GB of RAM must set low_ram
// and thus be allowed to continue using HAL1
if ((firstApiLevel == HAL1_PHASE_OUT_API_LEVEL) &&
(property_get_bool("ro.config.low_ram", /*default*/ false))) {
ALOGI("Hal1 allowed for low ram device");
return;
}
if (firstApiLevel >= HAL1_PHASE_OUT_API_LEVEL) {
hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames(mProvider);
for (const auto& name : cameraDeviceNames) {