- // __pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL, thumbnailPath);
- thumbnailPath = __pContact->GetThumbnailPath();
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+
+ result r = __pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL, thumbnailPath);
+ //Now check if there is a group ring tone
+ if(thumbnailPath.IsEmpty() == true)
+ {
+ IList* pCategoryList = __pAddressBook->GetCategoriesByContactN(__pContact->GetRecordId());
+ if(pCategoryList != null && pCategoryList->GetCount() > 0)
+ {
+ AppLogDebug("Changes to get thumbnail group photo");
+ Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+ thumbnailPath = pCategory->GetThumbnailPath();
+ }
+ }
+ //thumbnailPath = __pContact->GetThumbnailPath();