зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1020060 - Retry getCurrentCalls. r=hsinyi
This commit is contained in:
Родитель
dd76b7d29d
Коммит
b67f228592
|
@ -75,6 +75,8 @@ const MMI_MAX_LENGTH_SHORT_CODE = 2;
|
|||
|
||||
const MMI_END_OF_USSD = "#";
|
||||
|
||||
const GET_CURRENT_CALLS_RETRY_MAX = 3;
|
||||
|
||||
let RILQUIRKS_CALLSTATE_EXTRA_UINT32;
|
||||
// This may change at runtime since in RIL v6 and later, we get the version
|
||||
// number via the UNSOLICITED_RIL_CONNECTED parcel.
|
||||
|
@ -347,6 +349,7 @@ function RilObject(aContext) {
|
|||
this._pendingSentSmsMap = {};
|
||||
this.pendingNetworkType = {};
|
||||
this._receivedSmsCbPagesMap = {};
|
||||
this._getCurrentCallsRetryCount = 0;
|
||||
|
||||
// Init properties that are only initialized once.
|
||||
this.v5Legacy = RILQUIRKS_V5_LEGACY;
|
||||
|
@ -5483,10 +5486,16 @@ RilObject.prototype[REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE] =
|
|||
this._processEnterAndChangeICCResponses(length, options);
|
||||
};
|
||||
RilObject.prototype[REQUEST_GET_CURRENT_CALLS] = function REQUEST_GET_CURRENT_CALLS(length, options) {
|
||||
if (options.rilRequestError) {
|
||||
// Retry getCurrentCalls several times when error occurs.
|
||||
if (options.rilRequestError &&
|
||||
this._getCurrentCallsRetryCount < GET_CURRENT_CALLS_RETRY_MAX) {
|
||||
this._getCurrentCallsRetryCount++;
|
||||
this.getCurrentCalls();
|
||||
return;
|
||||
}
|
||||
|
||||
this._getCurrentCallsRetryCount = 0;
|
||||
|
||||
let Buf = this.context.Buf;
|
||||
let calls_length = 0;
|
||||
// The RIL won't even send us the length integer if there are no active calls.
|
||||
|
|
Загрузка…
Ссылка в новой задаче