Clamp more cell info values
As with LTE rsrp these values also need clamping as they're sometimes
outside of the expected values.
Test: run cts-dev -m CtsTelephonyTestCases -t android.telephony.cts.CellInfoTest#testCellInfo
Issue: FP2A10-44
Change-Id: Id737049665673ad4f578620dcd16f71e0257b996
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp
index e5fbebe..c4f57d6 100755
--- a/libril/ril_service.cpp
+++ b/libril/ril_service.cpp
@@ -7984,10 +7984,10 @@
rillCellInfo->CellInfo.wcdma.cellIdentityWcdma.cid;
cellInfoWcdma->cellIdentityWcdma.psc =
rillCellInfo->CellInfo.wcdma.cellIdentityWcdma.psc;
- cellInfoWcdma->cellIdentityWcdma.uarfcn =
- rillCellInfo->CellInfo.wcdma.cellIdentityWcdma.uarfcn;
- cellInfoWcdma->signalStrengthWcdma.signalStrength =
- rillCellInfo->CellInfo.wcdma.signalStrengthWcdma.signalStrength;
+ cellInfoWcdma->cellIdentityWcdma.uarfcn = clampWarn("uarfcn",
+ rillCellInfo->CellInfo.wcdma.cellIdentityWcdma.uarfcn, 412, 11000);
+ cellInfoWcdma->signalStrengthWcdma.signalStrength = clampWarn("signalStrength",
+ rillCellInfo->CellInfo.wcdma.signalStrengthWcdma.signalStrength, 0, 31);
cellInfoWcdma->signalStrengthWcdma.bitErrorRate =
rillCellInfo->CellInfo.wcdma.signalStrengthWcdma.bitErrorRate;
break;
@@ -8032,8 +8032,8 @@
rillCellInfo->CellInfo.lte.cellIdentityLte.pci;
cellInfoLte->cellIdentityLte.tac =
rillCellInfo->CellInfo.lte.cellIdentityLte.tac;
- cellInfoLte->cellIdentityLte.earfcn =
- rillCellInfo->CellInfo.lte.cellIdentityLte.earfcn;
+ cellInfoLte->cellIdentityLte.earfcn = clampWarn("earfcn",
+ rillCellInfo->CellInfo.lte.cellIdentityLte.earfcn, 7, 262136);
cellInfoLte->signalStrengthLte.signalStrength =
rillCellInfo->CellInfo.lte.signalStrengthLte.signalStrength;
cellInfoLte->signalStrengthLte.rsrp = clampWarn("rsrp",