mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 946942 - Update APN settings on start if MMS call is already connected. r=gene
This commit is contained in:
parent
f6316ef624
commit
88a9cf3962
@ -248,6 +248,23 @@ MmsConnection.prototype = {
|
||||
|
||||
this.connected = this.radioInterface.getDataCallStateByType("mms") ==
|
||||
Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED;
|
||||
// If the MMS network is connected during the initialization, it means the
|
||||
// MMS network must share the same APN with the mobile network by default.
|
||||
// Under this case, |networkManager.active| should keep the mobile network,
|
||||
// which is supposed be an instance of |nsIRilNetworkInterface| for sure.
|
||||
if (this.connected) {
|
||||
let networkManager =
|
||||
Cc["@mozilla.org/network/manager;1"].getService(Ci.nsINetworkManager);
|
||||
let activeNetwork = networkManager.active;
|
||||
if (activeNetwork.serviceId != this.serviceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
let rilNetwork = activeNetwork.QueryInterface(Ci.nsIRilNetworkInterface);
|
||||
// Set up the MMS APN setting based on the connected MMS network,
|
||||
// which is going to be used for the HTTP requests later.
|
||||
this.setApnSetting(rilNetwork);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user