phoneapp/phoneuicontrol/src/cphonestate.cpp
changeset 46 bc5a64e5bc3c
parent 45 6b911d05207e
child 50 377c906a8701
child 51 f39ed5e045e0
child 56 5bcb308bd24d
--- a/phoneapp/phoneuicontrol/src/cphonestate.cpp	Wed Jun 23 18:12:20 2010 +0300
+++ b/phoneapp/phoneuicontrol/src/cphonestate.cpp	Tue Jul 06 14:15:47 2010 +0300
@@ -38,7 +38,7 @@
 #include <settingsinternalcrkeys.h>
 #include <starterclient.h>
 #include <rsssettings.h>
-#include <uikoninternalpskeys.h>
+#include <UikonInternalPSKeys.h>
 #include <telephonydomainpstypes.h>
 #include <telinformationpskeys.h>
 #include <coreapplicationuisdomainpskeys.h>
@@ -189,6 +189,7 @@
             HandleAudioOutputChangedL();
             // Go to current state implementation
             iCbaManager->UpdateInCallCbaL();
+            SetTouchPaneButtons(0);
             break;
 
         case MEngineMonitor::EPEMessageAvailableAudioOutputsChanged:
@@ -197,6 +198,7 @@
                 {
                 // Go to current state implementation
                 iCbaManager->UpdateInCallCbaL();
+                SetTouchPaneButtons(0);
                 }
             break;
 
@@ -209,7 +211,8 @@
             break;
 
         case MEngineMonitor::EPEMessageCallWaiting:
-            SendGlobalInfoNoteL( EPhoneWaitingText );
+            // No need to send waiting notification for user.
+            //SendGlobalInfoNoteL( EPhoneWaitingText, ETrue );
             break;
 
         case MEngineMonitor::EPEMessageProfileChanged:
@@ -236,7 +239,7 @@
             break;
 
         case MEngineMonitor::EPEMessageTransferDone:
-            SendGlobalInfoNoteL( EPhoneInCallTransferred );
+            SendGlobalInfoNoteL( EPhoneInCallTransferred, ETrue );
             break;
 
        case MEngineMonitor::EPEMessageInitiatedEmergencyCall:
@@ -354,14 +357,6 @@
             HandleCugInUseNoteL();
             break;
 
-        // *#2873#
-        case MEngineMonitor::EPEMessageBTDebugMode:
-            accessoryBtHandler = CPhoneAccessoryBTHandler::NewLC(
-                iViewCommandHandle, iStateMachine, this );
-            accessoryBtHandler->SetBTDebugModeL();
-            CleanupStack::PopAndDestroy( accessoryBtHandler );
-            break;
-
         default:
 
             TBool handled( EFalse );
@@ -843,8 +838,13 @@
 void CPhoneState::HandleRemoteBusyL( TInt aCallId )
     {
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleRemoteBusyL( ) ");
-    ShowNumberBusyNoteL();
-
+
+    TPEErrorInfo info;
+    info.iCallId = aCallId;
+    info.iErrorCode = ECCPErrorBusy;
+    info.iErrorType = EPECcp;
+    CPhoneMainErrorMessagesHandler::Instance()->ShowErrorSpecificNoteL( info );
+    
     const TPECallType callType =
         iStateMachine->PhoneEngineInfo()->CallTypeCommand();
 
@@ -1775,7 +1775,7 @@
      __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::DecreaseAudioVolumeL - audio output =%d", output );
     if( output == EPETTY )
         {
-        SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl );
+        SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl, ETrue );
         }
     else
         {
@@ -1799,7 +1799,7 @@
      __PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IncreaseAudioVolumeL - audio output =%d", output );
     if( output == EPETTY )
         {
-        SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl );
+        SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl, ETrue );
         }
     else
         {
@@ -2154,11 +2154,11 @@
 // -----------------------------------------------------------
 //
 EXPORT_C void CPhoneState::CaptureKeysDuringCallNotificationL(
-    TBool aCaptured )
+    TBool /*aCaptured*/ )
     {
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::CaptureKeysDuringCallNotificationL( ) ");
     // Determine which view command to execute based on the capture status
-    const TInt viewCommandId = aCaptured ?
+    /*const TInt viewCommandId = aCaptured ?
         EPhoneViewStartCapturingKey :
         EPhoneViewStopCapturingKey;
 
@@ -2178,7 +2178,7 @@
         cameraKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
         iViewCommandHandle->ExecuteCommandL( viewCommandId,
             &cameraKeyCaptureParam );
-        }
+        }*/
     }
 
 // -----------------------------------------------------------
@@ -2577,7 +2577,7 @@
         iViewCommandHandle, iStateMachine, this );
     if ( !bt->SetHandsfreeModeL( aHandsfreeMode ))
         {
-        SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed );
+        SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue );
         }
     CleanupStack::PopAndDestroy( bt );
     }
@@ -2593,7 +2593,7 @@
         iViewCommandHandle, iStateMachine, this );
     if ( !bt->SetBTHandsfreeModeL( aHandsfreeMode ))
         {
-        SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed );
+        SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue );
         }
     CleanupStack::PopAndDestroy( bt );
     }
@@ -3436,8 +3436,22 @@
         {
         TPhoneCmdParamBoolean muteParam;
         muteParam.SetBoolean( iStateMachine->PhoneEngineInfo()->AudioMute() );
+        iViewCommandHandle->ExecuteCommand(EPhoneViewSetMuteFlag,&muteParam);
         
-        iViewCommandHandle->ExecuteCommand(EPhoneViewSetMuteFlag,&muteParam);
+        const TPEAudioOutput audioOutput =
+            iStateMachine->PhoneEngineInfo()->AudioOutput();
+
+        TBool btAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable(
+            EPEBTAudioAccessory );
+        
+        TPhoneCmdParamBoolean btParam;
+        btParam.SetBoolean( audioOutput == EPEBTAudioAccessory );        
+        iViewCommandHandle->ExecuteCommand(EPhoneViewSetBlueToothFlag,&btParam);
+
+        TPhoneCmdParamBoolean btAvailableParam;
+        btAvailableParam.SetBoolean( btAvailable );        
+        iViewCommandHandle->ExecuteCommand(
+                EPhoneViewSetBluetoothAvailableFlag,&btAvailableParam);
                
         TBool emergency( EPEStateIdle != 
             iStateMachine->PhoneEngineInfo()->CallState( KPEEmergencyCallId ) );
@@ -3883,13 +3897,14 @@
         globalNoteParam.SetTextResourceId(
             CPhoneMainResourceResolver::Instance()->
             ResolveResourceID( EPhoneCallWaitingWithLabel ) );
-
+        globalNoteParam.SetNotificationDialog( ETrue );
+        
         iViewCommandHandle->ExecuteCommandL(
                 EPhoneViewShowGlobalNote, &globalNoteParam );
         }
     else
         {
-        SendGlobalInfoNoteL( EPhoneCallWaitingWithoutLabel );
+        SendGlobalInfoNoteL( EPhoneCallWaitingWithoutLabel, ETrue );
         }
     }