satengine/SatServer/Commands/PlayToneCmd/src/CPlayToneHandler.cpp
branchRCL_3
changeset 19 7d48bed6ce0c
parent 12 71268bfa7aea
child 20 987c9837762f
--- a/satengine/SatServer/Commands/PlayToneCmd/src/CPlayToneHandler.cpp	Thu Aug 19 10:28:14 2010 +0300
+++ b/satengine/SatServer/Commands/PlayToneCmd/src/CPlayToneHandler.cpp	Tue Aug 31 15:45:17 2010 +0300
@@ -69,16 +69,14 @@
     LOG( SIMPLE, "PLAYTONE: CPlayToneHandler::ClientResponse calling" )
 
     iPlayToneRsp.SetPCmdNumber( iPlayToneData.PCmdNumber() );
-    
-    // A short-ish Play tone is aborted in GCf testing, that will be supported
-    // by using the Sat app Menu key to abort the play tone and to respond
-    // with KPSessionTerminatedByUser to Sat Server. That's why 
-    // MSatUtils::ESessionTerminatedByUser notify is NOT sent here because
-    // otherwise CSimSessionEndHandler::HandleCommand() closes Sat App always.
-    // (That should be done only if UI was not launched by user.)
-    LOG2( SIMPLE, "PLAYTONE: CPlayToneHandler::ClientResponse result=%d",
-        iPlayToneRsp.iGeneralResult )
-    
+    if ( RSat::KPSessionTerminatedByUser == iPlayToneRsp.iGeneralResult )
+        {
+        LOG( SIMPLE, "PLAYTONE: CPlayToneHandler::ClientResponse \
+             KPSessionTerminatedByUser" )
+        // Next SimSession end will close the ui session.
+        iUtils->NotifyEvent( MSatUtils::ESessionTerminatedByUser );
+        }
+        
     // If command had icon data and was done succesfully, report that icon
     // was not shown
     // To be removed when icons are allowed in this command