22 #include "mphonestatemachine.h" |
22 #include "mphonestatemachine.h" |
23 #include "phonerssbase.h" |
23 #include "phonerssbase.h" |
24 #include "phonelogger.h" |
24 #include "phonelogger.h" |
25 #include "cphonemainresourceresolver.h" |
25 #include "cphonemainresourceresolver.h" |
26 #include "tphonecmdparaminteger.h" |
26 #include "tphonecmdparaminteger.h" |
27 #include "tphonecmdparamcallstatedata.h" |
|
28 #include "tphonecmdparamboolean.h" |
27 #include "tphonecmdparamboolean.h" |
|
28 #include "phonecallutil.h" |
29 |
29 |
30 |
30 |
31 // ======== MEMBER FUNCTIONS ======== |
31 // ======== MEMBER FUNCTIONS ======== |
32 |
32 |
33 // --------------------------------------------------------------------------- |
33 // --------------------------------------------------------------------------- |
113 // ----------------------------------------------------------- |
113 // ----------------------------------------------------------- |
114 // |
114 // |
115 void CPhoneUiCommandManager::SetSoftRejectDimmedFlag() |
115 void CPhoneUiCommandManager::SetSoftRejectDimmedFlag() |
116 { |
116 { |
117 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneUiCommandManager::GetIncomingCallSilenceCBA ()" ); |
117 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneUiCommandManager::GetIncomingCallSilenceCBA ()" ); |
118 TPhoneCmdParamCallStateData callStateData; |
|
119 callStateData.SetCallState( EPEStateRinging ); |
|
120 TRAPD( err, iViewCommandHandle.HandleCommandL( |
|
121 EPhoneViewGetCallIdByState, &callStateData ) ); |
|
122 TPhoneCmdParamBoolean dimSoftRejectParam; |
118 TPhoneCmdParamBoolean dimSoftRejectParam; |
123 |
119 TInt callId = PhoneCallUtil::CallIdByState( EPEStateRinging ); |
124 if ( err == KErrNone && callStateData.CallId() > KErrNotFound ) |
120 if ( callId > KErrNotFound ) |
125 { |
121 { |
126 TBool privateNumber = iStateMachine.PhoneEngineInfo()-> |
122 TBool privateNumber = iStateMachine.PhoneEngineInfo()-> |
127 RemotePhoneNumber( callStateData.CallId() ).Length() == 0; |
123 RemotePhoneNumber( callId ).Length() == 0; |
128 |
124 |
129 TBool voip = iStateMachine.PhoneEngineInfo()-> |
125 TBool voip = iStateMachine.PhoneEngineInfo()-> |
130 CallType( callStateData.CallId() ) == EPECallTypeVoIP; |
126 CallType( callId ) == EPECallTypeVoIP; |
131 |
127 |
132 dimSoftRejectParam.SetBoolean( privateNumber || !iSoftRejectStatus || voip ); |
128 dimSoftRejectParam.SetBoolean( privateNumber || !iSoftRejectStatus || voip ); |
133 } |
129 } |
134 else |
130 else |
135 { |
131 { |