📄 historyhelper.c
字号:
AdjustSubLcd();
if (GetTotalCallCount() == 0)
{
mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_ENABLED);
if (GetHFreeHeld() == TRUE)
{
SetHFreeHeld(FALSE);
DisbleHandsFree();
SetLoudSpeaker(FALSE);
}
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr2));
GetOutOfCMApplication();
return;
}
if (GetCurrentState() == CM_OUTGOING_STATE && GetActivatedCcbsFlag() != TRUE)
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr3));
if (!IsScreenPresent(SCR1001_CM_OUTGOINGCALLSCREEN))
{
EntryScr1001OutgoingCall();
if (IsScreenPresent(CM_SCR_MARKER) == FALSE)
{
AddMarkerToHistory();
}
}
else
{
GoBackToHistory(SCR1001_CM_OUTGOINGCALLSCREEN);
}
return;
}
/* MT call caller picture, ringtone...will be overwrite by MO call,
it needs to be restored afterwards */
if (GetCurrentState() == CM_INCOMING_STATE && GetPreviousState() == CM_OUTGOING_STATE)
{
CM_CALL_HANDLE handle;
PHB_CM_INTERFACE phb_data;
handle = GetIncomingCallHandle();
phb_data = mmi_phb_call_get_data_for_call_mgnt(GetCallNumber(handle), FALSE);
#ifdef __MMI_INCOMING_CALL_VIDEO__
/* waiting call and ccbs invoke can't use video for display */
if (GetTotalCallCount() > 0 || GetCCBSFlag() == TRUE)
{
phb_data.videoId = 0;
}
#endif /* __MMI_INCOMING_CALL_VIDEO__ */
SetCMPhoneBookStruct(&phb_data);
}
if (GetCurrScrnId() == DTMF_SCR_DISPLAY_ID)
{
if (GetCurrentState() == CM_INCOMING_STATE && 1 == GetTotalCallCount())
{
if (GetCallWaitFlag() && !GetNoTwiceRingFlag()
&& mdi_audio_is_speech_mode() == FALSE && IsAttemptToAnswer() == FALSE)
{
SetWait2RingCallFlag(TRUE);
SetNoTwiceRingFlag(TRUE);
ShowIncomingCallIndication();
}
}
GoBackHistory();
return;
}
if (GetCurrentState() == CM_INCOMING_STATE)
{
if ((1 == GetTotalCallCount()) && (!IsScreenPresent(ITEMSCR_INCOMING_CALL)))
{
DeleteUptoScrID(CM_SCR_MARKER);
}
if (IsScreenPresent(ITEMSCR_INCOMING_CALL))
{
GoBackToHistory(ITEMSCR_INCOMING_CALL);
}
else if (IsScreenPresent(ITEMSCR_CCBS_INVOKE))
{
GoBackToHistory(ITEMSCR_CCBS_INVOKE);
}
else
{
EntryScrIncomingCallEvent();
}
if (GetTotalCallCount() == 1 && !GetRingingFlag() && IsAttemptToAnswer() == FALSE)
{
ShowIncomingCallIndication();
}
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr4));
return;
}
DeleteIncomingCallOptionScreen();
DeleteNScrId(ITEM_SCR_CALL_DEFLECT_DIGIT_HANDLER_ID);
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr6));
if (GetCMScrnFlag() == FALSE || IsScreenPresent(ITEM_SCR_USSN_MSG))
{
/* SS present, active call present, go back to SS screen */
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr7));
GoBackHistory();
return;
}
if (GetWapCallPresent())
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr8));
/* waiting call will add marker to history, need to be deleted before go back */
DeleteScreenIfPresent(CM_SCR_MARKER);
GoBackHistory();
return;
}
if (IsScreenPresent(DTMF_SCR_DISPLAY_ID))
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr5));
GoBackToHistory(DTMF_SCR_DISPLAY_ID);
return;
}
if (GetTotalActiveCallCount() > 0 && IsScreenPresent(ITEM_SCR_CONFIRM_DTMF_STRING))
{
GoBackToHistory(ITEM_SCR_CONFIRM_DTMF_STRING);
return;
}
if (IsScreenPresent(SCR_CM_ACTIVECALLSCREEN))
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr9));
GoBackToHistory(SCR_CM_ACTIVECALLSCREEN);
}
#ifdef __CTM_SUPPORT__
else if (IsScreenPresent(SCR_CTM_TALKING))
{
GoBackToHistory(SCR_CTM_TALKING);
}
#endif /* __CTM_SUPPORT__ */
else
{
if (GetExitScrnID() == SCR_CM_ACTIVECALLSCREEN
#ifdef __CTM_SUPPORT__
|| GetExitScrnID() == SCR_CTM_TALKING
#endif
)
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr10));
return;
}
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_GoBackfromNotifyScr11));
EntryScr1002ActiveCall();
if (!IsScreenPresent(CM_SCR_MARKER))
{
AddMarkerToHistory();
}
}
}
/*****************************************************************************
* FUNCTION
* AdjustHistoryForCM
* 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 AdjustHistoryForCM(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_AdjustHistoryForCM));
if (GetCbackAfterSS())
{
ExitScrShowSSEvent();
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM1));
return;
}
SetNotifySSFlag(FALSE);
AdjustSubLcd();
if (GetTotalCallCount() == 0)
{
mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_ENABLED);
/* side effect: sound recorder in call, the loud speaker cannot be turned off */
if (GetHFreeHeld() == TRUE)
{
SetHFreeHeld(FALSE);
DisbleHandsFree();
SetLoudSpeaker(FALSE);
}
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM2));
GetOutOfCMforAdjustHistory();
return;
}
if (GetCurrentState() == CM_OUTGOING_STATE && GetActivatedCcbsFlag() != TRUE)
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM3));
DeleteUptoScrID(SCR1001_CM_OUTGOINGCALLSCREEN);
return;
}
if (GetCurrentState() == CM_INCOMING_STATE)
{
if ((1 == GetTotalCallCount()) && (!IsScreenPresent(ITEMSCR_INCOMING_CALL)))
{
DeleteUptoScrID(CM_SCR_MARKER);
}
DeleteUptoScrID(ITEMSCR_INCOMING_CALL);
DeleteUptoScrID(ITEMSCR_CCBS_INVOKE);
/* MT call caller picture, ringtone...will be overwrite by MO call,
it needs to be restored afterwards */
if (GetPreviousState() == CM_OUTGOING_STATE)
{
CM_CALL_HANDLE handle;
PHB_CM_INTERFACE phb_data;
handle = GetIncomingCallHandle();
phb_data = mmi_phb_call_get_data_for_call_mgnt(GetCallNumber(handle), FALSE);
#ifdef __MMI_INCOMING_CALL_VIDEO__
/* waiting call and ccbs invoke can't use video for display */
if (GetTotalCallCount() > 0 || GetCCBSFlag() == TRUE)
{
phb_data.videoId = 0;
}
#endif /* __MMI_INCOMING_CALL_VIDEO__ */
SetCMPhoneBookStruct(&phb_data);
}
if (1 == GetTotalCallCount())
{
if (GetCallWaitFlag() && !GetNoTwiceRingFlag()
&& mdi_audio_is_speech_mode() == FALSE && IsAttemptToAnswer() == FALSE)
{
SetWait2RingCallFlag(TRUE);
SetNoTwiceRingFlag(TRUE);
ShowIncomingCallIndication();
}
}
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM4));
return;
}
if (IsScreenPresent(DTMF_SCR_DISPLAY_ID))
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM5));
DeleteUptoScrID(DTMF_SCR_DISPLAY_ID);
return;
}
if (GetTotalActiveCallCount() > 0 && IsScreenPresent(ITEM_SCR_CONFIRM_DTMF_STRING))
{
DeleteUptoScrID(ITEM_SCR_CONFIRM_DTMF_STRING);
return;
}
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM6));
if (GetCMScrnFlag() == FALSE || IsScreenPresent(ITEM_SCR_USSN_MSG))
{
/* SS present, active call present, go back to SS screen */
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM7));
return;
}
if (IsScreenPresent(SCR_CM_ACTIVECALLSCREEN))
{
DeleteUptoScrID(SCR_CM_ACTIVECALLSCREEN);
}
#ifdef __CTM_SUPPORT__
else if (IsScreenPresent(SCR_CTM_TALKING))
{
DeleteUptoScrID(SCR_CTM_TALKING);
}
#endif /* __CTM_SUPPORT__ */
else
{
if (GetWapCallPresent())
{
return;
}
if (GetExitScrnID() == SCR_CM_ACTIVECALLSCREEN
#ifdef __CTM_SUPPORT__
|| GetExitScrnID() == SCR_CTM_TALKING
#endif
)
{
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_INFO_AdjustHistoryForCM8));
return;
}
#if 1
EntryScr1002ActiveCall();
if (!IsScreenPresent(CM_SCR_MARKER))
{
AddMarkerToHistory();
}
#else /* 1 */
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 1 */
}
}
/*****************************************************************************
* FUNCTION
* AdjustSubLcd
* DESCRIPTION
* Adjusts sub-lcd scrn according to state
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void AdjustSubLcd(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ExecSubLCDCurrExitHandler();
if ((GetCurrentState() == CM_ACTIVE_STATE) || (GetCurrentState() == CM_HOLD_STATE))
{
ShowCategory304Screen(IMG_CM_STATE_CONNECTED, NULL);
SetSubLCDExitHandler(ExitSubLcdScr1002ActiveCall);
return;
}
if ((GetCurrentState() == CM_OUTGOING_STATE))
{
ShowCategory311Screen(gdispnameForSubLCD, IMG_CM_SUBLCD_CALLING, NULL);
SetSubLCDExitHandler(ExitSubLcdScr1001OutgoingCall);
return;
}
if ((GetCurrentState() == CM_INCOMING_STATE))
{
if (GetTotalCallCount() == 1)
{
DeleteSubLCDScreen(SUB_LCD_SCR_CM_ACTIVECALLSCREEN);
}
ShowCategory311Screen(gdispnameForSubLCD, IMG_CM_SUBLCD_CALLING, NULL);
SetSubLCDExitHandler(ExitSubLcdScrIncomingCallEvent);
return;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -