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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user