securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp
branchRCL_3
changeset 47 63339781d179
parent 5 3b17fc5c9564
child 49 09b1ac925e3f
equal deleted inserted replaced
46:94b923fa11ed 47:63339781d179
   223 // Initialize parameters and jump to RunL
   223 // Initialize parameters and jump to RunL
   224 // ----------------------------------------------------------
   224 // ----------------------------------------------------------
   225 //
   225 //
   226 void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage)
   226 void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage)
   227     {
   227     {
       
   228 	/*****************************************************
       
   229 	*	Series 60 Customer / ETel
       
   230 	*	Series 60  ETel API
       
   231 	*****************************************************/
       
   232     iMessage = aMessage;
       
   233     iReturnVal = aReturnVal;
       
   234     TBool skipQuery = EFalse; // In some cases the query is handled by some other entity and SecurityNotifier should skip it.
       
   235 
       
   236 	#if defined(_DEBUG)
       
   237     RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::GetParamsL() Start BEGIN"));
       
   238     #endif
       
   239     
       
   240 
       
   241     TSecurityNotificationPckg pckg;
       
   242     pckg.Copy( aBuffer );
       
   243     iStartup = pckg().iStartup;
       
   244     iEvent = static_cast<RMobilePhone::TMobilePhoneSecurityEvent>(pckg().iEvent);
       
   245     
   228 	#if defined(_DEBUG)
   246 	#if defined(_DEBUG)
   229 	RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
   247 	RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
       
   248 	RDebug::Printf( "%s %s (%u) iEvent=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, iEvent );
       
   249 	RDebug::Printf( "%s %s (%u) 2 RMobilePhone::EPin1Required=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, RMobilePhone::EPin1Required );
   230 	#endif
   250 	#endif
   231 	TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
   251 	TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
   232 	const TUid KAutolockUid = { 0x100059B5 };
   252 	const TUid KAutolockUid = { 0x100059B5 };
   233 	TApaTask task( taskList.FindApp( KAutolockUid ) );
   253 	TApaTask task( taskList.FindApp( KAutolockUid ) );
   234 	if ( !task.Exists() )
   254 	if ( !task.Exists() && iEvent != RMobilePhone::EPin1Required )	// PIN-request should not start autolock, to prevent that lock-code is secretly accepted by TARM. Rely on Startup.
   235 		{
   255 		{
   236 		#if defined(_DEBUG)
   256 		#if defined(_DEBUG)
   237 		RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 );
   257 		RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 );
   238 		#endif
   258 		#endif
   239 		RApaLsSession ls;                   
   259 		RApaLsSession ls;                   
   250 		RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x2 );
   270 		RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x2 );
   251 		#endif
   271 		#endif
   252 		
   272 		
   253 		CleanupStack::PopAndDestroy(2); // commandLine, ls
   273 		CleanupStack::PopAndDestroy(2); // commandLine, ls
   254 		}
   274 		}
   255 	/*****************************************************
       
   256 	*	Series 60 Customer / ETel
       
   257 	*	Series 60  ETel API
       
   258 	*****************************************************/
       
   259     iMessage = aMessage;
       
   260     iReturnVal = aReturnVal;
       
   261     TBool skipQuery = EFalse; // In some cases the query is handled by some other entity and SecurityNotifier should skip it.
       
   262 
       
   263 	#if defined(_DEBUG)
       
   264     RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::GetParamsL() Start BEGIN"));
       
   265     #endif
       
   266     
       
   267 
       
   268     TSecurityNotificationPckg pckg;
       
   269     pckg.Copy( aBuffer );
       
   270     iStartup = pckg().iStartup;
       
   271     iEvent = static_cast<RMobilePhone::TMobilePhoneSecurityEvent>(pckg().iEvent);
       
   272     
       
   273 
   275 
   274 if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ))
   276 if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ))
   275 		{
   277 		{
   276     if(iEvent == RMobilePhone::EPhonePasswordRequired)
   278     if(iEvent == RMobilePhone::EPhonePasswordRequired)
   277         {
   279         {