phonebookui/Phonebook2/Application/src/CPbk2AppUi.cpp
branchRCL_3
changeset 74 6b5524b4f673
parent 68 9da50d567e3c
child 85 38bb213f60ba
equal deleted inserted replaced
68:9da50d567e3c 74:6b5524b4f673
   570 // --------------------------------------------------------------------------
   570 // --------------------------------------------------------------------------
   571 // CPbk2AppUi::LeavePbkInMemExitL
   571 // CPbk2AppUi::LeavePbkInMemExitL
   572 // --------------------------------------------------------------------------
   572 // --------------------------------------------------------------------------
   573 //
   573 //
   574 void CPbk2AppUi::LeavePbkInMemExitL()
   574 void CPbk2AppUi::LeavePbkInMemExitL()
   575 	{
   575     {
   576 	PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING("CPbk2AppUi::LeavePbkInMemExitL"));
   576     PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING("CPbk2AppUi::LeavePbkInMemExitL"));
   577 	
   577     
       
   578     TBool dlgOnTop = IsDisplayingMenuOrDialog();
       
   579     // When Phonebook app is to leave in memory with a dialog displaying
       
   580     // on the top of it, an escape key event will be simuliated to notify
       
   581     // the dialog more earlier.
       
   582     if ( dlgOnTop ) 
       
   583         { 
       
   584         TKeyEvent key; 
       
   585         key.iRepeats = 0; 
       
   586         key.iCode = EKeyEscape; 
       
   587         key.iModifiers = 0; 
       
   588         key.iScanCode = EStdKeyNull; 
       
   589         iCoeEnv->SimulateKeyEventL(key, EEventKey); 
       
   590         } 
       
   591 
   578 	// Diasable bring to foreground on view activation event
   592 	// Diasable bring to foreground on view activation event
   579 	SetCustomControl(1);
   593 	SetCustomControl(1);
   580 	
   594 	
   581 	// Hide application in background
   595 	// Hide application in background
   582 	HideInBackground();
   596 	HideInBackground();