diff options
author | Robert Greenwalt <robdroid@android.com> | 2009-08-19 20:19:33 -0700 |
---|---|---|
committer | Robert Greenwalt <robdroid@android.com> | 2009-08-19 21:58:12 -0700 |
commit | a64bf834ffa677405af1c87c9f53eed0cd3853ce (patch) | |
tree | 6e92c9024b708aa8cf0e7e2839d20d071774cd45 /telephony | |
parent | f5d493a54b2320efecfb47d9c8b51092a7fe171f (diff) | |
download | frameworks_base-a64bf834ffa677405af1c87c9f53eed0cd3853ce.zip frameworks_base-a64bf834ffa677405af1c87c9f53eed0cd3853ce.tar.gz frameworks_base-a64bf834ffa677405af1c87c9f53eed0cd3853ce.tar.bz2 |
Fix various issues found when testing Mms.
Fix some race conditions (check isTeardownRequested).
Fix the passing of mInterfaceName to subtypes (mms, etc).
Fix the generation of CONNECTED message to already active subtypes.
Fix the enabling of Data in DataConnectionTracker.
bug: 2065037
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/DataConnectionTracker.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java index 29e89b5..cc981c9 100644 --- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java @@ -456,16 +456,19 @@ public abstract class DataConnectionTracker extends Handler { if (dataEnabled[id] != enable) { dataEnabled[id] = enable; + // count the total number of enabled APN's + // if we just enabled the first APN, start our Data connection, + // if we disabled the last, stop our data connection if (enable) { enabledCount++; + if (enabledCount == 1) { + setPrivateDataEnabled(true); + } } else { enabledCount--; - } - - if (enabledCount == 0) { - setPrivateDataEnabled(false); - } else if (enabledCount == 1) { - setPrivateDataEnabled(true); + if (enabledCount == 0) { + setPrivateDataEnabled(false); + } } } } |