//检测SIM卡
SY_SMS_STATE find_simcard_is_valid(void)
{
if(!((mmi_frm_sms_get_sms_list_size(0)!=0xFFFF)&&mmi_frm_sms_check_action_pending()==FALSE))
{
return SY_SIM_BUSY;//系统忙
}
#ifdef __MMI_DUAL_SIM_MASTER__
if((mmi_bootup_is_sim_removed() == TRUE)&&(mmi_bootup_is_sim2_removed() == TRUE))
{
return SY_SIM_NOSIM;//没有找到sim卡
}
if((mmi_bootup_is_sim_valid() == FALSE)&&(mmi_bootup_is_sim2_valid() == FALSE))
{
return SY_SIM_FAIL;//无效卡
}
if((mmi_bootup_is_sim_valid() == FALSE)&&(mmi_bootup_is_sim2_removed() == TRUE))
{
return SY_SIM_FAIL; //无效卡
}
if((mmi_bootup_is_sim_removed() == TRUE)&&(mmi_bootup_is_sim2_valid() == FALSE))
{
return SY_SIM_FAIL;//无效卡
}
#else
if((mmi_bootup_is_sim_removed() == TRUE))
{
return SY_SIM_NOSIM;//没有找到sim卡
}
if(mmi_bootup_is_sim_valid() == FALSE)
{
return SY_SIM_FAIL;//无效sim卡
}
if(mmi_bootup_is_sim_valid() == TRUE)
{
return SY_SIM_FAIL;//有效sim卡
}
#endif
return SY_SIM_NORMAL;
}