phoneapp/phoneuiview/src/cphoneaudiocontroller.cpp
branchRCL_3
changeset 58 40a3f856b14d
parent 0 5f000ab63145
--- a/phoneapp/phoneuiview/src/cphoneaudiocontroller.cpp	Thu Jul 15 18:38:16 2010 +0300
+++ b/phoneapp/phoneuiview/src/cphoneaudiocontroller.cpp	Thu Aug 19 09:54:27 2010 +0300
@@ -19,9 +19,9 @@
 // INCLUDE FILES
 #include <aknnavi.h>
 #include <aknnavide.h>
-#include <StringLoader.h>
+
 #include <avkon.rsg>
-#include <phoneui.rsg>
+
 #include <telephonyvariant.hrh>
 #include <eikenv.h>
 #include <eikappui.h>
@@ -39,9 +39,6 @@
 #include "phoneui.hrh"
 
 // CONSTANTS
-// Defines how long time volume control is shown when volume is changed 
-// while device is muted. Duration in microseconds.
-const TInt KPhoneDelayVolumeControlToDefaultAfterReleased = 1000000;
 
 // ================= MEMBER FUNCTIONS =======================
 // C++ default constructor can NOT contain any code, that
@@ -81,13 +78,6 @@
     // To get touch input, pen check in HandleControlEventL()
     iEarVolumeControl->DecoratedControl()->SetObserver( this );
     iIhfVolumeControl->DecoratedControl()->SetObserver( this );            
-  
-    // Create "muted" navi decorator
-    HBufC* mutedText = StringLoader::LoadLC( R_PHONE_INCALL_MUTED_PANE );
-    iMutedControl = iStatusPane->NaviPane().CreateMessageLabelL( *mutedText );
-    CleanupStack::PopAndDestroy( mutedText );
-        
-    iNaviPaneUpdateTimer = CPhoneTimer::NewL();
 
     iActivateRecoveryId = CPhoneRecoverySystem::Instance()->AddL( 
         TCallBack( DoRecoverActivateL, this ),
@@ -121,8 +111,6 @@
     CCoeEnv::Static()->RemoveForegroundObserver( *this );
     CPhoneRecoverySystem::Remove( iActivateRecoveryId );
      
-    delete iNaviPaneUpdateTimer;   
-    delete iMutedControl;
     delete iIhfVolumeControl;
     delete iEarVolumeControl;
     }
@@ -138,8 +126,8 @@
     if ( iVolumeControlCount == 1 ) // First time activation
         {
         // Decide whether decorator should be Ear or ihf decorator
-        CAknNavigationDecorator& selectedDecorator = SelectDecoratorL(); 
-        PushL( selectedDecorator ); 
+        CAknNavigationDecorator& selectedVolumeDecorator =VolumeDecorator();  
+        PushL( selectedVolumeDecorator ); 
         }
     }
 
@@ -168,16 +156,11 @@
     
     if( iVolumeControlCount )
         {
-        // Decide whether decorator should be Ear, Ihf or Muted decorator
-        CAknNavigationDecorator& selectedDecorator = SelectDecoratorL(); 
-        PushL( selectedDecorator );     
-        
-        if( &selectedDecorator != iMutedControl )
-            {            
-            TInt volumeLevel = VolumeLevel(); 
-            
-            SetVolumeLevel( VolumeControl(), volumeLevel );                 
-            }      
+        // Decide whether decorator should be Ear, Ihf decorator
+        CAknNavigationDecorator& selectedVolumeDecorator = VolumeDecorator(); 
+        PushL( selectedVolumeDecorator );                    
+        TInt volumeLevel = VolumeLevel();             
+        SetVolumeLevel( VolumeControl(), volumeLevel );                       
         }
     }
     
@@ -225,34 +208,12 @@
         {
         iEarVolume = volumeParam->Integer();
         }
