Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:14:47 +0300
branchRCL_3
changeset 11 6347473a7bb2
parent 9 fc313e1df071
child 12 994c46bea969
Revision: 201017 Kit: 201019
srsf/nssvasapi/nssvascore/src/vascvpbkhandler.cpp
srsf/nssvasapi/nssvasdb/src/nssvascvasdb.cpp
srsf/sicc/src/nsssispeechrecognitioncustomcommands.cpp
srsf/sispeechrecognitiondata/src/nsssispeechrecognitiondatadevasr.cpp
srsf/sisrscontrollerplugin/src/sicommondb.cpp
srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp
srsf/sisrscontrollerplugin/src/sigrammardb.cpp
srsf/sisrscontrollerplugin/src/silexicondb.cpp
srsf/speechsynthesis/client/src/speechsynthesis.cpp
srsf/speechsynthesis/server/src/speechsynthesisserver.cpp
srsf/ttscustomcommands/src/nssttscustomcommandparser.cpp
srsf/vcommandhandler/group/vcommandhandler.mmp
srsf/vcommandhandler/src/tagnameset.cpp
srsf/vcommandhandler/src/vcommandrunnable.cpp
srsf/vcommandmanager/inc/defaultvoicecommands.xml
srsf/vcommandmanager/src/vcmanagervoiceheadsetlauncher.cpp
srsf/vcommandmanager/src/vcmanagervoicekeylauncher.cpp
srsf/vcommandmanager/src/vcommandmanager.cpp
voiceui/pbkinfoviewimpl/group/pbkinfoview.mmp
voiceui/pbkinfoviewimpl/inc/pbkinfoviewdialog.h
voiceui/pbkinfoviewimpl/inc/pbkinfoviewsindhandler.h
voiceui/pbkinfoviewimpl/src/pbkinfoviewdialog.cpp
voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp
voiceui/vcommand/data/vcommand.rss
voiceui/vcommand/src/uiarraysgenerator.cpp
voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp
voiceui/voiceuivoicerecognition/src/vuiclistquerydialog.cpp
voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp
voiceui/voiceuivoicerecognition/src/vuicresultsstate.cpp
--- a/srsf/nssvasapi/nssvascore/src/vascvpbkhandler.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/nssvasapi/nssvascore/src/vascvpbkhandler.cpp	Tue May 11 16:14:47 2010 +0300
@@ -487,6 +487,12 @@
     __ASSERT_ALWAYS( iField, User::Leave( KErrArgument ) );
     __ASSERT_ALWAYS( !iOperation, User::Leave( KErrArgument ) );
     
+    if ( iField->BestMatchingFieldType()->FieldTypeResId() == R_VPBK_FIELD_TYPE_IMPP && 
+         iField->FieldData().DataType() == EVPbkFieldStorageTypeUri )
+        {
+        return MVPbkContactFieldUriData::Cast( iField->FieldData()).Scheme();
+        }
+
     return iField->FieldLabel();
     }
     
--- a/srsf/nssvasapi/nssvasdb/src/nssvascvasdb.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/nssvasapi/nssvasdb/src/nssvascvasdb.cpp	Tue May 11 16:14:47 2010 +0300
@@ -841,6 +841,8 @@
 //
 void CNssVasDb::SaveTagsL( CArrayPtrFlat<CNssTag>* aTagArray, RArray<TInt>& aTagIdArray )
     {
+	CleanupClosePushL( aTagIdArray );
+
     TInt k( 0 );
     TInt error( KErrNone );
 
@@ -912,6 +914,7 @@
     // Pop rollback cleanup
     // (which would have made database rollback, if a leave had happened)
     CleanupStack::Pop();  // Rollback cleanup item
+	CleanupStack::Pop();
     }
 
 // ---------------------------------------------------------
--- a/srsf/sicc/src/nsssispeechrecognitioncustomcommands.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/sicc/src/nsssispeechrecognitioncustomcommands.cpp	Tue May 11 16:14:47 2010 +0300
@@ -621,6 +621,7 @@
 EXPORT_C void RSISpeechRecognitionCustomCommands::GetPronunciationIDArrayL(
 	RArray<TSIPronunciationID>& aPronunciationIDs)
 	{
+	CleanupClosePushL( aPronunciationIDs );
 	
 	TPckgBuf<TInt> pckgSize;
 	
@@ -649,7 +650,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(2);//stream, buf
-		
+	CleanupStack::Pop();
 	}
 
 // -----------------------------------------------------------------------------
@@ -660,6 +661,7 @@
 EXPORT_C void RSISpeechRecognitionCustomCommands::GetRuleIDArrayL(
 	RArray<TSIRuleID>& aRuleIDs)
 	{
+	CleanupClosePushL( aRuleIDs );
 
 	TPckgBuf<TInt> pckgSize;
 	
@@ -687,7 +689,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(2);//stream, buf
-	
+	CleanupStack::Pop();
 	}
 
 // -----------------------------------------------------------------------------
