mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 951958 - B2G RIL: set/get preferred network type error message is not set accordingly. r=hsinyi
This commit is contained in:
parent
086840ca14
commit
6d2d4fa547
@ -5880,21 +5880,30 @@ RIL[REQUEST_SET_PREFERRED_NETWORK_TYPE] = function REQUEST_SET_PREFERRED_NETWORK
|
||||
return;
|
||||
}
|
||||
|
||||
options.success = (options.rilRequestError == ERROR_SUCCESS);
|
||||
if (options.rilRequestError) {
|
||||
options.success = false;
|
||||
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||
} else {
|
||||
options.success = true;
|
||||
}
|
||||
this.sendChromeMessage(options);
|
||||
};
|
||||
RIL[REQUEST_GET_PREFERRED_NETWORK_TYPE] = function REQUEST_GET_PREFERRED_NETWORK_TYPE(length, options) {
|
||||
let networkType;
|
||||
if (!options.rilRequestError) {
|
||||
networkType = RIL_PREFERRED_NETWORK_TYPE_TO_GECKO.indexOf(GECKO_PREFERRED_NETWORK_TYPE_DEFAULT);
|
||||
let responseLen = Buf.readInt32(); // Number of INT32 responsed.
|
||||
if (responseLen) {
|
||||
this.preferredNetworkType = networkType = Buf.readInt32();
|
||||
}
|
||||
options.networkType = networkType;
|
||||
if (options.rilRequestError) {
|
||||
options.success = false;
|
||||
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||
this.sendChromeMessage(options);
|
||||
return;
|
||||
}
|
||||
|
||||
options.success = (options.rilRequestError == ERROR_SUCCESS);
|
||||
let networkType = RIL_PREFERRED_NETWORK_TYPE_TO_GECKO.indexOf(GECKO_PREFERRED_NETWORK_TYPE_DEFAULT);
|
||||
let responseLen = Buf.readInt32(); // Number of INT32 responsed.
|
||||
if (responseLen) {
|
||||
this.preferredNetworkType = networkType = Buf.readInt32();
|
||||
}
|
||||
options.networkType = networkType;
|
||||
options.success = true;
|
||||
|
||||
this.sendChromeMessage(options);
|
||||
};
|
||||
RIL[REQUEST_GET_NEIGHBORING_CELL_IDS] = null;
|
||||
|
Loading…
Reference in New Issue
Block a user