diff options
author | Shuo Qian | 2017-08-03 18:17:33 -0500 |
---|---|---|
committer | android-build-merger | 2017-08-03 18:17:33 -0500 |
commit | d4c6c7b703a6725ddb7c7a48e229a3ab8aede343 (patch) | |
tree | 34dfa900c5980d498c1036aaf63f8b1be5c76b8a | |
parent | 7f8774ef804305bb04b1d2d17d8e4e657ad79761 (diff) | |
parent | afcdb1effb2c0309ff51160a1fd0a5b93d7f6360 (diff) | |
download | platform-hardware-interfaces-d4c6c7b703a6725ddb7c7a48e229a3ab8aede343.tar.gz platform-hardware-interfaces-d4c6c7b703a6725ddb7c7a48e229a3ab8aede343.tar.xz platform-hardware-interfaces-d4c6c7b703a6725ddb7c7a48e229a3ab8aede343.zip |
Merge "Add vts test for setCarrierInfoForImsiEncryption"
am: afcdb1effb
Change-Id: I08ab4ff325457ee5242060a5b40e56ce0c227ad4
-rw-r--r-- | radio/1.1/vts/functional/radio_hidl_hal_api.cpp | 23 | ||||
-rw-r--r-- | radio/1.1/vts/functional/radio_response.cpp | 4 |
2 files changed, 26 insertions, 1 deletions
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_api.cpp b/radio/1.1/vts/functional/radio_hidl_hal_api.cpp index e4d434ab..70c19241 100644 --- a/radio/1.1/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.1/vts/functional/radio_hidl_hal_api.cpp | |||
@@ -107,3 +107,26 @@ TEST_F(RadioHidlTest_v1_1, stopNetworkScan) { | |||
107 | radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED); | 107 | radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED); |
108 | } | 108 | } |
109 | } | 109 | } |
110 | |||
111 | /* | ||
112 | * Test IRadio.setCarrierInfoForImsiEncryption() for the response returned. | ||
113 | */ | ||
114 | TEST_F(RadioHidlTest_v1_1, setCarrierInfoForImsiEncryption) { | ||
115 | int serial = GetRandomSerialNumber(); | ||
116 | ImsiEncryptionInfo imsiInfo; | ||
117 | imsiInfo.mcc = "310"; | ||
118 | imsiInfo.mnc = "004"; | ||
119 | imsiInfo.carrierKey = (std::vector<uint8_t>){1, 2, 3, 4, 5, 6}; | ||
120 | imsiInfo.keyIdentifier = "Test"; | ||
121 | imsiInfo.expirationTime = 20180101; | ||
122 | |||
123 | radio_v1_1->setCarrierInfoForImsiEncryption(serial, imsiInfo); | ||
124 | EXPECT_EQ(std::cv_status::no_timeout, wait()); | ||
125 | EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_1->rspInfo.type); | ||
126 | EXPECT_EQ(serial, radioRsp_v1_1->rspInfo.serial); | ||
127 | |||
128 | if (cardStatus.cardState == CardState::ABSENT) { | ||
129 | ASSERT_TRUE(radioRsp_v1_1->rspInfo.error == RadioError::NONE || | ||
130 | radioRsp_v1_1->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED); | ||
131 | } | ||
132 | } | ||
diff --git a/radio/1.1/vts/functional/radio_response.cpp b/radio/1.1/vts/functional/radio_response.cpp index 37b80b16..407b4640 100644 --- a/radio/1.1/vts/functional/radio_response.cpp +++ b/radio/1.1/vts/functional/radio_response.cpp | |||
@@ -659,7 +659,9 @@ Return<void> RadioResponse_v1_1::acknowledgeRequest(int32_t /*serial*/) { | |||
659 | 659 | ||
660 | /* 1.1 Apis */ | 660 | /* 1.1 Apis */ |
661 | Return<void> RadioResponse_v1_1::setCarrierInfoForImsiEncryptionResponse( | 661 | Return<void> RadioResponse_v1_1::setCarrierInfoForImsiEncryptionResponse( |
662 | const RadioResponseInfo& /*info*/) { | 662 | const RadioResponseInfo& info) { |
663 | rspInfo = info; | ||
664 | parent_v1_1.notify(); | ||
663 | return Void(); | 665 | return Void(); |
664 | } | 666 | } |
665 | 667 | ||