Bug fix for showing proper contact display name in Call accept option pop-up
authorAmith Kumar Mahale <amith.m@samsung.com>
Thu, 25 Jul 2013 12:57:29 +0000 (18:27 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Thu, 25 Jul 2013 12:57:29 +0000 (18:27 +0530)
Change-Id: I12ddb994acba282b5b35da4c92df678fae7e0cfb
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
src/CallInfo.cpp
src/CallOptionPopup.cpp

index 049bcae..3467855 100644 (file)
@@ -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);
index 90bd482..c58099e 100644 (file)
@@ -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)