mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central and b2g-inbound
This commit is contained in:
commit
d384a21010
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"revision": "5de9f5b9b2f843825f13bd3667dc0fbf2e04e5f3",
|
"revision": "1c2a9f12dc455ae671b15d8eb9d49ee901d4e3a6",
|
||||||
"repo_path": "/integration/gaia-central"
|
"repo_path": "/integration/gaia-central"
|
||||||
}
|
}
|
||||||
|
@ -1516,55 +1516,51 @@ RadioInterface.prototype = {
|
|||||||
* the APN setting via APN types.
|
* the APN setting via APN types.
|
||||||
*/
|
*/
|
||||||
updateApnSettings: function updateApnSettings(allApnSettings) {
|
updateApnSettings: function updateApnSettings(allApnSettings) {
|
||||||
// TODO: Support multi-SIM, bug 799023.
|
let thisSimApnSettings = allApnSettings[this.clientId];
|
||||||
let simNumber = 1;
|
if (!thisSimApnSettings) {
|
||||||
for (let simId = 0; simId < simNumber; simId++) {
|
return;
|
||||||
let thisSimApnSettings = allApnSettings[simId];
|
}
|
||||||
if (!thisSimApnSettings) {
|
|
||||||
return;
|
// Clear old APN settings.
|
||||||
|
for each (let apnSetting in this.apnSettings.byAPN) {
|
||||||
|
// Clear all connections of this APN settings.
|
||||||
|
for each (let type in apnSetting.types) {
|
||||||
|
if (this.getDataCallStateByType(type) ==
|
||||||
|
RIL.GECKO_NETWORK_STATE_CONNECTED) {
|
||||||
|
this.deactivateDataCallByType(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (apnSetting.iface.name in gNetworkManager.networkInterfaces) {
|
||||||
|
gNetworkManager.unregisterNetworkInterface(apnSetting.iface);
|
||||||
|
}
|
||||||
|
this.unregisterDataCallCallback(apnSetting.iface);
|
||||||
|
delete apnSetting.iface;
|
||||||
|
}
|
||||||
|
this.apnSettings.byAPN = {};
|
||||||
|
this.apnSettings.byType = {};
|
||||||
|
|
||||||
|
// Create new APN settings.
|
||||||
|
for (let apnIndex = 0; thisSimApnSettings[apnIndex]; apnIndex++) {
|
||||||
|
let inputApnSetting = thisSimApnSettings[apnIndex];
|
||||||
|
if (!this.validateApnSetting(inputApnSetting)) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear old APN settings.
|
// Combine APN, user name, and password as the key of byAPN{} to get
|
||||||
for each (let apnSetting in this.apnSettings.byAPN) {
|
// the corresponding APN setting.
|
||||||
// Clear all connections of this APN settings.
|
let apnKey = inputApnSetting.apn + (inputApnSetting.user || '') +
|
||||||
for each (let type in apnSetting.types) {
|
(inputApnSetting.password || '');
|
||||||
if (this.getDataCallStateByType(type) ==
|
if (!this.apnSettings.byAPN[apnKey]) {
|
||||||
RIL.GECKO_NETWORK_STATE_CONNECTED) {
|
this.apnSettings.byAPN[apnKey] = {};
|
||||||
this.deactivateDataCallByType(type);
|
this.apnSettings.byAPN[apnKey] = inputApnSetting;
|
||||||
}
|
this.apnSettings.byAPN[apnKey].iface =
|
||||||
}
|
new RILNetworkInterface(this, this.apnSettings.byAPN[apnKey]);
|
||||||
if (apnSetting.iface.name in gNetworkManager.networkInterfaces) {
|
} else {
|
||||||
gNetworkManager.unregisterNetworkInterface(apnSetting.iface);
|
this.apnSettings.byAPN[apnKey].types.push(inputApnSetting.types);
|
||||||
}
|
|
||||||
this.unregisterDataCallCallback(apnSetting.iface);
|
|
||||||
delete apnSetting.iface;
|
|
||||||
}
|
}
|
||||||
this.apnSettings.byAPN = {};
|
for each (let type in inputApnSetting.types) {
|
||||||
this.apnSettings.byType = {};
|
this.apnSettings.byType[type] = {};
|
||||||
|
this.apnSettings.byType[type] = this.apnSettings.byAPN[apnKey];
|
||||||
// Create new APN settings.
|
|
||||||
for (let apnIndex = 0; thisSimApnSettings[apnIndex]; apnIndex++) {
|
|
||||||
let inputApnSetting = thisSimApnSettings[apnIndex];
|
|
||||||
if (!this.validateApnSetting(inputApnSetting)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Combine APN, user name, and password as the key of byAPN{} to get
|
|
||||||
// the corresponding APN setting.
|
|
||||||
let apnKey = inputApnSetting.apn + (inputApnSetting.user || '') +
|
|
||||||
(inputApnSetting.password || '');
|
|
||||||
if (!this.apnSettings.byAPN[apnKey]) {
|
|
||||||
this.apnSettings.byAPN[apnKey] = {};
|
|
||||||
this.apnSettings.byAPN[apnKey] = inputApnSetting;
|
|
||||||
this.apnSettings.byAPN[apnKey].iface =
|
|
||||||
new RILNetworkInterface(this, this.apnSettings.byAPN[apnKey]);
|
|
||||||
} else {
|
|
||||||
this.apnSettings.byAPN[apnKey].types.push(inputApnSetting.types);
|
|
||||||
}
|
|
||||||
for each (let type in inputApnSetting.types) {
|
|
||||||
this.apnSettings.byType[type] = {};
|
|
||||||
this.apnSettings.byType[type] = this.apnSettings.byAPN[apnKey];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2322,8 +2318,15 @@ RadioInterface.prototype = {
|
|||||||
break;
|
break;
|
||||||
case "ril.data.enabled":
|
case "ril.data.enabled":
|
||||||
if (DEBUG) this.debug("'ril.data.enabled' is now " + aResult);
|
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.oldEnabled = this.dataCallSettings.enabled;
|
||||||
this.dataCallSettings.enabled = aResult;
|
this.dataCallSettings.enabled = enabled;
|
||||||
this.updateRILNetworkInterface();
|
this.updateRILNetworkInterface();
|
||||||
break;
|
break;
|
||||||
case "ril.data.roaming_enabled":
|
case "ril.data.roaming_enabled":
|
||||||
|
Loading…
Reference in New Issue
Block a user