Beispiel #1
0
/*****************************************************************************
 * FUNCTION
 *  mmi_ucm_app_headset_key
 * DESCRIPTION
 *  Handle headset key after receiving GPIO detection. Mainly for GPIO.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_ucm_app_headset_key(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* incoming call exists, headset key is to answer it */
    if (mmi_ucm_get_incoming_group(MMI_UCM_CALL_TYPE_ALL, g_ucm_p->call_misc.index_list) != 0)
    {
        PRINT_INFORMATION("\n[mmi_ucm_app_headset_key] Answer Incoming Call\n");
        mmi_ucm_incoming_call_sendkey();
    }
    /* outgoing call exists, headset key is to abort it */
    else if (mmi_ucm_get_outgoing_group(MMI_UCM_CALL_TYPE_ALL, g_ucm_p->call_misc.index_list) != 0)
    {
        PRINT_INFORMATION("\n[mmi_ucm_app_headset_key] Abort Outgoing Call\n");
        mmi_ucm_outgoing_call_endkey();
    }
    /* in call, headset key is to release current highlight tab call */
    else if (g_ucm_p->call_list.num_group > 0)
    {
        PRINT_INFORMATION("\n[mmi_ucm_app_headset_key] Release Highlight Tab Call\n");
        mmi_ucm_in_call_endkey();
    }
}
Beispiel #2
0
/*****************************************************************************
 * FUNCTION
 *  OutgoingProcessCMFailureEvent
 * DESCRIPTION
 *  This is the Entry function for all the Events while the Call-Management application
 *  is Active.
 *  
 *  This function handles the events from both keyboard and protocol stack.
 *  The keyboard events have KB in there defination and Protocol has PS.
 * PARAMETERS
 *  inEvenType      [IN]        
 *  cause           [IN]        
 *  void(?)         [IN]        *(pointer to the event's associated structure)
 * RETURNS
 *  void
 *****************************************************************************/
void OutgoingProcessCMFailureEvent(CM_EVENT_TYPES inEvenType, U16 cause)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    MMI_TRACE(MMI_TRACE_G5_CM, MMI_CM_FUNC_OutgoingProcessCMFailureEvent);
    switch (inEvenType)
    {
        case CM_PS_CALLCONNECTED:
            /* fail in ss_parse_rsp, dial_ind, connect_ind or
               got release_ind before connect */
            ProcessPSCallConnectFailEvent(cause);
            break;

        case CM_PS_HOLDSUC:     /* hold fail */
        case CM_PS_RETRIEVESUC: /* retreive fail */
        case CM_PS_SWAPSUC:     /* swap fail */
        case CM_PS_CONFSUC:     /* conference fail */
        case CM_PS_SPLITSUC:    /* split fail */
        case CM_PS_ECT_SUC:     /* ECT fail */
            ShowCallManagementErrorMessage(cause, cm_p->ucm_operation);
            break;

        default:
            PRINT_INFORMATION("\n CM Event Handler does not exist \n");
            break;
    }
}
Beispiel #3
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_start_result_hdlr
 * DESCRIPTION
 *  webcam start result handler
 * PARAMETERS
 *  msg_ptr     [IN]        Message pointer
 * RETURNS
 *  void
 *****************************************************************************/
static void mdi_webcam_start_result_hdlr(void *msg_ptr)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_start_cnf_struct *start_data_ptr;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_start_result_hdlr()");

    start_data_ptr = (media_webcam_start_cnf_struct*) msg_ptr;

    if (start_data_ptr->seq_num != g_mdi_webcam_cntx.start_seq_num)
    {
        /* cant match, means already stopped */
        return;
    }

    if (mdi_webcam_event_callback_funcptr != NULL)
    {
        if (start_data_ptr->result == MED_RES_OK)
        {
            mdi_webcam_event_callback_funcptr(MDI_RES_WEBCAM_SUCCEED, start_data_ptr->camera_workable);
        }
        else
        {
            mdi_webcam_event_callback_funcptr(MDI_RES_WEBCAM_ERR_FAILED, start_data_ptr->camera_workable);
        }
    }
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

}
Beispiel #4
0
/*****************************************************************************
 * FUNCTION
 *  ProcessIncomingFailureEvents
 * DESCRIPTION
 *  This function handles all the failure conditions in call management.
 * PARAMETERS
 *  event           [IN]        
 *  cause           [IN]        
 *  Incoming(?)     [IN]        Event Type, Any information associated with the event
 * RETURNS
 *  void
 *****************************************************************************/
void ProcessIncomingFailureEvents(CM_EVENT_TYPES event, U16 cause)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

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

    switch (event)
    {
        case CM_PS_HELD_CALL_ACTIVE:
        case CM_PS_ACTIVE_CALL_HELD:
        case CM_PS_INCOMING_CALL_CONNECTED:
            /* fail to answer incoming call or waiting call */
            //No need to modify state machine in case of ERROR
            //ProcessIncomingFailureCallEvent(cause);
            ShowCallManagementErrorMessage(cause, cm_p->ucm_operation);
            break;

        case CM_PS_INCOMING_CALL_DEFLECT:
        case CM_PS_ACTIVATED_CCBS:
        case CM_PS_CCBS_INVOKE_DIAL:
            ShowCallManagementErrorMessage(cause, cm_p->ucm_operation);
            break;

        default:
            ShowCallManagementErrorMessage(ERR_L4C_GEN_CAUSE, cm_p->ucm_operation);
            PRINT_INFORMATION("File: [%s]  Line: [%d] <<Not Valid State Machine event>>\n", __FILE__, __LINE__);
            break;
    }
}
Beispiel #5
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_abort_indication_hdlr
 * DESCRIPTION
 *  webcam abort indication from driver
 * PARAMETERS
 *  msg_ptr     [IN]        Message pointer
 * RETURNS
 *  void
 *****************************************************************************/