@@ -698,6 +700,7 @@
 EXPORT_C void RSISpeechRecognitionCustomCommands::GetModelIDArrayL(
 	RArray<TSIModelID>& aModelIDs)
 	{
+	CleanupClosePushL( aModelIDs );
 
 	TPckgBuf<TInt> pckgSize;
 	
@@ -725,7 +728,7 @@
 		}
 
 	CleanupStack::PopAndDestroy( 2 );//stream, buf
-	
+	CleanupStack::Pop();
 	}
 
 // -----------------------------------------------------------------------------
@@ -736,7 +739,8 @@
 EXPORT_C void RSISpeechRecognitionCustomCommands::GetGrammarIDArrayL(
 	RArray<TSIGrammarID>& aGrammarIDs)
 	{
-
+	CleanupClosePushL( aGrammarIDs );
+	
 	TPckgBuf<TInt> pckgSize;
 	
 	User::LeaveIfError(iController.CustomCommandSync(iDestinationPckg, 
@@ -763,7 +767,7 @@
 		}
 
 	CleanupStack::PopAndDestroy( 2 );//stream, buf
-	
+	CleanupStack::Pop();//aGrammarIDs
 	}
 
 // -----------------------------------------------------------------------------
@@ -774,6 +778,7 @@
 EXPORT_C void RSISpeechRecognitionCustomCommands::GetLexiconIDArrayL(
 	RArray<TSILexiconID>& aLexiconIDs)
 	{
+	CleanupClosePushL( aLexiconIDs );
 
 	TPckgBuf<TInt> pckgSize;
 
@@ -802,7 +807,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(2);//stream, buf
-	
+	CleanupStack::Pop();
 	}
 
 // -----------------------------------------------------------------------------
@@ -813,6 +818,7 @@
 EXPORT_C void RSISpeechRecognitionCustomCommands::GetModelBankIDArrayL(
 	RArray<TSIModelBankID>& aModelBankIDs)
 	{
+	CleanupClosePushL( aModelBankIDs );
 
 	TPckgBuf<TInt> pckgSize;
 	
@@ -840,7 +846,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(2);//stream, buf
-	
+	CleanupStack::Pop();
 	}
 
 // -----------------------------------------------------------------------------
@@ -1001,6 +1007,7 @@
 	TInt aNumberElements, 
 	RArray<TInt>& aArray)
 	{
+	CleanupClosePushL( aArray );
 
 	RDesReadStream stream(aDes);
 	CleanupClosePushL(stream);
@@ -1011,7 +1018,7 @@
 		}
 
 	CleanupStack::PopAndDestroy();//stream
-
+	CleanupStack::Pop();
 	}
 
 /************************** New SI functions start here ***********************/
--- a/srsf/sispeechrecognitiondata/src/nsssispeechrecognitiondatadevasr.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/sispeechrecognitiondata/src/nsssispeechrecognitiondatadevasr.cpp	Tue May 11 16:14:47 2010 +0300
@@ -20,6 +20,7 @@
 // INCLUDE FILES
 #include <e32std.h>
 #include <s32mem.h>
+#include <mmf\common\mmfcontrollerpluginresolver.h>
 #include "nsssispeechrecognitiondatadevasr.h"
 #include "nsssispeechrecognitiondatatest.h"
 #include "nsssidataserialize.h"
@@ -2128,6 +2129,7 @@
 												 const TInt aIndex,
 												 RPointerArray<CSIPronunciationInfo>& aPronunciations ) const
 {
+	CleanupResetAndDestroyPushL( aPronunciations ); 
 	// clear given array
 	aPronunciations.Reset();
 	
@@ -2140,6 +2142,7 @@
 			User::LeaveIfError( error );
 		}
 	}
+	CleanupStack::Pop( &aPronunciations ); 
 }
 /*****************************************************************************/
 
--- a/srsf/sisrscontrollerplugin/src/sicommondb.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/sisrscontrollerplugin/src/sicommondb.cpp	Tue May 11 16:14:47 2010 +0300
@@ -228,6 +228,8 @@
 	TUid aClientUid,
 	RArray<TUint32>& aIDs )
 	{
+	CleanupClosePushL( aIDs ); 
+	
 	TBuf<100> KSQLStatement;
 	// Declare a literal string to hold the SQL statement
 	// SELECT aIdColumn, KUsedColumn FROM aIdTable WHERE KClientUidColumn = uid
@@ -279,6 +281,7 @@
 
 	// Cleanup view
     CleanupStack::PopAndDestroy();
+    CleanupStack::Pop();
 	}
 
 // -----------------------------------------------------------------------------
