📄 historyhelper.c
字号:
{
ResetRedialAttempts();
}
SetDialedDigitCalledFlag(FALSE);
mmi_phb_call_set_dial_from_list(MMI_PHB_NONE);
CHISTSetDialFromCallLogFlag(0);
/* turn off speech if needed */
type = mdi_audio_speech_get_app_id();
if (type == MDI_AUDIO_SPEECH_APP_ID_GSM)
{
mdi_audio_speech_session_stop(MDI_AUDIO_SPEECH_APP_ID_GSM);
}
else if (type == MDI_AUDIO_SPEECH_APP_ID_WCDMA)
{
mdi_audio_speech_session_stop(MDI_AUDIO_SPEECH_APP_ID_WCDMA);
}
/* stop voice recording */
if (GetVoiceRecordingFlag())
{
SetKeyPadStopVoiceRecordLongPress();
}
/* unmute phone */
if (TRUE == IsPhoneInMute())
{
UnMutethePhone();
}
/* turn off loud speaker */
if (GetHFreeHeld() == TRUE)
{
SetHFreeHeld(FALSE);
DisbleHandsFree();
SetLoudSpeaker(FALSE);
}
#ifdef __MMI_BT_PROFILE__
#ifdef __MMI_VOIP__
/* do not turn off sco link in case voip needs to turn on again */
if (mmi_voip_app_total_call() == 0)
{
PRINT_INFORMATION(("\n[GetOutOfCMApplication] SCO Ends\n"));
mmi_profiles_bt_call_end_callback();
}
else
{
PRINT_INFORMATION(("\n[GetOutOfCMApplication] SCO Not Ends\n"));
}
#else
/* notify bt profiles call end */
mmi_profiles_bt_call_end_callback();
#endif /* __MMI_VOIP__ */
#endif /* __MMI_BT_PROFILE__ */
/* resume audio */
#ifdef __MMI_CM_BLACK_LIST__
if(GetBlackIncomingFlag() == FALSE)
{
#endif /* __MMI_CM_BLACK_LIST__ */
mdi_audio_resume_background_play();
#ifdef __MMI_CM_BLACK_LIST__
}
SetBlackIncomingFlag(FALSE);
#endif /* __MMI_CM_BLACK_LIST__ */
/* micha0831 */
SATCallTerminate();
/* reset DTMF flag */
SetDTMFFlag(TRUE);
/* reset state and exit */
ReinitalizeCallManagement();
SetCallAbortReqSentFlag(FALSE);
if (GetAbortCallRequestedFlag() == TRUE || GetTotalCallCount() == 0)
{
DeleteAllCMSubLCDScreens();
GoBackSubLCDHistory();
SetAbortCallRequestedFlag(FALSE);
}
/* Delete background sound screen */
#if defined(__MMI_BG_SOUND_EFFECT__)
mmi_bgsnd_util_delete_end_call_screen();
#endif
/* Delete SCR_CTM_EDITOR by Mick*/
#ifdef __CTM_SUPPORT__
DeleteScreenIfPresent(SCR_CTM_EDITOR);
#endif /* __CTM_SUPPORT__ */
#ifdef __MMI_VOIP__
if ((IsScreenPresent(CM_SCR_MARKER) && GetCMScrnFlag() == FALSE) ||
(GetCMScrnFlag() == TRUE && mmi_voip_app_total_call() != 0))
#else
if ((IsScreenPresent(CM_SCR_MARKER)) && (GetCMScrnFlag() == FALSE))
#endif
{
/* enter in-call option menu to go to other applications
delete CM screens only and go back to that application */
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GetOutOfCMApplication1));
if (IsScreenPresent(SCR1003_CM_ACTIVECALLOPTIONS))
{
DeleteBetweenScreen(CM_SCR_MARKER, SCR1003_CM_ACTIVECALLOPTIONS);
DeleteIncomingCallOptionScreen();
}
else
{
if (!DeleteBetweenScreen(CM_SCR_MARKER, SCR_CM_ACTIVECALLSCREEN))
{
DeleteScreenIfPresent(CM_SCR_MARKER);
}
}
CMHistoryHandler();
SetCMScrnFlag(TRUE);
}
else
{
/* all CM screens, delete all CM screen and go back */
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GetOutOfCMApplication2));
DeleteNScrId(CM_SCR_MARKER);
CMHistoryHandler();
}
/* in case of USSD will have extra marker in history */
DeleteScreenIfPresent(CM_SCR_MARKER);
/*
*#ifdef __MMI_USB_SUPPORT__
* PendingUsbDetectionHdlr();
*#endif
*/
AlmEnableExpiryHandler();
/* PendingAlarmReminder(); */
if (mmi_msg_need_new_msg_ind_call_end())
{
mmi_msg_reset_new_msg_ind_call_end();
/* PlayMessageArrivalTone(); */
}
#ifdef OBIGO_SUPPORT /* WAP_SUPPORT */
/* Callback for WAP widget */
widget_MMI_on_exit_CM();
#endif /* OBIGO_SUPPORT */
return;
}
/*****************************************************************************
* FUNCTION
* GetOutOfCMforAdjustHistory
* DESCRIPTION
* Helper to perform last rites and exit application
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void GetOutOfCMforAdjustHistory(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 type;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_GetOutOfCMforAdjustHistory));
/* stop background sound effect */
#if defined(__MMI_BG_SOUND_EFFECT__)
mmi_bgsnd_util_stop_play_sound_end_call();
#endif
/* low battery */
if (g_charbat_context.LowBatteryTxProhibitFlag == 1)
{
SET_LOW_BATTERY_ALARM_THRESHOLD(LBAT_IDLE_DURCNT_PROHIBIT);
}
else
{
SET_LOW_BATTERY_ALARM_THRESHOLD(LBAT_IDLE_DURCNT_NORMAL);
}
if (GetCallDeflectFlag() == TRUE)
{
DeleteScreenIfPresent(ITEM_SCR_CALL_DEFLECT_DIGIT_HANDLER_ID);
SetCallDeflectFlag(FALSE);
}
/* reset redial data */
if (IsRedialSet())
{
ResetRedialAttempts();
}
SetDialedDigitCalledFlag(FALSE);
mmi_phb_call_set_dial_from_list(MMI_PHB_NONE);
CHISTSetDialFromCallLogFlag(0);
/* turn off speech if needed */
type = mdi_audio_speech_get_app_id();
if (type == MDI_AUDIO_SPEECH_APP_ID_GSM)
{
mdi_audio_speech_session_stop(MDI_AUDIO_SPEECH_APP_ID_GSM);
}
else if (type == MDI_AUDIO_SPEECH_APP_ID_WCDMA)
{
mdi_audio_speech_session_stop(MDI_AUDIO_SPEECH_APP_ID_WCDMA);
}
/* stop voice recording */
if (GetVoiceRecordingFlag())
{
SetKeyPadStopVoiceRecordLongPress();
}
/* unmute phone */
if (TRUE == IsPhoneInMute())
{
UnMutethePhone();
}
/* turn off loud speaker */
if (GetHFreeHeld() == TRUE)
{
SetHFreeHeld(FALSE);
DisbleHandsFree();
SetLoudSpeaker(FALSE);
}
#ifdef __MMI_BT_PROFILE__
#ifdef __MMI_VOIP__
/* do not turn off sco link in case voip needs to turn on again */
if (mmi_voip_app_total_call() == 0)
{
PRINT_INFORMATION(("\n[GetOutOfCMforAdjustHistory] SCO Ends\n"));
mmi_profiles_bt_call_end_callback();
}
else
{
PRINT_INFORMATION(("\n[GetOutOfCMforAdjustHistory] SCO Not Ends\n"));
}
#else
/* notify bt profiles call end */
mmi_profiles_bt_call_end_callback();
#endif /* __MMI_VOIP__ */
#endif /* __MMI_BT_PROFILE__ */
/* resume audio */
#ifdef __MMI_CM_BLACK_LIST__
if(GetBlackIncomingFlag() == FALSE)
{
#endif /* __MMI_CM_BLACK_LIST__ */
mdi_audio_resume_background_play();
#ifdef __MMI_CM_BLACK_LIST__
}
SetBlackIncomingFlag(FALSE);
#endif /* __MMI_CM_BLACK_LIST__ */
/* micha0831 */
SATCallTerminate();
/* reset DTMF flag */
SetDTMFFlag(TRUE);
/* reset state and exit */
ReinitalizeCallManagement();
SetCallAbortReqSentFlag(FALSE);
if (GetAbortCallRequestedFlag() == TRUE || GetTotalCallCount() == 0)
{
DeleteAllCMSubLCDScreens();
GoBackSubLCDHistory();
SetAbortCallRequestedFlag(FALSE);
}
/* Delete background sound screen */
#if defined(__MMI_BG_SOUND_EFFECT__)
mmi_bgsnd_util_delete_end_call_screen();
#endif
/* Delete SCR_CTM_EDITOR by Mick*/
#ifdef __CTM_SUPPORT__
DeleteScreenIfPresent(SCR_CTM_EDITOR);
#endif /* __CTM_SUPPORT__ */
#ifdef __MMI_VOIP__
if ((IsScreenPresent(CM_SCR_MARKER) && GetCMScrnFlag() == FALSE) ||
(GetCMScrnFlag() == TRUE && mmi_voip_app_total_call() != 0))
#else
if ((IsScreenPresent(CM_SCR_MARKER)) && (GetCMScrnFlag() == FALSE))
#endif
{
/* enter in-call option menu to go to other applications
delete CM screens only */
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GetOutOfCMforAdjustHistory1));
if (IsScreenPresent(SCR1003_CM_ACTIVECALLOPTIONS))
{
DeleteBetweenScreen(CM_SCR_MARKER, SCR1003_CM_ACTIVECALLOPTIONS);
DeleteIncomingCallOptionScreen();
}
else
{
if (!DeleteBetweenScreen(CM_SCR_MARKER, SCR_CM_ACTIVECALLSCREEN))
{
DeleteScreenIfPresent(CM_SCR_MARKER);
}
}
SetCMScrnFlag(TRUE);
}
else
{
/* all CM screens, delete all CM screen */
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GetOutOfCMforAdjustHistory2));
DeleteNScrId(CM_SCR_MARKER);
}
/* in case of USSD will have extra marker in hostory */
DeleteScreenIfPresent(CM_SCR_MARKER);
/*
* #ifdef __MMI_CLAMCLOSE_BACK2IDLE__
* if (IsClamClose())
* ExecuteCurrKeyHandler( KEY_END, KEY_EVENT_DOWN );
* #endif
*/
/*
*#ifdef __MMI_USB_SUPPORT__
* PendingUsbDetectionHdlr();
*#endif
*/
AlmEnableExpiryHandler();
/* PendingAlarmReminder(); */
if (mmi_msg_need_new_msg_ind_call_end())
{
mmi_msg_reset_new_msg_ind_call_end();
/* PlayMessageArrivalTone(); */
}
#ifdef OBIGO_SUPPORT /* WAP_SUPPORT */
/* Callback for WAP widget */
widget_MMI_on_exit_CM();
#endif /* OBIGO_SUPPORT */
return;
}
/*****************************************************************************
* FUNCTION
* GoBackfromNotifyScr
* DESCRIPTION
* This is the function which is invoked when there is a timeout
* or user presses the LSK of the notification screen.
*
* This is the base function for all exit of the notification screen.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void GoBackfromNotifyScr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_GoBackfromNotifyScr));
StopTimer(CM_NOTIFYDURATION_TIMER);
SetPOPUpFlag(FALSE);
if (GetCbackAfterSS())
{
ExitScrShowSSEvent();
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr1));
return;
}
SetNotifySSFlag(FALSE);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -