summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-06-29 13:33:47 -0700
committerJaikumar Ganesh <jaikumar@google.com>2009-06-29 13:33:47 -0700
commitc0303921d028b4616010e96f66820fb0e9ab9254 (patch)
tree8e255dd3ca1d1f6b511926a3f8576449bcd33ffe
parentbd9aa793b19f7aa529ca4123492f8940b96486b8 (diff)
downloadframeworks_base-c0303921d028b4616010e96f66820fb0e9ab9254.zip
frameworks_base-c0303921d028b4616010e96f66820fb0e9ab9254.tar.gz
frameworks_base-c0303921d028b4616010e96f66820fb0e9ab9254.tar.bz2
Fix setting of the APN type.
The user is on wifi, then enables SUPL APN. When wifi is switched off, we try to establish DATA connection on the Default APN. If this fails, we were not retrying as the mRequestedApnType variable was not being reset. This was happening because the SUPL APN and the data connection APN were the same.
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 346944a..e00ee83 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -377,10 +377,14 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
removeMessages(EVENT_RESTORE_DEFAULT_APN);
setEnabled(type, false);
if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {
+ mRequestedApnType = Phone.APN_TYPE_DEFAULT;
if (dataEnabled[APN_DEFAULT_ID]) {
return Phone.APN_ALREADY_ACTIVE;
} else {
- cleanUpConnection(true, Phone.REASON_DATA_DISABLED);
+ Message msg = obtainMessage(EVENT_CLEAN_UP_CONNECTION);
+ msg.arg1 = 1; // tearDown is true;
+ msg.obj = Phone.REASON_DATA_DISABLED;
+ sendMessage(msg);
return Phone.APN_REQUEST_STARTED;
}
} else {
@@ -1235,10 +1239,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
protected void onRestoreDefaultApn() {
if (DBG) Log.d(LOG_TAG, "Restore default APN");
setEnabled(Phone.APN_TYPE_MMS, false);
-
+ mRequestedApnType = Phone.APN_TYPE_DEFAULT;
if (!isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {
cleanUpConnection(true, Phone.REASON_RESTORE_DEFAULT_APN);
- mRequestedApnType = Phone.APN_TYPE_DEFAULT;
}
}