securitydialogs/Autolock/src/AutolockAppUi.cpp
changeset 14 b75757c81051
parent 0 164170e6151a
child 17 8957df7b0072
--- a/securitydialogs/Autolock/src/AutolockAppUi.cpp	Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/Autolock/src/AutolockAppUi.cpp	Fri Mar 19 09:41:08 2010 +0200
@@ -959,7 +959,25 @@
 	if (!iAppKey)
 		{
 		RWindowGroup& groupWin=iCoeEnv->RootWin();
-		iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
+		#if defined(_DEBUG)
+		RDebug::Printf( "%s %s (%u) searching for popupclock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
+		#endif
+		TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
+		const TUid KBigClockUid = { 0x2000FDC3 };
+		TApaTask task( taskList.FindApp( KBigClockUid ) );
+		if ( task.Exists() )
+			{
+			#if defined(_DEBUG)
+			RDebug::Printf( "%s %s (%u) popupclock.exe is running. Not capturing EStdKeyApplication0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyApplication0 );
+			#endif
+			}
+		else
+			{
+			#if defined(_DEBUG)
+			RDebug::Printf( "%s %s (%u) popupclock.exe not running. Not capturing EStdKeyApplication0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyApplication0 );
+			#endif
+			iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
+			}
 		}
 	LockSideKeyL();
 	}