securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp
changeset 22 6b63ca65093a
parent 19 098e361762d2
child 26 aad866c37519
--- a/securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp	Fri May 14 16:43:26 2010 +0300
+++ b/securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp	Thu May 27 13:44:17 2010 +0300
@@ -226,40 +226,30 @@
 void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage)
     {
 	#if defined(_DEBUG)
-	RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
+	RDebug::Printf( "%s %s (%u) searching for autolocksrv.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
 	#endif
-	
-   // Start Dirty and quick hack    
-   #include <PSVariables.h>   // Property values
-   #include <coreapplicationuisdomainpskeys.h>
-   _LIT_SECURITY_POLICY_PASS(KReadPolicy);
-   _LIT_SECURITY_POLICY_C1(KWritePolicy, ECapabilityWriteDeviceData);
-   int ret = RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, RProperty::EInt, KReadPolicy, KWritePolicy);
-   RDebug::Printf( "%s %s (%u) EAutolockOff=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 );
-   RProperty::Set(KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, 1);
-   // End Dirty and quick hack
 		
-	
 	TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
 	const TUid KAutolockUid = { 0x100059B5 };
-	TApaTask task( taskList.FindApp( KAutolockUid ) );
+	//TApaTask task( taskList.FindApp( KAutolockUid ) );
+	TApaTask task( taskList.FindApp( _L("autolocksrv.exe" )) );
 	if ( !task.Exists() )
 		{
 		#if defined(_DEBUG)
-		RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 );
+		RDebug::Printf( "%s %s (%u) sutolocksrv.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 );
 		#endif
 		RApaLsSession ls;                   
 		User::LeaveIfError(ls.Connect());   
 		CleanupClosePushL(ls);         
 		
 		CApaCommandLine* commandLine = CApaCommandLine::NewLC();
-		commandLine->SetExecutableNameL( _L("autolock.exe" ) );     
+		commandLine->SetExecutableNameL( _L("autolockarv.exe" ) );     
 		commandLine->SetCommandL( EApaCommandRun );
 		
 		// Try to launch the application.        
 		User::LeaveIfError(ls.StartApp(*commandLine));
 		#if defined(_DEBUG)
-		RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x2 );
+		RDebug::Printf( "%s %s (%u) autolocksrv.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x2 );
 		#endif
 		
 		CleanupStack::PopAndDestroy(2); // commandLine, ls