@@ -291,6 +294,8 @@
 	const TDesC& aIdColumn,
 	RArray<TUint32>& aIDs )
 	{
+	CleanupClosePushL( aIDs ); 
+	
 	TBuf<100> KSQLStatement;
 	// Declare a literal string to hold the SQL statement
 	// SELECT aIdColumn FROM aIdTable WHERE KUsedColumn = KUsed
@@ -333,6 +338,7 @@
 
 	// Cleanup view
     CleanupStack::PopAndDestroy();
+    CleanupStack::Pop(); 
 	}
 
 // -----------------------------------------------------------------------------
--- a/srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp	Tue May 11 16:14:47 2010 +0300
@@ -2877,6 +2877,8 @@
                                                       RArray<TSIRuleID>& aRuleIDs )
     {
     RUBY_DEBUG_BLOCK( "CSIControllerPlugin::UpdateGrammarAndLexiconDBL" );
+    CleanupClosePushL( aRuleIDs ); 
+    
     iSITtpWordList = aSITtpWordList;
     iLexiconID = aLexiconID;
     iGrammarID = aGrammarID;
@@ -2963,6 +2965,8 @@
     iSILexiconDB->UpdateLexiconL( iClientUid,aLexicon );
     iSIDatabase->CommitChangesL( ETrue );  
     CleanupStack::PopAndDestroy( 2 ); // aGrammar aLexicon	
+    
+    CleanupStack::Pop(); //aRuleIDs
     }
 
 // -----------------------------------------------------------------------------
--- a/srsf/sisrscontrollerplugin/src/sigrammardb.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/sisrscontrollerplugin/src/sigrammardb.cpp	Tue May 11 16:14:47 2010 +0300
@@ -608,6 +608,8 @@
 void CSIGrammarDB::GetAllRuleIDsL( TSIGrammarID aGrammarID,
                                    RArray<TSIRuleID>& aRuleIDs )
     {
+	CleanupClosePushL( aRuleIDs );
+	
     // Construct the table name using the provided grammar ID
     TBuf<40> KGrammarName(KSIGrammarTable);
     KGrammarName.AppendNumUC(aGrammarID);
@@ -622,6 +624,7 @@
         User::LeaveIfError(aRuleIDs.Append(RuleId));
         } 
     CleanupStack::PopAndDestroy(newgrammar);
+    CleanupStack::Pop();
     }
 
 // -----------------------------------------------------------------------------
--- a/srsf/sisrscontrollerplugin/src/silexicondb.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/sisrscontrollerplugin/src/silexicondb.cpp	Tue May 11 16:14:47 2010 +0300
@@ -334,6 +334,8 @@
 //
 void CSILexiconDB::GetAllPronunciationIDsL( TSILexiconID aLexiconID, RArray<TSIPronunciationID>& aPronunciationIDs )
     {
+	CleanupClosePushL( aPronunciationIDs ); 
+	
     // Construct the table name using the provided Lexicon ID
     TBuf<40> KLexiconName(KSILexiconTable);
     KLexiconName.AppendNumUC(aLexiconID);
@@ -350,6 +352,7 @@
     
     CleanupStack::PopAndDestroy(newLexicon); // newLexicon
     //	GetAllIDsL(KLexiconName, KPronunciationIDColumn, aPronunciationIDs);
+    CleanupStack::Pop(); 
     }
 
 // -----------------------------------------------------------------------------
--- a/srsf/speechsynthesis/client/src/speechsynthesis.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/speechsynthesis/client/src/speechsynthesis.cpp	Tue May 11 16:14:47 2010 +0300
@@ -257,6 +257,7 @@
 //
 EXPORT_C void RSpeechSynthesis::GetLanguagesL( RArray<TLanguage>& aLanguages )
     {
+	CleanupClosePushL( aLanguages ); 
     if ( Handle() == 0 )
         {
         User::Leave( KErrBadHandle );
@@ -288,6 +289,7 @@
 
         CleanupStack::PopAndDestroy( data );
         }
+    CleanupStack::Pop(); 
     }
 
 // ----------------------------------------------------------------------------
@@ -298,6 +300,7 @@
 EXPORT_C void RSpeechSynthesis::GetVoicesL( RArray<TVoice>& aVoices,
                                             TLanguage aLanguage )
     {
+	CleanupClosePushL( aVoices ); 
     if ( Handle() == 0 )
         {
         User::Leave( KErrBadHandle );
@@ -330,6 +333,7 @@
         
         CleanupStack::PopAndDestroy( data );   
         }
+    CleanupStack::Pop(); 
     }
 
 // ----------------------------------------------------------------------------
