voiceui/voiceuivoicerecognition/src/vuicinitstate.cpp
branchRCL_3
changeset 7 f096c31e006a
parent 0 bf1d17376201
--- a/voiceui/voiceuivoicerecognition/src/vuicinitstate.cpp	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/src/vuicinitstate.cpp	Mon Mar 15 12:40:40 2010 +0200
@@ -109,6 +109,10 @@
             nextState = CErrorState::NewL( DataStorage(), UiModel(), aEvent );
             break;
             
+        case KErrNoMemory:
+            nextState = CErrorState::NewL( DataStorage(), UiModel(), aEvent );
+            break;
+            
         case ELongKeypress:
         case EEndCallKeypress:
         
@@ -149,16 +153,23 @@
 #endif // __WINS__  
         // Initialize phonebook handler
         TRAPD( error, DataStorage().PbkHandler()->InitializeL() );
-        if ( error != KErrAlreadyExists )
+        if ( error == KErrNoMemory )
             {
-            User::LeaveIfError( error );
+            HandleEventL ( KErrNoMemory );
             }
-        
-        // Initialize start tone
-        DataStorage().TonePlayer()->InitToneL( EAvkonSIDNameDiallerStartTone );
-
-        // Initialize recognition
-        RecognizeInitL();
+        else
+            {
+            if ( error != KErrAlreadyExists )
+                {
+                User::LeaveIfError( error );
+                }
+            
+            // Initialize start tone
+            DataStorage().TonePlayer()->InitToneL( EAvkonSIDNameDiallerStartTone );
+    
+            // Initialize recognition
+            RecognizeInitL();
+            }
         }
     else
         {