static void mdi_webcam_abort_indication_hdlr(void *msg_ptr)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_abort_ind_struct *abort_data_ptr;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_abort_indication_hdlr()");

    abort_data_ptr = (media_webcam_abort_ind_struct*) msg_ptr;

    if (abort_data_ptr->seq_num != g_mdi_webcam_cntx.start_seq_num)
    {
        /* cant match, means already stopped */
        return;
    }

    if (mdi_webcam_event_callback_funcptr != NULL)
    {
        mdi_webcam_event_callback_funcptr(MDI_RES_WEBCAM_DRV_ABORT, KAL_TRUE);
    }
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

}
Beispiel #6
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_resume
 * DESCRIPTION
 *  resume webcam
 * PARAMETERS
 *  rotate      [IN]        Preview rotate
 * RETURNS
 *  MDI_RESULT
 *****************************************************************************/
MDI_RESULT mdi_webcam_resume(U16 rotate)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_resume_req_struct resume_data;
    S32 ret;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_resume()");

    resume_data.rotate = rotate + CAM_IMAGE_NORMAL;
    ret = media_webcam_resume(MOD_MMI, &resume_data);
    if (ret != MED_RES_OK)
    {
        return MDI_RES_WEBCAM_ERR_FAILED;
    }
    else
    {
        return MDI_RES_WEBCAM_SUCCEED;
    }    
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

    return MDI_RES_WEBCAM_SUCCEED;
}
Beispiel #7
0
/*****************************************************************************
 * FUNCTION
 *  mmi_ucm_app_clam_open
 * DESCRIPTION
 *  Handle clam open after receiving GPIO detection. Mainly for GPIO.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_ucm_app_clam_open(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MMI_ANSWERING_MODE ansMode;
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* clam open accept call will only take effect when there is no pending action */
    if ((mmi_ucm_get_process_state(MMI_UCM_WAIT_PROCESS_STATE, g_ucm_p->call_misc.index_list) == 0) && 
        (mmi_ucm_get_process_state(MMI_UCM_DO_PROCESS_STATE, g_ucm_p->call_misc.index_list) == 0) && 
        (mmi_ucm_get_process_state(MMI_UCM_COMP_PROCESS_STATE, g_ucm_p->call_misc.index_list) == 0))
    {
        PRINT_INFORMATION("\n[mmi_ucm_app_clam_open] No Pending Action\n");
        memcpy(&ansMode, GetAnsweringMode(), sizeof(MMI_ANSWERING_MODE));
        if ((ansMode.coverAnswer == TRUE) && (mmi_ucm_get_incoming_group(MMI_UCM_CALL_TYPE_ALL, g_ucm_p->call_misc.index_list) != 0))
        {
            PRINT_INFORMATION("\n[mmi_ucm_app_clam_open] Ready to Answer Incoming Call\n");
            mmi_ucm_incoming_call_sendkey();
        }
    }
}
Beispiel #8
0
/*****************************************************************************
 * FUNCTION
 *  mmi_ucm_app_clam_close
 * DESCRIPTION
 *  Handle clam close after receiving GPIO detection. Mainly for GPIO.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_ucm_app_clam_close(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (mmi_ucm_app_total_call(MMI_UCM_CALL_TYPE_ALL))
    {                
        PRINT_INFORMATION("\n[mmi_ucm_app_clam_close] In Call, Ready to End All Calls\n");
        mmi_ucm_end_all_action();
    }
}
Beispiel #9
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_stop
 * DESCRIPTION
 *  stop webcam
 * PARAMETERS
 *  void
 * RETURNS
 *  MDI_RESULT
 *****************************************************************************/
MDI_RESULT mdi_webcam_stop(void)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_stop()");

    g_mdi_webcam_cntx.start_seq_num++;
    media_webcam_stop(MOD_MMI);
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

    return MDI_RES_WEBCAM_SUCCEED;
}
void CPHSMMInfoInd(void *msgPtr)
{
    mmi_cphs_mmi_info_ind_struct *mmiIndoInd;
    mmiIndoInd=(mmi_cphs_mmi_info_ind_struct *)msgPtr;
    PRINT_INFORMATION(("<<CPHS>> Recieved CPHS MMI Info Ind"));
    if(mmiIndoInd->is_valid_csp)
        InitialiseCSPInfoArray(mmiIndoInd->csp);
    if(mmiIndoInd->no_info_num)
        InitialiseInformationArray(mmiIndoInd->no_info_num, mmiIndoInd->info_num);
    /****************** Deepali*****************************/
    ServiceIndicationStringDisplay(mmiIndoInd);
    /****************** Deepali*****************************/

#ifdef __MMI_EONS_SUPPORT__
    if( !is_sim_replaced() )
        eons_replace_opn_by_pnn_for_hplmn_req(); // replace opn string
#endif

    GetSettingOptionsStatus();
}
Beispiel #11
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_start
 * DESCRIPTION
 *  start webcam
 * PARAMETERS
 *  rotate              [IN]        Preview rotate
 *  banding             [IN]        Banding
 *  event_callback      [IN]        Webcam event callback
 * RETURNS
 *  MDI_RESULT
 *****************************************************************************/