--- a/srsf/speechsynthesis/server/src/speechsynthesisserver.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/speechsynthesis/server/src/speechsynthesisserver.cpp	Tue May 11 16:14:47 2010 +0300
@@ -461,6 +461,7 @@
                                                   RArray<TVoice>& aVoices )
     {
     RUBY_DEBUG_BLOCK( "CSpeechSynthesisServer::GetSupportedVoicesL" );
+    CleanupClosePushL( aVoices );
     
     UpdateSynthesisConfigurationIfNeededL();
     
@@ -477,6 +478,7 @@
             aVoices.AppendL( voice );
             }
         }
+    CleanupStack::Pop(); 
     }
  
 // ----------------------------------------------------------------------------
--- a/srsf/ttscustomcommands/src/nssttscustomcommandparser.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/ttscustomcommands/src/nssttscustomcommandparser.cpp	Tue May 11 16:14:47 2010 +0300
@@ -427,10 +427,11 @@
     TInt* languageCount = intPtrPckg();
     
     RArray<TLanguage> languages;
+    CleanupClosePushL( languages ); 
     iImplementor.MttscGetSupportedLanguagesL( languages );
     *languageCount = languages.Count();
 
-    languages.Close();
+    CleanupStack::PopAndDestroy();
     }
     
 // -----------------------------------------------------------------------------
@@ -484,9 +485,10 @@
     TInt* voiceCount = intPtrPckg();
     
     RArray<TTtsStyle> voices;
+    CleanupClosePushL( voices ); 
     iImplementor.MttscGetSupportedVoicesL( language, voices );
     *voiceCount = voices.Count();
 
-    voices.Close();    
+    CleanupStack::PopAndDestroy( );
     }
 // End of File
--- a/srsf/vcommandhandler/group/vcommandhandler.mmp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandhandler/group/vcommandhandler.mmp	Tue May 11 16:14:47 2010 +0300
@@ -67,3 +67,4 @@
 LIBRARY	    aknskins.lib
 LIBRARY	    aknskinsrv.lib 
 LIBRARY	    aknswallpaperutils.lib 
+LIBRARY     cone.lib 
--- a/srsf/vcommandhandler/src/tagnameset.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandhandler/src/tagnameset.cpp	Tue May 11 16:14:47 2010 +0300
@@ -178,7 +178,15 @@
             DecreaseCallbacksExpected();
             WaitUntilOperationsAreCompletedL();
             
-            User::Leave( nssErr );
+            switch( nssErr )
+                {
+                case MNssSpeechItem::EVasInvalidParameter:
+                    User::Leave( KErrArgument );
+                case MNssSpeechItem::EVasTrainFailed:
+                    User::Leave( KErrGeneral );
+                default:
+                    User::Leave( nssErr );
+                } 
             }        
         }
     RUBY_DEBUG0( "CTagNameSet::TrainTagL Tag training has been initiated" );
--- a/srsf/vcommandhandler/src/vcommandrunnable.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandhandler/src/vcommandrunnable.cpp	Tue May 11 16:14:47 2010 +0300
@@ -23,6 +23,8 @@
 #include <apaid.h>
 #include <apgcli.h>
 #include <apacmdln.h>
