diff -r 1eef62f5c541 -r 2a5d4ab426d3 phoneapp/phoneuicontrol/src/cphoneaccessorybthandler.cpp --- a/phoneapp/phoneuicontrol/src/cphoneaccessorybthandler.cpp Mon Aug 23 15:42:12 2010 +0300 +++ b/phoneapp/phoneuicontrol/src/cphoneaccessorybthandler.cpp Fri Sep 03 13:33:36 2010 +0300 @@ -101,46 +101,33 @@ void CPhoneAccessoryBTHandler::ShowBTAddressL() { __LOGMETHODSTARTEND(EPhoneControl, "CPhoneAccessoryBTHandler::ShowBTAddressL( ) "); - if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer )) - { - iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent ); - } - else - { - // Remove number entry from screen - iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); - } - - // Get BT address + iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent ); + TBuf addressBuffer; - - CPhoneCenRepProxy::Instance()->GetString( + CPhoneCenRepProxy::Instance()->GetString( KCRUidBluetoothLocalDeviceAddress, KBTLocalDeviceAddress, addressBuffer ); - // BT address was empty. BT is not turned on. if ( addressBuffer.Length() == 0 ) { - __PHONELOG( EBasic, EPhoneControl, "CPhoneAccessoryBTHandler::ShowBTAddressL.NoAddress" ); + __PHONELOG( EBasic, + EPhoneControl, + "CPhoneAccessoryBTHandler::ShowBTAddressL.NoAddress" ); } - // So we got the address. Now we need the localised text: HBufC* buf = StringLoader::LoadLC( CPhoneMainResourceResolver::Instance()-> ResolveResourceID( EPhonePhoneBtDevAddress ) , addressBuffer ); - TPhoneCmdParamNote noteParam; noteParam.SetType( EPhoneNoteCustom ); noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> ResolveResourceID( EPhoneInformationWaitNote ) ); noteParam.SetText( *buf ); - - // Display note + iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); - - CleanupStack::PopAndDestroy( buf ); + CleanupStack::PopAndDestroy( buf ); } // ----------------------------------------------------------- @@ -152,21 +139,13 @@ void CPhoneAccessoryBTHandler::ShowBTLoopbackL() { __LOGMETHODSTARTEND(EPhoneControl, "CPhoneAccessoryBTHandler::ShowBTLoopbackL( ) "); - if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer )) - { - iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent ); - } - else - { - // Remove number entry from screen - iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); - } + iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent ); + // Get current status of BT loopback TInt btLoopback( EBTDutOff ); - - // Get current status of BT loopback - TInt err = RProperty::Get( KPSUidBluetoothDutMode, KBTDutEnabled, - btLoopback ); - + TInt err = RProperty::Get( + KPSUidBluetoothDutMode, + KBTDutEnabled, + btLoopback ); // If loopback was disabled enable it. According to current knowledge // disabling BT test loop is not possible. If error getting the value // assume that it is disabled. @@ -181,15 +160,12 @@ btLoopback = EBTDutOn; } } - + // Get localised text according to setting status HBufC* btLoopbackString( NULL ); - - // Get localised text according to setting status btLoopbackString = StringLoader::LoadLC( CPhoneMainResourceResolver::Instance()-> ResolveResourceID( btLoopback == EBTDutOn ? EPhoneBtLoopbackEnabled : EPhoneBtLoopbackDisabled ) ); - TPhoneCmdParamNote noteParam; noteParam.SetType( EPhoneNoteCustom ); noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> @@ -197,9 +173,7 @@ noteParam.SetText( *btLoopbackString ); noteParam.SetTone( CAknNoteDialog::EConfirmationTone ); - // Display note iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); - CleanupStack::PopAndDestroy( btLoopbackString ); } @@ -214,12 +188,9 @@ HBufC* buf = StringLoader::LoadLC( CPhoneMainResourceResolver::Instance()-> ResolveResourceID( EPhoneInfoBTAccActivated ) ); - TPhoneCmdParamNote noteParam; noteParam.SetType( EPhoneNoteConfirmation ); noteParam.SetText( *buf ); - - // Display note iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); CleanupStack::PopAndDestroy( buf ); } @@ -232,26 +203,17 @@ TBool aHandsfreeMode, TPEAudioOutput aAudioOutput ) { __LOGMETHODSTARTEND(EPhoneControl, "CPhoneAccessoryBTHandler::DoSetHandsfreeModeL( ) "); - __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), - Panic( EPhoneCtrlInvariant )); - - TBool allowed; + __ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant )); + TBool allowed(EFalse); // Only toggle the handsfree mode if there is no wired accessory connected if( iStateMachine->PhoneEngineInfo()->AudioOutput() != EPEWiredAudioAccessory ) { - TBool showNote = aHandsfreeMode || - !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ); - - iStateMachine->PhoneEngineInfo()->SetAudioOutputCommand( - aAudioOutput, showNote ); - iStateMachine->SendPhoneEngineMessage( - MPEPhoneModel::EPEMessageSetAudioOutput ); + iStateMachine->PhoneEngineInfo()-> + SetAudioOutputCommand( aAudioOutput, aHandsfreeMode ); + iStateMachine-> + SendPhoneEngineMessage( MPEPhoneModel::EPEMessageSetAudioOutput ); allowed = ETrue; } - else - { - allowed = EFalse; - } return allowed; }