From d85df99540ed036449e99c3643ea94735a640fda Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 21 Oct 2014 14:31:46 +0800 Subject: [PATCH] Bug 1052842 - Part 3: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (gonk). r=echen --- dom/mobileconnection/gonk/MobileConnectionService.js | 2 +- dom/system/gonk/ril_consts.js | 7 ++++--- dom/system/gonk/ril_worker.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dom/mobileconnection/gonk/MobileConnectionService.js b/dom/mobileconnection/gonk/MobileConnectionService.js index 36e408c61e1e..b6089511f177 100644 --- a/dom/mobileconnection/gonk/MobileConnectionService.js +++ b/dom/mobileconnection/gonk/MobileConnectionService.js @@ -236,7 +236,7 @@ MobileConnectionProvider.prototype = { voice: null, data: null, iccId: null, - networkSelectionMode: null, + networkSelectionMode: Ci.nsIMobileConnection.NETWORK_SELECTION_MODE_UNKNOWN, radioState: null, lastKnownNetwork: null, lastKnownHomeNetwork: null, diff --git a/dom/system/gonk/ril_consts.js b/dom/system/gonk/ril_consts.js index a5a5775a3f16..dd09e0f7ee4c 100644 --- a/dom/system/gonk/ril_consts.js +++ b/dom/system/gonk/ril_consts.js @@ -2600,9 +2600,10 @@ GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_SPCK_PUK] = CARD_PERSOSUBSTAT GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RCCK_PUK] = CARD_PERSOSUBSTATE_RUIM_CORPORATE_PUK; GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RSPCK_PUK] = CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK; -this.GECKO_NETWORK_SELECTION_UNKNOWN = null; -this.GECKO_NETWORK_SELECTION_AUTOMATIC = "automatic"; -this.GECKO_NETWORK_SELECTION_MANUAL = "manual"; +// See nsIMobileConnection::NETWORK_SELECTION_MODE_* +this.GECKO_NETWORK_SELECTION_UNKNOWN = -1; +this.GECKO_NETWORK_SELECTION_AUTOMATIC = 0; +this.GECKO_NETWORK_SELECTION_MANUAL = 1; this.GECKO_MOBILE_CONNECTION_STATE_UNKNOWN = null; this.GECKO_MOBILE_CONNECTION_STATE_NOTSEARCHING = "notSearching"; diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 9525a085ac59..0c6fb69e5c2d 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -469,7 +469,7 @@ RilObject.prototype = { */ this.appType = null; - this.networkSelectionMode = null; + this.networkSelectionMode = GECKO_NETWORK_SELECTION_UNKNOWN; this.voiceRegistrationState = {}; this.dataRegistrationState = {};