Skip to content
Snippets Groups Projects
Commit ec4de90f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Temporarily land gecko patch for bug 855643"

parents 9366e061 31e0ee0f
No related branches found
No related merge requests found
# HG changeset patch
# User Hsin-Yi Tsai <htsai@mozilla.com>
# Date 1364869044 -28800
# Node ID 55b16a94d7417675be1575c8a7336f11c767f034
# Parent 243cfff1150eba41ceb670a51b935c23e945774d
Bug 855643 - B2G RIL: actively update networkSelectionMode at the first time querying. r=allstars.chh
diff --git a/dom/system/gonk/RILContentHelper.js b/dom/system/gonk/RILContentHelper.js
--- a/dom/system/gonk/RILContentHelper.js
+++ b/dom/system/gonk/RILContentHelper.js
@@ -330,16 +330,17 @@ function RILContentHelper() {
// Request initial context.
let rilContext = cpmm.sendSyncMessage("RIL:GetRilContext")[0];
if (!rilContext) {
debug("Received null rilContext from chrome process.");
return;
}
this.cardState = rilContext.cardState;
+ this.networkSelectionMode = rilContext.networkSelectionMode;
this.updateICCInfo(rilContext.icc, this.iccInfo);
this.updateConnectionInfo(rilContext.voice, this.voiceConnectionInfo);
this.updateConnectionInfo(rilContext.data, this.dataConnectionInfo);
}
RILContentHelper.prototype = {
__proto__: DOMRequestIpcHelper.prototype,
diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -212,16 +212,17 @@ function RadioInterfaceLayer() {
debug("Starting RIL Worker");
this.worker = new ChromeWorker("resource://gre/modules/ril_worker.js");
this.worker.onerror = this.onerror.bind(this);
this.worker.onmessage = this.onmessage.bind(this);
this.rilContext = {
radioState: RIL.GECKO_RADIOSTATE_UNAVAILABLE,
cardState: RIL.GECKO_CARDSTATE_UNKNOWN,
+ networkSelectionMode: RIL.GECKO_NETWORK_SELECTION_UNKNOWN,
icc: null,
// These objects implement the nsIDOMMozMobileConnectionInfo interface,
// although the actual implementation lives in the content process. So are
// the child attributes `network` and `cell`, which implement
// nsIDOMMozMobileNetworkInfo and nsIDOMMozMobileCellInfo respectively.
voice: {connected: false,
emergencyCallsOnly: false,
@@ -1338,16 +1339,17 @@ RadioInterfaceLayer.prototype = {
this._sendRequestResults("RIL:GetAvailableNetworks", message);
},
/**
* Update network selection mode
*/
updateNetworkSelectionMode: function updateNetworkSelectionMode(message) {
debug("updateNetworkSelectionMode: " + JSON.stringify(message));
+ this.rilContext.networkSelectionMode = message.mode;
this._sendTargetMessage("mobileconnection", "RIL:NetworkSelectionModeChanged", message);
},
/**
* Handle "manual" network selection request.
*/
handleSelectNetwork: function handleSelectNetwork(message) {
debug("handleSelectNetwork: " + JSON.stringify(message));
diff --git a/dom/system/gonk/nsIRadioInterfaceLayer.idl b/dom/system/gonk/nsIRadioInterfaceLayer.idl
--- a/dom/system/gonk/nsIRadioInterfaceLayer.idl
+++ b/dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ -287,23 +287,25 @@ interface nsIICCRecords : nsISupports
[scriptable, uuid(c0c5cb9f-6372-4b5a-b74c-baacc2da5e4f)]
interface nsIVoicemailInfo : nsISupports
{
readonly attribute DOMString number;
readonly attribute DOMString displayName;
};
-[scriptable, uuid(e6dc89f2-0d4e-46fc-902c-cfeeaee15e40)]
+[scriptable, uuid(5e43d291-8ec0-42b7-8aad-756f1df86bae)]
interface nsIRilContext : nsISupports
{
readonly attribute DOMString radioState;
readonly attribute DOMString cardState;
+ readonly attribute DOMString networkSelectionMode;
+
readonly attribute nsIICCRecords icc;
readonly attribute nsIDOMMozMobileConnectionInfo voice;
readonly attribute nsIDOMMozMobileConnectionInfo data;
};
[scriptable, uuid(8b3a1bc8-86d2-11e2-ace0-33f0ed290b90)]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment