/**********************
* GLOBAL FUNCTIONS
***********************/
+
+#ifdef __MMI_ZHSX_SUPPORT__
+
+static nv_watch_switch_t s_dial_pad_switch = {0};
+static uint8_t s_dial_pad_switch_init = 0;
+
+void mmi_dial_pad_switch_nv_write(void)
+{
+ uint32_t nv_data_length = sizeof(nv_watch_switch_t);
+
+ if(nv_data_length != UI_NV_Write_Req(NV_SECTION_UI_DIAL_PAD_SWITCH, 0, nv_data_length, (uint8_t *)&s_dial_pad_switch))
+ {
+ printf("[@CHENG_DEBUG][%s][%d]: nv write fail\n", __FUNCTION__, __LINE__);
+ }
+}
+
+void mmi_dial_pad_switch_nv_read(void)
+{
+ uint32_t nv_data_length = sizeof(nv_watch_switch_t);
+
+ if(nv_data_length != UI_NV_Read_Req(NV_SECTION_UI_DIAL_PAD_SWITCH, 0, nv_data_length, (uint8_t *)&s_dial_pad_switch))
+ {
+ printf("[@CHENG_DEBUG][%s][%d]: nv read fail\n", __FUNCTION__, __LINE__);
+ }
+}
+
+uint8_t mmi_dial_pad_switch_get(void)
+{
+ if(0 == s_dial_pad_switch_init)
+ {
+ s_dial_pad_switch_init = 1;
+ mmi_dial_pad_switch_nv_read();
+ }
+ return (s_dial_pad_switch.switch_flag);
+}
+
+void mmi_dial_pad_switch_set(uint8_t value)
+{
+ if(0 == value || 1 == value)
+ {
+ s_dial_pad_switch.switch_flag = value;
+ mmi_dial_pad_switch_nv_write();
+ }
+}
+#endif
+
lv_obj_t * dialpad_create(lv_obj_t * activity_obj)
{
lv_dialpad_obj_ext_t * ext = NULL;
lv_wechat_msg_sending_ext_t * sending_ext = (lv_wechat_msg_sending_ext_t *)wechat_actId_ext_get(ACT_ID_WECHAT_SENDING);
if(NULL != sending_ext)
{
- //WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
if(NULL != sending_ext->sending_timer_id)
{
Hal_Timer_Stop(sending_ext->sending_timer_id);
sending_ext->sending_timer_id = NULL;
}
- //WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
if(NULL != sending_ext->result_timer_id)
{
Hal_Timer_Stop(sending_ext->result_timer_id);
sending_ext->result_timer_id = NULL;
}
- //WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+ WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
if(NULL != sending_ext->sending_anim.var)
{
lv_anim_del(sending_ext->sending_anim.var, NULL);
recording_ext->file_size = 0;
Hal_Audio_Manage_End_Ind(AUDIO_CTRL_PRIORITY_5);
- //wechat_chat_list_set_slide_enable(&ext->old_ext, true); /*reset slide_enable at the end of recording*/
//lv_watch_del_interface(ACT_ID_WECHAT_RECORDING);
lv_obj_t * activity_obj = lv_watch_get_activity_obj(ACT_ID_WECHAT_RECORDING);
if(NULL != activity_obj)
{
lv_obj_del(activity_obj);
}
-
- //lv_wechat_ext_t * ext = wechat_actId_ext_get(ACT_ID_WECHAT_MAIN);
- //if(NULL != ext)
- //{
- // wechat_chat_list_set_slide_enable(&ext->old_ext, false); /*prevent to slide out while recording*/
- //}
}
}
{
lv_obj_del(activity_obj);
}
- wechat_chat_list_set_slide_enable(&ext->old_ext, true); /*reset slide_enable at the end of recording*/
break;
case MCI_EVENT_INFO:
lv_wechat_msg_recording_ext_t * recording_ext = lv_obj_allocate_ext_attr(obj, sizeof(lv_wechat_msg_recording_ext_t));
LV_ASSERT_MEM(recording_ext);
-
- wechat_chat_list_set_slide_enable(&recording_ext->old_ext, false); /*prevent to slide out while recording*/
lv_obj_t * cont = lv_cont_create(obj, NULL);
lv_obj_set_size(cont, lv_obj_get_width(obj), lv_obj_get_height(obj));
lv_wechat_ext_t * ext = wechat_actId_ext_get(ACT_ID_WECHAT_MAIN);
if(NULL == ext)
return ;
+
+ wechat_chat_list_set_slide_enable(&ext->old_ext, true); /*reset slide_enable at the end of recording*/
if(0 == ext->old_ext.element_click_en)
{
}
else
{
- //wechat_msg_voice_item_playing_stop(ext);
+ wechat_chat_list_set_slide_enable(&ext->old_ext, false); /*prevent to slide out while recording*/
+
wechat_msg_recording_screen_create();
}
}
if(NULL == recording_ext)
return NULL;
+ wechat_chat_list_set_slide_enable(&ext->old_ext, true); /*reset slide_enable at the end of recording*/
+
lv_indev_t * indev = lv_indev_get_act();
if(indev)
{
lv_wechat_ext_t * ext = wechat_actId_ext_get(ACT_ID_WECHAT_MAIN);
if(NULL != ext)
{
- //wechat_chat_list_set_slide_enable(&ext->old_ext, false); /*prevent to slide out while recording*/
wechat_msg_voice_item_playing_stop(ext);
}
}