Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:40 +0200
branchRCL_3
changeset 7 f096c31e006a
parent 5 01d847e5a91b
child 8 b2f9a76933e1
Revision: 201009 Kit: 201010
srsf/nssvasapi/nssvasdb/inc/nssvasdbkonsts.h
voiceui/voiceuivoicerecognition/data/vuivoicerecognition.rss
voiceui/voiceuivoicerecognition/inc/vuicglobalnote.h
voiceui/voiceuivoicerecognition/inc/vuicprecheckstate.h
voiceui/voiceuivoicerecognition/src/vuiccontactresultsstate.cpp
voiceui/voiceuivoicerecognition/src/vuicerrorstate.cpp
voiceui/voiceuivoicerecognition/src/vuicglobalnote.cpp
voiceui/voiceuivoicerecognition/src/vuicinitstate.cpp
voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp
--- a/srsf/nssvasapi/nssvasdb/inc/nssvasdbkonsts.h	Fri Feb 19 22:52:04 2010 +0200
+++ b/srsf/nssvasapi/nssvasdb/inc/nssvasdbkonsts.h	Mon Mar 15 12:40:40 2010 +0200
@@ -42,8 +42,8 @@
 
 const TInt KNssVasDbContextName          =50;
 const TInt KNssVasDbRRDText              =64;
-const TInt KNssVasDbSpeechItemName       =102;
-const TInt KNssVasDbTagName              =102;
+const TInt KNssVasDbSpeechItemName       =128;
+const TInt KNssVasDbTagName              =128;
 const TInt KNssStatementLength           =300; // can be really long, but 300 can be enough
 const TInt KNssMaxSQLLength              =KNssVasDbContextName + KNssStatementLength;
 const TInt KNssMaxNumLength              =10;
--- a/voiceui/voiceuivoicerecognition/data/vuivoicerecognition.rss	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/data/vuivoicerecognition.rss	Mon Mar 15 12:40:40 2010 +0200
@@ -403,6 +403,8 @@
 RESOURCE TBUF   r_qan_vc_verification_other     { buf = qan_vc_verification_other; }
 RESOURCE TBUF   r_qan_vc_verification_cancel    { buf = qan_vc_verification_cancel; }
 
+RESOURCE TBUF   r_qtn_vc_memory_low             { buf = qtn_err_eikon_mem; }
+
 // SIND Demo
 RESOURCE TBUF   r_text_sind_tutorial_page_intro_title        { buf = qtn_vc_tutorial_page1_title; }
 RESOURCE TBUF   r_text_sind_tutorial_page_intro_text_up      { buf = qtn_vc_tutorial_page1_text_up; }
--- a/voiceui/voiceuivoicerecognition/inc/vuicglobalnote.h	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/inc/vuicglobalnote.h	Mon Mar 15 12:40:40 2010 +0200
@@ -53,7 +53,8 @@
             ESystemError,
             ENoTag,
             ENoMatchPermanent,
-            ENotRecognizedPermanent
+            ENotRecognizedPermanent,
+            ENoMemory
             };
                                 
     public:     // New functions
--- a/voiceui/voiceuivoicerecognition/inc/vuicprecheckstate.h	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/inc/vuicprecheckstate.h	Mon Mar 15 12:40:40 2010 +0200
@@ -81,6 +81,12 @@
         * @return ETrue if video call else EFalse
         */
         TBool IsVideoCall();
+        
+        /**
+        * Checks if "lockphone" dialog is active
+        * @return ETrue if lockphone dialog else EFalse
+        */
+        TBool IsLockPhoneDialogL();
                 
     private:    // Data
 
--- a/voiceui/voiceuivoicerecognition/src/vuiccontactresultsstate.cpp	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/src/vuiccontactresultsstate.cpp	Mon Mar 15 12:40:40 2010 +0200
@@ -486,7 +486,7 @@
     CDesC16ArrayFlat* items = new ( ELeave ) CDesC16ArrayFlat( KSindMaxResults );
     CleanupStack::PushL( items );
 
-    TName buffer;
+    TFullName buffer;
     
     for ( TInt i = 0; i < count; ++i )
         {
--- a/voiceui/voiceuivoicerecognition/src/vuicerrorstate.cpp	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/src/vuicerrorstate.cpp	Mon Mar 15 12:40:40 2010 +0200
@@ -207,6 +207,11 @@
             type = CGlobalNote::ESystemError;
             break;
             }
+        case KErrNoMemory:
+            {
+            type = CGlobalNote::ENoMemory;
+            break;
+            }
         default:
             {
             type = CGlobalNote::ENotRecognizedPermanent;
--- a/voiceui/voiceuivoicerecognition/src/vuicglobalnote.cpp	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/src/vuicglobalnote.cpp	Mon Mar 15 12:40:40 2010 +0200
@@ -98,6 +98,10 @@
                                 EMbmAvkonQgn_note_error_mask );
             break;
             
+        case ENoMemory:
+            DisplayGlobalNoteL( EAknGlobalErrorNote, R_QTN_VC_MEMORY_LOW,
+                                SecondaryDisplay::ECmdVoiceNoNote );
+            break;
         default:
             RUBY_ERROR0( "CGlobalNote::DisplayGlobalNoteL - Invalid state" );
             break;
--- 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
         {
--- a/voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp	Fri Feb 19 22:52:04 2010 +0200
+++ b/voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp	Mon Mar 15 12:40:40 2010 +0200
@@ -21,6 +21,9 @@
 #include <coreapplicationuisdomainpskeys.h>
 #include <ctsydomainpskeys.h>
 #include <PSVariables.h>        // Property values
+#include <apgwgnam.h> 
+#include <coemain.h>
+#include <coedef.h>
 
 #include "vuicstate.h"
 #include "vuicprecheckstate.h"
@@ -34,6 +37,8 @@
 
 #include "rubydebug.h"
     
+//fix for the error ECWG-7WDA9G
+const TUid KAknnfysrvUid = {0x10281ef2};
 // -----------------------------------------------------------------------------
 // CPrecheckState::NewL
 // Two-phased constructor.
@@ -109,6 +114,12 @@
         {
         DataStorage().SetDeviceLockMode( EFalse );
         }
+		
+	// Check if lockphone dialog is active
+    if ( IsLockPhoneDialogL() )
+    	{
+    	error = KErrGeneral;
+    	}
 
     // Check if phone or video call is currently active
     TInt state = CheckCallState();
@@ -193,6 +204,24 @@
     return callType == EPSCTsyCallTypeH324Multimedia;
     }    
 
+// -----------------------------------------------------------------------------
+// CPrecheckState::IsLockPhoneDialogL
+// -----------------------------------------------------------------------------
+//
+TBool CPrecheckState::IsLockPhoneDialogL()
+	{
+	//fix for the error ECWG-7WDA9G,if we found the first windows is "lockphone" dialog we will terminate the App.
+	TBool islock = EFalse;
+	RWsSession &ws = CCoeEnv::Static()->WsSession();
+	TInt wgId = ws.GetFocusWindowGroup(); 
+	CApaWindowGroupName *WindowsGroupName = CApaWindowGroupName::NewL( ws, wgId );
+	if ( ( KAknnfysrvUid == WindowsGroupName->AppUid() ) && 
+	      ( ws.GetWindowGroupOrdinalPriority( wgId ) >= ECoeWinPriorityAlwaysAtFront ) )
+	    {
+	    islock = ETrue;
+	    }
+	return islock;
+	}
     
 // End of File