Merge commit 'e14861eaa7e01e28e1f5a8dc9c10924400ac2cb7' into eclair-mr2-plus-aosp * commit 'e14861eaa7e01e28e1f5a8dc9c10924400ac2cb7': Add needsOtaServiceProvisioning and used to not allow
This commit is contained in:
@@ -80,6 +80,10 @@ public class CDMAPhone extends PhoneBase {
|
|||||||
static final String LOG_TAG = "CDMA";
|
static final String LOG_TAG = "CDMA";
|
||||||
private static final boolean DBG = true;
|
private static final boolean DBG = true;
|
||||||
|
|
||||||
|
// Min values used to by needsActivation
|
||||||
|
private static final String UNACTIVATED_MIN2_VALUE = "000000";
|
||||||
|
private static final String UNACTIVATED_MIN_VALUE = "1111110111";
|
||||||
|
|
||||||
// Default Emergency Callback Mode exit timer
|
// Default Emergency Callback Mode exit timer
|
||||||
private static final int DEFAULT_ECM_EXIT_TIMER_VALUE = 300000;
|
private static final int DEFAULT_ECM_EXIT_TIMER_VALUE = 300000;
|
||||||
|
|
||||||
@@ -838,6 +842,26 @@ public class CDMAPhone extends PhoneBase {
|
|||||||
mRuimRecords.setVoiceMessageWaiting(1, mwi);
|
mRuimRecords.setVoiceMessageWaiting(1, mwi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if CDMA OTA Service Provisioning needs to be performed.
|
||||||
|
*/
|
||||||
|
/* package */ boolean
|
||||||
|
needsOtaServiceProvisioning() {
|
||||||
|
String cdmaMin = getCdmaMin();
|
||||||
|
boolean needsProvisioning;
|
||||||
|
if (cdmaMin == null || (cdmaMin.length() < 6)) {
|
||||||
|
if (DBG) Log.d(LOG_TAG, "needsOtaServiceProvisioning: illegal cdmaMin='"
|
||||||
|
+ cdmaMin + "' assume provisioning needed.");
|
||||||
|
needsProvisioning = true;
|
||||||
|
} else {
|
||||||
|
needsProvisioning = (cdmaMin.equals(UNACTIVATED_MIN_VALUE)
|
||||||
|
|| cdmaMin.substring(0,6).equals(UNACTIVATED_MIN2_VALUE))
|
||||||
|
|| SystemProperties.getBoolean("test_cdma_setup", false);
|
||||||
|
}
|
||||||
|
if (DBG) Log.d(LOG_TAG, "needsOtaServiceProvisioning: ret=" + needsProvisioning);
|
||||||
|
return needsProvisioning;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exitEmergencyCallbackMode() {
|
public void exitEmergencyCallbackMode() {
|
||||||
if (mWakeLock.isHeld()) {
|
if (mWakeLock.isHeld()) {
|
||||||
|
|||||||
@@ -330,7 +330,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
|||||||
phone.getState() == Phone.State.IDLE )
|
phone.getState() == Phone.State.IDLE )
|
||||||
&& isDataAllowed()
|
&& isDataAllowed()
|
||||||
&& desiredPowerState
|
&& desiredPowerState
|
||||||
&& !mPendingRestartRadio) {
|
&& !mPendingRestartRadio
|
||||||
|
&& !mCdmaPhone.needsOtaServiceProvisioning()) {
|
||||||
|
|
||||||
return setupData(reason);
|
return setupData(reason);
|
||||||
|
|
||||||
@@ -348,7 +349,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
|||||||
" dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
|
" dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
|
||||||
" desiredPowerState=" + desiredPowerState +
|
" desiredPowerState=" + desiredPowerState +
|
||||||
" PendingRestartRadio=" + mPendingRestartRadio +
|
" PendingRestartRadio=" + mPendingRestartRadio +
|
||||||
" MasterDataEnabled=" + mMasterDataEnabled);
|
" MasterDataEnabled=" + mMasterDataEnabled +
|
||||||
|
" needsOtaServiceProvisioning=" + mCdmaPhone.needsOtaServiceProvisioning());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user