//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
* @file CalllogManager.cpp
* @brief This class provides call log APIs
*/
-#include "CalllogManager.h"
#include <FLocales.h>
+#include "CallApp.h"
+#include "CalllogManager.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
}
result
-CallLogManager::AddCallogInfoToDatabase(CallInfo* calllogInfo)
+CallLogManager::AddCallogInfoToDatabase(AppCallInfo* calllogInfo)
{
AppLog(" AddVoiceCallInfo Entry");
int duration = 0;
case CALL_LOG_TYPE_VOICE_OUTGOING:
logType = CONTACTS_PLOG_TYPE_VOICE_OUTGOING;
break;
- case CALL_LOG_TYPE_VOICE_MISSED:
+ case CALL_LOG_TYPE_VOICE_MISSED_UNSEEN:
logType = CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN;
break;
case CALL_LOG_TYPE_VOICE_REJECTED:
else
{
//start time is in miliseconds . so convert to seconds and set it to time_t format.
- long long connectTime = calllogInfo->GetCallConnectTime();
+ long long connectTime = calllogInfo->GetDurationTime();
if(connectTime == 0 || connectTime < 0)
{
- connectTime = time(null);
+ //connectTime = time(null);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ connectTime = pPhoneApp->GetCallAppTicks();
+ connectTime /=1000;
}
else
{
- connectTime = calllogInfo->GetCallConnectTime()/ 1000;
+ connectTime = calllogInfo->GetDurationTime()/ 1000;
}
duration = (int)GetDuration(connectTime);
}
unsigned long
CallLogManager::GetDuration(long long start_time)
{
- time_t curr_time;
+ long long curr_time;
unsigned long call_duration_in_sec = 50;
- curr_time = time(0);
+// curr_time = time(0);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ curr_time = pPhoneApp->GetCallAppTicks();
+ curr_time /=1000;
/*if(start_time != 0)
{
start_time /= 1000;