Bug 832808 - B2G Multi-SIM: To support data call function for multi-SIM. r=vicamo

This commit is contained in:
Jessica Jong 2013-08-22 18:06:36 +08:00
Родитель 0dec9ded73
Коммит e623140a57
1 изменённых файлов: 50 добавлений и 47 удалений

Просмотреть файл

@ -1516,10 +1516,7 @@ RadioInterface.prototype = {
* the APN setting via APN types.
*/
updateApnSettings: function updateApnSettings(allApnSettings) {
// TODO: Support multi-SIM, bug 799023.
let simNumber = 1;
for (let simId = 0; simId < simNumber; simId++) {
let thisSimApnSettings = allApnSettings[simId];
let thisSimApnSettings = allApnSettings[this.clientId];
if (!thisSimApnSettings) {
return;
}
@ -1566,7 +1563,6 @@ RadioInterface.prototype = {
this.apnSettings.byType[type] = this.apnSettings.byAPN[apnKey];
}
}
}
},
/**
@ -2322,8 +2318,15 @@ RadioInterface.prototype = {
break;
case "ril.data.enabled":
if (DEBUG) this.debug("'ril.data.enabled' is now " + aResult);
let enabled;
if (Array.isArray(aResult)) {
enabled = aResult[this.clientId];
} else {
// Backward compability
enabled = aResult;
}
this.dataCallSettings.oldEnabled = this.dataCallSettings.enabled;
this.dataCallSettings.enabled = aResult;
this.dataCallSettings.enabled = enabled;
this.updateRILNetworkInterface();
break;
case "ril.data.roaming_enabled":