Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +33 −16 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ import android.telephony.gsm.GsmCellLocation; import android.text.TextUtils; import android.util.EventLog; import android.util.LocalLog; import android.util.Log; import android.util.Pair; import android.util.SparseArray; import android.view.WindowManager; Loading Loading @@ -2844,8 +2845,15 @@ public class DcTracker extends Handler { * A SETUP (aka bringUp) has completed, possibly with an error. If * there is an error this method will call {@link #onDataSetupCompleteError}. */ protected void onDataSetupComplete(ApnContext apnContext, boolean success, int cause, @RequestNetworkType int requestType, @HandoverFailureMode int handoverFailureMode) { protected void onDataSetupComplete(ApnContext apnContext, boolean success, @DataFailureCause int cause, @RequestNetworkType int requestType, @HandoverFailureMode int handoverFailureMode) { if (success && (handoverFailureMode != DataCallResponse.HANDOVER_FAILURE_MODE_UNKNOWN && handoverFailureMode != DataCallResponse.HANDOVER_FAILURE_MODE_LEGACY)) { Log.wtf(mLogTag, "bad failure mode: " + DataCallResponse.failureModeToString(handoverFailureMode)); } else if (handoverFailureMode != DataCallResponse.HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_HANDOVER) { int apnType = ApnSetting.getApnTypesBitmaskFromString(apnContext.getApnType()); List<Message> messageList = mRequestNetworkCompletionMsgs.get(apnType); if (messageList != null) { Loading @@ -2855,6 +2863,7 @@ public class DcTracker extends Handler { } messageList.clear(); } } if (success) { DataConnection dataConnection = apnContext.getDataConnection(); Loading @@ -2879,7 +2888,7 @@ public class DcTracker extends Handler { } if (dataConnection == null) { log("onDataSetupComplete: no connection to DC, handle as error"); onDataSetupCompleteError(apnContext, requestType); onDataSetupCompleteError(apnContext, requestType, false); } else { ApnSetting apn = apnContext.getApnSetting(); if (DBG) { Loading Loading @@ -3001,7 +3010,12 @@ public class DcTracker extends Handler { log("cause = " + cause + ", mark apn as permanent failed. apn = " + apn); apnContext.markApnPermanentFailed(apn); } onDataSetupCompleteError(apnContext, requestType); requestType = (handoverFailureMode == DataCallResponse.HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_HANDOVER) ? REQUEST_TYPE_HANDOVER : REQUEST_TYPE_NORMAL; onDataSetupCompleteError(apnContext, requestType, shouldFallbackOnFailedHandover(handoverFailureMode, requestType, cause)); } } Loading @@ -3012,13 +3026,16 @@ public class DcTracker extends Handler { * be a delay defined by {@link ApnContext#getDelayForNextApn(boolean)}. */ protected void onDataSetupCompleteError(ApnContext apnContext, @RequestNetworkType int requestType) { @RequestNetworkType int requestType, boolean fallback) { long delay = apnContext.getDelayForNextApn(mFailFast); // Check if we need to retry or not. // TODO: We should support handover retry in the future. if (delay >= 0) { if (DBG) log("onDataSetupCompleteError: Try next APN. delay = " + delay); if (delay >= 0 && !fallback) { if (DBG) { log("onDataSetupCompleteError: APN type=" + apnContext.getApnType() + ". Request type=" + requestTypeToString(requestType) + ", Retry in " + delay + "ms."); } apnContext.setState(DctConstants.State.RETRYING); // Wait a bit before trying the next APN, so that // we're not tying up the RIL command channel Loading Loading @@ -3705,7 +3722,7 @@ public class DcTracker extends Handler { generation = pair.second; handoverFailureMode = msg.arg2; if (apnContext.getConnectionGeneration() == generation) { onDataSetupCompleteError(apnContext, handoverFailureMode); onDataSetupCompleteError(apnContext, handoverFailureMode, false); } else { loge("EVENT_DATA_SETUP_COMPLETE_ERROR: Dropped the event because generation " + "did not match."); Loading src/java/com/android/internal/telephony/vendor/dataconnection/VendorDcTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ public class VendorDcTracker extends DcTracker { @Override protected void onDataSetupCompleteError(ApnContext apnContext, @RequestNetworkType int requestType) { @RequestNetworkType int requestType, boolean fallback) { long delay = apnContext.getDelayForNextApn(mFailFast); if (mPhone.getContext().getResources().getBoolean( com.android.internal.R.bool.config_pdp_reject_enable_retry)) { Loading Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +33 −16 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ import android.telephony.gsm.GsmCellLocation; import android.text.TextUtils; import android.util.EventLog; import android.util.LocalLog; import android.util.Log; import android.util.Pair; import android.util.SparseArray; import android.view.WindowManager; Loading Loading @@ -2844,8 +2845,15 @@ public class DcTracker extends Handler { * A SETUP (aka bringUp) has completed, possibly with an error. If * there is an error this method will call {@link #onDataSetupCompleteError}. */ protected void onDataSetupComplete(ApnContext apnContext, boolean success, int cause, @RequestNetworkType int requestType, @HandoverFailureMode int handoverFailureMode) { protected void onDataSetupComplete(ApnContext apnContext, boolean success, @DataFailureCause int cause, @RequestNetworkType int requestType, @HandoverFailureMode int handoverFailureMode) { if (success && (handoverFailureMode != DataCallResponse.HANDOVER_FAILURE_MODE_UNKNOWN && handoverFailureMode != DataCallResponse.HANDOVER_FAILURE_MODE_LEGACY)) { Log.wtf(mLogTag, "bad failure mode: " + DataCallResponse.failureModeToString(handoverFailureMode)); } else if (handoverFailureMode != DataCallResponse.HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_HANDOVER) { int apnType = ApnSetting.getApnTypesBitmaskFromString(apnContext.getApnType()); List<Message> messageList = mRequestNetworkCompletionMsgs.get(apnType); if (messageList != null) { Loading @@ -2855,6 +2863,7 @@ public class DcTracker extends Handler { } messageList.clear(); } } if (success) { DataConnection dataConnection = apnContext.getDataConnection(); Loading @@ -2879,7 +2888,7 @@ public class DcTracker extends Handler { } if (dataConnection == null) { log("onDataSetupComplete: no connection to DC, handle as error"); onDataSetupCompleteError(apnContext, requestType); onDataSetupCompleteError(apnContext, requestType, false); } else { ApnSetting apn = apnContext.getApnSetting(); if (DBG) { Loading Loading @@ -3001,7 +3010,12 @@ public class DcTracker extends Handler { log("cause = " + cause + ", mark apn as permanent failed. apn = " + apn); apnContext.markApnPermanentFailed(apn); } onDataSetupCompleteError(apnContext, requestType); requestType = (handoverFailureMode == DataCallResponse.HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_HANDOVER) ? REQUEST_TYPE_HANDOVER : REQUEST_TYPE_NORMAL; onDataSetupCompleteError(apnContext, requestType, shouldFallbackOnFailedHandover(handoverFailureMode, requestType, cause)); } } Loading @@ -3012,13 +3026,16 @@ public class DcTracker extends Handler { * be a delay defined by {@link ApnContext#getDelayForNextApn(boolean)}. */ protected void onDataSetupCompleteError(ApnContext apnContext, @RequestNetworkType int requestType) { @RequestNetworkType int requestType, boolean fallback) { long delay = apnContext.getDelayForNextApn(mFailFast); // Check if we need to retry or not. // TODO: We should support handover retry in the future. if (delay >= 0) { if (DBG) log("onDataSetupCompleteError: Try next APN. delay = " + delay); if (delay >= 0 && !fallback) { if (DBG) { log("onDataSetupCompleteError: APN type=" + apnContext.getApnType() + ". Request type=" + requestTypeToString(requestType) + ", Retry in " + delay + "ms."); } apnContext.setState(DctConstants.State.RETRYING); // Wait a bit before trying the next APN, so that // we're not tying up the RIL command channel Loading Loading @@ -3705,7 +3722,7 @@ public class DcTracker extends Handler { generation = pair.second; handoverFailureMode = msg.arg2; if (apnContext.getConnectionGeneration() == generation) { onDataSetupCompleteError(apnContext, handoverFailureMode); onDataSetupCompleteError(apnContext, handoverFailureMode, false); } else { loge("EVENT_DATA_SETUP_COMPLETE_ERROR: Dropped the event because generation " + "did not match."); Loading
src/java/com/android/internal/telephony/vendor/dataconnection/VendorDcTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ public class VendorDcTracker extends DcTracker { @Override protected void onDataSetupCompleteError(ApnContext apnContext, @RequestNetworkType int requestType) { @RequestNetworkType int requestType, boolean fallback) { long delay = apnContext.getDelayForNextApn(mFailFast); if (mPhone.getContext().getResources().getBoolean( com.android.internal.R.bool.config_pdp_reject_enable_retry)) { Loading