Symbian 来电拦截的实现
2010-03-07 19:59:00 来源:WEB开发网RProperty::Set(KTelephonyAudioOutput,KTelephonyAudioOutputPreference,EPSPrivate);
if (irepository)
{
delete irepository;
irepository = NULL;
}
break;
}
case CTelephony::EStatusDialling:
{
GetDialNumber();
if (CmpDialedNumber())
{
SimulateRedKey();
}
break;
}
case CTelephony::EStatusRinging:
{
//turn off the vibra and ring the moment the phone is open
GetReceivedNumber();
if (CmpReceivedNumber())
{
SimulateRedKey();
ilight->LightOffL(CHWRMLight::EPrimaryDisplayAndKeyboard);
}
//compare the detect number, if it is, answer it.
else if (CmpDetectNumber())
{
// SetVibraAndRing();
//this is to turn off the ring
SimulateRightKey();
itelephony->AnswerIncomingCall(iStatus, iCallid);
//ilight->LightOffL(CHWRMLight::EPrimaryDisplayAndKeyboard);
OpenLoudSpeaker();
SetCallVolumn(0);
}
else
{
//if it's the normal call, recover the vibra and ring
//turn off it when the call is over
RecoverVibraAndRing();
}
break;
}
default:
{
ilight->LightOffL(CHWRMLight::EPrimaryDisplayAndKeyboard);
break;
}
}
}
Cancel();
//if the status of line changes, it means some one is calling this phone
itelephony->NotifyChange(iStatus,
CTelephony::EVoiceLineStatusChange,
iLineStatusPckg);
}
//----------------------------------------------------
//CTelDial::StartObserve()
//observe the call
更多精彩
赞助商链接