Esempio n. 1
0
/*****************************************************************************
 * FUNCTION
 *  srv_ctm_med_send_text_req
 * DESCRIPTION
 *  
 * PARAMETERS
 *  text        [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void srv_ctm_med_send_text_req(CHAR* text)
{
#ifndef __CTM_DEBUG
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_ctm_send_text_req_struct *param;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    MMI_TRACE(MMI_COMMON_TRC_G5_CALL, FUNC_SRV_CTM_MED_SEND_TEXT_REQ);

    ClearInputEventHandler(MMI_DEVICE_ALL);

    param = OslAllocDataPtr(media_ctm_send_text_req_struct);
    param->num_of_char = mmi_ucs2strlen(text);
    mmi_ucs2ncpy((CHAR*)param->text, text, CTM_SEND_TEXT_CHAR_MAX_NUM);

    SetProtocolEventHandler(srv_ctm_phdlr_send_text_rsp, MSG_ID_MEDIA_CTM_SEND_TEXT_CNF);
    mmi_frm_send_ilm(MOD_MED, MSG_ID_MEDIA_CTM_SEND_TEXT_REQ, (oslParaType*)param, NULL);

#else /* __CTM_DEBUG */ 
    StartTimer(CM_NOTIFYDURATION_TIMER, 2000, (FuncPtr) srv_ctm_phdlr_send_text_rsp);
#endif /* __CTM_DEBUG */ 
}
Esempio n. 2
0
/*****************************************************************************
 * FUNCTION
 *  mmi_java_send_reset_rms_res
 * DESCRIPTION
 *  This routines send MMI_JAVA_SEND_RESET_RMS_RES to MOD_J2ME for user decision
 * PARAMETERS
 *  confirm     [IN]        KAL_TRUE if really want to install this MIDS
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_java_send_reset_rms_res(S8 confirm)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MYQUEUE Message;
    mmi_java_install_reset_rms_res_struct *msg;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    MMI_TRACE(MMI_TRACE_FUNC, MMI_JAVA_SEND_RESET_RMS_RES);
    ClearInputEventHandler(MMI_DEVICE_ALL);

    msg = (mmi_java_install_reset_rms_res_struct*) OslConstructDataPtr(sizeof(mmi_java_install_reset_rms_res_struct));

    msg->session_id = reset_rms_ind_msg.session_id;
    msg->confirm = confirm;

    Message.oslSrcId = MOD_MMI;
    Message.oslDestId = MOD_J2ME;
    Message.oslMsgId = MSG_ID_MMI_JAVA_INSTALL_RESET_RMS_RES;
    Message.oslDataPtr = (local_para_struct*) msg;
    Message.oslPeerBuffPtr = NULL;
    OslMsgSendExtQueue(&Message);
}
Esempio n. 3
0
/*****************************************************************************
 * FUNCTION
 *  GetGPRSCountersRequest
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void GetGPRSCountersRequest(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    /* micha1020 */
#ifdef __MMI_GPRS_FEATURES__
    MYQUEUE Message;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearInputEventHandler(MMI_DEVICE_ALL);
    ClearKeyHandler(KEY_END, KEY_EVENT_UP);
    ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
    /* micha1020 */
    SetProtocolEventHandler(GetGPRSCountersResponse, PRT_MMI_PS_GET_GPRS_DATA_COUNTER_RSP);
    /* format message to send req for get plmn list */
    Message.oslSrcId = MOD_MMI;
    Message.oslDestId = MOD_L4C;
    /* micha1020 */
    Message.oslMsgId = PRT_MMI_PS_GET_GPRS_DATA_COUNTER_REQ;
    Message.oslDataPtr = NULL;
    Message.oslPeerBuffPtr = NULL;
    OslMsgSendExtQueue(&Message);
    return;
#endif /* __MMI_GPRS_FEATURES__ */ 
}
Esempio n. 4
0
/*****************************************************************************
 * FUNCTION
 *  DeleteAllRecdCalls
 * DESCRIPTION
 *  To delete all the recd call entries
 * NA
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void DeleteAllRecdCalls(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MYQUEUE Message;
    DEL_LAST_NUMBER_REQ *dataPtr;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* clear key handler; not to process any other key */
    ClearInputEventHandler(MMI_DEVICE_ALL);

    /* format the message for delete all received calls */
    Message.oslSrcId = MOD_MMI;
    Message.oslDestId = MOD_L4C;
    Message.oslMsgId = PRT_MMI_PHB_DEL_LAST_NUMBER_REQ;

    dataPtr = (DEL_LAST_NUMBER_REQ*) OslConstructDataPtr(sizeof(DEL_LAST_NUMBER_REQ));

    dataPtr->type = PHB_LNR;
    dataPtr->index = 0xff;
    dataPtr->no_data = 0;

    Message.oslDataPtr = (oslParaType*) dataPtr;
    Message.oslPeerBuffPtr = NULL;

    /* Set the response handler for the delete all received calls request */
    SetProtocolEventHandler(RspDeleteAllRecvdNum, PRT_MMI_PHB_DEL_LAST_NUMBER_RSP);

    /* Send request to l4 for delete all received calls */
    OslMsgSendExtQueue(&Message);
    return;
}
Esempio n. 5
0
/*****************************************************************************
 * FUNCTION
 *  mmi_java_send_reset_rms_res_no
 * DESCRIPTION
 *  Handle Function: revoked when select "NO" in "RESET RMS" screen
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_java_send_reset_rms_res_no(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearInputEventHandler(MMI_DEVICE_ALL);
    GoBackHistory();    /* KEY PRESSED */
    mmi_java_send_reset_rms_res(KAL_FALSE);
}
Esempio n. 6
0
/*****************************************************************************
 * FUNCTION
 *  mmi_java_mids_get_confirm_cancel_hdlr
 * DESCRIPTION
 *  Handler Function: revoked when select "End key" in "CONFIRM" screen
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_java_mids_get_confirm_cancel_hdlr(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearInputEventHandler(MMI_DEVICE_ALL);
    mmi_java_send_mids_get_confirm_res(MMI_FALSE);
    DisplayIdleScreen();
}
Esempio n. 7
0
/*****************************************************************************
 * FUNCTION
 *  mmi_java_mids_get_confirm_no_hdlr
 * DESCRIPTION
 *  Handler Function: revoked when select "No" in "CONFIRM" screen
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_java_mids_get_confirm_no_hdlr(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearInputEventHandler(MMI_DEVICE_ALL);
    GoBackHistory();
    mmi_java_send_mids_get_confirm_res(MMI_FALSE);
}
Esempio n. 8
0
/*****************************************************************************
 * FUNCTION
 *  mmi_java_get_permission_rsk_hdlr
 * DESCRIPTION
 *  Handler Function: revoked when press "NO" in "PERMISSION" screen
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_java_get_permission_rsk_hdlr(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearInputEventHandler(MMI_DEVICE_ALL);
    (*mmi_java_get_permission_index) = MMI_FALSE;
    GoBackHistory();
}
Esempio n. 9
0
/*****************************************************************************
 * FUNCTION
 *  mmi_vrsi_redial_read_call_log_num_req
 * DESCRIPTION
 *  This function send request to get call log from L4
 * PARAMETERS
 *  type        [IN]        Call log type
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_vrsi_redial_read_call_log_num_req(U8 type)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MYQUEUE Message;
    GET_LAST_NUMBER_REQ *dataPtr;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#if !defined(__MMI_CH_MIXED_CALL_LOG__)
    if (type == PHB_LND)
    {
        chis_p->dialedCalls = (LOG_CALL*) chis_p->callsLog;
    }
    else if (type == PHB_LNM)
    {
        chis_p->missedCalls = (LOG_CALL*) chis_p->callsLog;
    }
    else if (type == PHB_LNR)
    {
        chis_p->recvdCalls = (LOG_CALL*) chis_p->callsLog;
    }
#endif /* !defined(__MMI_CH_MIXED_CALL_LOG__) */ 

    dataPtr = (GET_LAST_NUMBER_REQ*) OslConstructDataPtr(sizeof(GET_LAST_NUMBER_REQ));
    dataPtr->type = type;
    dataPtr->seq_id = 1; /* Only need 1 record, so just get once */

    Message.oslSrcId = MOD_MMI;
    Message.oslDestId = MOD_L4C;
    Message.oslMsgId = PRT_MMI_PHB_GET_LAST_NUMBER_REQ;
    Message.oslDataPtr = (oslParaType*) dataPtr;
    Message.oslPeerBuffPtr = NULL;

    if (chis_p->isFirstTime == FALSE)
    {
        AlmDisableExpiryHandler();
        ClearInputEventHandler(MMI_DEVICE_ALL);
    }

    SetProtocolEventHandler(mmi_vrsi_redial_read_call_log_num_rsp, PRT_MMI_PHB_GET_LAST_NUMBER_RSP);
    OslMsgSendExtQueue(&Message);

    chis_p->isReqSent = TRUE;
}
Esempio n. 10
0
/*****************************************************************************
 * FUNCTION
 *  SSCHandleIMEI
 * DESCRIPTION
 *  Send req to get the IMEI number
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void SSCHandleIMEI(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#ifndef __COSMOS_MMI_PACKAGE__
	mmi_frm_group_create_ex(GRP_ID_ROOT, SCR_ID_DUMMY, NULL, NULL, MMI_FRM_NODE_SMART_CLOSE_FLAG);
	scrn_dummy_entry();
#endif
    ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
    //memset(gstrIMEI, 0x00, sizeof(gstrIMEI));
	mmi_ssc_handle_imei(MOD_L4C,mmi_ssc_get_imei_rsp);   
}
Esempio n. 11
0
/*****************************************************************************
 * FUNCTION
 *  ResetGPRSCounterReq
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetGPRSCounterReq(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#ifdef __MMI_GPRS_UNIT_TEST__

    gprsTotalSent = 0;
    gprsTotalReceived = 0;
    gprsLastSent = 0;
    gprsLastReceived = 0;
    DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CS_NOTIFYDURATION, SUCCESS_TONE);
    DeleteUptoScrID(SCR8004_GPRS_COUNTER);

#else /* __MMI_GPRS_UNIT_TEST__ */ 

    /* micha1020 */
#ifdef __MMI_GPRS_FEATURES__

    MYQUEUE Message;

    ClearInputEventHandler(MMI_DEVICE_ALL);
    ClearKeyHandler(KEY_END, KEY_EVENT_UP);
    ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
    /* micha1020 */
    SetProtocolEventHandler(ResetGPRSCounterRsp, PRT_MMI_PS_RESET_GPRS_DATA_COUNTER_RSP);
    /* format message to send req for get plmn list */
    Message.oslSrcId = MOD_MMI;
    Message.oslDestId = MOD_L4C;
    /* micha1020 */
    Message.oslMsgId = PRT_MMI_PS_RESET_GPRS_DATA_COUNTER_REQ;
    Message.oslDataPtr = NULL;
    Message.oslPeerBuffPtr = NULL;
    OslMsgSendExtQueue(&Message);

#endif /* __MMI_GPRS_FEATURES__ */ 

#endif /* __MMI_GPRS_UNIT_TEST__ */ 

    return;
}
Esempio n. 12
0
/*****************************************************************************
 * FUNCTION
 *  srv_ctm_med_connect_req
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void srv_ctm_med_connect_req(void)
{
#ifndef __CTM_DEBUG
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    MMI_TRACE(MMI_COMMON_TRC_G5_CALL, FUNC_SRV_CTM_MED_CONNECT_REQ);
    
    ClearInputEventHandler(MMI_DEVICE_ALL);

    SetProtocolEventHandler(srv_ctm_phdlr_connect_rsp, MSG_ID_MEDIA_CTM_CONNECT_CNF);
    mmi_frm_send_ilm(MOD_MED, MSG_ID_MEDIA_CTM_CONNECT_REQ, NULL, NULL);

#else /* __CTM_DEBUG */ 
    StartTimer(CM_NOTIFYDURATION_TIMER, 2000, (FuncPtr) srv_ctm_phdlr_connect_rsp);
#endif /* __CTM_DEBUG */ 
}
Esempio n. 13
0
void SFAppRegistKeyHandler()
{
       ClearInputEventHandler(MMI_DEVICE_KEY);
	   
	SetKeyHandler(SfKey0_DownHandler,KEY_0,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey0_UpHandler,KEY_0,KEY_EVENT_UP);

	SetKeyHandler(SfKey1_DownHandler,KEY_1,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey1_UpHandler,KEY_1,KEY_EVENT_UP);

	SetKeyHandler(SfKey2_DownHandler,KEY_2,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey2_UpHandler,KEY_2,KEY_EVENT_UP);

	SetKeyHandler(SfKey3_DownHandler,KEY_3,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey3_UpHandler,KEY_3,KEY_EVENT_UP);

	SetKeyHandler(SfKey4_DownHandler,KEY_4,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey4_UpHandler,KEY_4,KEY_EVENT_UP);

	SetKeyHandler(SfKey5_DownHandler,KEY_5,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey5_UpHandler,KEY_5,KEY_EVENT_UP);


	SetKeyHandler(SfKey6_DownHandler,KEY_6,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey6_UpHandler,KEY_6,KEY_EVENT_UP);

	SetKeyHandler(SfKey7_DownHandler,KEY_7,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey7_UpHandler,KEY_7,KEY_EVENT_UP);


	SetKeyHandler(SfKey8_DownHandler,KEY_8,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey8_UpHandler,KEY_8,KEY_EVENT_UP);
	
	SetKeyHandler(SfKey9_DownHandler,KEY_9,KEY_EVENT_DOWN);
	SetKeyHandler(SfKey9_UpHandler,KEY_9,KEY_EVENT_UP);


	SetKeyHandler(SfKeyLSK_DownHandler,KEY_LSK,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyLSK_UpHandler,KEY_LSK,KEY_EVENT_UP);

	SetKeyHandler(SfKeyRSK_DownHandler,KEY_RSK,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyRSK_UpHandler,KEY_RSK,KEY_EVENT_UP);

	SetKeyHandler(SfKeyEnter_DownHandler,KEY_ENTER,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyEnter_UpHandler,KEY_ENTER,KEY_EVENT_UP);

	SetKeyHandler(SfKeyUpArrow_DownHandler,KEY_UP_ARROW,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyUpArrow_UpHandler,KEY_UP_ARROW,KEY_EVENT_UP);


	SetKeyHandler(SfKeyDownArrow_DownHandler,KEY_DOWN_ARROW,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyDownArrow_UpHandler,KEY_DOWN_ARROW,KEY_EVENT_UP);

	SetKeyHandler(SfKeyLeftArrow_DownHandler,KEY_LEFT_ARROW,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyLeftArrow_UpHandler,KEY_LEFT_ARROW,KEY_EVENT_UP);

	SetKeyHandler(SfKeyRightArrow_DownHandler,KEY_RIGHT_ARROW,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyRightArrow_UpHandler,KEY_RIGHT_ARROW,KEY_EVENT_UP);
	
	SetKeyHandler(SfKeyStar_DownHandler,KEY_STAR,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyStar_UpHandler,KEY_STAR,KEY_EVENT_UP);

	SetKeyHandler(SfKeyPound_DownHandler,KEY_POUND,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyPound_UpHandler,KEY_POUND,KEY_EVENT_UP);
	
	SetKeyHandler(SfKeyClear_DownHandler,KEY_CLEAR,KEY_EVENT_DOWN);
	SetKeyHandler(SfKeyClear_UpHandler,KEY_CLEAR,KEY_EVENT_UP);
	
	SetKeyHandler(SfKeyEnd_DownHandler,KEY_END,KEY_EVENT_DOWN);
	
}
Esempio n. 14
0
/*****************************************************************************
 * FUNCTION
 *  mmi_sample_3dgame_entry_app_screen
 * DESCRIPTION
 *  enter dev3dgame screen - init an MMI  environment for 3D game
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_sample_3dgame_entry_app_screen(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    PU8 gui_buffer;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_3D_GAME, mmi_sample_3dgame_exit_app_screen, mmi_sample_3dgame_entry_app_screen, NULL);

    gui_buffer = GetCurrGuiBuffer(SCR_ID_3D_GAME);

    /* reset clip */
    gdi_layer_reset_clip();
    gdi_layer_reset_text_clip();

    /* enable multilayer */
    gdi_layer_multi_layer_enable();

    /* entry full screen app - will force status bar update */
    entry_full_screen();

    /* force all playing keypad tone off */
    mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);

    /* set audio volumn */
    mdi_audio_set_volume(MDI_VOLUME_MEDIA, 4);  /* vol level : 0 - 6 */

    /* suspend background play */
    mdi_audio_suspend_background_play();

    /* stop MMI sleep */
    TurnOnBacklight(0);

    /* clear keys */
    ClearInputEventHandler(MMI_DEVICE_ALL);
    clear_category_screen_key_handlers();

    /* set RSK-up to exit */
    SetKeyHandler(GoBackHistory, KEY_RSK, KEY_EVENT_UP);

    /* clear background as black */
    gdi_layer_clear(GDI_COLOR_BLACK);
    gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);

#ifndef WIN32
    /* enable faster key handling */
    mmi_frm_set_key_handle_in_high_frequency(MMI_TRUE);
