diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-10-27 09:00:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-27 09:00:59 +0000 |
commit | 33f79bed54a274763fe39103f6b22d52caa2c158 (patch) | |
tree | 93967edb49be88f3150b5e9d824885e5c9f00dd8 | |
parent | 93b625c1998ba9c82152a470d2f0a55266484401 (diff) | |
parent | 4729b849927377a0cf9b660b0705e412368aee18 (diff) | |
download | ril-33f79bed54a274763fe39103f6b22d52caa2c158.tar.gz |
Merge "Map RIL_RadioTechnologyFamily to RadioTechnologyFamily correctly" am: 4729b84992
Original change: https://android-review.googlesource.com/c/platform/hardware/ril/+/1471647
Change-Id: I00e8a517b9cbb76fe78495bdad47941136958554
-rwxr-xr-x | libril/ril_service.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp index 06bdfef..123f3e2 100755 --- a/libril/ril_service.cpp +++ b/libril/ril_service.cpp @@ -5971,7 +5971,7 @@ int radio::getImsRegistrationStateResponse(int slotId, RadioResponseInfo responseInfo = {}; populateResponseInfo(responseInfo, serial, responseType, e); bool isRegistered = false; - int ratFamily = 0; + RadioTechnologyFamily ratFamily = RadioTechnologyFamily::THREE_GPP; int numInts = responseLen / sizeof(int); if (response == NULL || numInts != 2) { RLOGE("getImsRegistrationStateResponse Invalid response: NULL"); @@ -5979,11 +5979,16 @@ int radio::getImsRegistrationStateResponse(int slotId, } else { int *pInt = (int *) response; isRegistered = pInt[0] == 1 ? true : false; - ratFamily = pInt[1]; + // Map RIL_RadioTechnologyFamily to RadioTechnologyFamily + if (pInt[1] == RADIO_TECH_3GPP) { + ratFamily = RadioTechnologyFamily::THREE_GPP; + } else { + ratFamily = RadioTechnologyFamily::THREE_GPP2; + } } Return<void> retStatus = radioService[slotId]->mRadioResponse->getImsRegistrationStateResponse( - responseInfo, isRegistered, (RadioTechnologyFamily) ratFamily); + responseInfo, isRegistered, ratFamily); radioService[slotId]->checkReturnStatus(retStatus); } else { RLOGE("getImsRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL", |