32 // Second phase constructor |
32 // Second phase constructor |
33 // --------------------------------------------------------------------------- |
33 // --------------------------------------------------------------------------- |
34 void CLockAppAppUi::ConstructL( ) |
34 void CLockAppAppUi::ConstructL( ) |
35 { |
35 { |
36 #if defined(_DEBUG) |
36 #if defined(_DEBUG) |
37 RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x8 ); |
37 INFO_4( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x8 ); |
38 #endif |
38 #endif |
39 |
39 |
40 // default appui constructor has to be called |
40 // default appui constructor has to be called |
41 BaseConstructL( ); |
41 BaseConstructL( ); |
42 |
42 |
43 TInt use_old_autolock=1; |
43 TInt use_old_autolock=1; |
44 if(use_old_autolock) |
44 if(use_old_autolock) |
45 { |
45 { |
46 // start autolock instead of lockapp . This is a backup solution to use in case that not all SysAp and Avkon changes are implemented |
46 // start autolock instead of lockapp . This is a backup solution to use in case that not all SysAp and Avkon changes are implemented |
47 #if defined(_DEBUG) |
47 #if defined(_DEBUG) |
48 RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 ); |
48 INFO_4( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 ); |
49 #endif |
49 #endif |
50 TApaTaskList taskList( iCoeEnv->WsSession() ); |
50 TApaTaskList taskList( iCoeEnv->WsSession() ); |
51 TApaTask task( taskList.FindApp( _L("autolock.exe" )) ); |
51 TApaTask task( taskList.FindApp( _L("autolock.exe" )) ); |
52 if ( !task.Exists() ) |
52 if ( !task.Exists() ) |
53 { |
53 { |
60 commandLine->SetCommandL( EApaCommandRun ); |
60 commandLine->SetCommandL( EApaCommandRun ); |
61 |
61 |
62 // Try to launch the application. |
62 // Try to launch the application. |
63 User::LeaveIfError(ls.StartApp(*commandLine)); |
63 User::LeaveIfError(ls.StartApp(*commandLine)); |
64 #if defined(_DEBUG) |
64 #if defined(_DEBUG) |
65 RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x7 ); |
65 INFO_4( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x7 ); |
66 #endif |
66 #endif |
67 |
67 |
68 CleanupStack::PopAndDestroy(2); // commandLine, ls |
68 CleanupStack::PopAndDestroy(2); // commandLine, ls |
69 } |
69 } |
70 Exit(); |
70 Exit(); |
187 // Handle window-server events |
187 // Handle window-server events |
188 // ---------------------------------------------------------- |
188 // ---------------------------------------------------------- |
189 void CLockAppAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
189 void CLockAppAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
190 { |
190 { |
191 #if defined(_DEBUG) |
191 #if defined(_DEBUG) |
192 RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); |
192 INFO_4( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); |
193 #endif |
193 #endif |
194 if ( aEvent.Type() == TRawEvent::EKeyDown ) |
194 if ( aEvent.Type() == TRawEvent::EKeyDown ) |
195 { |
195 { |
196 #if defined(_DEBUG) |
196 #if defined(_DEBUG) |
197 RDebug::Printf("CLockAppAppUi::HandleWsEventL() - aEvent.Key()->iCode: %d", aEvent.Key()->iCode ); |
197 INFO_1("CLockAppAppUi::HandleWsEventL() - aEvent.Key()->iCode: %d", aEvent.Key()->iCode ); |
198 #endif |
198 #endif |
199 } |
199 } |
200 |
200 |
201 // call super-class |
201 // call super-class |
202 CAknAppUi::HandleWsEventL( aEvent, aDestination ); |
202 CAknAppUi::HandleWsEventL( aEvent, aDestination ); |