Merge "Add Delay for data connection retry." into honeycomb-LTE

This commit is contained in:
Wink Saville
2011-05-05 16:20:11 -07:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 3 deletions

View File

@@ -144,6 +144,9 @@ public abstract class DataConnectionTracker extends Handler {
public static final String APN_TYPE_KEY = "apnType"; public static final String APN_TYPE_KEY = "apnType";
/** Delay between APN attempts */
protected static final int APN_DELAY_MILLIS = 5000;
// responds to the setInternalDataEnabled call - used internally to turn off data // responds to the setInternalDataEnabled call - used internally to turn off data
// for example during emergency calls // for example during emergency calls
protected boolean mInternalDataEnabled = true; protected boolean mInternalDataEnabled = true;

View File

@@ -701,7 +701,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
notifyDataConnection(reason); notifyDataConnection(reason);
mActiveApn = null; mActiveApn = null;
if (retryAfterDisconnected(reason)) { if (retryAfterDisconnected(reason)) {
trySetupData(reason); // Wait a bit before trying, so we're not tying up RIL command channel.
sendMessageDelayed(obtainMessage(EVENT_TRY_SETUP_DATA, reason), APN_DELAY_MILLIS);
} }
} }

View File

@@ -101,8 +101,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
// call reRegisterNetwork, or pingTest succeeds. // call reRegisterNetwork, or pingTest succeeds.
private int mPdpResetCount = 0; private int mPdpResetCount = 0;
/** Delay between APN attempts */
protected static final int APN_DELAY_MILLIS = 5000;
//***** Constants //***** Constants