mmsharing/mmshengine/src/musengtelephoneutils.cpp
branchRCL_3
changeset 21 ce86b6d44a6d
parent 18 0da2e08216b6
child 30 2d2c7d1515f7
equal deleted inserted replaced
19:95754dcd27ad 21:ce86b6d44a6d
    98     MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::AudioRoutingCanBeChanged" )
    98     MUS_LOG( "mus: [ENGINE]  -> CMusEngTelephoneUtils::AudioRoutingCanBeChanged" )
    99     
    99     
   100     TBool retValue = ( iTelephonyAudioRouting->Output() !=
   100     TBool retValue = ( iTelephonyAudioRouting->Output() !=
   101                        CTelephonyAudioRouting::EWiredAudioAccessory &&
   101                        CTelephonyAudioRouting::EWiredAudioAccessory &&
   102                        iTelephonyAudioRouting->Output() !=
   102                        iTelephonyAudioRouting->Output() !=
   103                        CTelephonyAudioRouting::EBTAudioAccessory &&
       
   104                        iTelephonyAudioRouting->Output() !=
       
   105                        CTelephonyAudioRouting::ETTY );
   103                        CTelephonyAudioRouting::ETTY );
   106     
   104     
   107     MUS_LOG1( "mus: [ENGINE]  <- CMusEngTelephoneUtils::AudioRoutingCanBeChanged: %d",
   105     MUS_LOG1( "mus: [ENGINE]  <- CMusEngTelephoneUtils::AudioRoutingCanBeChanged: %d",
   108               retValue )
   106               retValue )
   109               
   107               
   121               aEnable )
   119               aEnable )
   122     
   120     
   123     if ( aEnable )
   121     if ( aEnable )
   124         {
   122         {
   125         if ( iTelephonyAudioRouting->Output() == 
   123         if ( iTelephonyAudioRouting->Output() == 
   126              CTelephonyAudioRouting::EHandset )
   124              CTelephonyAudioRouting::EHandset || 
       
   125              iTelephonyAudioRouting->Output() == 
       
   126              CTelephonyAudioRouting::EBTAudioAccessory )  
   127             {
   127             {
   128             // Disable note shown by audiorouting api as it causes
   128             // Disable note shown by audiorouting api as it causes
   129             // application going to background for a while. Instead, display
   129             // application going to background for a while. Instead, display
   130             // note by ourselves once setting output completes. This mechanism
   130             // note by ourselves once setting output completes. This mechanism
   131             // is needed only for loudspeaker enabling as going to background
   131             // is needed only for loudspeaker enabling as going to background
   300     // NOP, since we really cannot do anything but log the result
   300     // NOP, since we really cannot do anything but log the result
   301     MUS_LOG1( "mus: [ENGINE]    Asynchronous call completed with code %d",
   301     MUS_LOG1( "mus: [ENGINE]    Asynchronous call completed with code %d",
   302              iStatus.Int() )
   302              iStatus.Int() )
   303 
   303 
   304     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::RunL()" )
   304     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::RunL()" )
       
   305     }
       
   306 
       
   307 // -------------------------------------------------------------------------
       
   308 //  If RunL() leaves,It should be handled here.
       
   309 // -------------------------------------------------------------------------
       
   310 //
       
   311 TInt CMusEngTelephoneUtils::RunError( TInt aError )
       
   312     {
       
   313     MUS_LOG1( "mus: [ENGINE]     -> CMusEngTelephoneUtils::\
       
   314               RunError() return #%d", aError )
       
   315     
       
   316     // Nothing can be done here.
       
   317     aError = KErrNone;
       
   318 
       
   319     MUS_LOG( "mus: [ENGINE]  <- CMusEngTelephoneUtils::RunError()" )
       
   320     return aError;
   305     }
   321     }
   306 
   322 
   307 
   323 
   308 // -----------------------------------------------------------------------------
   324 // -----------------------------------------------------------------------------
   309 // 
   325 //