зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1052836 - Part 3: Use enums for preferred network type in nsIMobileConnectionService.idl (gonk). r=echen
This commit is contained in:
Родитель
b984a643b0
Коммит
b67b853197
|
@ -774,7 +774,7 @@ MobileConnectionProvider.prototype = {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
aCallback.notifySuccessWithString(aResponse.type);
|
aCallback.notifyGetPreferredNetworkTypeSuccess(aResponse.type);
|
||||||
return false;
|
return false;
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
},
|
},
|
||||||
|
|
|
@ -1333,8 +1333,8 @@ RilObject.prototype = {
|
||||||
* RIL_PREFERRED_NETWORK_TYPE_TO_GECKO as its `type` attribute.
|
* RIL_PREFERRED_NETWORK_TYPE_TO_GECKO as its `type` attribute.
|
||||||
*/
|
*/
|
||||||
setPreferredNetworkType: function(options) {
|
setPreferredNetworkType: function(options) {
|
||||||
let networkType = RIL_PREFERRED_NETWORK_TYPE_TO_GECKO.indexOf(options.type);
|
let networkType = options.type;
|
||||||
if (networkType < 0) {
|
if (networkType < 0 || networkType >= RIL_PREFERRED_NETWORK_TYPE_TO_GECKO.length) {
|
||||||
options.errorMsg = GECKO_ERROR_INVALID_PARAMETER;
|
options.errorMsg = GECKO_ERROR_INVALID_PARAMETER;
|
||||||
this.sendChromeMessage(options);
|
this.sendChromeMessage(options);
|
||||||
return;
|
return;
|
||||||
|
@ -6292,8 +6292,7 @@ RilObject.prototype[REQUEST_GET_PREFERRED_NETWORK_TYPE] = function REQUEST_GET_P
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let networkType = this.context.Buf.readInt32List()[0];
|
options.type = this.context.Buf.readInt32List()[0];
|
||||||
options.type = RIL_PREFERRED_NETWORK_TYPE_TO_GECKO[networkType];
|
|
||||||
this.sendChromeMessage(options);
|
this.sendChromeMessage(options);
|
||||||
};
|
};
|
||||||
RilObject.prototype[REQUEST_GET_NEIGHBORING_CELL_IDS] = function REQUEST_GET_NEIGHBORING_CELL_IDS(length, options) {
|
RilObject.prototype[REQUEST_GET_NEIGHBORING_CELL_IDS] = function REQUEST_GET_NEIGHBORING_CELL_IDS(length, options) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче