31 // --------------------------------------------------------------------------- |
31 // --------------------------------------------------------------------------- |
32 // Second phase constructor |
32 // Second phase constructor |
33 // --------------------------------------------------------------------------- |
33 // --------------------------------------------------------------------------- |
34 void CLockAppAppUi::ConstructL( ) |
34 void CLockAppAppUi::ConstructL( ) |
35 { |
35 { |
36 RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x8 ); |
36 // RDebug::Printf( "%s %s (%u) 1 value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x8 ); |
37 |
|
38 // default appui constructor has to be called |
|
39 BaseConstructL( ); |
|
40 |
37 |
41 TInt use_old_autolock=1; |
38 TInt use_old_autolock=1; |
42 if(use_old_autolock) |
39 if(use_old_autolock) |
43 { |
40 { |
44 // start autolock instead of lockapp . This is a backup solution to use in case that not all SysAp and Avkon changes are implemented |
41 // start autolock instead of lockapp . This is a backup solution to use in case that not all SysAp and Avkon changes are implemented |
45 RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 ); |
42 RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 ); |
46 TApaTaskList taskList( iCoeEnv->WsSession() ); |
43 TApaTaskList taskList( iCoeEnv->WsSession() ); |
47 TApaTask task( taskList.FindApp( _L("autolock.exe" )) ); |
44 TApaTask task( taskList.FindApp( _L("autolocksrv.exe" )) ); |
48 if ( !task.Exists() ) |
45 if ( !task.Exists() ) |
49 { |
46 { |
50 RApaLsSession ls; |
47 RApaLsSession ls; |
51 User::LeaveIfError(ls.Connect()); |
48 User::LeaveIfError(ls.Connect()); |
52 CleanupClosePushL(ls); |
49 CleanupClosePushL(ls); |
53 |
50 |
54 CApaCommandLine* commandLine = CApaCommandLine::NewLC(); |
51 CApaCommandLine* commandLine = CApaCommandLine::NewLC(); |
55 commandLine->SetExecutableNameL( _L("autolock.exe" ) ); |
52 commandLine->SetExecutableNameL( _L("autolocksrv.exe" ) ); |
56 commandLine->SetCommandL( EApaCommandRun ); |
53 commandLine->SetCommandL( EApaCommandRun ); |
57 |
54 |
58 // Try to launch the application. |
55 // Try to launch the application. |
59 User::LeaveIfError(ls.StartApp(*commandLine)); |
56 User::LeaveIfError(ls.StartApp(*commandLine)); |
60 RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x7 ); |
57 RDebug::Printf( "%s %s (%u) Start: autolocksrv.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x7 ); |
61 |
58 |
62 CleanupStack::PopAndDestroy(2); // commandLine, ls |
59 CleanupStack::PopAndDestroy(2); // commandLine, ls |
63 } |
60 } |
|
61 } |
|
62 |
|
63 INFO( "CLockAppAppUi::ConstructL started" ); |
|
64 // default appui constructor has to be called |
|
65 BaseConstructL( ); |
|
66 if(use_old_autolock) |
|
67 { |
64 Exit(); |
68 Exit(); |
65 } |
69 } |
66 |
70 |
67 INFO( "CLockAppAppUi::ConstructL started" ); |
|
68 |
71 |
69 // start the server with the specified name |
72 // start the server with the specified name |
70 iLockServer = CLockAppServer::NewL( KLockAppServerName ); |
73 iLockServer = CLockAppServer::NewL( KLockAppServerName ); |
71 |
74 |
72 // status pane is should not be visible |
75 // status pane is should not be visible |