summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-04-14 22:35:07 -0400
committerMike Lockwood <lockwood@android.com>2009-04-14 22:35:07 -0400
commitd90ff986b415c7a6747285c1c2d08a2338543cc5 (patch)
tree2dc0127c769bfea7f96c87973f7f4bdaedf1a94a
parente2393c5792e968e3fe2467fd1e81c8072c7dbd59 (diff)
downloadframeworks_base-d90ff986b415c7a6747285c1c2d08a2338543cc5.zip
frameworks_base-d90ff986b415c7a6747285c1c2d08a2338543cc5.tar.gz
frameworks_base-d90ff986b415c7a6747285c1c2d08a2338543cc5.tar.bz2
telephony: Don't disable an APN type that is not enabled.
Fixes a bad interaction between MMS and SUPL that occurs when they are using the same APN. Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java8
1 files changed, 5 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 1b07add..9ca4610 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -369,13 +369,15 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
* The APN of the specified type is no longer needed. Ensure that if
* use of the default APN has not been explicitly disabled, we are connected
* to the default APN.
- * @param type the APN type. The only valid value currently is {@link Phone#APN_TYPE_MMS}.
+ * @param type the APN type. The only valid values are currently
+ * {@link Phone#APN_TYPE_MMS} and {@link Phone#APN_TYPE_SUPL}.
* @return
*/
protected int disableApnType(String type) {
Log.d(LOG_TAG, "disableApnType("+type+")");
- if (TextUtils.equals(type, Phone.APN_TYPE_MMS) ||
- TextUtils.equals(type, Phone.APN_TYPE_SUPL)) {
+ if ((TextUtils.equals(type, Phone.APN_TYPE_MMS) ||
+ TextUtils.equals(type, Phone.APN_TYPE_SUPL))
+ && isEnabled(type)) {
removeMessages(EVENT_RESTORE_DEFAULT_APN);
setEnabled(type, false);
if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {