📄 historyhelper.c
字号:
scr101.entryFuncPtr = EntryScrMarkerError;
AddHistory(scr101);
}
/*****************************************************************************
* FUNCTION
* DeleteUptoCmScreen
* DESCRIPTION
* Helper to delete all screen upto marker
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void DeleteUptoCmScreen(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
DeleteUptoScrID(CM_SCR_MARKER);
}
/*****************************************************************************
* FUNCTION
* DeleteAllCMSubLCDScreens
* DESCRIPTION
* Deletes All Sub LCD Screens in history
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void DeleteAllCMSubLCDScreens(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
while (IsSubLCDScreenPresent(SUB_LCD_SCR_CM_ACTIVECALLSCREEN))
{
DeleteSubLCDScreen(SUB_LCD_SCR_CM_ACTIVECALLSCREEN);
}
while (IsSubLCDScreenPresent(SUB_LCD_SCR1001_CM_OUTGOINGCALLSCREEN))
{
DeleteSubLCDScreen(SUB_LCD_SCR1001_CM_OUTGOINGCALLSCREEN);
}
while (IsSubLCDScreenPresent(SUB_LCD_ITEMSCR_INCOMING_CALL))
{
DeleteSubLCDScreen(SUB_LCD_ITEMSCR_INCOMING_CALL);
}
}
/*****************************************************************************
* FUNCTION
* DeleteIncomingCallOptionScreen
* DESCRIPTION
* Deletes All incoming call option Screens in history
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void DeleteIncomingCallOptionScreen(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U16 scrnId = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
GetPreviousScrnIdOf(SCR1009_CM_CALLLISTSCREEN, &scrnId);
if (scrnId == ITEM_SCR_INC_MACT_OPN)
{
DeleteScreenIfPresent(SCR1009_CM_CALLLISTSCREEN);
}
/* deflect need to delete dial pad and phb list if any */
GetNextScrnIdOf (ITEM_SCR_CALL_DEFLECT_DIGIT_HANDLER_ID, &scrnId);
if (scrnId == SCR_PBOOK_LIST)
{
DeleteScreenIfPresent(SCR_PBOOK_LIST);
DeleteScreenIfPresent(ITEM_SCR_CALL_DEFLECT_DIGIT_HANDLER_ID);
}
DeleteScreenIfPresent(ITEM_SCR_INC_MACT_OPN);
DeleteScreenIfPresent(ITEM_SCR_INCOMING_OPTIONS);
}
/*****************************************************************************
* FUNCTION
* SetNotifySSFlag
* DESCRIPTION
* Sets Notify SS Flag dpeneding on flag
* PARAMETERS
* flag [IN]
* RETURNS
* void
*****************************************************************************/
void SetNotifySSFlag(pBOOL flag)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cm_p->history_info.IsNotifySS = flag;
}
/*****************************************************************************
* FUNCTION
* GetNotifySSFlag
* DESCRIPTION
* Returns Notify SS Flag
* PARAMETERS
* void
* RETURNS
* flag
*****************************************************************************/
pBOOL GetNotifySSFlag(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return cm_p->history_info.IsNotifySS;
}
/*****************************************************************************
* FUNCTION
* SetCbackAfterSS
* DESCRIPTION
* Sets Function to be called after SS
* PARAMETERS
* fptr [IN]
* Function(?) [IN]
* RETURNS
* void
*****************************************************************************/
void SetCbackAfterSS(FuncPtr fptr)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cm_p->history_info.CbackAfterNotifySS = fptr;
}
/*****************************************************************************
* FUNCTION
* GetCbackAfterSS
* DESCRIPTION
* Returns Function to be called after SS
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
FuncPtr GetCbackAfterSS(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return cm_p->history_info.CbackAfterNotifySS;
}
/*****************************************************************************
* FUNCTION
* SetPOPUpFlag
* DESCRIPTION
*
* PARAMETERS
* flag [IN]
* TRUE(?) [IN] For set, FALSE for not set
* RETURNS
* void
*****************************************************************************/
void SetPOPUpFlag(pBOOL flag)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cm_p->history_info.IsPopUp = flag;
}
/*****************************************************************************
* FUNCTION
* GetPOPUpFlag
* DESCRIPTION
* Gets the LoudSpFromOption Flag Status
* PARAMETERS
* void
* TRUE(?) [OUT] For set, FALSE for not set
* RETURNS
* void
*****************************************************************************/
pBOOL GetPOPUpFlag(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return cm_p->history_info.IsPopUp;
}
/*****************************************************************************
* FUNCTION
* GetCmMarkerScrnID
* DESCRIPTION
* This function checks marker screen id value.
* PARAMETERS
* void
* RETURNS
* U16
*****************************************************************************/
U16 GetCmMarkerScrnID(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return CM_SCR_MARKER;
}
/*****************************************************************************
* FUNCTION
* SetNoSave
* DESCRIPTION
* Controls access to global history store buffer
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void SetNoSave(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
cm_p->history_info.IsSave = FALSE;
}
/*****************************************************************************
* FUNCTION
* CMHistoryHandler
* DESCRIPTION
* Helper to perform last rites and exit application
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void CMHistoryHandler(void)
{
#ifdef __MMI_CLAMCLOSE_BACK2IDLE__
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (IsClamClose() == MMI_TRUE && !IsInSATCall())
{
DeleteScreenIfPresent(SCR8055_CALLS_LIST_DIALED);
DeleteScreenIfPresent(SCR8056_CALLS_LIST_MISSED);
DeleteScreenIfPresent(SCR8054_CALLS_LIST_RECEIVED);
DeleteScreenIfPresent(SCR8057_CALLS_LIST_MIXED);
DeleteScreenIfPresent(SCR_ID_ALM_INDICATION);
#ifdef __MMI_TODOLIST__
DeleteScreenIfPresent(SCR_TDL_REMINDER);
#endif
}
#endif /* __MMI_CLAMCLOSE_BACK2IDLE__ */
GoBackHistory();
#ifdef __MMI_WEBCAM__
if (GetExitScrnID() == SCR_ID_USB_WEBCAM)
{
/* if is in webcam screen, do not proess End key handler */
return;
}
#endif /* __MMI_WEBCAM__ */
#ifdef __MMI_CLAMCLOSE_BACK2IDLE__
if (IsClamClose() == MMI_TRUE && cm_p->history_info.IsClamCloseEndCall == MMI_TRUE &&
!IsInSATCall() && (GetExitScrnID() != ITEM_SCR_MISSED_CALL))
{
cm_p->history_info.IsClamCloseEndCall = MMI_FALSE;
ExecuteCurrKeyHandler(KEY_END, KEY_EVENT_DOWN);
}
#endif /* __MMI_CLAMCLOSE_BACK2IDLE__ */
}
/*****************************************************************************
* FUNCTION
* GetOutOfCMApplication
* DESCRIPTION
* Helper to perform last rites and exit application
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void GetOutOfCMApplication(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 type;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
// XXX CAUTION: If any changes are being done here,
// corresponding changes have to be there in GetOutOfCMforAdjustHistory()
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_GetOutOfCMApplication));
/* 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())
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -