securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp
changeset 1 d5423fbb4f29
parent 0 164170e6151a
child 8 ece4bbb094df
equal deleted inserted replaced
0:164170e6151a 1:d5423fbb4f29
   206     *    Series 60  ETel API
   206     *    Series 60  ETel API
   207     *****************************************************/
   207     *****************************************************/
   208     #if defined(_DEBUG)
   208     #if defined(_DEBUG)
   209     RDebug::Print(_L("(SECUI)CSecurityHandler::AskSecCodeL()"));
   209     RDebug::Print(_L("(SECUI)CSecurityHandler::AskSecCodeL()"));
   210     #endif
   210     #endif
       
   211 
       
   212     /* if code is still not initialized, then there's no need to ask it. This fixes the error when the RFS requests the code */
       
   213     const TUid KCRUidSCPLockCode = {0x2002677B};
       
   214     const TUint32 KSCPLockCodeDefaultLockCode = 0x00000001;
       
   215 	
       
   216     CRepository* repository = CRepository::NewL(KCRUidSCPLockCode);
       
   217     TInt currentLockStatus = -1;
       
   218     TInt res=-1;
       
   219 
       
   220     res = repository->Get(KSCPLockCodeDefaultLockCode , currentLockStatus);
       
   221     #if defined(_DEBUG)
       
   222     RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res );
       
   223     RDebug::Printf( "%s %s (%u) currentLockStatus=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, currentLockStatus );
       
   224     #endif
       
   225     delete repository;
       
   226     if(res==0 && currentLockStatus==1)
       
   227         {
       
   228         // code is the default one; no need to request it.
       
   229         return ETrue;
       
   230         }
       
   231     /* end check for default code */
       
   232 
   211     // Destructor sets thisDestroyed to ETrue
   233     // Destructor sets thisDestroyed to ETrue
   212     TBool thisDestroyed( EFalse );
   234     TBool thisDestroyed( EFalse );
   213     iDestroyedPtr = &thisDestroyed;
   235     iDestroyedPtr = &thisDestroyed;
   214     
   236     
   215     iQueryCanceled = EFalse;
   237     iQueryCanceled = EFalse;