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
This commit is contained in:
Robert Greenwalt
2009-08-19 20:19:33 -07:00
parent f5d493a54b
commit a64bf834ff
3 changed files with 30 additions and 16 deletions

View File

@@ -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);
}
}
}
}