From 23f646367ddecc26b95db683c752791ab3ea7fa1 Mon Sep 17 00:00:00 2001 From: Kazuhiro Ondo Date: Mon, 13 Jun 2011 21:53:37 -0500 Subject: Revert "CDMALTE: Get roaming status based on SID/NID" This reverts commit 3fc9055c7f3bc25948f17bc29582abae72fe7de1. --- .../telephony/cdma/CdmaLteServiceStateTracker.java | 35 ++-------------------- .../telephony/cdma/CdmaServiceStateTracker.java | 6 ++-- 2 files changed, 5 insertions(+), 36 deletions(-) (limited to 'telephony') diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java index abd87b8..318cf37 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java @@ -125,6 +125,8 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { } } + // Not sure if this is needed in CDMALTE phone. + // mDataRoaming = regCodeIsRoaming(regState); mLteSS.setRadioTechnology(type); mLteSS.setState(regCodeToServiceState(regState)); } else { @@ -210,12 +212,6 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { if (DBG) log("pollStateDone: oldSS=[" + ss + "] newSS=[" + newSS + "]"); - if (cm.getSimState().isSIMReady()) { - // If CSIM is used, check roaming status according to SID/NID - // on EFcdmahome record. - newSS.setRoaming(!isInHomeSidNid(newSS.getSystemId(), newSS.getNetworkId())); - } - boolean hasRegistered = ss.getState() != ServiceState.STATE_IN_SERVICE && newSS.getState() == ServiceState.STATE_IN_SERVICE; @@ -468,33 +464,6 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { return provisioningState; } - /** - * Check whether the specified SID and NID pair appears in the HOME SID/NID list - * read from NV or SIM. - * - * @return true if provided sid/nid pair belongs to operator's home network. - */ - private boolean isInHomeSidNid(int sid, int nid) { - // if SID/NID is not available, do not declare roaming. - if (isSidsAllZeros()) return true; - - // length of SID/NID shold be same - if (mHomeSystemId.length != mHomeNetworkId.length) return true; - - if (sid == 0) return true; - - for (int i = 0; i < mHomeSystemId.length; i++) { - // Use SID only if NID is a reserved value. - // SID 0 and NID 0 and 65535 are reserved. (C.0005 2.6.5.2) - if ((mHomeSystemId[i] == sid) && - ((mHomeNetworkId[i] == 0) || (mHomeNetworkId[i] == 65535) || - (nid == 0) || (nid == 65535) || (mHomeNetworkId[i] == nid))) { - return true; - } - } - return false; - } - @Override protected void log(String s) { Log.d(LOG_TAG, "[CdmaLteSST] " + s); diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index e41985e..5ebdd22 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java @@ -130,8 +130,8 @@ public class CdmaServiceStateTracker extends ServiceStateTracker { private String curPlmn = null; protected String mMdn; - protected int mHomeSystemId[] = null; - protected int mHomeNetworkId[] = null; + private int mHomeSystemId[] = null; + private int mHomeNetworkId[] = null; protected String mMin; protected String mPrlVersion; protected boolean mIsMinInfoReady = false; @@ -1481,7 +1481,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker { } } - protected boolean isSidsAllZeros() { + private boolean isSidsAllZeros() { if (mHomeSystemId != null) { for (int i=0; i < mHomeSystemId.length; i++) { if (mHomeSystemId[i] != 0) { -- cgit v1.1