MTK-data security and call log
来源:互联网 发布:淘宝evisu官方旗舰店 编辑:程序博客网 时间:2024/05/12 18:43
数据保密功能的操作
[功能设置]
[安全设置]
[SIM锁]
[话机锁]
[键盘锁]
[拒接不明来电]
[数据保密] MENU_DATA_SECURITY
[固定拨号]
[更改密码]
在初始化函数:
InitSecuritySetupApp()
#ifdef __IACJ_DATA_SECURITY__
SetHiliteHandler(MENU_DATA_SECURITY, HighlightDataSecurity);
LoadDataSecurityState();
ReadValue(NVRAM_DATA_SECURITY_ID, &data, DS_BYTE, &error);
if(data == 0xff)
{
data = 0;
WriteValue(NVRAM_DATA_SECURITY_ID, &data, DS_BYTE, &error);
}
gDataSecurityContext.DataSecState = data;
#endif
HighlightDataSecurity()
gDataSecurityContext.DataSecDisplayState = gDataSecurityContext.DataSecState;
gSecuritySetupContext.VerifyPassSuccessCallBack = EntryDataSecurity; //输入的密码与L4确认正确后,呼叫的函数
SetLeftSoftkeyFunction(EntryRstScr, KEY_EVENT_UP);
SetKeyHandler(EntryRstScr, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
EntryRstScr()
检查SIM卡是否blocked
EntryRstCheckPhoneLock()
EntryRstCheckPhoneLock()
RegisterInputBoxValidationFunction(RstrSettingPasswdScrSoftKeyFunc); //注册函数,检查输入有效性
ShowCategory111Screen(
STR_GLOBAL_OK,
IMG_GLOBAL_OK,
STR_GLOBAL_BACK,
IMG_GLOBAL_BACK,
STR_RESTORE_PHONE,
INPUT_TYPE_NUMERIC_PASSWORD,
gPhonePassword,
(MAX_SIM_SETTING_PASSWD_LEN + 1),
NULL,
NULL);
SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
SetLeftSoftkeyFunction(RstVerifyPhoneLockReq, KEY_EVENT_UP);
gSecuritySetupContext.PasswdLenCheckCallBack = RstVerifyPhoneLockReq; //判断输入的密码是否正确
输入密码后(大于4位),按下左软件或者#,进入:
RstVerifyPhoneLockReq()
ClearInputEventHandler(MMI_DEVICE_ALL);
//设置消息
Message.oslSrcId = MOD_MMI;
Message.oslDestId = MOD_L4C;
Message.oslMsgId = PRT_MMI_SMU_VERIFY_PIN_REQ;
SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP); 注册CBACK函数
OslMsgSendExtQueue(&Message);
L4返回消息:PRT_MMI_SMU_VERIFY_PIN_RSP,进入CBack:
SECSETVerifyPINRsp()
switch (local_data->next_type)
case MMI_SETTING_TYPE_NO_REQUIRED: //密码正确
if (gSecuritySetupContext.VerifyPassSuccessCallBack != NULL) 就是上面蓝色部分注册的:gSecuritySetupContext.VerifyPassSuccessCallBack = EntryDataSecurity
{
(*gSecuritySetupContext.VerifyPassSuccessCallBack) ();
gSecuritySetupContext.VerifyPassSuccessCallBack = NULL;
}
密码如果正确,进入:
[]电话簿及通话记录
[]信息服务
这两个状态信息保存在gDataSecurityContext.DataSecState中,bit0—电话簿及通话记录,bit1—信息服务。
gDataSecurityContext.DataSecDisplayState是显示使用。
EntryDataSecurity()
RegisterHighlightHandler (GetDataSecurityIndex);
ShowCategory184Screen(STR_MENU_DATA_SECURITY, GetRootTitleIcon(MENU_DATA_SECURITY),
STR_GLOBAL_OK, IMG_GLOBAL_OPTIONS,
STR_GLOBAL_BACK, IMG_GLOBAL_BACK,
2,
DataSecurityGetItem, //获取item text
DataSecurityChangeSoftkey , //这里被用来动态改变左软件的标签
hiliteitem,
guiBuffer);
if(gDataSecurityContext.DataSecDisplayState != gDataSecurityContext.DataSecState)
{
RskFunc = DataSecuritySaveConfirm;
ChangeRightSoftkey(STR_GLOBAL_DONE, IMG_GLOBAL_OK);
}
SetRightSoftkeyFunction (RskFunc, KEY_EVENT_UP);
SetLeftSoftkeyFunction(DataSecurityCurrItemOnClick, KEY_EVENT_UP);
按下左软件改变选择或者取消之时,更新gDataSecurityContext.DataSecDisplayState的值,然后重新进入EntryDataSecurity()。然后判断:
if(gDataSecurityContext.DataSecDisplayState != gDataSecurityContext.DataSecState)
如果不相同,说明用户已经改变选择,要改变右软件响应:RskFunc = DataSecuritySaveConfirm; ChangeRightSoftkey(STR_GLOBAL_DONE, IMG_GLOBAL_OK);
如果相同,说明没有改变,右软件直接是GoBackToSecSetSrc()
假设此时改变选择,进入:
DataSecuritySaveConfirm()
//确认保存?
DisplayConfirm(STR_GLOBAL_YES, IMG_GLOBAL_YES,
STR_GLOBAL_NO, IMG_GLOBAL_NO,
get_string(STR_GLOBAL_OK), IMG_GLOBAL_QUESTION, WARNING_TONE);
SetLeftSoftkeyFunction(SetDataSecurityState,KEY_EVENT_UP);
SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);
确定保存:
SetDataSecurityState()
data = gDataSecurityContext.DataSecDisplayState;
gDataSecurityContext.DataSecState = gDataSecurityContext.DataSecDisplayState;
WriteValue(NVRAM_DATA_SECURITY_ID, &data, DS_BYTE, &error); //保存到NVRAM
DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, SUCCESS_TONE);
DeleteUptoScrID(SCR_ID_SECSET_MAIN);
如果开启了mixed call那操作是如何?
注意:在启动了mixed call log之后,由于需要在同一时刻SHOW出所有3种CALL LOG的LIST。因此,在结构体:call_history_context_struct中,dialedCalls,missedCalls,recevdCalls不再是共用同一个存储空间了,而是都有独立的存储空间。mixedCalls是指针数组,在最后的排序中,mixedCalls分别指向前3种类型的CALL LOG空间。
在Idle screen时,按下SEND键,或者是在通话记录菜单下的子菜单:mixed call log。响应都是:
CHISTGetCallLogBySENDKey()
CHISTGetCallLogBySENDKey_ext()
chis_p->isMixedStyle = TRUE;
ShowCategoryDummyScreen(); /* dummy category */
ReqReadDialedNumByKey_ext(); //开始读取dialed call log
ReqReadDialedNum();
chis_p->isReqSent = TRUE;
ReqReadDaildedNum() 读取dailed call log
RspReadDialedNum() 返回dialed call log的读取结果
在抽取了call log之后,进入:
if (chis_p->isFirstTime == TRUE || chis_p->isMixedStyle == TRUE) 此时虽然不是初始化的第一次读取(isFirstTime = FALSE,但是isMixedStyle = TRUE)
ReqReadMissedNum(); 继续读取missed call log
return;
ReqReadMissedNum()
SetProtocolEventHandler(RspReadMissedNum, PRT_MMI_PHB_GET_LAST_NUMBER_RSP);
读取之后,L4返回消息:PRT_MMI_PHB_GET_LAST_NUMBER_RSP,进入CBACK函数:
RspReadMissedNum()
抽取missed call log list 之后,进入下面判断:
if (chis_p->isFirstTime == TRUE || chis_p->isMixedStyle == TRUE)
ReqReadRecvdNum(); 读取received call log
return;
ReqReadRecvdNum()
SetProtocolEventHandler(RspReadRecvdNum, PRT_MMI_PHB_GET_LAST_NUMBER_RSP);
L4返回消息,进入CBACK函数:
RspReadRecvdNun()
由于开启了MIXED CALL LOG,并且isMixedStyle = TRUE, 因此要SHOW出mixed call log list。
#ifdef __MMI_CH_MIXED_CALL_LOG__
if (chis_p->isMixedStyle == TRUE)
{
CHISTSortCallLogsByTime(); //按照时间顺序,对3中call log list进行排序,排序后的结果的地址放在chis_p->missedCalls中。注意:这是指针数组
EntryCHISTViewMixedCallList(); //显示mixed call log list
#if defined(__IACJ_DATA_SECURITY__)
if(IsScreenPresent(SCR_RESTORE))
{
DeleteBetweenScreen(SCR_RESTORE, SCR_RESTORE);
}
#endif
AlmEnableExpiryHandler();
chis_p->isMixedStyle = FALSE;
return;
}
#endif /* __MMI_CH_MIXED_CALL_LOG__ */
EntryCHISTViewRecvdCallList() 如果上面的mixed call 条件不成立,就进入这里:只SHOW received call list。
EntryCHISTViewMixedCallList()
//首先处理missed call的一些操作
g_chist_have_missed_call = 0;
mmi_chist_set_have_missed_call();
HideStatusIcon(STATUS_ICON_MISSED_CALL);
#ifndef __MMI_SUBLCD_SHORT_STATUSICON_LIST__
HideStatusIcon(STATUS_ICON_SUBLCD_MISSED_CALL);
#endif /* __MMI_SUBLCD_SHORT_STATUSICON_LIST__ */
UpdateStatusIcons();
guiBuffer = GetCurrGuiBuffer(SCR8057_CALLS_LIST_MIXED);
RegisterHighlightHandler(CHISTGetCurrMixedCallIndex);
CHISTPopulateMixedCallList(phoneNumbers, phoneNames);
chis_p->nMissedCallBeforeView = 0;
for (count = 0; count < chis_p->nMixedCalls; count++)
{
在这里,设置每种类型CALL LOG的图标。按照地址之间的关系来判断,每个mixedCalls中存储的是哪种类型的CALL LOG。
依据是:在定义chis_p的时候,dialedCalls, missedCalls,recvdCalls,系统肯定是按照顺序来分配的。
}
ShowCategory53Screen()
SetKeyHandler(CHISTCallMixedNum, KEY_SEND, KEY_EVENT_DOWN);
SetKeyHandler(EntryCHISTViewMixedCall, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetLeftSoftkeyFunction(EntryCHISTViewMixedCall, KEY_EVENT_UP);
按下左软件,进入一个CALL LOG的详细信息;
EntryCHISTViewMixedCall()
这里并不是重新写一个mixed call log的详细函数,而是根据地址计算出当前所指的CALL LOG是属于哪种。然后根据地址计算出该CALL LOG的顺序索引。
以missed call log 为例:
chis_p->currMissedCallIndex = (U8)
(((U32) chis_p->mixedCalls[chis_p->currMixedCallIndex] -
(U32) & chis_p->missedCalls[0]) / sizeof(MISSED_CALL));
EntryCHISTViewMissedCall();
在计入IDLE SCREEN的时候如果存在missed call,进入:
void EntryCHISTNotifyMissedCall(void)
StartBeepIndication(); 开始发出警告音
把要显示的提示信息:N 未接电话。拷贝到变量CHISTMsgStr中
此时,如果键盘锁,不能直接读取missed call log。必须解锁之后才可以。
如果没有键盘锁,则左软件显示:读取,右软件显示返回。
SetKeyHandler(CHISTIgnoreMissedCallScreen, KEY_END, KEY_EVENT_DOWN);
SetLeftSoftkeyFunction(CHISTReadMissedNum, KEY_EVENT_UP);
SetRightSoftkeyFunction(CHISTIgnoreMissedCallScreen, KEY_EVENT_UP);
SetMissedCallFlag(FALSE);
chis_p->currMissedCallIndex = 0;
- MTK-data security and call log
- MTK-data security and call log
- Social Data and Log Analysis Using MongoDB
- Data Security
- MTK UCM incoming call
- MTK UCM incoming call
- MTK-call history initializ
- MTK-call history initialize
- Cryptographic cloud storage financial cryptography and data security(译)
- The Definitive Security Data Science and Machine Learning Guide
- ACM Web Search and Data Mining (WSDM) Call For Paper
- MTK 手机抓log
- MTK kernel log Tool
- MTK 开启DISP LOG
- mtk中输出log
- Oracle Data Security - Advanced Security
- MTK-call history operate(1)
- MTK-call history operate(2)
- MTK-Phonebook bootup(3)
- MTK-call history initialize
- MTK-call history operate(1)
- MTK-call history operate(2)
- Oralce笔记:更新语句(Insert,Update,delete,alter)
- MTK-data security and call log
- MTK_DM_layer
- C/C++ 常见误区
- 转载:同班毕业两夫妻退休待遇四比一
- 中国男足!!强悍
- 原理银行一直在收我利息!!!
- [转载]《国足欢迎你》
- 犯人逼供,狠!!
- [转载]WAP简介