Пример #1
0
/*************************************************************
**	FUNCTION NAME		: EntryCSBStartView
**
** 	PURPOSE				: Enrty function for CSB Start View
**
**	INPUT PARAMETERS	: nil
**
**	OUTPUT PARAMETERS	: void
**
**	RETURNS				: void
**
**	REMARKS			: 
***************************************************************/
void EntryCSBStartView(void)
{

	/* ASSERT if none of AUTO or MANUAL mode is selected -- should never happen */
	ASSERT(g_CSB_struct.csb_settings.view_mode == VIEW_MODE_AUTO || g_CSB_struct.csb_settings.view_mode == VIEW_MODE_MANUAL);
	
	if(SEARCH_BY_VIEW == csb_frm_get_search_mode())
	{
		/* Check for AUTO or MANUAL mode */
		if(VIEW_MODE_AUTO == g_CSB_struct.csb_settings.view_mode)		
		{
			/* In AUTO mode, the back light must be ON always */
			TurnOnBacklight(0);							
			csb_frm_start_view_auto();
		} 
		else if(VIEW_MODE_MANUAL == g_CSB_struct.csb_settings.view_mode)
		{
			csb_frm_start_view_manual();
		}
	}
	/* In case of Search by Scr ID, the entered category screen should be displayed directly */
	else if(SEARCH_BY_SCREENID == csb_frm_get_search_mode())
	{
		/* This flag disables the key handlers which are not required */
		g_CSB_struct.pscreen_info[g_CSB_struct.screen_counter].entryFuncPtr();
	}
	/* If the search mode is CONT or APP, after any async eventsame screen shall appear */
	else if(SEARCH_BY_CONTROL == csb_frm_get_search_mode()
			||
			SEARCH_BY_APP == csb_frm_get_search_mode())
	{
		entry_csb_show_cat_scr();
	}
}
Пример #2
0
/*****************************************************************************
 * FUNCTION
 *  mmi_opp_scr_recv_obj_ind
 * DESCRIPTION
 *  This function is to display popup sceren when receiving file
 * PARAMETERS
 *  cause       [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_opp_scr_recv_obj_ind(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    static BOOL previousInVdoApp=0;
	
     if (opp_suppress_popup_flag == MMI_TRUE ||
       (isInCall() && !GetWapCallPresent()))
    {
        /*
         * If the applications won't want to show the WAP/MMS popup or
         * the handset has the voice call, 
         * we return here directly.
         */
         g_NeedRecheckOppRecv = 1;
        return ;
    }
    MMI_OPP_RECV_IND_STR()  ;

    if ((isInCall() != MMI_TRUE) || (IsWapCallPresent()) ||opp_suppress_popup_flag==MMI_FALSE)
    {
#if defined(__MMI_VIDEO_PLAYER__)
        /* Play warning tone to notify file saved */
        if (mmi_vdoply_is_in_app())
        {
		DisplayPopup(mmi_opp_recv_notify_str, IMG_GLOBAL_ACTIVATED, 1, UI_POPUP_NOTIFYDURATION_TIME, WARNING_TONE);	
		g_NeedRecheckOppRecv = 1;
		previousInVdoApp = 1;
        }
	 else
#endif
	 {
	 	if (previousInVdoApp)
	 	{
	 		previousInVdoApp = 0;
			mmi_opp_entry_idle_notify_scr();
	 	}
		else
			DisplayPopupCallBack(mmi_opp_recv_notify_str, IMG_GLOBAL_ACTIVATED, 1, UI_POPUP_NOTIFYDURATION_TIME, WARNING_TONE,mmi_opp_entry_idle_notify_scr);
	 	MMI_OPP_CTX(cur_recv_file_cnt) = 0;
	 }
    }
/*
    if (g_idle_context.IsOnIdleScreen || GetActiveScreenId() == SCR_OPP_NOTY_FILE_RECV)
    {
        EntryIdleScreen();
    }
    else
    {
//	mmi_opp_entry_idle_notify_scr();
    }
    */
    TurnOnBacklight(1);
}
Пример #3
0
/*****************************************************************************
 * FUNCTION
 *  mmi_vrsi_entry_redial_dial_prompt
 * DESCRIPTION
 *  This function is entry function of redial prompt
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_vrsi_entry_redial_dial_prompt(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S8 str_prompt[MMI_VRSI_MAX_PROMPT_STR * ENCODING_LENGTH];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    mmi_vrsi_redial_dial_prompt_message(str_prompt);

    TurnOnBacklight(1);

    EntryNewScreen(SCR_ID_VRSI_REDIAL_PROMPT, mmi_vrsi_exit_redial_dial_prompt, NULL, NULL);

    ShowCategory66Screen(
        STR_ID_VRSI_APP,
        MAIN_MENU_TITLE_MULTIMEDIA_ICON,
        STR_GLOBAL_DIAL,    /* LSK STR */
        0,                  /* LSK IMG */
        STR_GLOBAL_ABORT,   /* RSK STR */
        0,                  /* RSK IMG */
        (U8*) str_prompt,   /* message id */
        0,                  /* icon id */
        NULL);

    SetLeftSoftkeyFunction(mmi_vrsi_redial_dial_number, KEY_EVENT_UP);
    SetRightSoftkeyFunction(mmi_vrsi_rcg_abort, KEY_EVENT_UP);
#ifdef __MMI_DUAL_SIM_MASTER__
    MTPNP_PFAL_CC_HandleSendKeys(mmi_vrsi_redial_dial_number,KEY_EVENT_UP);
#else   /* __MMI_DUAL_SIM_MASTER__ */
    SetKeyHandler(mmi_vrsi_redial_dial_number, KEY_SEND, KEY_EVENT_UP);
#endif  /* __MMI_DUAL_SIM_MASTER__ */

    /* Play prompt TTS */
    mmi_vrsi_util_play_tts((U16*) str_prompt, mmi_vrsi_redial_dial_number);

}
Пример #4
0
/*****************************************************************************
 * FUNCTION
 *  mmi_opp_entry_recv_confirm_scr
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_opp_entry_recv_confirm_scr(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (isIncomingCall() )
    {
        mmi_opp_add_history_before_cm_marker(SCR_OPP_NOTY_RECV_ACCEPT,mmi_opp_entry_recv_confirm_scr);
        return;
    }
        
    MMI_OPP_BUILD_RECV_ACCEPT_NOTY_STR();

    EntryNewScreen(SCR_OPP_NOTY_RECV_ACCEPT, NULL, mmi_opp_entry_recv_confirm_scr, NULL);

    SetDelScrnIDCallbackHandler(SCR_OPP_NOTY_RECV_ACCEPT, (HistoryDelCBPtr) NULL);
    DeleteScreenIfPresent(SCR_OPP_NOTY_RECV_ACCEPT);

    ShowCategory165Screen(
        STR_GLOBAL_YES,
        IMG_GLOBAL_YES,
        STR_GLOBAL_NO,
        IMG_GLOBAL_NO,
        (UI_string_type) mmi_opp_idle_notify_str,
        IMG_GLOBAL_QUESTION,
        NULL);

    SetLeftSoftkeyFunction(mmi_opp_accept_file_recv, KEY_EVENT_UP);
    SetRightSoftkeyFunction(mmi_opp_reject_file_recv, KEY_EVENT_UP);
    SetDelScrnIDCallbackHandler(SCR_OPP_NOTY_RECV_ACCEPT, (HistoryDelCBPtr) mmi_opp_confirm_del_cb);

    TurnOnBacklight(1);
}
Пример #5
0
/*****************************************************************************
 * FUNCTION
 *  mmi_vrsi_entry_prf_switch_prompt
 * DESCRIPTION
 *  Entry function of switch profile mode.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_vrsi_entry_prf_switch_prompt(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S8 str_prompt[MMI_VRSI_MAX_PROMPT_STR * ENCODING_LENGTH];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    mmi_vrsi_prf_switch_prompt_message(str_prompt);

    TurnOnBacklight(1);

    EntryNewScreen(SCR_ID_VRSI_SWITCH_PROFILE_PROMPT, mmi_vrsi_exit_prf_switch_prompt, NULL, NULL);

    ShowCategory66Screen(
        STR_ID_VRSI_APP,
        MAIN_MENU_TITLE_MULTIMEDIA_ICON,
        0,                  /* LSK STR */
        0,                  /* LSK IMG */
        STR_GLOBAL_ABORT,   /* RSK STR */
        0,                  /* RSK IMG */
        (U8*) str_prompt,   /* message id */
        0,                  /* icon id */
        NULL);

    SetRightSoftkeyFunction(mmi_vrsi_rcg_abort, KEY_EVENT_UP);

    //g_vrsi_cntx.curr_grammar = MMI_VRSI_GRAMMAR_DIGIT;
    //g_vrsi_cntx.curr_scenario = VRSI_CMD1_DIGIT_DIAL;

    /* Play prompt TTS */
    mmi_vrsi_util_play_tts((U16*) str_prompt, mmi_vrsi_prf_switch_mode);

    /* g_vrsi_cntx.retry++; */
}
Пример #6
0
void SFApp_SetupGDI(void)
{
	gdi_handle gdi_hdlr;
	lcd_power_up();
	entry_full_screen();

	gdi_layer_reset_clip();
	gdi_layer_get_base_handle(&gdi_hdlr);
	gdi_layer_set_blt_layer(gdi_hdlr,0,0,0);

	gdi_layer_set_active(gdi_hdlr);
	gdi_layer_clear(GDI_COLOR_BLACK);
		
	TurnOnBacklight(0);

	gdi_layer_blt_ext(GDI_LAYER_MAIN_BASE_LAYER_HANDLE, 0, 0, 0,
			#ifdef GDI_6_LAYERS
						0, 0,
			#endif
						0, 0, LCD_WIDTH-1, LCD_HEIGHT-1);	

    gdi_layer_lock_frame_buffer();

	mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);
