phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp
branchRCL_3
changeset 9 8871b09be73b
parent 0 5f000ab63145
child 15 2a26698d78ba
--- a/phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -35,6 +35,7 @@
 #include "cphonecenrepproxy.h"
 #include "cphonemediatorfactory.h"
 #include "tphonecmdparamnumberentryobserver.h"
+#include <phoneappcommands.hrh>
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -323,9 +324,17 @@
     {
     __ASSERT_DEBUG( iStateMachine->State(), Panic( EPhoneCtrlInvariant ) );
 
+    
 	// Send key up message to engine so that we wouldn't accidentally play
 	// any DTMF tone.
-    iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
+    
+    // DTMF tone is not ended if command is EPhoneDialerValidNumber or
+    // EPhoneDialerInvalidNumber. These commands result from
+    // user pressing numbers, and they must not interfere with tones.
+    if ( ! ( aCommand == EPhoneDialerValidNumber || aCommand == EPhoneDialerInvalidNumber ) )
+        {
+        iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
+        }
 
     return iStateMachine->State()->HandleCommandL( aCommand );
     }