if provisioning apn conditionally restart the radio.
Some radios need a swift kick in the butt after provisioning.
Bug: 11673637
Change-Id: Ie758a303fd751d204fd6baa60217e88df6376aae
diff --git a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
index ae026b7..9e6140f 100644
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
@@ -1810,6 +1810,7 @@
// pending.
if (isDisconnected()) {
if (mPhone.getServiceStateTracker().processPendingRadioPowerOffAfterDataOff()) {
+ if(DBG) log("onDisconnectDone: radio will be turned off, no retries");
// Radio will be turned off. No need to retry data setup
apnContext.setApnSetting(null);
apnContext.setDataConnectionAc(null);
@@ -1823,12 +1824,23 @@
// Wait a bit before trying the next APN, so that
// we're not tying up the RIL command channel.
// This also helps in any external dependency to turn off the context.
+ if(DBG) log("onDisconnectDone: attached, ready and retry after disconnect");
startAlarmForReconnect(getApnDelay(), apnContext);
} else {
+ boolean restartRadioAfterProvisioning = mPhone.getContext().getResources().getBoolean(
+ com.android.internal.R.bool.config_restartRadioAfterProvisioning);
+
+ if (apnContext.isProvisioningApn() && restartRadioAfterProvisioning) {
+ log("onDisconnectDone: restartRadio after provisioning");
+ restartRadio();
+ }
apnContext.setApnSetting(null);
apnContext.setDataConnectionAc(null);
if (isOnlySingleDcAllowed(mPhone.getServiceState().getRilDataRadioTechnology())) {
+ if(DBG) log("onDisconnectDone: isOnlySigneDcAllowed true so setup single apn");
setupDataOnConnectableApns(Phone.REASON_SINGLE_PDN_ARBITRATION);
+ } else {
+ if(DBG) log("onDisconnectDone: not retrying");
}
}
}