msm8974-common: libril: Handle MCC/MNC in data registration state provided by legacy vendor RILs
Include MCC/MNC provided by legacy (versions 14 and older) vendor RIL implementations as part of data registration state, in data registration state reported to clients of the radio HAL service. Bug: 119904357 Test: local build and did the local test on Marlin device, the mcc/mnc value are correct (not -1 and empty string value). [haggertk: This purposely omits updating the numStrings check in getDataRegistrationStateResponse(), given that we purposely changed that check in our libril] Change-Id: I5a26939402b86d889133e16f3508ab76b8bedddc
This commit is contained in:
parent
1878e1f3b3
commit
672b247a16
@ -3578,6 +3578,11 @@ void fillCellIdentityResponse(CellIdentity &cellIdentity, RIL_CellIdentity_v16 &
|
||||
std::to_string(rilCellIdentity.cellIdentityGsm.mcc);
|
||||
cellIdentity.cellIdentityGsm[0].mnc =
|
||||
ril::util::mnc::decode(rilCellIdentity.cellIdentityGsm.mnc);
|
||||
|
||||
if (cellIdentity.cellIdentityGsm[0].mcc == "-1") {
|
||||
cellIdentity.cellIdentityGsm[0].mcc = "";
|
||||
}
|
||||
|
||||
cellIdentity.cellIdentityGsm[0].lac = rilCellIdentity.cellIdentityGsm.lac;
|
||||
cellIdentity.cellIdentityGsm[0].cid = rilCellIdentity.cellIdentityGsm.cid;
|
||||
cellIdentity.cellIdentityGsm[0].arfcn = rilCellIdentity.cellIdentityGsm.arfcn;
|
||||
@ -3591,6 +3596,11 @@ void fillCellIdentityResponse(CellIdentity &cellIdentity, RIL_CellIdentity_v16 &
|
||||
std::to_string(rilCellIdentity.cellIdentityWcdma.mcc);
|
||||
cellIdentity.cellIdentityWcdma[0].mnc =
|
||||
ril::util::mnc::decode(rilCellIdentity.cellIdentityWcdma.mnc);
|
||||
|
||||
if (cellIdentity.cellIdentityWcdma[0].mcc == "-1") {
|
||||
cellIdentity.cellIdentityWcdma[0].mcc = "";
|
||||
}
|
||||
|
||||
cellIdentity.cellIdentityWcdma[0].lac = rilCellIdentity.cellIdentityWcdma.lac;
|
||||
cellIdentity.cellIdentityWcdma[0].cid = rilCellIdentity.cellIdentityWcdma.cid;
|
||||
cellIdentity.cellIdentityWcdma[0].psc = rilCellIdentity.cellIdentityWcdma.psc;
|
||||
@ -3615,6 +3625,11 @@ void fillCellIdentityResponse(CellIdentity &cellIdentity, RIL_CellIdentity_v16 &
|
||||
std::to_string(rilCellIdentity.cellIdentityLte.mcc);
|
||||
cellIdentity.cellIdentityLte[0].mnc =
|
||||
ril::util::mnc::decode(rilCellIdentity.cellIdentityLte.mnc);
|
||||
|
||||
if (cellIdentity.cellIdentityLte[0].mcc == "-1") {
|
||||
cellIdentity.cellIdentityLte[0].mcc = "";
|
||||
}
|
||||
|
||||
cellIdentity.cellIdentityLte[0].ci = rilCellIdentity.cellIdentityLte.ci;
|
||||
cellIdentity.cellIdentityLte[0].pci = rilCellIdentity.cellIdentityLte.pci;
|
||||
cellIdentity.cellIdentityLte[0].tac = rilCellIdentity.cellIdentityLte.tac;
|
||||
@ -3628,6 +3643,11 @@ void fillCellIdentityResponse(CellIdentity &cellIdentity, RIL_CellIdentity_v16 &
|
||||
std::to_string(rilCellIdentity.cellIdentityTdscdma.mcc);
|
||||
cellIdentity.cellIdentityTdscdma[0].mnc =
|
||||
ril::util::mnc::decode(rilCellIdentity.cellIdentityTdscdma.mnc);
|
||||
|
||||
if (cellIdentity.cellIdentityTdscdma[0].mcc == "-1") {
|
||||
cellIdentity.cellIdentityTdscdma[0].mcc = "";
|
||||
}
|
||||
|
||||
cellIdentity.cellIdentityTdscdma[0].lac = rilCellIdentity.cellIdentityTdscdma.lac;
|
||||
cellIdentity.cellIdentityTdscdma[0].cid = rilCellIdentity.cellIdentityTdscdma.cid;
|
||||
cellIdentity.cellIdentityTdscdma[0].cpid = rilCellIdentity.cellIdentityTdscdma.cpid;
|
||||
@ -3761,6 +3781,14 @@ void fillCellIdentityFromDataRegStateResponseString(CellIdentity &cellIdentity,
|
||||
/* valid CID are hexstrings in the range 0x00000000 - 0xffffffff */
|
||||
rilCellIdentity.cellIdentityGsm.cid =
|
||||
convertResponseHexStringEntryToInt(response, 2, numStrings);
|
||||
|
||||
if (numStrings >= 13) {
|
||||
rilCellIdentity.cellIdentityGsm.mcc =
|
||||
convertResponseStringEntryToInt(response, 11, numStrings);
|
||||
|
||||
rilCellIdentity.cellIdentityGsm.mnc =
|
||||
convertResponseStringEntryToInt(response, 12, numStrings);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RIL_CELL_INFO_TYPE_WCDMA: {
|
||||
@ -3771,6 +3799,14 @@ void fillCellIdentityFromDataRegStateResponseString(CellIdentity &cellIdentity,
|
||||
/* valid CID are hexstrings in the range 0x00000000 - 0xffffffff */
|
||||
rilCellIdentity.cellIdentityWcdma.cid =
|
||||
convertResponseHexStringEntryToInt(response, 2, numStrings);
|
||||
|
||||
if (numStrings >= 13) {
|
||||
rilCellIdentity.cellIdentityWcdma.mcc =
|
||||
convertResponseStringEntryToInt(response, 11, numStrings);
|
||||
|
||||
rilCellIdentity.cellIdentityWcdma.mnc =
|
||||
convertResponseStringEntryToInt(response, 12, numStrings);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RIL_CELL_INFO_TYPE_TD_SCDMA:{
|
||||
@ -3781,6 +3817,14 @@ void fillCellIdentityFromDataRegStateResponseString(CellIdentity &cellIdentity,
|
||||
/* valid CID are hexstrings in the range 0x00000000 - 0xffffffff */
|
||||
rilCellIdentity.cellIdentityTdscdma.cid =
|
||||
convertResponseHexStringEntryToInt(response, 2, numStrings);
|
||||
|
||||
if (numStrings >= 13) {
|
||||
rilCellIdentity.cellIdentityTdscdma.mcc =
|
||||
convertResponseStringEntryToInt(response, 11, numStrings);
|
||||
|
||||
rilCellIdentity.cellIdentityTdscdma.mnc =
|
||||
convertResponseStringEntryToInt(response, 12, numStrings);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RIL_CELL_INFO_TYPE_LTE: {
|
||||
@ -3790,6 +3834,14 @@ void fillCellIdentityFromDataRegStateResponseString(CellIdentity &cellIdentity,
|
||||
convertResponseStringEntryToInt(response, 7, numStrings);
|
||||
rilCellIdentity.cellIdentityLte.ci =
|
||||
convertResponseStringEntryToInt(response, 8, numStrings);
|
||||
|
||||
if (numStrings >= 13) {
|
||||
rilCellIdentity.cellIdentityLte.mcc =
|
||||
convertResponseStringEntryToInt(response, 11, numStrings);
|
||||
|
||||
rilCellIdentity.cellIdentityLte.mnc =
|
||||
convertResponseStringEntryToInt(response, 12, numStrings);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
Loading…
Reference in New Issue
Block a user