MDI_RESULT mdi_webcam_start(U16 rotate, U16 banding, mdi_webcam_event_callback event_callback)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_start_req_struct start_data;
    S32 ret;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_start()");

    /* check if size is set or not */
    MMI_ASSERT(g_mdi_webcam_cntx.is_pause_jpeg_size_set);
    MMI_ASSERT(event_callback != NULL);

    SetProtocolEventHandler(mdi_webcam_start_result_hdlr, MSG_ID_MEDIA_WEBCAM_START_CNF);
    SetProtocolEventHandler(mdi_webcam_abort_indication_hdlr, MSG_ID_MEDIA_WEBCAM_ABORT_IND);

    start_data.banding = banding;
    start_data.rotate = rotate + CAM_IMAGE_NORMAL;
    start_data.seq_num = g_mdi_webcam_cntx.start_seq_num;

    mdi_webcam_event_callback_funcptr = event_callback;

    ret = media_webcam_start(MOD_MMI, &start_data);
    if (ret != MED_RES_OK)
    {
        return MDI_RES_WEBCAM_ERR_FAILED;
    }
    else
    {
        return MDI_RES_WEBCAM_SUCCEED;
    }
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

    return MDI_RES_WEBCAM_SUCCEED;
}
Beispiel #12
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_pause
 * DESCRIPTION
 *  pause webcam
 * PARAMETERS
 *  void
 * RETURNS
 *  MDI_RESULT
 *****************************************************************************/
MDI_RESULT mdi_webcam_pause(void)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_pause_req_struct data;
    S32 i;
    S32 ret;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_pause()");

    data.no_of_jpeg_files = 0;
    for (i = 0; i < MDI_WEBCAM_JPG_COUNT; i++)
    {
        if (g_mdi_webcam_cntx.jpg_file_info[i].start_addr != NULL)
        {
            data.no_of_jpeg_files++;
        }
    }

    data.file_info = (webcam_default_jpeg_file_info*) g_mdi_webcam_cntx.jpg_file_info;

    ret = media_webcam_pause(MOD_MMI, (void*)&data);
    if (ret != MED_RES_OK)
    {
        return MDI_RES_WEBCAM_ERR_FAILED;
    }
    else
    {
        return MDI_RES_WEBCAM_SUCCEED;
    }
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

    return MDI_RES_WEBCAM_SUCCEED;
}
Beispiel #13
0
/*****************************************************************************
 * FUNCTION
 *  mmi_ucm_app_make_call_with_source
 * DESCRIPTION
 *  Sample code
 * PARAMETERS
 *  call_type       [IN]            Call type
 *  num_uri			[IN]			Number or URI in unicode string
 * RETURNS
 *  void
 *****************************************************************************/
MMI_BOOL mmi_ucm_app_make_call_with_source(mmi_ucm_module_origin_enum module_id, mmi_ucm_call_type_enum call_type, U8 *num_uri)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S32 unicodeLen = 0;
    U8* num_uri_ascii = NULL;
    MMI_BOOL result = TRUE;
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if ((mmi_bootup_get_active_flight_mode()))
    {
        result = FALSE;
        return result;
    }
#ifdef __MMI_WLAN_FEATURES__
    else if ((mmi_netset_get_active_preferred_mode() == P_WLAN_ONLY) && (call_type != MMI_UCM_VOIP_CALL_TYPE))
    {
        result = FALSE;
        return result;
    }
