Bug fix for showing proper contact display name in Call accept option pop-up
[apps/osp/Call.git] / src / CallOptionPopup.cpp
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)