connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp
changeset 1 40cb640ef159
parent 0 5a93021fdf25
child 19 22c3c67e5001
child 41 bbb64eb3bdee
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp	Thu Dec 17 08:55:21 2009 +0200
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLANDlg.cpp	Thu Jan 07 12:56:54 2010 +0200
@@ -178,7 +178,9 @@
     CLOG_ENTERFN( "CSelectWLANDlg::OkToExitL " );  
     
     TBool result( EFalse );
-    if ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk )
+    
+    if ( ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk ) &&
+         !iFromOkToExit )
         {
         __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
         
@@ -586,27 +588,17 @@
 TKeyResponse CSelectWLANDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
                                              TEventCode aType)
     {
-    if( NeedToDismissQueryL(aKeyEvent) )
+    if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend )
         {
-        return EKeyWasConsumed;
-        }
- 	
-    return CAknListQueryDialog::OfferKeyEventL(aKeyEvent,aType);
-    }
-    
-// ---------------------------------------------------------
-// CSelectWLANDlg::NeedToDismissQueryL
-// ---------------------------------------------------------
-//
-TBool CSelectWLANDlg::NeedToDismissQueryL(const TKeyEvent& aKeyEvent)
-    {
-    if (aKeyEvent.iCode == EKeyPhoneSend)
-        {
-        TryExitL(EEikBidCancel);
-        return ETrue;
+        // Let's not obscure the Dialer in the background
+        if ( iExpiryTimer && !iFromOkToExit )
+            {
+            iExpiryTimer->Cancel();
+            iExpiryTimer->StartShort();    
+            }
         }
         
-    return EFalse;
+    return CAknListQueryDialog::OfferKeyEventL( aKeyEvent,aType ); 
     }
 
 // ---------------------------------------------------------