securitydialogs/lockapp/src/lockapp.cpp
changeset 61 1cc4c46c2963
parent 37 7bad16cccaca
equal deleted inserted replaced
56:25a3fbb5e4d3 61:1cc4c46c2963
    26 #include <apgtask.h>
    26 #include <apgtask.h>
    27 #include <eikenv.h>
    27 #include <eikenv.h>
    28 #include <e32property.h>
    28 #include <e32property.h>
    29 #include <secuisecuritysettings.h>
    29 #include <secuisecuritysettings.h>
    30 #include <coreapplicationuisdomainpskeys.h>
    30 #include <coreapplicationuisdomainpskeys.h>
       
    31 #include <keyguardaccessapi.h>
    31 
    32 
    32 // ----------------------------------------------------------------------------------------
    33 // ----------------------------------------------------------------------------------------
    33 // Server startup code
    34 // Server startup code
    34 // ----------------------------------------------------------------------------------------
    35 // ----------------------------------------------------------------------------------------
    35 static void RunServerL()
    36 static void RunServerL()
    70 
    71 
    71     CApaCommandLine* commandLine = CApaCommandLine::NewLC();
    72     CApaCommandLine* commandLine = CApaCommandLine::NewLC();
    72     commandLine->SetExecutableNameL(_L("autolock.exe"));
    73     commandLine->SetExecutableNameL(_L("autolock.exe"));
    73     commandLine->SetCommandL(EApaCommandRun);
    74     commandLine->SetCommandL(EApaCommandRun);
    74     // Try to launch the application.        
    75     // Try to launch the application.        
    75     TInt err = ls.StartApp(*commandLine); // this migh fail
    76     TInt err = 0 ;	// ls.StartApp(*commandLine); // this migh fail
    76     RDebug::Printf("%s %s (%u) Start: autolock.exe err=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, err);
    77     RDebug::Printf("%s %s (%u) Start: autolock.exe err=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, err);
       
    78 
       
    79 						// alternate way of starting Autolock
       
    80             CKeyguardAccessApi* iKeyguardAccess = CKeyguardAccessApi::NewL( );
       
    81            	RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 );
       
    82 						ret = iKeyguardAccess->ShowKeysLockedNote( );
       
    83 						RDebug::Printf( "%s %s (%u) ret=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, ret );
       
    84 						delete iKeyguardAccess;
       
    85 
    77 
    86 
    78     CleanupStack::PopAndDestroy(2); // commandLine, ls
    87     CleanupStack::PopAndDestroy(2); // commandLine, ls
    79 
    88 
    80     // Initialisation complete, now signal the client
    89     // Initialisation complete, now signal the client
    81     RProcess::Rendezvous( KErrNone);
    90     RProcess::Rendezvous( KErrNone);