Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1129402 - Fix IMEI request. r=hsinyi
Browse files Browse the repository at this point in the history
  • Loading branch information
aknow committed Feb 6, 2015
1 parent 365b2e4 commit 7e94247
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dom/telephony/gonk/TelephonyService.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,8 @@ TelephonyService.prototype = {
return;
}

// Dial a non-emergency call when only emergency call is allowed.
if (!isEmergencyNumber &&
(aIsDialEmergency || this._isEmergencyOnly(aClientId))) {
// DialEmergency accepts only emergency number.
if (aIsDialEmergency && !isEmergencyNumber) {
if (DEBUG) debug("Error: Dail a non-emergency by dialEmergency. Drop.");
aCallback.notifyError(DIAL_ERROR_BAD_NUMBER);
return;
Expand Down Expand Up @@ -591,6 +590,11 @@ TelephonyService.prototype = {
}

let isEmergency = gDialNumberUtils.isEmergency(aNumber);
if (!isEmergency && this._isEmergencyOnly()) {
if (DEBUG) debug("Error: Dail a normal call when emergencyCallsOnly. Drop");
aCallback.notifyError(DIAL_ERROR_BAD_NUMBER);
}

if (isEmergency) {
// Automatically select a proper clientId for emergency call.
aClientId = gRadioInterfaceLayer.getClientIdForEmergencyCall() ;
Expand Down

0 comments on commit 7e94247

Please sign in to comment.