#endif /* __MMI_WLAN_FEATURES__ */
    else if (mmi_ucm_is_pending_action() == MMI_TRUE)
    {
        result = FALSE;
        return result;
    }

    unicodeLen = (MMI_UCM_MAX_NUM_URI_LEN > mmi_ucs2strlen((S8*)num_uri)) ? (mmi_ucs2strlen((S8*)num_uri)) : (MMI_UCM_MAX_NUM_URI_LEN - 1);
    num_uri_ascii = OslMalloc((unicodeLen + 1) * ENCODING_LENGTH);
    memset(num_uri_ascii, 0, (unicodeLen + 1) * ENCODING_LENGTH);
    mmi_ucs2_n_to_asc((S8*)num_uri_ascii, (S8*)num_uri, unicodeLen * ENCODING_LENGTH);
    
    /* do not check sos number for SAT call */
    if ((module_id != MMI_UCM_FROM_SAT) && (mmi_ucm_is_sos_number(call_type, num_uri_ascii) == TRUE))
    {
        if (mmi_ucm_is_sos_in_call_list() == FALSE)
        {
        #if defined(__MMI_DUAL_SIM_MASTER__)
            mmi_ucm_set_call_channel(call_type);
        #endif /* __MMI_DUAL_SIM_MASTER__ */

            g_ucm_p->mo_info.module_id = module_id;
            g_ucm_p->mo_info.dial_type = call_type;
            memset(g_ucm_p->mo_info.dial_num.num_uri, 0, MMI_UCM_MAX_NUM_URI_LEN);
            mmi_ucs2_n_to_asc((S8*)g_ucm_p->mo_info.dial_num.num_uri, (S8*)num_uri, unicodeLen * ENCODING_LENGTH);

            /* If CSD number is ECC, the CSD call fails while ECC voice should be dialed. */
            if (call_type & MMI_UCM_CSD_CALL_TYPE)
            {
                g_ucm_p->mo_info.dial_type = MMI_UCM_VOICE_CALL_TYPE;
            
                if (g_ucm_p->mo_info.module_id == MMI_UCM_FROM_ABM)
                {
                    g_ucm_p->mo_info.module_id = MMI_UCM_FROM_IDLE;
                }
                result = FALSE;
            }
            else if (call_type & MMI_UCM_CSD_CALL_TYPE_SIM2)
            {
                g_ucm_p->mo_info.dial_type = MMI_UCM_VOICE_CALL_TYPE_SIM2;

                if (g_ucm_p->mo_info.module_id == MMI_UCM_FROM_ABM)
                {
                    g_ucm_p->mo_info.module_id = MMI_UCM_FROM_IDLE;
                }
                result = FALSE;                
            }

            if (mmi_ucm_app_total_call(MMI_UCM_CALL_TYPE_ALL) != 0)
            {
                PRINT_INFORMATION("\n[mmi_ucm_app_make_call_with_source] End All Calls before Dial SOS\n");
                g_ucm_p->mo_info.is_wait_dial = TRUE;
                mmi_ucm_end_all_action();
            }
            else
            {            
                PRINT_INFORMATION("\n[mmi_ucm_app_make_call_with_source] Directly Dial SOS\n");
                g_ucm_p->mo_info.is_wait_dial = TRUE;
                mmi_ucm_dial_action();
            }
        }
        else /* not allow to dial this sos number */
        {
            result = FALSE;
        }        
    }
    else /* not a sos number */
    {
        if (!strlen((S8*)num_uri_ascii)) /* empty number */
        {
            result = FALSE;
        }
        else if ((!mmi_bootup_is_sim_valid()) && 
                 (call_type != MMI_UCM_VOIP_CALL_TYPE) && 
                 !(call_type & MMI_UCM_SIM2_CALL_TYPE_ALL))
        {
            result = FALSE;
        }
    #if defined(__MMI_DUAL_SIM_MASTER__)
        else if ((!mmi_bootup_is_sim2_valid()) &&
                 (call_type & MMI_UCM_SIM2_CALL_TYPE_ALL))
        {
            result = FALSE;
        }
    #endif /* __MMI_DUAL_SIM_MASTER__ */
        /* Data/CSD call priority is lower than voice call priority. */
        else if (mmi_ucm_app_total_call(MMI_UCM_CALL_TYPE_ALL) && (call_type & (MMI_UCM_CALL_TYPE_DATA_CSD_ALL)))
        {
            result = FALSE;
        }
        else if ((mmi_ucm_is_busy() == FALSE) && (mmi_ucm_dial_option() == TRUE))
        {
        #if defined(__MMI_DUAL_SIM_MASTER__)
            mmi_ucm_set_call_channel(call_type);
        #endif /* __MMI_DUAL_SIM_MASTER__ */

            g_ucm_p->mo_info.module_id = module_id;
            g_ucm_p->mo_info.dial_type = call_type;
            memset(g_ucm_p->mo_info.dial_num.num_uri, 0, MMI_UCM_MAX_NUM_URI_LEN);
            mmi_ucs2_n_to_asc((S8*)g_ucm_p->mo_info.dial_num.num_uri, (S8*)num_uri, unicodeLen * ENCODING_LENGTH);
        
            if ((g_ucm_p->mo_info.dial_type & MMI_UCM_VOICE_CALL_TYPE_ALL) && 
                (SS_OPERATION == applib_ss_string_parsing((U8*)g_ucm_p->mo_info.dial_num.num_uri, (U8)strlen((S8*)g_ucm_p->mo_info.dial_num.num_uri))))
            {
                /* dial directly if SS operation or SIM operation */
                mmi_ucm_dial_action();
            }
            else if (mmi_ucm_app_total_call(MMI_UCM_CALL_TYPE_DATA_CSD_ALL) && (g_ucm_p->mo_info.dial_type & MMI_UCM_CALL_TYPE_NO_DATA_CSD))
            {
                /* normal call and data call cannot co-exist */
                PRINT_INFORMATION("\n[mmi_ucm_app_make_call_with_source] End All Calls before Dial %d\n", g_ucm_p->mo_info.dial_type);
                g_ucm_p->mo_info.is_wait_dial = TRUE;
                mmi_ucm_end_all_action();
            }
            else if (mmi_ucm_get_active_group(MMI_UCM_CALL_TYPE_ALL, FALSE, g_ucm_p->call_misc.index_list) == MMI_UCM_MAX_ACTIVE_TAB)
            {
                mmi_ucm_hold_and_dial_action();
            }
            else
            {
                mmi_ucm_dial_action();
            }
            result = TRUE;
        }
        else
        {
            result = FALSE;
        }
    }

    if (result == TRUE)
    {
        /* abort auto redial if necessary */
        if (GetExitScrnID() == SCR_ID_UCM_AUTO_REDIAL ||
            IsScreenPresent(SCR_ID_UCM_AUTO_REDIAL))
        {
            StopTimer(UCM_AUTO_REDIAL_TIMER);
            ClearDelScrnIDCallbackHandler(SCR_ID_UCM_AUTO_REDIAL, NULL);
            
            if (GetExitScrnID() == SCR_ID_UCM_AUTO_REDIAL)
            {
                EntryNewScreen(GLOBAL_SCR_DUMMY, NULL, NULL, NULL);
            }

            DeleteScreenIfPresent(SCR_ID_UCM_AUTO_REDIAL);
            if (g_ucm_p->auto_redial.abort_hdlr)
            {
                g_ucm_p->auto_redial.abort_hdlr();                
            }
            memset(&g_ucm_p->auto_redial, 0, sizeof(mmi_ucm_auto_redial_struct));
        }
    }

    OslMfree(num_uri_ascii);
    return result;
}
Beispiel #14
0
/*****************************************************************************
 * FUNCTION
 *  ProcessPSCallConnectFailEvent
 * DESCRIPTION
 *  This is the function to process Protocol(Response) failure Event.
 * PARAMETERS
 *  cause       [IN]        
 *  void(?)     [IN]        *(this points to CM_CALL_HANDLE of the call which requested CM_KB_OUTGOINGCALL)
 * RETURNS
 *  void
 *****************************************************************************/
void ProcessPSCallConnectFailEvent(U16 cause)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    CM_CALL_HANDLE callHandle;
    U8 type;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

    SetCallEndCause(cause);
    
    if (GetCCFlag() == TRUE)
    {
        callHandle = GetOutgoingCallHandle();

        if (callHandle == -1)
        {
            PRINT_INFORMATION("\n ProcessPSCallConnectFailEvent Getting the Connected Handle has -1 \n");
            return;
        }

        switch (GetCurrentState())
        {
                /* amanda add 0326, MO MT collision */
            case CM_INCOMING_STATE:
                PurgeOutgoingCallsStructure();
                cause = 0;
                break;

            case CM_OUTGOING_STATE:
                type = GetOutgoingCallType();
                PurgeOutgoingCallsStructure();
                
                if (GetTotalCallCount() == 0)
                {
                    SetCurrentState(CM_IDLE_STATE);
                }
                else
                {
                    SetCurrentState(GetPreviousState());
                }
                SetPreviousState(CM_OUTGOING_STATE);
                
                if (GetTotalCallCount() == 0)
                {
                    /* only voice call can redial */
                #ifdef __MMI_VIDEO_TELEPHONY__
                    if ((type != CM_VOICE_CALL && type != CSMCC_VIDEO_CALL) || (IsRedialNeeded(cause) == FALSE))
                #else /* __MMI_VIDEO_TELEPHONY__ */
                    if ((type != CM_VOICE_CALL) || (IsRedialNeeded(cause) == FALSE))
                #endif/* __MMI_VIDEO_TELEPHONY__ */ 
                    {
                        /* no need to redial, just show error and get out of CM */
                        /*ShowCallManagementErrorMessage(cause, cm_p->ucm_operation);*/
                        SetCallEndCause(cause);
                        mmi_gsm_release_ind(GetCallEndCause());
                        return;
                    }
                    else
                    {
                        /* need to redial, show error and redial */
                        if (IsRedialSet())
                        {
                            SetCallEndedBeforeConnFlag(FALSE);
                            CheckRedialOrShowError(cause);
        					/* abort SS if needed */
                            return;
                        }
                    }
                }
                /* still have other call, can't redial, just show error */
                break;

            default:
                PRINT_INFORMATION("\n ProcessPSCallConnectFailEvent CM State m/c Corrupted \n");
                break;
        }
    }

    if(cm_p->ucm_operation == MMI_GSM_UCM_DIAL)
    {
        /*SS_PARSING_RSP FAIL*/
        ShowCallManagementErrorMessage(cause, cm_p->ucm_operation);
    }
    else if(cm_p->ucm_operation == MMI_GSM_UCM_HOLD_AND_DIAL)
    {
        /*SS_PARSING_RSP FAIL*/
        ShowCallManagementErrorMessage(cause, cm_p->ucm_operation);
    }
#ifdef __MMI_DUAL_SIM_MASTER__
    else if(cm_p->slave_ss_session)
    {
        MTPNP_PFAL_CC_UCMShowCallErrorMessage(cause,MMI_GSM_UCM_IDLE);
        mmi_gsm_set_slave_ss_falg(FALSE);
    }
#endif /* __MMI_DUAL_SIM_MASTER__ */    
    else
    {
        mmi_gsm_release_ind(GetCallEndCause());
    }
    return;
}
Beispiel #15
0
/*****************************************************************************
 * FUNCTION
 *  CheckAndPrintMsgId
 * DESCRIPTION
 *  Checks and Prints Msg Ids Recieved from L4
 * PARAMETERS
 *  Id      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void CheckAndPrintMsgId(U16 Id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    switch (Id)
    {
        case MSG_ID_MMI_CC_SPEECH_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_SPEECH_IND ***\n");
            break;
        case MSG_ID_MMI_CC_CALL_RELEASE_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_CALL_RELEASE_IND ***\n");
            break;
        case MSG_ID_MMI_CC_START_DTMF_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_START_DTMF_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_STOP_DTMF_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_STOP_DTMF_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_DIAL_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_DIAL_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_GET_CALL_LIST_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_GET_CALL_LIST_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_GET_CALL_LIST_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_GET_CALL_LIST_REQ ***\n");
            break;
        case MSG_ID_MMI_CC_CHLD_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_CHLD_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_ATH_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_ATH_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_CALL_RING_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_CALL_RING_IND ***\n");
            break;
        case MSG_ID_MMI_CC_ATA_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_ATA_RSP ***\n");
            break;
        case MSG_ID_MMI_EQ_SET_SPEECH_MODE_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_EQ_SET_SPEECH_MODE_RSP ***\n");
            break;
        case MSG_ID_MMI_CC_DIAL_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_DIAL_IND ***\n");
            break;
        case MSG_ID_MMI_CC_CALL_CONNECT_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_CALL_CONNECT_IND ***\n");
            break;
        case MSG_ID_MMI_CC_CALL_WAIT_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_CALL_WAIT_IND ***\n");
            break;
        case MSG_ID_MMI_CC_ATA_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_ATA_REQ ***\n");
            break;
        case MSG_ID_MMI_CC_ATH_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_ATH_REQ ***\n");
            break;
        case MSG_ID_MMI_CC_CHLD_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_CHLD_REQ ***\n");
            break;
        case MSG_ID_MMI_CC_DIAL_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_DIAL_REQ ***\n");
            break;
        case MSG_ID_MMI_CC_START_DTMF_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_START_DTMF_REQ ***\n");
            break;
        case MSG_ID_MMI_CC_STOP_DTMF_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_STOP_DTMF_REQ ***\n");
            break;
        case MSG_ID_MMI_SS_USSD_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_SS_USSD_REQ ***\n");
            break;
        case MSG_ID_MMI_SS_CALL_FORWARD_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_SS_CALL_FORWARD_REQ ***\n");
            break;
        case MSG_ID_MMI_EQ_SET_SPEECH_MODE_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_EQ_SET_SPEECH_MODE_REQ ***\n");
            break;
        case MSG_ID_MMI_EQ_PLAY_AUDIO_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_EQ_PLAY_AUDIO_REQ***\n");
            break;
        case MSG_ID_MMI_EQ_PLAY_AUDIO_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_EQ_PLAY_AUDIO_RSP***\n");
            break;
        case MSG_ID_MMI_EQ_STOP_AUDIO_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_EQ_STOP_AUDIO_REQ***\n");
            break;
        case MSG_ID_MMI_EQ_STOP_AUDIO_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_EQ_STOP_AUDIO_RSP***\n");
            break;
        case MSG_ID_MMI_SS_PARSING_STRING_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_SS_PARSING_STRING_REQ***\n");
            break;
        case MSG_ID_MMI_SS_PARSING_STRING_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_SS_PARSING_STRING_RSP***\n");
            break;
        case MSG_ID_MMI_CC_INTERNAL_ALERT_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_INTERNAL_ALERT_IND***\n");
            break;
        case MSG_ID_MMI_CC_NOTIFY_SS_IND:
            PRINT_INFORMATION("*** MSG_ID_MMI_CC_NOTIFY_SS_IND***\n");
            break;
        case MSG_ID_MMI_CC_CALL_DEFLECT_REQ:
            PRINT_INFORMATION("*** MSG_ID_MMI_SS_CALL_DEFLECT_REQ***\n");
            break;
        case MSG_ID_MMI_CC_CALL_DEFLECT_RSP:
            PRINT_INFORMATION("*** MSG_ID_MMI_SS_CALL_DEFLECT_RSP***\n");
            break;
        default:
            /* custom_print ("*** Non CC Message ***\n"); */
            break;
    }
}
Beispiel #16
0
void CheckAndPrintMsgId	(U32 Id)
{
#ifdef MMI_ON_HARDWARE_P
	switch (Id) {
	case MSG_ID_MMI_CC_SPEECH_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_SPEECH_IND ***\n"));
		break;
	case MSG_ID_MMI_CC_CALL_RELEASE_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_CALL_RELEASE_IND ***\n"));
		break;
	case MSG_ID_MMI_CC_START_DTMF_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_START_DTMF_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_STOP_DTMF_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_STOP_DTMF_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_DIAL_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_DIAL_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_GET_CALL_LIST_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_GET_CALL_LIST_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_GET_CALL_LIST_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_GET_CALL_LIST_REQ ***\n"));
		break;
	case MSG_ID_MMI_CC_CHLD_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_CHLD_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_ATH_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_ATH_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_CALL_RING_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_CALL_RING_IND ***\n"));
		break;
	case MSG_ID_MMI_CC_ATA_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_ATA_RSP ***\n"));
		break;
	case MSG_ID_MMI_EQ_SET_SPEECH_MODE_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_EQ_SET_SPEECH_MODE_RSP ***\n"));
		break;
	case MSG_ID_MMI_CC_DIAL_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_DIAL_IND ***\n"));
		break;
	case MSG_ID_MMI_CC_CALL_CONNECT_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_CALL_CONNECT_IND ***\n"));
		break;
	case MSG_ID_MMI_CC_CALL_WAIT_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_CALL_WAIT_IND ***\n"));
		break;
	case MSG_ID_MMI_CC_ATA_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_ATA_REQ ***\n"));
		break;
	case MSG_ID_MMI_CC_ATH_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_ATH_REQ ***\n"));
		break;
	case MSG_ID_MMI_CC_CHLD_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_CHLD_REQ ***\n"));
		break;
	case MSG_ID_MMI_CC_DIAL_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_DIAL_REQ ***\n"));
		break;
	case MSG_ID_MMI_CC_START_DTMF_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_START_DTMF_REQ ***\n"));
		break;
	case MSG_ID_MMI_CC_STOP_DTMF_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_STOP_DTMF_REQ ***\n"));
		break;
	case MSG_ID_MMI_SS_USSD_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_SS_USSD_REQ ***\n"));
		break;
	case MSG_ID_MMI_SS_CALL_FORWARD_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_SS_CALL_FORWARD_REQ ***\n"));
		break;
	case MSG_ID_MMI_EQ_SET_SPEECH_MODE_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_EQ_SET_SPEECH_MODE_REQ ***\n"));
		break;
	case MSG_ID_MMI_EQ_PLAY_AUDIO_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_EQ_PLAY_AUDIO_REQ***\n"));
		break;
	case MSG_ID_MMI_EQ_PLAY_AUDIO_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_EQ_PLAY_AUDIO_RSP***\n"));
		break;
	case MSG_ID_MMI_EQ_STOP_AUDIO_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_EQ_STOP_AUDIO_REQ***\n"));
		break;
	case MSG_ID_MMI_EQ_STOP_AUDIO_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_EQ_STOP_AUDIO_RSP***\n"));
		break;
	case MSG_ID_MMI_SS_PARSING_STRING_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_SS_PARSING_STRING_REQ***\n"));
		break;
	case MSG_ID_MMI_SS_PARSING_STRING_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_SS_PARSING_STRING_RSP***\n"));
		break;
	case MSG_ID_MMI_CC_INTERNAL_ALERT_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_INTERNAL_ALERT_IND***\n"));
		break;
	case MSG_ID_MMI_CC_NOTIFY_SS_IND:
		PRINT_INFORMATION (("*** MSG_ID_MMI_CC_NOTIFY_SS_IND***\n"));
		break;
	case MSG_ID_MMI_CC_CALL_DEFLECT_REQ:
		PRINT_INFORMATION (("*** MSG_ID_MMI_SS_CALL_DEFLECT_REQ***\n"));
		break;
	case MSG_ID_MMI_CC_CALL_DEFLECT_RSP:
		PRINT_INFORMATION (("*** MSG_ID_MMI_SS_CALL_DEFLECT_RSP***\n"));
		break;
	default:
		//custom_print ("*** Non CC Message ***\n");
		break;
	}
#endif
}
Beispiel #17
0
void MTPNP_PFAL_Show_NetWorkFlag(void)
{
#if 0
/* 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 /* 0 */
    MTPNP_BOOL OPN_Exist;
    MTPNP_BOOL SPN_Exist;
    MTPNP_BOOL MSISDN_Exist;
    MTPNP_UINT8 Scenario;
    MTPNP_UINT8 MSISDN_Flag;

    extern MTPNP_UINT8 gOpNameValid_2;
    extern MTPNP_UINT8 gSpnValid_2;
    extern MTPNP_UINT8 gPLMN_2[];

    extern idle_nitz_struct g_nitz_display_2;

    MTPNP_PFAL_Read_Show_Owner_Number_Flag(&MSISDN_Flag);
    MSISDN_Exist = ((MTPNP_BOOL) MSISDN_Flag) && (MTPNP_PFAL_Unicode_String_Length((MTPNP_CHAR *) g_slave_ownername) != 0);

    OPN_Exist = gOpNameValid_2 && (MTPNP_PFAL_Unicode_String_Length((MTPNP_CHAR *) g_slave_operatorname) != 0) /* && SHOW_OPN */ ;
    SPN_Exist = gSpnValid_2 && (MTPNP_PFAL_Unicode_String_Length((MTPNP_CHAR *) g_slave_servprovderName) != 0);

    if (IsChineseSet() && mmi_idle_is_camp_on_chinese_network(gPLMN_2) && !MTPNP_AD_Card2_IsRoam()) /* Trad. Chinese and Simp. Chinese only */
    {
        /* Ignore OPN because OPN does not have UCS2 encoding */
        Scenario = (gSpnValid_2 ? 2 : 0) + (MTPNP_PFAL_Is_Show_OPN() ? 1 : 0);
    }
    else
    {
        /* OPN*4 + SPN*2+ b1*1 */
        Scenario = (gOpNameValid_2 ? 4 : 0) + (gSpnValid_2 ? 2 : 0) + (MTPNP_PFAL_Is_Show_OPN() ? 1 : 0);
    }

    switch (Scenario)   /* OPN--SPN--b1 */
    {
        case 0:                             /* OPN=OFF, SPN=OFF, b1=0 */
        case 1:                             /* OPN=OFF, SPN=OFF, b1=1 */
            MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
            if (MSISDN_Exist)
            {
                MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2: Owner Name */
            }
            break;

        case 2: /* OPN=OFF, SPN=ON, b1=0 */
            if (MSISDN_Exist)
            {
                if (MTPNP_AD_Card2_IsRoam()/* && !mmi_idle_is_rplmn_in_spdi_list()*/)
                {
                    MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                    if (SPN_Exist/* && !mmi_idle_is_spn_b2_set()*/ && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_nw_providername) != 0)
                    {
                        MTPNP_PFAL_Show_Idle_SPN();  /* Line 2 = SPN */
                    }
                    else
                    {
                        MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2: Owner Name */
                    }
                }
                else
                {
                    MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2: Owner Name */
                    if (SPN_Exist)
                    {
                        SetLine3Text((MTPNP_UINT8*) g_slave_servprovderName); /* Line 1 = SPN */
                    }
                }
            }
            else
            {
                if (MTPNP_AD_Card2_IsRoam()/* && !mmi_idle_is_rplmn_in_spdi_list()*/)
                {
                    MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                    if (SPN_Exist/* && !mmi_idle_is_spn_b2_set()*/ && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_nw_providername) != 0)
                    {
                        MTPNP_PFAL_Show_Idle_SPN();  /* Line 2 = SPN */
                    }
                }
                else
                {
                    if (SPN_Exist)
                    {
                        SetLine3Text((MTPNP_UINT8*) g_slave_servprovderName);  /* Line 1 = SPN */
                    }
                    else
                    {
                        MTPNP_PFAL_Show_Idle_OPN();  /* Line 2 = NULL */
                    }
                }
            }
            break;

        case 3:                             /* OPN=OFF, SPN=ON, b1=1 */
            MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
            if (MTPNP_AD_Card2_IsRoam()/* && !mmi_idle_is_rplmn_in_spdi_list()*/)
            {
                if (SPN_Exist/* && !mmi_idle_is_spn_b2_set()*/ && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_nw_providername) != 0)
                {
                    MTPNP_PFAL_Show_Idle_SPN();  /* Line 2 = SPN */
                }
                else if (MSISDN_Exist)
                {
                    MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2: Owner Name */
                }
                else
                {
                    SetLine4Text((MTPNP_UINT8*) NULL);
                }
            }
            else
            {
                if (SPN_Exist && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_nw_providername) != 0)
                {
                    MTPNP_PFAL_Show_Idle_SPN();  /* Line 2 = SPN */
                }
                else if (MSISDN_Exist)
                {
                    MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2: Owner Name */
                }
                else
                {
                    SetLine4Text((MTPNP_UINT8*) NULL);
                }
            }
            break;

        case 4: /* OPN=ON, SPN=OFF, b1=0 */
        case 5: /* OPN=ON, SPN=OFF, b1=1 */
            if (MTPNP_AD_Card2_IsRoam() == MMI_TRUE)
            {
                MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                if (OPN_Exist)
                {
                    SetLine4Text((MTPNP_UINT8*) g_slave_operatorname); /* Line 2 = OPN */
                }
                else    /* They are both valid but NULL */
                {
                    SetLine4Text((MTPNP_UINT8*) NULL);
                }
            }
            else
            {
                if (OPN_Exist)
                {
                    SetLine3Text((MTPNP_UINT8*) g_slave_operatorname); /* Line 1 = OPN */
                }
                else    /* They are both valid but NULL */
                {
                    MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                }
                if (MSISDN_Exist)
                {
                    MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2 = Owner Name */
                }
            }
            break;

        case 6: /* OPN=ON, SPN=ON, b1=0 */
        case 7: /* OPN=ON, SPN=ON, b1=1 */
            if (MTPNP_AD_Card2_IsRoam() == MMI_TRUE/* && !mmi_idle_is_rplmn_in_spdi_list()*/)
            {
                MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                if (SPN_Exist && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_nw_providername) != 0)
                {
                    MTPNP_PFAL_Show_Idle_SPN();      /* Line 2 = SPN */
                }
                else if (MSISDN_Exist)
                {
                    MTPNP_PFAL_Show_Idle_OwnerName();
                }
                else
                {
                    SetLine4Text((MTPNP_UINT8*) NULL);
                }
            }
            else
            {
                if (OPN_Exist)
                {
                    SetLine3Text((MTPNP_UINT8*) g_slave_operatorname); /* Line 1 = OPN */
                    if (SPN_Exist/* && !mmi_idle_is_spn_b2_set()*/ && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_operatorname) != 0)
                    {
                        MTPNP_PFAL_Show_Idle_SPN();  /* Line 2 = SPN */
                    }
                    else if (MSISDN_Exist)
                    {
                        MTPNP_PFAL_Show_Idle_OwnerName();        /* Line 2 = MSISDN */
                    }
                    else
                    {
                        SetLine4Text((MTPNP_UINT8*) NULL);
                    }
                }
                else    /* They are both valid but NULL */
                {
                    if (MTPNP_PFAL_Is_Show_OPN())
                    {
                        MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                        if (SPN_Exist && mmi_ucs2icmp((S8*) g_slave_servprovderName, (S8*) g_slave_nw_providername) != 0)
                        {
                            MTPNP_PFAL_Show_Idle_SPN();  /* Line 2 = SPN */
                        }
                        else if (MSISDN_Exist)
                        {
                            MTPNP_PFAL_Show_Idle_OwnerName();        /* Line 2 = MSISDN */
                        }
                        else
                        {
                            SetLine4Text((MTPNP_UINT8*) NULL);
                        }
                    }
                    else
                    {
                        if (SPN_Exist)
                        {
                            SetLine3Text((MTPNP_UINT8*) g_slave_servprovderName);  /* Line 1: SPN */
                        }
                        else
                        {
                            MTPNP_PFAL_Show_Idle_OPN();  /* Line 1 = PLMN */
                        }

                        if (MSISDN_Exist)
                        {
                            MTPNP_PFAL_Show_Idle_OwnerName(); /* Line 2: Owner Name */
                        }
                    }
                }
            }
            break;

        default:
            MMI_ASSERT(0);
            break;
    }

