Bug 1010284 - Add radio tech mapping for MLS. r=garvank, sr=hannosch

Having this mapping is needed in order to properly identify the radio
technology family being used by the connected network.

--HG--
extra : rebase_source : b1e77cc78a4d882af5bdc65a377dcc26340c7fac
This commit is contained in:
Alexandre Lissy 2014-09-30 07:11:00 -04:00
parent 42d57721e8
commit 508fd2978c

View File

@ -424,12 +424,26 @@ WifiGeoPositionProvider.prototype = {
let network = voice && voice.network;
if (network && cell && type) {
if (type === "gsm" || type === "gprs" || type === "edge") {
type = "gsm";
} else {
type = "wcdma";
}
result.push({ radio: type,
let radioTechFamily;
switch (type) {
case "gsm":
case "gprs":
case "edge":
radioTechFamily = "gsm";
break;
case "umts":
case "hsdpa":
case "hsupa":
case "hspa":
case "hspa+":
radioTechFamily = "wcdma";
break;
case "lte":
radioTechFamily = "lte";
break;
// CDMA cases to be handled in bug 1010282
};
result.push({ radio: radioTechFamily,
mobileCountryCode: voice.network.mcc,
mobileNetworkCode: voice.network.mnc,
locationAreaCode: cell.gsmLocationAreaCode,