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;
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;
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;
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;
/* 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: {
/* 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:{
/* 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: {
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: {
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else if (s_vendorFunctions->version <= 14) {
int numStrings = responseLen / sizeof(char *);
- if ((numStrings != 6) && (numStrings != 11)) {
+ if ((numStrings != 6) && (numStrings != 11) && (numStrings != 13)) {
RLOGE("getDataRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {