1) 定义kal_uint32 g_java_highlight_list_index = 0;
2) 修改highligth function:
extern mmi_fng_highlight_setting_java();
void mmi_java_highlight_get_mids_index(S32 nIndex)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE(MMI_TRACE_FUNC, MMI_JAVA_GET_JAVA_APP_MIDS_INDEX);
g_java_highlight_list_index = nIndex;
if (nIndex == 0)
{
mmi_fng_highlight_setting_java();
return;
}
else
{
nIndex--;
}
g_java.mids_index = nIndex;
g_java.mid_index = 0;
SetLeftSoftkeyFunction(mmi_java_entry_opt, KEY_EVENT_UP);
#ifdef __MMI_MY_FAVORITE__
ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
#else
SetKeyHandler(mmi_java_entry_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
#endif
}
3) 修改入口函数:
void EntryScrJavaMenu(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U32 count;
U8 *guiBuffer;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#if defined(J2ME_SUPPORT_PAUSE) || defined(J2ME_SUPPORT_BACKGROUND)
if (jam_is_pause_mode() || jam_is_minimize_mode())
{
if( jvm_get_initiate_game_type() == GAMETYPE_JAVA_GAME )
{
mmi_java_entry_resume_dialog();
}
else if( jvm_get_initiate_game_type() == GAMETYPE_INFUSIO_EUREKA)
{
mmi_java_entry_cb_terminate_dialog(mmi_java_entry_menu_ask_terminate_cb,
(U16*)GetString(STR_JAVA_TERMINATE_EUREKA));
}
else
{
ASSERT(0);
mmi_java_display_is_busy();
}
return;
}
#endif
if (mmi_java_check_and_display_is_busy())
{
return;
}
g_java.mids_info_end = g_java.mids_info_start = -1;
/* get list at the very beginning */
needToSendGetListReq = KAL_TRUE;
mmi_java_fetch_mids_list(0, (UI_string_type) NULL, (PU8*) NULL, 0);
count = g_java.total_java_app_mids;
count++;
.................
if (guiBuffer == NULL)
{
mmi_java_highlight_get_mids_index(0);
}
else
{
If (g_java_highlight_list_index == 0)
{
mmi_java_highlight_get_mids_index(0);
}
}
}
4) 修改fetch mids list 函数:
pBOOL mmi_java_fetch_mids_list(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8
str_img_mask)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (needToSendGetListReq == KAL_FALSE )
{
if(item_index == 0)
{
if (str_buff)
{
mmi_ucs2ncpy(
(S8*) str_buff,
L"Java setting",
12);
}
if (img_buff_p)
{
(*img_buff_p) = (PU8) GetImage(IMG_JAVA_STAR2);
}
return;
}
else
{
item_index--;
}
}
。。。。。。。。。。。。。。
return KAL_TRUE;
}
2) 修改highligth function:
extern mmi_fng_highlight_setting_java();
void mmi_java_highlight_get_mids_index(S32 nIndex)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE(MMI_TRACE_FUNC, MMI_JAVA_GET_JAVA_APP_MIDS_INDEX);
g_java_highlight_list_index = nIndex;
if (nIndex == 0)
{
mmi_fng_highlight_setting_java();
return;
}
else
{
nIndex--;
}
g_java.mids_index = nIndex;
g_java.mid_index = 0;
SetLeftSoftkeyFunction(mmi_java_entry_opt, KEY_EVENT_UP);
#ifdef __MMI_MY_FAVORITE__
ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
#else
SetKeyHandler(mmi_java_entry_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
#endif
}
3) 修改入口函数:
void EntryScrJavaMenu(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U32 count;
U8 *guiBuffer;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#if defined(J2ME_SUPPORT_PAUSE) || defined(J2ME_SUPPORT_BACKGROUND)
if (jam_is_pause_mode() || jam_is_minimize_mode())
{
if( jvm_get_initiate_game_type() == GAMETYPE_JAVA_GAME )
{
mmi_java_entry_resume_dialog();
}
else if( jvm_get_initiate_game_type() == GAMETYPE_INFUSIO_EUREKA)
{
mmi_java_entry_cb_terminate_dialog(mmi_java_entry_menu_ask_terminate_cb,
(U16*)GetString(STR_JAVA_TERMINATE_EUREKA));
}
else
{
ASSERT(0);
mmi_java_display_is_busy();
}
return;
}
#endif
if (mmi_java_check_and_display_is_busy())
{
return;
}
g_java.mids_info_end = g_java.mids_info_start = -1;
/* get list at the very beginning */
needToSendGetListReq = KAL_TRUE;
mmi_java_fetch_mids_list(0, (UI_string_type) NULL, (PU8*) NULL, 0);
count = g_java.total_java_app_mids;
count++;
.................
if (guiBuffer == NULL)
{
mmi_java_highlight_get_mids_index(0);
}
else
{
If (g_java_highlight_list_index == 0)
{
mmi_java_highlight_get_mids_index(0);
}
}
}
4) 修改fetch mids list 函数:
pBOOL mmi_java_fetch_mids_list(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8
str_img_mask)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (needToSendGetListReq == KAL_FALSE )
{
if(item_index == 0)
{
if (str_buff)
{
mmi_ucs2ncpy(
(S8*) str_buff,
L"Java setting",
12);
}
if (img_buff_p)
{
(*img_buff_p) = (PU8) GetImage(IMG_JAVA_STAR2);
}
return;
}
else
{
item_index--;
}
}
。。。。。。。。。。。。。。
return KAL_TRUE;
}