#endif /* WIN32 */ 

#ifdef __MMI_SUBLCD__
    /* draw game icon on sublcd */
    ForceSubLCDScreen(mmi_sample_3dgame_entry_sublcd);
#endif /* __MMI_SUBLCD__ */ 

    /* disalbe align timer, this will let timer more accurate */
    UI_disable_alignment_timers();

    /* start game */
    if (gui_buffer == NULL)
    {
        /* TODO: start new game here .. */

    }
    else
    {
        /* back from interrupt */
        /* TODO: resume a existing game here .. */
    }

}
Esempio n. 15
0
/*****************************************************************************
 * FUNCTION
 *  ShowCallManagementErrorMessage
 * DESCRIPTION
 *  This function shows the failure in case of call management
 *  
 *  This is a part of other hardware application.
 * PARAMETERS
 *  cause       [IN]        
 *  TRUE(?)     [OUT]       Or FALSE
 * RETURNS
 *  pBOOL(?)
 *****************************************************************************/
void ShowCallManagementErrorMessage(U16 cause)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 error_code, img_id = IMG_ERROR_NOTIFY;
    U16 tone_id = ERROR_TONE_IN_CALL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    MMI_TRACE(MMI_TRACE_G5_CM, MMI_CM_FUNC_ShowCallManagementErrorMessage);

    if (GetCallEndCause() == 0)
    {
        SetCallEndCause(cause);
    }
    SetCbackAfterSS(NULL);
    if (GetNotifySSFlag())
    {
        MMI_TRACE(MMI_TRACE_G5_CM, MMI_CM_INFO_ShowErrorAfterNotifySS);
        SetCbackAfterSS((FuncPtr) ShowCallManagementErrorMessage);
        return;
    }

    EntryNewScreen(CM_SCR_ERR_MSG, ExitScrCMErrMsg, NULL, NULL);

    switch (GetCallEndCause())
    {
        case ERR_UNASSIGNED_NUM:
        	tone_id = NUM_UNOBTAIN_TONE;
        case ERR_INVALID_NUMBER_FORMAT:
            error_code = ERROR_UNRECOGNIZED_NUMBER;
            break;

        case ERR_SWITCH_EQUIPMENT_CONGESTION:
			tone_id = CONGESTION_TONE;
        case ERR_CALL_REJECTED:
			tone_id= AUTH_FAIL_TONE;
        case ERR_NO_ROUTE_TO_DESTINATION:
        case ERR_DEST_OUT_OF_ORDER:
        case ERR_FACILITY_REJECT:
        case ERR_TEMPORARY_FAILURE:
        case ERR_SER_UNAVAILABLE:
        case ERR_BEARER_SER_UNIMPL:
        case ERR_INVALID_TI_VALUE:
        case ERR_USER_NOT_IN_CUG:
        case ERR_INCOMPATIBLE_DEST:
        case ERR_SEMANTIC_ERR:
        case ERR_INTER_WRK_UNSPECIFIED:
        case ERR_CSMCC_ILLEGAL_CALL_ID:
        case ERR_CSMCC_CALL_ALLOC_FAIL:
        case ERR_CSMCC_BC_FILL_FAIL:
        case ERR_CSMCC_ILLEGAL_BC:
        case ERR_CSMCC_MODIFY_ACTUAL_MODE:
        case ERR_CSMCC_DATA_ACT_FAIL:
        case ERR_MAC_FAILURE:
        case ERR_SYNC_FAILURE:
        case ERR_CONGESTION:
        case ERR_ILLEGAL_MS:
        case ERR_ILLEGAL_ME:
        case ERR_CM_MM_CM_ENQUEUE_FAIL:
        case ERR_CM_MM_NOT_UPDATED:
        case ERR_CM_MM_STATE_NOT_ALLOWED_CM:
            error_code = ERROR_FAIL;
            break;

        case ERR_CHANNEL_UN_ACCP:
        case ERR_NO_CIRCUIT_CHANNEL_AVAIL:
        case ERR_NETWORK_OUT_OF_ORDER:
        case ERR_QOS_UNAVAIL:
        case ERR_INVALID_TRANSIT_NW_SEL:
        case ERR_CSMCC_NO_RESPONSE_FROM_NW:
        case ERR_NETWORK_FAILURE:
        case ERR_CM_MM_RR_CONN_RELEASE:
        case ERR_CM_SS_SYSTEMFAILURE:
            error_code = ERROR_NETWORK_FAIL;
            break;

        case ERR_REQUESTED_CKT_CHANEL_NOT_AVIL:
        case ERR_RESOURCE_UNAVAIL_UNSPECIFIED:
        case ERR_CM_MM_AUTH_FAILURE:
            error_code = ERROR_NETWORK_NOT_AVAILABLE;
            break;

        case ERR_OPR_DTR_BARRING:
        case ERR_CALL_BARRED:
        case ERR_IC_BAR_CUG:
        case ERR_BEARER_CAP_NOT_AVAIL:
        case ERR_CM_MM_ACCESS_BARRED:
            error_code = INCOMING_DEFAULT_ERROR;
            break;

        case ERR_USER_BUSY:
        {
            /* voice call shows user busy, csd call shows network busy */
            if (cm_p->state_info.CallStructureForCallLog.call_type == CM_VOICE_CALL)
            {
                error_code = ERROR_USER_BUSY;
            }
            else
            {
                error_code = ERROR_BUSY_NETWORK;
            }
        }
            break;

        case ERR_NO_USER_RESPONDING:
            error_code = ERROR_NOT_RESPONDING;
            break;

        case ERR_NO_ANSWER_ON_ALERT:
            error_code = ERROR_NO_ANSWER;
            break;

        case ERR_ACM_EXCEEDED:
            error_code = ERROR_ACM_EXCEEDED;
            break;

        case ERR_REQ_FACILITY_UNAVAIL:
        case ERR_IE_NOT_IMPLEMENTED:
        case ERR_CONDITIONAL_MM_IE_ERROR:
        case ERR_CM_MM_ASSIGNMENT_REJECT:
            error_code = ERROR_UNAVAILABLE;
            break;

        case ERR_CSMCC_ILLEGAL_DTMF_TONE:
        case ERR_CSMCC_CALL_ACCEPT_NOT_ALLOW:
        case ERR_MS_ID_NOT_DERIVED_BY_NW:
        case ERR_IMPLICIT_DETACH:
        case ERR_MSG_NOT_COMPAT_WITH_PROTO_STATE:
        case ERR_PROTO_ERROR_UNSPECIFIED:
            error_code = ERROR_UNEXPECTED_ERROR;
            break;

        case ERR_IMSI_UNKNOWN_IN_HLR:
        case ERR_IMSI_UNKNOWN_IN_VLR:
        case ERR_CM_MM_IMSI_DETACH:
            error_code = ERROR_IMSI_UNKNOWN;
            break;

        case ERR_IMEI_NOT_ACCEPTED:
            error_code = ERROR_IMEI_ERROR;
            break;

        case ERR_GPRS_NOT_ALLOWED:
        case ERR_GPRS_NON_GPRS_NOT_ALLOWED:
            error_code = ERROR_GPRS_NOT_ALLOWED;
            break;

        case ERR_CM_MT_DATA_CALL:
            error_code = ERROR_MT_DATA_CALL;
            break;

        case ERR_REQ_FAC_NOT_SUBS:
        case ERR_PLMN_NOT_ALLOWED:
        case ERR_LOCATION_AREA_NOT_ALLOWED:
        case ERR_ROAMING_AREA_NOT_ALLOWED:
        case ERR_GPRS_NOT_ALLOWED_IN_PLMN:
        case ERR_NO_SUITABLE_CELLS_IN_LA:
        case ERR_MSC_TEMP_NOT_REACHABLE:
        case ERR_CM_MM_ABORT_BY_NW:
            /* case ERR_CM_MM_STATE_NOT_ALLOWED_CM: */
        case ERR_BEARER_CAP_NOT_AUTHORISED:
            error_code = ERROR_NETWORK_NOT_ALLOWED;
            break;

        case ERR_CSMCC_CMD_NOT_ALLOW:
        case ERR_SERV_OPTION_NOT_SUPPORTED:
        case ERR_REQ_SERV_OPTION_NOT_SUBSCRIBED:
        case ERR_SERV_OPTION_TEMP_OUT_OF_ORDER:
        case ERR_CALL_CANNOT_BE_IDENTIFIED:
            error_code = ERROR_COMMAND_NOT_SUPPORTED;
            break;

        case ERR_NO_PDP_CONTEXT_ACTIVATED:
        case ERR_SEMANTICALLY_INCORRECT_MSG:
        case ERR_INVALID_MM_MAND_INFO:
            error_code = ERROR_DATA_ERROR;
            break;

        case ERR_MSG_TYPE_NON_EXISTENT:
        case ERR_MSG_TYPE_INCOMPAT_WITH_PROTO_STATE:
            error_code = ERROR_MESSAGE_TYPE_ERROR;
            break;

        case ERR_ACCESS_CLASS_BARRED:
        case ERR_CM_MM_RANDOM_ACCES_FAILURE:
            error_code = ERROR_ACCESS_FAIL;
            break;

        case ERR_CM_MM_CONN_TIMEOUT:
            error_code = ERROR_TIMER_EXPIRED;
            break;

        case ERR_NORMAL_CALL_CLR:
        case ERR_NORMAL_UNSPECIFIED:
            error_code = STR_CALL_ENDED;
            img_id = IMG_CM_STATE_ENDED;
            break;
        case ERR_L4C_USSD_ABORT:
            error_code = ERROR_USSD_ABORTED;
            break;
        case ERR_CM_MM_RR_NO_SERVICE:
        case ERR_CM_MM_NO_SERVICE:
        case ERR_RESERVED:
        case ERR_NUMBER_CHANGED:
        case ERR_PRE_EMPTION:
        case ERR_NON_SEL_USER_CLEAR:
        case ERR_RES_STATUS_ENQ:
        case ERR_ACCESS_INFO_DISCARDED:
        case ERR_RESTR_DIGITAL_INFO:
        case ERR_SER_OPT_UNIMPL:
        case ERR_INVALID_MANDATORY_INF:
        case ERR_MSG_TYPE_UNIMPL:
        case ERR_MSG_TYPE_NOT_COMPATIBLE:
        case ERR_IE_NON_EX:
        case ERR_COND_IE_ERR:
        case ERR_INCOMP_MESG_WITH_STATE:
        case ERR_RECOVERY_ON_TIMER_EXPIRY:
        case ERR_PROTOCOL_ERR_UNSPECIFIED:
        case ERR_CSMCC_CALL_RE_EST:
        case ERR_RETRY_UPON_ENTRY_INTO_NEWCELL_MIN:
        case ERR_RETRY_UPON_ENTRY_INTO_NEWCELL_MAX:
        case ERR_CM_MM_CAUSE_NONE:
        case ERR_L4C_GEN_CAUSE:
            error_code = INCOMING_DEFAULT_ERROR;
            break;

        case ERR_L4C_FDN_FAIL:
            error_code = ERROR_FDN_FAIL;
            break;

        case NO_ACTIVE_CALL:
            error_code = ERROR_INVALID_COMMAND;
            break;

        case ERR_CM_UNKNOWN:
            error_code = INCOMING_UNKNOWN_ERROR;
            break;

        default:
            error_code = INCOMING_DEFAULT_ERROR;
            break;
    }   /* End of Switch */

    ShowCategory62Screen(error_code, img_id, NULL);

    TurnOnBacklight(1);

    SetCallEndCause(0);

    if (GetTotalActiveCallCount() == 0 && GetTotalHoldCallCount() == 0)
    {
        /* only play error tone when not in-call */
        playRequestedTone(tone_id);
        SetErrorToneFlag(tone_id);
    }

    if (cm_p->redial_info.RedialTimer == TRUE)
    {
        /* cannot press key before pop up disappear,
           buy more time for call log writing */
        DeleteSubLCDScreen(SUB_LCD_SCR1001_CM_OUTGOINGCALLSCREEN);
        GoBackSubLCDHistory();
        if (IsScreenPresent(CM_SCR_MARKER))
        {
            DeleteUptoCmScreen();
        }
        DeleteScreenIfPresent(CM_SCR_MARKER);
        ClearInputEventHandler(MMI_DEVICE_ALL);
        SetPOPUpFlag(TRUE);
        SetKeyHandler(ResetRedialAndGoBack, KEY_END, KEY_EVENT_DOWN);
        cm_p->redial_info.ErrRedialScreen = TRUE;
        StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT, ShowRedialScreen);
    }
    else
    {
        /* cannot press key before pop up disappear,
           buy more time for call log writing */
        ClearInputEventHandler(MMI_DEVICE_ALL);
        SetKeyHandler((FuncPtr) GoBackfromNotifyScr, KEY_END, KEY_EVENT_DOWN);
        SetPOPUpFlag(TRUE);
        StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT, GoBackfromNotifyScr);
    }

}