mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
VTS: stop network scan once trigger network scan success
For some vendors do not supports independent radios, if there is one manual search ongoing, another manual search on other SIM is not supported. So sending stop network scan request once trigger network scan completed to exclude this modem limitation. Bug: 135005200 Test: atest RadioHidlTest_v1_2#startNetworkScan Change-Id: Iacfd59ac2ad4d44e763ee03697c1f8f57162ce38
This commit is contained in:
committed by
Terry Huang
parent
5c654f3fc6
commit
a2affa6636
@@ -60,6 +60,11 @@ TEST_F(RadioHidlTest_v1_2, startNetworkScan) {
|
||||
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
|
||||
RadioError::OPERATION_NOT_ALLOWED}));
|
||||
}
|
||||
|
||||
if (radioRsp_v1_2->rspInfo.error == RadioError::NONE) {
|
||||
ALOGI("Stop Network Scan");
|
||||
stopNetworkScan();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android/hardware/radio/1.1/IRadio.h>
|
||||
#include <radio_hidl_hal_utils_v1_2.h>
|
||||
|
||||
void RadioHidlTest_v1_2::SetUp() {
|
||||
@@ -84,4 +85,28 @@ void RadioHidlTest_v1_2::updateSimCardStatus() {
|
||||
serial = GetRandomSerialNumber();
|
||||
radio_v1_2->getIccCardStatus(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
}
|
||||
}
|
||||
|
||||
void RadioHidlTest_v1_2::stopNetworkScan() {
|
||||
sp<::android::hardware::radio::V1_1::IRadio> radio_v1_1;
|
||||
|
||||
radio_v1_1 = ::testing::VtsHalHidlTargetTestBase::getService<
|
||||
::android::hardware::radio::V1_1::IRadio>(
|
||||
RadioHidlEnvironment::Instance()
|
||||
->getServiceName<::android::hardware::radio::V1_1::IRadio>(
|
||||
hidl_string(RADIO_SERVICE_NAME)));
|
||||
if (radio_v1_1 == NULL) {
|
||||
sleep(60);
|
||||
radio_v1_1 = ::testing::VtsHalHidlTargetTestBase::getService<
|
||||
::android::hardware::radio::V1_1::IRadio>(
|
||||
RadioHidlEnvironment::Instance()
|
||||
->getServiceName<::android::hardware::radio::V1_1::IRadio>(
|
||||
hidl_string(RADIO_SERVICE_NAME)));
|
||||
}
|
||||
ASSERT_NE(nullptr, radio_v1_1.get());
|
||||
|
||||
serial = GetRandomSerialNumber();
|
||||
|
||||
radio_v1_1->stopNetworkScan(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
}
|
||||
|
||||
@@ -622,7 +622,10 @@ class RadioHidlTest_v1_2 : public ::testing::VtsHalHidlTargetTestBase {
|
||||
/* Update Sim Card Status */
|
||||
void updateSimCardStatus();
|
||||
|
||||
public:
|
||||
/* Stop Network Scan Command */
|
||||
void stopNetworkScan();
|
||||
|
||||
public:
|
||||
virtual void SetUp() override;
|
||||
|
||||
/* Used as a mechanism to inform the test about data/event callback */
|
||||
|
||||
Reference in New Issue
Block a user