From 320268140563bfc3e4a652ef8da442779d5913c4 Mon Sep 17 00:00:00 2001 From: Amith Kumar Mahale Date: Thu, 25 Jul 2013 18:27:29 +0530 Subject: [PATCH] Bug fix for showing proper contact display name in Call accept option pop-up Change-Id: I12ddb994acba282b5b35da4c92df678fae7e0cfb Signed-off-by: Amith Kumar Mahale --- src/CallInfo.cpp | 1 + src/CallOptionPopup.cpp | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/CallInfo.cpp b/src/CallInfo.cpp index 049bcae..3467855 100644 --- a/src/CallInfo.cpp +++ b/src/CallInfo.cpp @@ -444,6 +444,7 @@ AppCallInfo::FetchLatestCallerNameN(const Tizen::Base::String& phoneNumber) { pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName); } + delete pContact; } return new (std::nothrow) String(displayName); diff --git a/src/CallOptionPopup.cpp b/src/CallOptionPopup.cpp index 90bd482..c58099e 100644 --- a/src/CallOptionPopup.cpp +++ b/src/CallOptionPopup.cpp @@ -138,7 +138,15 @@ CallOptionPopup::ConstructListData(void) else { //show display name, if available, Else show contact number - String* pDisplayName = callInfo.FetchCallerNameN(); + String* pDisplayName = null; + if(callInfo.GetContactNumber().IsEmpty() == false) + { + pDisplayName = callInfo.FetchLatestCallerNameN(callInfo.GetContactNumber()); + } + else + { + pDisplayName = new (std::nothrow) String(L""); + } if (pDisplayName->IsEmpty() == true) { //If contact number is also not present show unknown @@ -178,7 +186,15 @@ CallOptionPopup::ConstructListData(void) if (firstCallInfo.IsConferenceCall() == false) { //show display name if available, else show contact number - String* pDisplayName = firstCallInfo.FetchCallerNameN(); + String* pDisplayName = null; + if(firstCallInfo.GetContactNumber().IsEmpty() == false) + { + pDisplayName = firstCallInfo.FetchLatestCallerNameN(firstCallInfo.GetContactNumber()); + } + else + { + pDisplayName = new (std::nothrow) String(L""); + } if (pDisplayName->IsEmpty() == true) { if(firstCallInfo.GetContactNumber().IsEmpty() == false) -- 2.7.4