From 3bc635e7b7e2565505827f20df39d1481c5c68eb Mon Sep 17 00:00:00 2001 From: Grant Menke Date: Thu, 4 Jan 2024 11:48:48 -0800 Subject: [PATCH] Updated VTS getSimultaneousCallingSupport test. This CL updates the getSimultaneousCallingSupport VTS test to ensure that REQUEST_NOT_SUPPORTED is not returned and that enabledLogicalSlots is set to an empty array by default for the default CF impl. Test: VtsHalRadioTargetTest Bug: 311495663 Change-Id: Ie382c14a19951bb69c7b7db4056f0e9dabc27685 --- radio/aidl/vts/radio_config_response.cpp | 3 ++- radio/aidl/vts/radio_config_test.cpp | 9 ++++++++- radio/aidl/vts/radio_config_utils.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/radio/aidl/vts/radio_config_response.cpp b/radio/aidl/vts/radio_config_response.cpp index dccbd0e9c5..c532440dcc 100644 --- a/radio/aidl/vts/radio_config_response.cpp +++ b/radio/aidl/vts/radio_config_response.cpp @@ -41,8 +41,9 @@ ndk::ScopedAStatus RadioConfigResponse::getPhoneCapabilityResponse( } ndk::ScopedAStatus RadioConfigResponse::getSimultaneousCallingSupportResponse( - const RadioResponseInfo& info, const std::vector& /* enabledLogicalSlots */) { + const RadioResponseInfo& info, const std::vector& enabledLogicalSlots) { rspInfo = info; + currentEnabledLogicalSlots = enabledLogicalSlots; parent_config.notify(info.serial); return ndk::ScopedAStatus::ok(); } diff --git a/radio/aidl/vts/radio_config_test.cpp b/radio/aidl/vts/radio_config_test.cpp index f7251367c3..6f18d18c49 100644 --- a/radio/aidl/vts/radio_config_test.cpp +++ b/radio/aidl/vts/radio_config_test.cpp @@ -150,10 +150,17 @@ TEST_P(RadioConfigTest, getSimultaneousCallingSupport) { ALOGI("getSimultaneousCallingSupport, rspInfo.error = %s\n", toString(radioRsp_config->rspInfo.error).c_str()); + // REQUEST_NOT_SUPPORTED is omitted here because users of the V3 HAL should implement this + // method and return at least an empty array ASSERT_TRUE(CheckAnyOfErrors( radioRsp_config->rspInfo.error, {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR, - RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED})); + RadioError::MODEM_ERR})); + + if (radioRsp_config->rspInfo.error == RadioError ::NONE) { + // The size of enabledLogicalSLots should be 0 or a positive number: + EXPECT_GE(radioRsp_config->currentEnabledLogicalSlots.size(), 0); + } } /* diff --git a/radio/aidl/vts/radio_config_utils.h b/radio/aidl/vts/radio_config_utils.h index 9e809ff4ef..84c74fcec7 100644 --- a/radio/aidl/vts/radio_config_utils.h +++ b/radio/aidl/vts/radio_config_utils.h @@ -39,6 +39,7 @@ class RadioConfigResponse : public BnRadioConfigResponse { PhoneCapability phoneCap; bool modemReducedFeatureSet1; std::vector simSlotStatus; + std::vector currentEnabledLogicalSlots; virtual ndk::ScopedAStatus getSimSlotsStatusResponse( const RadioResponseInfo& info, const std::vector& slotStatus) override;