mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1052846 - Part 3: Use enums for MobileNetworkType in nsIMobileConnectionService.idl (gonk). r=echen
This commit is contained in:
parent
c656364ed5
commit
5b5039fce3
@ -398,6 +398,7 @@ MobileConnectionProvider.prototype = {
|
||||
RIL.GECKO_SUPPORTED_NETWORK_TYPES_DEFAULT.split(",");
|
||||
}
|
||||
|
||||
let enumNetworkTypes = [];
|
||||
for (let type of supportedNetworkTypes) {
|
||||
// If the value in system property is not valid, use the default one which
|
||||
// is defined in ril_consts.js.
|
||||
@ -405,15 +406,18 @@ MobileConnectionProvider.prototype = {
|
||||
if (DEBUG) {
|
||||
this._debug("Unknown network type: " + type);
|
||||
}
|
||||
supportedNetworkTypes =
|
||||
RIL.GECKO_SUPPORTED_NETWORK_TYPES_DEFAULT.split(",");
|
||||
RIL.GECKO_SUPPORTED_NETWORK_TYPES_DEFAULT.split(",").forEach(aType => {
|
||||
enumNetworkTypes.push(RIL.GECKO_SUPPORTED_NETWORK_TYPES.indexOf(aType));
|
||||
});
|
||||
break;
|
||||
}
|
||||
enumNetworkTypes.push(RIL.GECKO_SUPPORTED_NETWORK_TYPES.indexOf(type));
|
||||
}
|
||||
if (DEBUG) {
|
||||
this._debug("Supported Network Types: " + supportedNetworkTypes);
|
||||
this._debug("Supported Network Types: " + enumNetworkTypes);
|
||||
}
|
||||
return supportedNetworkTypes;
|
||||
|
||||
return enumNetworkTypes;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -427,6 +427,7 @@ this.RIL_PREFERRED_NETWORK_TYPE_TO_GECKO = [
|
||||
];
|
||||
|
||||
this.GECKO_SUPPORTED_NETWORK_TYPES_DEFAULT = "gsm,wcdma";
|
||||
// Index-item pair must be in sync with nsIMobileConnection.MOBILE_NETWORK_TYPE_*
|
||||
this.GECKO_SUPPORTED_NETWORK_TYPES = [
|
||||
"gsm",
|
||||
"wcdma",
|
||||
|
Loading…
Reference in New Issue
Block a user