From c338f29b6d8cb271776a640143be19aca1dbc26f Mon Sep 17 00:00:00 2001 From: Sneh Bansal Date: Wed, 12 Jan 2022 20:23:57 +0530 Subject: [PATCH] VTS: Check for "ro.board.first_api_level" in GetBarringInfo() Some GRF targets launched with S release do not support getBarringInfo() API. Check "ro.board.first_api_level" also to return from the test-case when the response is REQUEST_NOT_SUPPORTED. Bug: 212384410 Change-Id: I890f54f80ff3aca3dcb2c51f20db087d453c2927 --- radio/1.5/vts/functional/radio_hidl_hal_api.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp index d108951c0e..152858f6a8 100644 --- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp @@ -1271,8 +1271,12 @@ TEST_P(RadioHidlTest_v1_5, getBarringInfo) { EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial); int32_t firstApiLevel = android::base::GetIntProperty("ro.product.first_api_level", 0); + int32_t boardApiLevel = android::base::GetIntProperty("ro.board.first_api_level", 0); // Allow devices shipping with Radio::1_5 and Android 11 to not support barring info. - if (firstApiLevel > 0 && firstApiLevel <= 30) { + // b/212384410 Some GRF targets lauched with S release but with vendor R release + // do not support getBarringInfo API. Allow these devices to not support barring info. + if ((firstApiLevel > 0 && firstApiLevel <= 30) || + (boardApiLevel > 0 && boardApiLevel <= 30)) { ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED})); // Early exit for devices that don't support barring info.