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.
--- a/dom/system/NetworkGeolocationProvider.js
+++ b/dom/system/NetworkGeolocationProvider.js
@@ -419,22 +419,36 @@ WifiGeoPositionProvider.prototype = {
LOG("Looking for SIM in slot:" + i + " of " + service.length);
let connection = service.getItemByServiceId(i);
let voice = connection && connection.voice;
let cell = voice && voice.cell;
let type = voice && voice.type;
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,
cellId: cell.gsmCellId });
}
}
return result;
} catch (e) {