Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9e7d808 authored by Nathan Harold's avatar Nathan Harold Committed by Automerger Merge Worker
Browse files

Merge "VTS: Check for "ro.board.first_api_level" in GetBarringInfo()" am: e9ec9545

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1946232

Change-Id: I026118ed59ec674589329b4c4b6bf3e50fe2ca88
parents 30112172 e9ec9545
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -1271,8 +1271,12 @@ TEST_P(RadioHidlTest_v1_5, getBarringInfo) {
    EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);


    int32_t firstApiLevel = android::base::GetIntProperty<int32_t>("ro.product.first_api_level", 0);
    int32_t firstApiLevel = android::base::GetIntProperty<int32_t>("ro.product.first_api_level", 0);
    int32_t boardApiLevel = android::base::GetIntProperty<int32_t>("ro.board.first_api_level", 0);
    // Allow devices shipping with Radio::1_5 and Android 11 to not support barring info.
    // 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,
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
        // Early exit for devices that don't support barring info.
        // Early exit for devices that don't support barring info.