Bug 856520 - B2G RIL: update RILContentHelper.rilContext.networkSelectionMode correctly. r=allstars.chh

This commit is contained in:
Hsin-Yi Tsai 2013-04-01 14:26:45 +08:00
parent 3c9bc77189
commit a874c054da

View File

@ -471,8 +471,8 @@ RILContentHelper.prototype = {
let request = Services.DOMRequest.createRequest(window);
let requestId = this.getRequestId(request);
if (this.networkSelectionMode == RIL.GECKO_NETWORK_SELECTION_MANUAL
&& this.rilContext.voiceConnectionInfo.network === network) {
if (this.rilContext.networkSelectionMode == RIL.GECKO_NETWORK_SELECTION_MANUAL &&
this.rilContext.voiceConnectionInfo.network === network) {
// Already manually selected this network, so schedule
// onsuccess to be fired on the next tick
@ -505,7 +505,7 @@ RILContentHelper.prototype = {
let request = Services.DOMRequest.createRequest(window);
let requestId = this.getRequestId(request);
if (this.networkSelectionMode == RIL.GECKO_NETWORK_SELECTION_AUTOMATIC) {
if (this.rilContext.networkSelectionMode == RIL.GECKO_NETWORK_SELECTION_AUTOMATIC) {
// Already using automatic selection mode, so schedule
// onsuccess to be be fired on the next tick
this.dispatchFireRequestSuccess(requestId, null);
@ -1015,7 +1015,7 @@ RILContentHelper.prototype = {
this.handleGetAvailableNetworks(msg.json);
break;
case "RIL:NetworkSelectionModeChanged":
this.networkSelectionMode = msg.json.mode;
this.rilContext.networkSelectionMode = msg.json.mode;
break;
case "RIL:SelectNetwork":
this.handleSelectNetwork(msg.json,
@ -1170,7 +1170,7 @@ RILContentHelper.prototype = {
handleSelectNetwork: function handleSelectNetwork(message, mode) {
this._selectingNetwork = null;
this.networkSelectionMode = mode;
this.rilContext.networkSelectionMode = mode;
if (message.errorMsg) {
this.fireRequestError(message.requestId, message.errorMsg);