Fix crash issue on test case RadioHidlTest_v1_5#startNetworkScan.
Bad safe_union access is raised by calling the GET method of eutranBands(), because in default ctor of safe_union RadioAccessSpecifier::Bands hidl_d is assigned with hidl_discriminator::geranBands, which conflicts with hidl_discriminator::eutranBands, and leads to crash. Should use the SET method of eutranBands(&) for assignment purpose. Fix: 275077563 Bug: 271642958 Change-Id: Ie241e8968eb7f9a1297203be2ab4e0a1bf738dea Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
This commit is contained in:
parent
2550e7a719
commit
a2881ffbd0
1 changed files with 2 additions and 2 deletions
|
@ -565,9 +565,9 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
|
|||
serial = GetRandomSerialNumber();
|
||||
|
||||
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band17;
|
||||
band17.eutranBands() = {::android::hardware::radio::V1_5::EutranBands::BAND_17};
|
||||
band17.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_17});
|
||||
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band20;
|
||||
band20.eutranBands() = {::android::hardware::radio::V1_5::EutranBands::BAND_20};
|
||||
band20.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_20});
|
||||
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier17 = {
|
||||
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
|
||||
.bands = band17,
|
||||
|
|
Loading…
Reference in a new issue