欢迎来到天天文库
浏览记录
ID:38910821
大小:39.50 KB
页数:4页
时间:2019-06-21
《MTK删除通话记录》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、卡1跟卡2的实现函数不一样。卡1:1、函数实现调用入口:myapp_DeleteDialedNum()其函数原型为:myapp_DeleteDialedNum(){myapp_ReqDeleteCallLog(PHB_LND,chis_p->currDialedCallIndex,1);return;}//和系统函数一样,只是改了函数名2、调用函数myapp_ReqDeleteCallLog(U8type,U8index,U8no_data)其函数原型为:voidmyapp_ReqDeleteCallLog(U8type,U8index,U8no_d
2、ata){MYQUEUEMessage;DEL_LAST_NUMBER_REQ*dataPtr;ClearInputEventHandler(MMI_DEVICE_ALL);if(type==PHB_LND){SetProtocolEventHandler(myapp_RspDeleteDialedNum,PRT_MMI_PHB_DEL_LAST_NUMBER_RSP);}else{return;}dataPtr=(DEL_LAST_NUMBER_REQ*)OslConstructDataPtr(sizeof(DEL_LAST_NUMBER_REQ)
3、);dataPtr->type=type;dataPtr->index=index;dataPtr->no_data=no_data;Message.oslSrcId=MOD_MMI;Message.oslDestId=MOD_L4C;Message.oslMsgId=PRT_MMI_PHB_DEL_LAST_NUMBER_REQ;Message.oslDataPtr=(oslParaType*)dataPtr;Message.oslPeerBuffPtr=NULL;ClearInputEventHandler(MMI_DEVICE_ALL);Osl
4、MsgSendExtQueue(&Message);return;}//和系统函数不一样,改的地方是if语句,原为switch语句,实现选择删除哪种通话记录,我们只需实现删除已拨电话(其他类同),所以除去多余代码。1、在上一个函数里的if条件满足后调用函数myapp_RspDeleteDialedNum(void*info)其函数原型为:voidmyapp_RspDeleteDialedNum(void*info){S32i;DEL_LAST_NUMBER_RSP*rsp;rsp=(DEL_LAST_NUMBER_RSP*)info;if(rsp->
5、result.flag==CALL_LOG_RESULT_OK){for(i=chis_p->currDialedCallIndex;i<(chis_p->nDialedCalls-1);i++){memcpy(&chis_p->dialedCalls[i],&chis_p->dialedCalls[i+1],sizeof(DIALED_CALL));}chis_p->nDialedCalls--;if((chis_p->currDialedCallIndex>=chis_p->nDialedCalls)&&(chis_p->nDialedCalls
6、!=0)){chis_p->currDialedCallIndex=chis_p->nDialedCalls-1;}}if(chis_p->nDialedCalls==0){#ifdef__MMI_CH_MIXED_CALL_LOG__if(!IsScreenPresent(SCR8055_CALLS_LIST_DIALED))#ifdef__MMI_CH_OPTIONS_INCLUDE_INFO__DeleteScreenIfPresent(SCR8009_DIALED_CALL_OPTIONS);#elseDeleteBetweenScreen(
7、SCR8008_CALL_DIALED,SCR8009_DIALED_CALL_OPTIONS);#endifelse#endif/*__MMI_CH_MIXED_CALL_LOG__*/DeleteBetweenScreen(SCR8055_CALLS_LIST_DIALED,SCR8009_DIALED_CALL_OPTIONS);}else#ifdef__MMI_CH_OPTIONS_INCLUDE_INFO__DeleteScreenIfPresent(SCR8009_DIALED_CALL_OPTIONS);#elseDeleteBetwe
8、enScreen(SCR8008_CALL_DIALED,SCR8009_DIALED_CALL_OPTIO
此文档下载收益归作者所有