+#include <apgtask.h>
+#include <eikappui.h>
 
 /**
 * The version of the streamed data protocol
@@ -232,6 +234,21 @@
 		}
 	else 
 		{
+        const TUid KLogsUID3 = { 270486741 };//101F4CD5
+        //In case logs.exe run in background [EDCN-84B68Q]
+        //todo: General support for this kind of case,
+		//      eg, add "view" keyworkd in defaultvoicecommands.xml...
+        if ( iExeUid == KLogsUID3 )
+            {
+            TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
+            TApaTask task = taskList.FindApp( iExeUid );
+            if( task.Exists() ) //Logs already open. Request it to
+                {               //activate the correct view
+                task.SendMessage( iExeUid, *iArguments );
+                return;
+                }
+            }
+        
 		TApaAppInfo appInfo;
 		RApaLsSession apaLsSession;
 		CleanupClosePushL( apaLsSession );
--- a/srsf/vcommandmanager/inc/defaultvoicecommands.xml	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandmanager/inc/defaultvoicecommands.xml	Tue May 11 16:14:47 2010 +0300
@@ -37,7 +37,7 @@
             <tooltip locindex="10001"/>
             <executes uid="0x101F4CD5"/>
             <cmdlineparams>
-            
+            counters
             </cmdlineparams>
             <icon uid="0x101F4CD5"/>
         </vcommand>
--- a/srsf/vcommandmanager/src/vcmanagervoiceheadsetlauncher.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandmanager/src/vcmanagervoiceheadsetlauncher.cpp	Tue May 11 16:14:47 2010 +0300
@@ -80,6 +80,7 @@
     
     // iCallHandlingTarget will be destroyed when iSelector is destroyed.  
     delete iSelector;
+    iProperty.Close();
     
     RUBY_DEBUG0( "CVCommandManagerVoiceHeadSetLauncher::~CVCommandManagerVoiceHeadSetLauncher - EXIT" );
     }
@@ -237,6 +238,7 @@
             {
             RApaLsSession apaLsSession;
             User::LeaveIfError( apaLsSession.Connect() );
+            CleanupClosePushL(apaLsSession);
             
             TApaAppInfo appInfo;
             User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, KVoiceUiUID ) );
@@ -256,7 +258,7 @@
             User::LeaveIfError ( apaLsSession.StartApp( *apaCommandLine ) );
             CleanupStack::PopAndDestroy( apaCommandLine );
 
-            apaLsSession.Close();
+            CleanupStack::PopAndDestroy(&apaLsSession);
             }    
         }
     }
--- a/srsf/vcommandmanager/src/vcmanagervoicekeylauncher.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandmanager/src/vcmanagervoicekeylauncher.cpp	Tue May 11 16:14:47 2010 +0300
@@ -176,6 +176,7 @@
         {
         RApaLsSession apaLsSession;
         User::LeaveIfError( apaLsSession.Connect() );
+        CleanupClosePushL(apaLsSession);
         
         TApaAppInfo appInfo;
         User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, KVoiceUiUID ) );
@@ -188,7 +189,7 @@
         User::LeaveIfError ( apaLsSession.StartApp( *apaCommandLine ) );
         CleanupStack::PopAndDestroy( apaCommandLine );
     
-        apaLsSession.Close();
+        CleanupStack::PopAndDestroy(&apaLsSession);
         }    
     }
     
--- a/srsf/vcommandmanager/src/vcommandmanager.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/srsf/vcommandmanager/src/vcommandmanager.cpp	Tue May 11 16:14:47 2010 +0300
@@ -179,7 +179,7 @@
         }
     else
         {
-        RUBY_ERROR1( "CVCommandManager::ParseAllFilesFromDirectoryL - GetDir returns [%d]", error );
+        RUBY_DEBUG1( "CVCommandManager::ParseAllFilesFromDirectoryL - GetDir returns [%d]", error );
         }
     }
     
--- a/voiceui/pbkinfoviewimpl/group/pbkinfoview.mmp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/pbkinfoviewimpl/group/pbkinfoview.mmp	Tue May 11 16:14:47 2010 +0300
@@ -85,6 +85,8 @@
 LIBRARY VPbkEng.lib
 LIBRARY Pbk2Presentation.lib
 LIBRARY Pbk2CommonUI.lib
+LIBRARY	fbscli.lib
+LIBRARY	egul.lib 
 //EXPORTUNFROZEN
 
 
--- a/voiceui/pbkinfoviewimpl/inc/pbkinfoviewdialog.h	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/pbkinfoviewimpl/inc/pbkinfoviewdialog.h	Tue May 11 16:14:47 2010 +0300
@@ -32,6 +32,9 @@
 #include "pbkinfoviewreshandler.h"
 #include "pbkinfoviewsindhandler.h"
 
+// FORWARD DECLARATIONS
+class TXspIconHelper;
+
 // CLASS DECLARATION
 
 /**
@@ -46,7 +49,6 @@
 	    EIconIndexVideo,
 	    EIconIndexVoip,
 	    EIconIndexEmail,
-	    EIconIndexXsp,
 	    EIconIndexEmpty
 		};	
 
@@ -165,9 +167,10 @@
 	    /**
         * Returns TInfoViewDialogIconIndex enumeration icon index.
 		* @param aIconId enumeration TPbkIconId from PbkIconId.hrh.
+		*        aTagIndex voice tag index
         * @return Icon index.
         */
-		TInt IconIndex( TInt aIconId );
+		TInt IconIndex( TInt aIconId,TInt aTagIndex );
 		
 		/**
         * Creates listbox items.
@@ -250,8 +253,8 @@
 		// SIND handler
 		CPbkInfoViewSindHandler* iSindHandler;
 		
-		// Xsp flag
-		TBool isXsp;
+		//XSp icon helper
+		RArray<TXspIconHelper>   iXspIconHelper;
     };
 
 #endif    // PBKINFOVIEWDIALOG_H
--- a/voiceui/pbkinfoviewimpl/inc/pbkinfoviewsindhandler.h	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/pbkinfoviewimpl/inc/pbkinfoviewsindhandler.h	Tue May 11 16:14:47 2010 +0300
@@ -122,10 +122,20 @@
          TInt IconIdL( TInt aIndex );
 		 
          /**
-         * Returns an field id
-		 * @return TInt the field id
+         * Returns an field id that the voice tage is associated
+         * @param aIndex index for the voice tag.
+         *        0 <= aIndex <= VoiceTagCount() - 1
+		 * @return TInt field id
          */
