Created
October 8, 2014 16:38
-
-
Save rik/9c591e010eb4281f9ec5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apps/callscreen/js/calls_handler.js | 2 ++ | |
apps/callscreen/js/handled_call.js | 2 ++ | |
2 files changed, 4 insertions(+) | |
diff --git a/apps/callscreen/js/calls_handler.js b/apps/callscreen/js/calls_handler.js | |
index 0464826..76b41f9 100644 | |
--- a/apps/callscreen/js/calls_handler.js | |
+++ b/apps/callscreen/js/calls_handler.js | |
@@ -78,6 +78,8 @@ var CallsHandler = (function callsHandler() { | |
/* === Handled calls === */ | |
var highPriorityWakeLock = null; | |
function onCallsChanged() { | |
+ telephony.calls.forEach((call) => | |
+ console.log('callschanged', call.id.number, call.state)) | |
// Acquire or release the high-priority wake lock, as necessary. This | |
// (mostly) prevents this process from being killed while we're on a call. | |
if (!highPriorityWakeLock && telephony.calls.length > 0) { | |
diff --git a/apps/callscreen/js/handled_call.js b/apps/callscreen/js/handled_call.js | |
index e81da27..84d5c76 100644 | |
--- a/apps/callscreen/js/handled_call.js | |
+++ b/apps/callscreen/js/handled_call.js | |
@@ -90,6 +90,8 @@ HandledCall.prototype._wasUnmerged = function hc_wasUnmerged() { | |
}; | |
HandledCall.prototype.handleEvent = function hc_handle(evt) { | |
+ navigator.mozTelephony.calls.forEach((call) => | |
+ console.log('statechange', evt.call.id.number, evt.call.state)) | |
switch (evt.call.state) { | |
case 'connected': | |
// The dialer agent in the system app plays and stops the ringtone once |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment