diff options
author | Wink Saville <wink@google.com> | 2011-01-31 18:11:31 -0800 |
---|---|---|
committer | John Wang <johnwang@google.com> | 2011-03-07 17:52:36 -0800 |
commit | b3c991b0190faa4fc833a5fc9074939fd5d8a3c4 (patch) | |
tree | aeedbfd0017cfc6b9fa031ac1f61675327637008 | |
parent | 928ec5e021162fe371da8bdac7f5bb2c854b1aa1 (diff) | |
download | frameworks_base-b3c991b0190faa4fc833a5fc9074939fd5d8a3c4.zip frameworks_base-b3c991b0190faa4fc833a5fc9074939fd5d8a3c4.tar.gz frameworks_base-b3c991b0190faa4fc833a5fc9074939fd5d8a3c4.tar.bz2 |
Provide default value for operator numeric for CDMA.
If the RIL_REQUEST_OPERATOR response[2], the numeric for the operator,
is bad use the system property ro.cdma.home.operator.numeric.
bug: 3383515
Change-Id: I090e5ba0cb7e3a7f1dc08d24996e78e489b9cd41
-rwxr-xr-x | telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java | 3 | ||||
-rwxr-xr-x | telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java index a1d5121..db4cefd 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java @@ -136,6 +136,7 @@ public class CDMAPhone extends PhoneBase { Registrant mPostDialHandler; + static String PROPERTY_CDMA_HOME_OPERATOR_NUMERIC = "ro.cdma.home.operator.numeric"; // Constructors public CDMAPhone(Context context, CommandsInterface ci, PhoneNotifier notifier) { @@ -195,7 +196,7 @@ public class CDMAPhone extends PhoneBase { setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); // Sets operator numeric property by retrieving from build-time system property - String operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric"); + String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC); setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric); // Sets iso country property by retrieving from build-time system property diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index a7f7866..b217f07 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java @@ -16,6 +16,8 @@ package com.android.internal.telephony.cdma; +import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC; + import com.android.internal.telephony.CommandException; import com.android.internal.telephony.CommandsInterface; import com.android.internal.telephony.DataConnectionTracker; @@ -794,6 +796,18 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { String opNames[] = (String[])ar.result; if (opNames != null && opNames.length >= 3) { + // If the NUMERIC field isn't valid use PROPERTY_CDMA_HOME_OPERATOR_NUMERIC + if ((opNames[2] == null) || (opNames[2].length() < 5) + || ("00000".equals(opNames[2]))) { + opNames[2] = SystemProperties.get( + CDMAPhone.PROPERTY_CDMA_HOME_OPERATOR_NUMERIC, "00000"); + if (DBG) { + log("RIL_REQUEST_OPERATOR.response[2], the numeric, " + + " is bad. Using SystemProperties '" + + CDMAPhone.PROPERTY_CDMA_HOME_OPERATOR_NUMERIC + + "'= " + opNames[2]); + } + } if (cm.getRadioState().isNVReady()) { // In CDMA in case on NV, the ss.mOperatorAlphaLong is set later with the // ERI text, so here it is ignored what is coming from the modem. |