securitydialogs/Autolock/src/AutolockAppUi.cpp
branchRCL_3
changeset 5 3b17fc5c9564
parent 0 164170e6151a
child 8 ece4bbb094df
equal deleted inserted replaced
1:d5423fbb4f29 5:3b17fc5c9564
   957 	#endif
   957 	#endif
   958 	// capture appkey & volume key
   958 	// capture appkey & volume key
   959 	if (!iAppKey)
   959 	if (!iAppKey)
   960 		{
   960 		{
   961 		RWindowGroup& groupWin=iCoeEnv->RootWin();
   961 		RWindowGroup& groupWin=iCoeEnv->RootWin();
   962 		iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
   962 		#if defined(_DEBUG)
       
   963 		RDebug::Printf( "%s %s (%u) searching for popupclock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
       
   964 		#endif
       
   965 		TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
       
   966 		const TUid KBigClockUid = { 0x2000FDC3 };
       
   967 		TApaTask task( taskList.FindApp( KBigClockUid ) );
       
   968 		if ( task.Exists() )
       
   969 			{
       
   970 			#if defined(_DEBUG)
       
   971 			RDebug::Printf( "%s %s (%u) popupclock.exe is running. Not capturing EStdKeyApplication0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyApplication0 );
       
   972 			#endif
       
   973 			}
       
   974 		else
       
   975 			{
       
   976 			#if defined(_DEBUG)
       
   977 			RDebug::Printf( "%s %s (%u) popupclock.exe not running. Not capturing EStdKeyApplication0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyApplication0 );
       
   978 			#endif
       
   979 			iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
       
   980 			}
   963 		}
   981 		}
   964 	LockSideKeyL();
   982 	LockSideKeyL();
   965 	}
   983 	}
   966 // ----------------------------------------------------
   984 // ----------------------------------------------------
   967 // CAutolockAppUi::UnLockKeys()
   985 // CAutolockAppUi::UnLockKeys()
  1255    								    		aCallButtonRect = TRect (aCallRect);
  1273    								    		aCallButtonRect = TRect (aCallRect);
  1256 								    }
  1274 								    }
  1257 	    	        if(pointer->iType==TPointerEvent::EButton1Up)
  1275 	    	        if(pointer->iType==TPointerEvent::EButton1Up)
  1258 	    	        	{
  1276 	    	        	{
  1259 		    	        TPoint iPosition = pointer->iPosition;
  1277 		    	        TPoint iPosition = pointer->iPosition;
  1260 						if(aCallButtonRect.iBr.iX<iPosition.iX && iPosition.iX<aCallButtonRect.iBr.iX+aCallButtonRect.iTl.iX && iPosition.iY<400 )
  1278 						if(aCallButtonRect.iBr.iX<iPosition.iX && iPosition.iX<aCallButtonRect.iBr.iX+aCallButtonRect.iTl.iX && iPosition.iY>400 )
  1261 	    		        	{
  1279 	    		        	{
  1262 	    		        		#define KPhoneAppUid1 TUid::Uid(0x100058B3)
  1280 	    		        		#define KPhoneAppUid1 TUid::Uid(0x100058B3)
  1263 	    		        		TApaTaskList tasklist( iCoeEnv->WsSession() );
  1281 	    		        		TApaTaskList tasklist( iCoeEnv->WsSession() );
  1264                       TApaTask phonetask = tasklist.FindApp( KPhoneAppUid1 );
  1282                       TApaTask phonetask = tasklist.FindApp( KPhoneAppUid1 );
  1265 	    		        		if ( phonetask.Exists() )
  1283 	    		        		if ( phonetask.Exists() )