serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontacts_async/src/tcontacts_async_blocks.cpp
--- a/serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontacts_async/src/tcontacts_async_blocks.cpp Tue Aug 31 16:06:03 2010 +0300
+++ b/serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontacts_async/src/tcontacts_async_blocks.cpp Wed Sep 01 12:28:47 2010 +0100
@@ -23,7 +23,7 @@
#include <StifParser.h>
#include <StifTestInterface.h>
#include <VPbkEng.rsg>
-
+#include <mmfcontrollerpluginresolver.h>
#include <MVPbkContactFieldTextData.h>
#include <MVPbkContactStoreList.h>
#include <MVPbkContactOperationBase.h>
@@ -112,7 +112,11 @@
}
void CContactsUT::HandleReturnId( const TInt& aError, HBufC8* acntId, TInt aTransId )
{
+ delete acntId;
CActiveScheduler::Stop();
+ if(aError == KErrNone)
+ iErr = KErrNone;
+
}
void CContactsUT::HandleReturnArray(const TInt& aError, RPointerArray<HBufC8>& aArray, TInt aTransId )
@@ -203,10 +207,11 @@
iLog->Log(_L("Phone Contact Field modified \n"));
__UHEAP_MARK;
iServiceHandle->AddL(this,0,singleContact);
+ __UHEAP_MARKEND;
+
iLog->Log(_L("AddL called\n"));
iLog->Log(_L("Start Active Scheduler\n"));
CActiveScheduler::Start();
- __UHEAP_MARKEND;
break;
}
}
@@ -660,7 +665,7 @@
iErr = KErrNone;
- __UHEAP_MARK;
+ // __UHEAP_MARK;
iOp = iContactManager->MatchPhoneNumberL(
KPhoneNumber, KPhoneNumber().Length(), *this );
CActiveScheduler::Start();
@@ -686,7 +691,7 @@
iContactToDelete = NULL;
- __UHEAP_MARKEND;
+ // __UHEAP_MARKEND;
}
//Add 1 contact
@@ -740,7 +745,8 @@
//Check for contact
void CContactsUT::CheckContactsL(TInt& aCount,RPointerArray<TDesC8>& aIdArray)
- {
+ {
+ CleanupResetAndDestroyPushL(aIdArray);
// Print to UI
_LIT( KContactsTest, "ContactsUT" );
_LIT( KExample, "In CheckContactsL" );
@@ -766,7 +772,8 @@
}
delete iFindResults;
iFindResults = NULL;
- // __UHEAP_MARKENDC(aCount);
+ // __UHEAP_MARKENDC(aCount);
+ CleanupStack::Pop(&aIdArray);
}
// -----------------------------------------------------------------------------
@@ -3154,7 +3161,7 @@
{
while(count)
{
- //__UHEAP_MARK;
+ __UHEAP_MARK;
iBuffer = (const_cast<MVPbkContactLink&>(iFindResults->At(--count))).PackLC();
CleanupStack::Pop();//iBuffer
iServiceHandle = CContactService::NewL();
@@ -3169,7 +3176,7 @@
delete iServiceHandle;//serviceHandle
iServiceHandle = NULL;
iLog->Log( KServiceClose );
- //__UHEAP_MARKEND;
+ __UHEAP_MARKEND;
}
}