#ifdef __MMI_NITZ__
    mmi_idle_update_sim2_nitz_content();
    if (g_nitz_display_2.opname_from_nitz && mmi_idle_check_sim2_nitz_display_validation())
    {
        PRINT_INFORMATION("[Idle] Network name from NITZ");
        if (MTPNP_AD_Card2_IsRoam())
        {
            /* Roaming and receive NITZ network name */
            SetLine3Text(g_nitz_display_2.display_name);
        }
        else if (!OPN_Exist && mmi_idle_is_spn_b1_set()) /* not roaming but no OPN */
        {
            /* Network name from NITZ takes lower priority from OPN, but not replace SPN */
            SetLine3Text(g_nitz_display_2.display_name);
        }
    }
#endif /* __MMI_NITZ__ */ 
}
Beispiel #18
0
/*****************************************************************************
 * FUNCTION
 *  ProcessPSCallConnectFailEvent
 * DESCRIPTION
 *  This is the function to process Protocol(Response) failure Event.
 * PARAMETERS
 *  cause       [IN]        
 *  void(?)     [IN]        *(this points to CM_CALL_HANDLE of the call which requested CM_KB_OUTGOINGCALL)
 * RETURNS
 *  void
 *****************************************************************************/
void ProcessPSCallConnectFailEvent(U16 cause)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    CM_CALL_HANDLE callHandle;
    U8 type;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (GetCCFlag() == TRUE)
    {
        callHandle = GetOutgoingCallHandle();

        if (callHandle == -1)
        {
            PRINT_INFORMATION("\n ProcessPSCallConnectFailEvent Getting the Connected Handle has -1 \n");
            return;
        }

        switch (GetCurrentState())
        {
                /* amanda add 0326, MO MT collision */
            case CM_INCOMING_STATE:
                PurgeOutgoingCallsStructure();
                cause = 0;
                break;

            case CM_OUTGOING_STATE:
                type = GetOutgoingCallType();
                PurgeOutgoingCallsStructure();
                SetCurrentState(GetPreviousState());
                SetPreviousState(CM_OUTGOING_STATE);
                if (GetTotalCallCount() == 0)
                {
                    /* only voice call can redial */
                    if ((type != CM_VOICE_CALL) || (IsRedialNeeded(cause) == FALSE))
                    {
                        /* no need to redial, just show error and get out of CM */
                        ShowCallManagementErrorMessage(cause);
                        GetOutOfCMforAdjustHistory();
                        return;
                    }
                    else
                    {
                        /* need to redial, show error and redial */
                        if (IsRedialSet())
                        {
                            SetCallEndedBeforeConnFlag(FALSE);
                            CheckRedialOrShowError(cause);
        					/* abort SS if needed */
                            DeleteScreenIfPresent(ITEM_SCR_USSN_MSG);
                            return;
                        }
                    }
                }
                /* still have other call, can't redial, just show error */
                break;

            default:
                PRINT_INFORMATION("\n ProcessPSCallConnectFailEvent CM State m/c Corrupted \n");
                break;
        }
    }
    ShowCallManagementErrorMessage(cause);
}