[DESCRIPTION]
此问题复现路径较多,表象略有差别,一种可能的复现路径示例如下: 4卡的项目,情景模式铃声设置,每张卡的
铃声自定义设置为T卡上的不同铃声,设置保存后,发现卡2、卡3的铃声变成跟卡4的铃声一样。
综合来看,此类问题都跟情景模式中开启如下宏相关:
__MMI_PROFILES_EXT_FILE_SUPPORT__ ,如果开启该宏
,情景模式中会增加从外部选择自定义铃声的功能,但是同时也可能会带来如下问题:自定义铃声设置后,不能正确保
存。
如果出现这类问题,请参照如下方法处理。
[SOLUTION]来自半导体社区
1. 在ProfilesSrvGprot.h文件中添加如下枚举定义:
typedef enum
{
SRV_PROF_SETTINGS_MT_CALL_TONE_SLOT=0,
#if (SRV_PROF_MT_CALL_TONE_AMOUNT > 1)
SRV_PROF_SETTINGS_MT_CALL_CARD2_TONE_SLOT,
#if (SRV_PROF_MT_CALL_TONE_AMOUNT > 2)
SRV_PROF_SETTINGS_MT_CALL_CARD3_TONE_SLOT,
#if (SRV_PROF_MT_CALL_TONE_AMOUNT > 3)
SRV_PROF_SETTINGS_MT_CALL_CARD4_TONE_SLOT,
#endif
#endif
#endif
#ifdef __MMI_VIDEO_TELEPHONY__
SRV_PROF_SETTINGS_VT_CALL_TONE_SLOT,
#endif
SRV_PROF_SETTINGS_VT_CALL_TONE_SLOT_END
}srv_prof_settings_tone_slot_enum;
2. 将
profilesApp.c中的函数
static MMI_BOOL
mmi_prof_get_ext_file_slot(U16 profile_id, srv_prof_settings_enum setting, U8 * slot)
整体替换如下:
static MMI_BOOL mmi_prof_get_ext_file_slot(U16 profile_id, srv_prof_settings_enum setting, U8 * slot)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_prof_settings_tone_slot_enum i = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
switch (setting)
{
case SRV_PROF_SETTINGS_MT_CALL_TONE:
{
i = SRV_PROF_SETTINGS_MT_CALL_TONE_SLOT;
break;
}
#if (SRV_PROF_MT_CALL_TONE_AMOUNT > 1)
case SRV_PROF_SETTINGS_MT_CALL_CARD2_TONE:
{
i = SRV_PROF_SETTINGS_MT_CALL_CARD2_TONE_SLOT;
break;
}
#if (SRV_PROF_MT_CALL_TONE_AMOUNT > 2)
case SRV_PROF_SETTINGS_MT_CALL_CARD3_TONE:
{
i=SRV_PROF_SETTINGS_MT_CALL_CARD3_TONE_SLOT;
break;
}
#if (SRV_PROF_MT_CALL_TONE_AMOUNT > 3)
case SRV_PROF_SETTINGS_MT_CALL_CARD4_TONE:
{
i = SRV_PROF_SETTINGS_MT_CALL_CARD4_TONE_SLOT;
break;
}
#endif
#endif
#endif
#ifdef __MMI_VIDEO_TELEPHONY__
case SRV_PROF_SETTINGS_VT_CALL_TONE:
{
i = SRV_PROF_SETTINGS_VT_CALL_TONE_SLOT;
break;
}
#endif
default:
return MMI_FALSE;
}
if (profile_id < MMI_PROFILE_SILENT)
{
*slot = (profile_id - MMI_PROF_PROF_ID_BEGIN) * SRV_PROF_EXT_MELODY_NUM /
(SRV_PROF_PROFILES_TOTAL_NUM-1) + i;
}
else if (profile_id > MMI_PROFILE_SILENT)
{
*slot = (profile_id - MMI_PROF_PROF_ID_BEGIN - 1) * SRV_PROF_EXT_MELODY_NUM /
(SRV_PROF_PROFILES_TOTAL_NUM-1) + i;
}
else
{
return MMI_FALSE;
}
return MMI_TRUE;
}
网友评论