Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #7907 from etiennesegonzac/bug-836166-network-check
Browse files Browse the repository at this point in the history
Bug 836166 - dialer - lazily checking the connection when the call button is pressed.
  • Loading branch information
etiennesegonzac committed Feb 1, 2013
2 parents 2f0d508 + 36efb9a commit 05de572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/communications/dialer/js/telephony_helper.js
Expand Up @@ -3,7 +3,6 @@
var TelephonyHelper = (function() {

var telephony = navigator.mozTelephony;
var conn = window.navigator.mozMobileConnection;

var call = function(number, oncall, onconnected, ondisconnected, onerror) {
var settings = window.navigator.mozSettings, req;
Expand All @@ -13,6 +12,7 @@ var TelephonyHelper = (function() {
req.addEventListener('success', function onsuccess() {
var status = req.result['ril.radio.disabled'];
if (!status) {
var conn = window.navigator.mozMobileConnection;
if (!conn || !conn.voice.network) {
// No voice connection, the call won't make it
handleError(null, true /* generic */);
Expand Down

0 comments on commit 05de572

Please sign in to comment.