connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp
branchRCL_3
changeset 26 0a9e01492035
parent 8 2e6c4614c58e
child 54 984e13af52c4
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp	Tue May 11 16:35:05 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ConfirmationQueryNotif.cpp	Tue May 25 13:08:02 2010 +0300
@@ -109,24 +109,23 @@
            }    
         }
     
+    TInt err( KErrNone );
+    TInt emergencyCallState( 0 );
+    
     // Check if emergency call is ongoing. If it is then do not display the dialog.    
-    TInt err( KErrNone );
-    TInt state( 0 );
-
-    err = RProperty::Get(
-            KPSUidCtsyEmergencyCallInfo,
+    err = RProperty::Get( KPSUidCtsyEmergencyCallInfo,
             KCTSYEmergencyCallInfo,
-            state );
-    
-    if ( err == KErrNone && state )
+            emergencyCallState );
+
+    if ( (err == KErrNone && emergencyCallState) || ScreenSaverOn() || AutolockOn() )
         {
-        // Emergency call is active. Cancel connection. 
-        CLOG_WRITE( "CConfirmationQueryNotif::StartL: Emergency call is active!" );
+        // Emergency call, screen saver or autolock is active. Cancel the dialog. 
+        CLOG_WRITE( "CConfirmationQueryNotif::StartL: Emergency call, Screen saver or Autolock is active." );
         aMessage.WriteL( aReplySlot, TPckg<TMsgQueryLinkedResults>( EMsgQueryCancelled ) );
         aMessage.Complete( KErrNone );
         return;
         }
-    
+
     iChoice = EMsgQueryCancelled; 
     TPckgBuf<TConnUiUiDestConnMethodNoteId> input;
     input.Copy( aBuffer );