-    
-    if( iMuted )
-        {
-        // Enable timed control transition in muted state    
-        iTimedMuteTransferPending = ETrue; 
-        }
-    else
-        {        
-        iTimedMuteTransferPending = EFalse; 
-        }
      
     // Activate the approriate volume control
     CPhoneRecoverySystem::Instance()->RecoverNow( 
         iActivateRecoveryId, 
         CTeleRecoverySystem::EPhonePriorityStandard );
-
-    if( iTimedMuteTransferPending )    
-        {
-        iTimedMuteTransferPending = EFalse;     
-        
-        // Cancel any pending request
-        iNaviPaneUpdateTimer->CancelTimer();
-
-        // Activate change to Muted decorator after given delay        
-        iNaviPaneUpdateTimer->After(                    
-            KPhoneDelayVolumeControlToDefaultAfterReleased,
-            TCallBack( DoUpdateNaviPaneToDefault, this ) );           
-        }
+    
     }
     
 // ---------------------------------------------------------
@@ -269,28 +230,6 @@
         static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
     
     iIhfMode = booleanParam->Boolean();    
-    
-    // Set state transition flag 
-    iIhfTransferPending = ETrue; 
-    }
-    
-// ---------------------------------------------------------
-// CPhoneAudioController::HandleMuteChange
-//
-// Updates incall indicator according to current call state.
-// ---------------------------------------------------------
-//
-void CPhoneAudioController::HandleMuteChange(
-    TPhoneCommandParam* aCommandParam )
-    {
-    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneAudioController::HandleMuteChange()");
-    TPhoneCmdParamBoolean* booleanParam =
-        static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
-
-    iMuted = booleanParam->Boolean();
-    
-    // Decide whether decorator should be ear, ihf or muted decorator
-    TRAP_IGNORE( PushL( SelectDecoratorL() ) );
     }
     
 // -----------------------------------------------------------------------------
@@ -319,20 +258,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CPhoneAudioController::DoUpdateNaviPaneToDefault
-// -----------------------------------------------------------------------------
-//
-TInt CPhoneAudioController::DoUpdateNaviPaneToDefault( TAny* aAny )
-    {
-    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneAudioController::DoUpdateNaviPaneToDefault()");
-    CPhoneAudioController* self = static_cast< CPhoneAudioController* >( aAny );
-    CPhoneRecoverySystem::Instance()->RecoverNow( 
-        self->iActivateRecoveryId, 
-        CTeleRecoverySystem::EPhonePriorityStandard );
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
 // CPhoneAudioController::HandleControlEventL
 // -----------------------------------------------------------------------------
 //    
@@ -442,43 +367,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CPhoneAudioController::SelectDecoratorL
-// -----------------------------------------------------------------------------
-//    
-CAknNavigationDecorator& CPhoneAudioController::SelectDecoratorL()
-    {
-    __LOGMETHODSTARTEND( EPhoneUIView,"CPhoneAudioController::SelectDecoratorL()" );                                     
-    CAknNavigationDecorator* newDecorator = NULL;    
-    if ( !iMuted )
-        {
-        __PHONELOG( EBasic, EPhoneUIView,"CPhoneAudioController::SelectDecoratorL() - volume decorator " );     
-        newDecorator = &VolumeDecorator();
-        }
-    else 
-        {
-        if ( iIhfTransferPending || !iTimedMuteTransferPending )
-            {
-            __PHONELOG( EBasic, EPhoneUIView,"CPhoneAudioController::SelectDecoratorL() - muted decorator " );         
-            newDecorator = iMutedControl;    
-            }            
-        else 
-            {
-            __PHONELOG( EBasic, EPhoneUIView,"CPhoneAudioController::SelectDecoratorL() - volume decorator " );         
-            newDecorator = &VolumeDecorator();
-            
-            // In muted state the volume decorator must be first 
-            // pushed to container to enable volume popup showing 
-            PushL( *newDecorator );             
-            }
-        }
-
-    // Clear IHF transfer flag. 
-    iIhfTransferPending = EFalse;
-           
-    return *newDecorator;         
-    }
-
-// -----------------------------------------------------------------------------
 // CPhoneAudioController::SetVolumeLevel
 // -----------------------------------------------------------------------------
 //