- String idVal;
- idVal.Append(pContact->GetRecordId());
- extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
- extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
- extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), new (std::nothrow) String(idVal));
- extraData.Add(new (std::nothrow) String(CONTACTS_ID_KEY), new (std::nothrow) String(idVal));
- extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_PERSON));
- pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_VIEW);
-
- }
- else
- {
- AppLogDebug("Add Contact");
- extraData.Add(new (std::nothrow) String(INPUT_TYPE_PHONE), new (std::nothrow) String(*__pContactNumber));
- extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_CONTACT));
- pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_ADD);
-
- }
- if (pAc != null)
- {
- r = pAc->Start(null, null, &extraData, this);
- if(r != E_SUCCESS)
- {
- //AppControl request failed, reset flag.
- __isContactAppControlLaunched = false;
- }
- else if (r == E_SUCCESS && __pEndCallEventTimer != null)
- {
- //cancel EndCallTimer, if AppControl request was success.
- __pEndCallEventTimer->Cancel();
- }
- delete pAc;