-         TInt FieldIdL();
+         TInt FieldIdL( TInt aIndex );
+         
+         /**
+         * Returns a tag label that the voice tage is associated
+         * @param aIndex index for the voice tag.
+         *        0 <= aIndex <= VoiceTagCount() - 1
+         * @return TPtrC the tag label
+         */
+         TPtrC LabelL( TInt aIndex );
          
          /**
          * Calls CompareL and catches possible leaves
--- a/voiceui/pbkinfoviewimpl/src/pbkinfoviewdialog.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/pbkinfoviewimpl/src/pbkinfoviewdialog.cpp	Tue May 11 16:14:47 2010 +0300
@@ -51,6 +51,10 @@
 #include <TVPbkContactStoreUriPtr.h>
 #include <PbkFields.hrh>
 
+#include <MPbk2FieldPropertyArray2.h>
+#include <MPbk2FieldProperty2.h>
+#include <MPbk2FieldProperty.h>
+
 const TUint KFieldIds[] = 
     {
     R_VPBK_FIELD_TYPE_LANDPHONEGEN,    
@@ -61,6 +65,31 @@
     R_VPBK_FIELD_TYPE_IMPP
     };
 
+NONSHARABLE_CLASS( TXspIconHelper )
+    {
+    public:    
+        TXspIconHelper( TInt aIndex, const TDesC& aLable );
+        TDesC& LableText();
+        TInt   Index();
+    private:
+        TBuf<KPbkSIPMaxLength> iLable;
+        TInt iIndex;
+    };
+
+TXspIconHelper::TXspIconHelper( TInt aIndex, const TDesC& aLable ):
+    iLable(aLable),iIndex(aIndex)
+    {
+    }
+
+inline TInt TXspIconHelper::Index()
+    {
+    return iIndex;
+    }
+inline TDesC& TXspIconHelper::LableText()
+    {
+    return iLable;
+    }
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -153,6 +182,8 @@
         {
         iNaviPane->Pop();
         }
+    
+    iXspIconHelper.Close();
     }
 
 //------------------------------------------------------------------------------
@@ -515,7 +546,7 @@
 // @return TInt Icon index.
 // -----------------------------------------------------------------------------
 //
-TInt CPbkInfoViewDialog::IconIndex( TInt aIconId )
+TInt CPbkInfoViewDialog::IconIndex( TInt aIconId, TInt aTagIndex )
 	{
 	TInt iconIndex;
 	
@@ -534,17 +565,20 @@
 		    iconIndex = EIconIndexEmail;
 		    break;
 		case EPbkqgn_prop_nrtyp_voip:
-			if ( isXsp )
+		    iconIndex = EIconIndexVoip;
+			if ( iSindHandler->FieldIdL( aTagIndex ) == EPbkFieldIdXsp )
 				{
-				iconIndex = EIconIndexXsp;
-				}
-			else
-				{
-				iconIndex = EIconIndexVoip;
+				for ( TInt i=0; i<iXspIconHelper.Count();i++)
+				    {
+                    if ( !iXspIconHelper[i].LableText().Compare(iSindHandler->LabelL(aTagIndex)) )
+                        {
+                        iconIndex = iXspIconHelper[i].Index();
+                        }
+				    }                
 				}
 		    break;
 		default:
-		    iconIndex = EIconIndexEmpty;    
+		    iconIndex = EIconIndexPhone;    
 		    break;
 		}
 		
@@ -574,12 +608,8 @@
 		HBufC* firstLine = iSindHandler->VoiceTagLabelLC( i );
 		// Phone number, email address, etc...
 		HBufC* secondLine = iSindHandler->VoiceTagValueL( i ).AllocLC();
-        isXsp = EFalse;
-		if( iSindHandler->FieldIdL() == EPbkFieldIdXsp )
-			{
-			isXsp = ETrue;
-			}
-		TInt iconIndex = IconIndex( iSindHandler->IconIdL( i ) );
+
+		TInt iconIndex = IconIndex( iSindHandler->IconIdL( i ), i );
 
 		TPtr ptr1 = firstLine->Des();
 		AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr1 );
@@ -743,6 +773,17 @@
     for( count = 0; count < propertyArray->Count(); ++ count)
         {
         icon = pbk2IconFactory->CreateIconL( propertyArray->At(count).IconId());
+        // Append xSP icon info to helper array
+        if ( propertyArray->At(count).FieldType().FieldTypeResId() == R_VPBK_FIELD_TYPE_IMPP 
+                && icon && icon->Bitmap()->Handle() )
+            {
+            const MPbk2FieldProperty& property = propertyArray->At(count);
+            MPbk2FieldProperty2* property2 = reinterpret_cast<MPbk2FieldProperty2*>
+                ( const_cast<MPbk2FieldProperty&> (property).FieldPropertyExtension(
+                        KMPbk2FieldPropertyExtension2Uid ) );      
+            TXspIconHelper xsp( count, property2->XSpName() );
+            iXspIconHelper.Append( xsp );
+            }
         aIconArray->AppendL(icon);
         }
 
@@ -750,14 +791,6 @@
 	
     //Destroy: configuration,uriArray,contactManager
     //fieldTypeList,propertyArray,pbk2IconFactory
-    CleanupStack::PopAndDestroy( 6,configuration ); 	
-    
-	TFileName bitmapName;
-	CPbkInfoViewResHandler::GetBitmapFileName( bitmapName );
-	
-	aIconArray->AppendL( TDialogUtil::CreateIconL(
-	                KAknsIIDQgnLogoEmpty, bitmapName,
-	                EMbmAvkonQgn_prop_empty,
-	                EMbmAvkonQgn_prop_empty_mask ) );
+    CleanupStack::PopAndDestroy( 6,configuration );
 	}
 //  End of File  
--- a/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp	Tue May 11 16:14:47 2010 +0300
@@ -505,14 +505,40 @@
 // ----------------------------------------------------------------------------
 // CPbkInfoViewSindHandler::FieldIdL
 // Returns an field id for the contact field.
+// @param aIndex index for the voice tag. 0 <= aIndex <= VoiceTagCount() - 1
 // @return TInt the field id
 // ----------------------------------------------------------------------------
-TInt CPbkInfoViewSindHandler::FieldIdL( )
-	{
+TInt CPbkInfoViewSindHandler::FieldIdL( TInt aIndex )
+	{    
+    RUBY_DEBUG_BLOCK( "CPbkInfoViewSindHandler::FieldIdL" );
+    
+    __ASSERT_ALWAYS( aIndex >= 0 && aIndex < VoiceTagCount(),
+                     User::Leave( KErrArgument ) );
+        
+    iPbkHandler->FindContactFieldL( iTagArray[aIndex] );
+    
 	return iPbkHandler->FieldIdL();
 	}
 
 // ----------------------------------------------------------------------------
+// CPbkInfoViewSindHandler::LabelL
+// Returns label for the contact field.
+// @param aIndex index for the voice tag. 0 <= aIndex <= VoiceTagCount() - 1
+// @return TPtrC the tag label
+// ----------------------------------------------------------------------------
+TPtrC CPbkInfoViewSindHandler::LabelL( TInt aIndex )
+    {
+    RUBY_DEBUG_BLOCK( "CPbkInfoViewSindHandler::LabelL" );
+    
+    __ASSERT_ALWAYS( aIndex >= 0 && aIndex < VoiceTagCount(),
+                     User::Leave( KErrArgument ) );
+        
+    iPbkHandler->FindContactFieldL( iTagArray[aIndex] );
+    
+    return iPbkHandler->LabelL();
+    }
+
+// ----------------------------------------------------------------------------
 // CPbkInfoViewSindHandler::CreateVoiceTagListL
 // Fetches voice tag list from vas db.
 // @param aContactId Contact id for the contact whose voice tags are
--- a/voiceui/vcommand/data/vcommand.rss	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/vcommand/data/vcommand.rss	Tue May 11 16:14:47 2010 +0300
@@ -196,6 +196,11 @@
             },
         MENU_ITEM
             {
+            command = EVCCmdStartVui;
+            txt = qtn_vc_tutorial;
+            },			
+        MENU_ITEM
+            {
             command = EVCCmdPlayback;
             txt = text_voice_replay;
             flags = EEikMenuItemAction;
@@ -210,12 +215,7 @@
             {
             command = EVCCmdSettings;
             txt = qtn_vc_settings;
-            },
-        MENU_ITEM
-            {
-            command = EVCCmdStartVui;
-            txt = qtn_vc_tutorial;
-            },
+            },       
         MENU_ITEM
             {
             command = EAknCmdHelp;
--- a/voiceui/vcommand/src/uiarraysgenerator.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/vcommand/src/uiarraysgenerator.cpp	Tue May 11 16:14:47 2010 +0300
@@ -206,6 +206,8 @@
 				  CAknIconArray& aIconArray, CDesC16ArrayFlat& aFolderTitles, 
 				  RArray<TBool>& aItemIsFolder, CDesC16ArrayFlat& aItemArray )
 	{
+	CleanupClosePushL( aItemIsFolder ); 
+	
 	aIconArray.ResetAndDestroy();
 	aFolderTitles.Reset();
 	aItemIsFolder.Reset();
@@ -241,7 +243,9 @@
         }
     
     CleanupStack::PopAndDestroy( entries );  // ResetAndDestroy
-    CleanupStack::PopAndDestroy( entries );  // delete    
+    CleanupStack::PopAndDestroy( entries );  // delete
+    
+    CleanupStack::Pop(); //aItemIsFolder
 	}
 
 /**
--- a/voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp	Tue May 11 16:14:47 2010 +0300
@@ -137,3 +137,6 @@
 LIBRARY         estor.lib
 LIBRARY         etel3rdparty.lib
 
+LIBRARY         VPbkEng.lib
+LIBRARY         ecom.lib 
+
--- a/voiceui/voiceuivoicerecognition/src/vuiclistquerydialog.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/src/vuiclistquerydialog.cpp	Tue May 11 16:14:47 2010 +0300
@@ -226,6 +226,13 @@
             iObserver->ProcessCommandL( EVoiceTagSoftKeySelect );
             }
         }
+    else if ( aEventType == EEventFlickStopped )
+        {
+        if ( iObserver )
+            {
+            iObserver->ProcessCommandL( EDragKeypress );
+            }
+        }
         
     if ( forwardEvent )
         {
--- a/voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp	Tue May 11 16:14:47 2010 +0300
@@ -214,12 +214,13 @@
 	TBool islock = EFalse;
 	RWsSession &ws = CCoeEnv::Static()->WsSession();
 	TInt wgId = ws.GetFocusWindowGroup(); 
-	CApaWindowGroupName *WindowsGroupName = CApaWindowGroupName::NewL( ws, wgId );
+	CApaWindowGroupName *WindowsGroupName = CApaWindowGroupName::NewLC( ws, wgId );
 	if ( ( KAknnfysrvUid == WindowsGroupName->AppUid() ) && 
 	      ( ws.GetWindowGroupOrdinalPriority( wgId ) >= ECoeWinPriorityAlwaysAtFront ) )
 	    {
 	    islock = ETrue;
 	    }
+	CleanupStack::PopAndDestroy( WindowsGroupName );
 	return islock;
 	}
     
--- a/voiceui/voiceuivoicerecognition/src/vuicresultsstate.cpp	Wed Apr 14 15:58:44 2010 +0300
+++ b/voiceui/voiceuivoicerecognition/src/vuicresultsstate.cpp	Tue May 11 16:14:47 2010 +0300
@@ -42,6 +42,14 @@
 #include "vuicttsplayer.h"
 #include "vuivoiceicondefs.h"
 
+#include <CVPbkContactStoreUriArray.h>
+#include <CVPbkContactManager.h>
+#include <VPbkContactStoreUris.h>
+#include <TVPbkContactStoreUriPtr.h>
+#include <CVPbkContactIdConverter.h>
+#include <MVPbkContactStore.h>
+#include <MVPbkContactStoreList.h>
+
 #include "rubydebug.h"
 
 _LIT( KTab, "\t" );
@@ -731,16 +739,39 @@
     CleanupClosePushL( *parameter );
 
     parameter->SetConnectionFlag( MCCAParameter::ENormal );
-    parameter->SetContactDataFlag( MCCAParameter::EContactId );
+    parameter->SetContactDataFlag( MCCAParameter::EContactLink );
+        
+    // Create a Contact Manager and bind it with the default contact database 
+    CVPbkContactStoreUriArray* uriArray = CVPbkContactStoreUriArray::NewL();
+    CleanupStack::PushL( uriArray );
+    
+    TVPbkContactStoreUriPtr uri( VPbkContactStoreUris::DefaultCntDbUri() );
+    uriArray->AppendL( uri );  
+    
+    CVPbkContactManager* contactManager = CVPbkContactManager::NewL(*uriArray);
+    CleanupStack::PushL( contactManager );
+    
+    // Find Contacts Model store URI from the contact manager (copied from Phonebook app)
+    MVPbkContactStore* defaultStore = contactManager->ContactStoresL().Find( uri );
+    User::LeaveIfNull( defaultStore );
+    
+    // Create a ContactIdConverter object for the ContactId-to-ContactLink conversion 
+    CVPbkContactIdConverter* idConverter = CVPbkContactIdConverter::NewL( *defaultStore );
+    CleanupStack::PushL( idConverter );
+    
+    MVPbkContactLink* link = idConverter->IdentifierToLinkLC(
+            DataStorage().Tag()->RRD()->IntArray()->At( KVasContactIdRrdLocation ));
+    
+    HBufC8*  link8  = link->PackLC(); 
+    HBufC16* link16 = HBufC16::NewLC( link8->Length() );
+    link16->Des().Copy( *link8 );
 
-    TBuf<10> idString;
-    idString.Num( DataStorage().Tag()->RRD()->IntArray()->At( KVasContactIdRrdLocation ) );
-
-    parameter->SetContactDataL( idString );
+    parameter->SetContactDataL( link16->Des() );
 
     iConnection->LaunchAppL( *parameter, this );
     
-    CleanupStack::Pop(); // parameter
+    CleanupStack::PopAndDestroy(6,uriArray);    
+    CleanupStack::Pop();//parameter
     }
     
 // End of File