/*
	gdi_handle gdi_hdlr;
	lcd_power_up();
	entry_full_screen();

	gdi_layer_reset_clip();
	gdi_layer_get_base_handle(&gdi_hdlr);
	gdi_layer_set_blt_layer(gdi_hdlr,0,0,0);

	gdi_layer_set_active(gdi_hdlr);
	mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);
*/
}
Пример #7
0
void SpofEntryPwrOffInd(void)
{
	mmi_trace(1," SpofEntryPwrOffInd ");
	
	TurnOnBacklight(1);
	
	EntryNewScreen(SCR_ID_SPOF_PWROFF_IND, NULL, SpofEntryPwrOffInd, NULL);

	ClearAllKeyHandler();
	ClearKeyHandler( KEY_END, KEY_EVENT_DOWN );
	ClearKeyHandler( KEY_END, KEY_LONG_PRESS );
	/*modify the right softkey caption from "Back" to "Cancel" by liuxl on 20090626*/
	ShowCategory66Screen(  SPOF_MAIN_TITLE_STRINGID,
                                            #if defined(__PROJECT_GALLITE_C01__)
							NULL,
                                            #else
							SPOF_TYPEPOWEROFF_IMAGEID,
                                            #endif
							STR_GLOBAL_OK, 0, 
							STR_GLOBAL_CANCEL, 0, 
							(PU8)GetString(SPOF_POWER_OFF_CONFIRM), 
                                            #if defined(__PROJECT_GALLITE_C01__)
							NULL,
                                            #else
							SPOF_TYPEPOWEROFF_IMAGEID,
                                            #endif 
							NULL);

	SetLeftSoftkeyFunction(ShutdownSystemOperation, KEY_EVENT_UP);
	//wangzl: 090912 modify for 14334
	//SetRightSoftkeyFunction(QuitPwrOffIndBackToIdleScreen, KEY_EVENT_UP);
	SetRightSoftkeyFunction(QuitPwrOffIndBack, KEY_EVENT_UP);
	//wangzl: 090912 modify end

	StartTimer(SYSTEM_SHUTDOWN, 10*1000, ShutdownSystemOperation);
}
Пример #8
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 .. */
    }

}
Пример #9
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);
    }

}