am 0737ae93: am 6ce96faa: Don\'t mark an APN disabled if setup fails

Merge commit '0737ae93b27e328dc04eb0f5d56d9e2f72a064c4'

* commit '0737ae93b27e328dc04eb0f5d56d9e2f72a064c4':
  Don't mark an APN disabled if setup fails
This commit is contained in:
Robert Greenwalt
2009-08-28 14:42:43 -07:00
committed by Android Git Automerger
3 changed files with 3 additions and 13 deletions

View File

@@ -280,16 +280,8 @@ public abstract class DataConnectionTracker extends Handler {
if (!dataEnabled[apnId]) {
dataEnabled[apnId] = true;
enabledCount++;
if (enabledCount == 1) {
if (onTrySetupData(null) == false) {
// failed to setup data - note we can't optimize by only adj
// these after a successfull call. dataEnabled must be set
// prior or we think data is not available.
dataEnabled[apnId] = false;
enabledCount--;
}
}
}
onTrySetupData(null);
} else {
// disable
if (dataEnabled[apnId]) {

View File

@@ -568,8 +568,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
private boolean retryAfterDisconnected(String reason) {
boolean retry = true;
if ( Phone.REASON_RADIO_TURNED_OFF.equals(reason) ||
Phone.REASON_DATA_DISABLED.equals(reason) ) {
if ( Phone.REASON_RADIO_TURNED_OFF.equals(reason) ) {
retry = false;
}
return retry;

View File

@@ -1010,8 +1010,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
private boolean retryAfterDisconnected(String reason) {
boolean retry = true;
if ( Phone.REASON_RADIO_TURNED_OFF.equals(reason) ||
Phone.REASON_DATA_DISABLED.equals(reason) ) {
if ( Phone.REASON_RADIO_TURNED_OFF.equals(reason) ) {
retry = false;
}
return retry;