CallDuration.min = 0;
CallDuration.hour = 0;
window.clearTimeout(CallDuration.timeout);
- var callStatus = tizen.phone.activeCall.state.toLowerCase();
+ var activeCall = tizen.phone.activeCall();
+ var callStatus = activeCall.state.toLowerCase();
if (callStatus === "DIALING".toLowerCase()) {
$("#callDuration").html("DIALING");
} else if (callStatus === "DISCONNECTED".toLowerCase()) {
stopwatch: function() {
"use strict";
- var callStatus = tizen.phone.activeCall.state.toLowerCase();
+ var activeCall = tizen.phone.activeCall();
+ var callStatus = activeCall.state.toLowerCase();
if (callStatus === "DIALING".toLowerCase()) {
$("#callDuration").html("DIALING");
} else if (callStatus === "DISCONNECTED".toLowerCase()) {
CallDuration.resetIt();
initializeCallInfo(contact);
- var callStatus = tizen.phone.activeCall.state.toLowerCase();
+ var activeCall = tizen.phone.activeCall();
+ var callStatus = activeCall.state.toLowerCase();
if (callStatus !== "ACTIVE".toLowerCase() && callStatus !== "DIALING".toLowerCase()) {
if (callStatus === "INCOMING".toLowerCase()) {
}
});
/* initialize phone widget by active call status */
- var callStatus = tizen.phone.activeCall.state.toLowerCase();
+ var activeCall = tizen.phone.activeCall();
+ var callStatus = activeCall.state.toLowerCase();
if (callStatus === "INCOMING".toLowerCase() || callStatus === "DIALING".toLowerCase() || callStatus === "ACTIVE".toLowerCase()) {
var contact;
if (tizen.phone.callState) {
- contact = tizen.phone.activeCall.contact;
+ contact = activeCall.contact;
}
acceptPhoneCallFromOtherWidget = true;
acceptCall(contact);
/* add listener to change call state */
tizen.phone.addCallChangedListener(function(result) {
var contact;
+ var activeCall = tizen.phone.activeCall();
if ( !! result.contact.name) {
contact = result.contact;
} else {
contact = {
phoneNumbers: [{
/* jshint camelcase: false */
- number: tizen.phone.activeCall.line_id
+ number: activeCall.line_id
/* jshint camelcase: true */
}]
if (acceptPhoneCallFromOtherWidget === true) {
window.setTimeout(function() {
- if (typeof tizen !== "undefined") {
+ if (typeof (tizen.application.getCurrentApplication) !== "undefined") {
tizen.application.getCurrentApplication().exit();
}
}, 1000);