/*****************************************************************************
 * FUNCTION
 *  mmi_fmsr_pause_record
 * DESCRIPTION
 *  Pause FM radio record
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_fmsr_pause_record(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    mdi_result result;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (g_fmsr_cntx.rec.state == FMSR_STATE_RECORD)
    {
        result = mdi_fmr_pause_record();

        mmi_fmsr_update_duration();
        if (result == MDI_AUDIO_SUCCESS)
        {
            g_fmsr_cntx.rec.state = FMSR_STATE_PAUSE;
            mmi_fmsr_change_pause_screen();
            mmi_fmsr_redraw_LSK_up();   /* add to fix redraw LSK issue */
        }
        else    /* Can't pause, stop recording */
        {
            g_fmsr_cntx.rec.state = FMSR_STATE_READY;
            mmi_fmsr_record_error_hdlr(result);

            g_fmsr_cntx.rec.is_show_msg = FALSE;
            mmi_fmsr_power_off();
        }

        /* clear key events to prevent external queue overflow */
        ClearKeyEvents();
    }
}
Ejemplo n.º 2
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_testtool_callback
 * DESCRIPTION
 *  Callback to take snap shots one by one (non-blocking)
 * PARAMETERS
 *  void
 * RETURNS
 *  U16
 *****************************************************************************/
void csb_frm_testtool_callback(void)
{
    /*----------------------------------------------------------*/
    /* Local Variables                                          */
    /*----------------------------------------------------------*/
	BOOL error_code = TRUE;

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

	StopTimer(CSB_AUTO_MODE_TIMER_ID);

    /* Lock the buffer as we dont want to display the category screens */
    gdi_layer_lock_frame_buffer();

    /* ASSERT if the entryFuncPtr is NULL */
    ASSERT(g_CSB_struct.pscreen_info[g_csb_index].entryFuncPtr != NULL);
    /* Call the category as the buffer must built before calling csb_frm_save_screen_shot */
    g_CSB_struct.pscreen_info[g_csb_index].entryFuncPtr();

    /* Unlock the buffer as it is already built */
    gdi_layer_unlock_frame_buffer();

    /* API to create the file path and save the LAYER contents in JPEG format */
    error_code = (BOOL)csb_frm_save_screen_shot((U32)g_csb_index);

    if (error_code == FALSE)
    {
        /* Clear the key events */
        ClearKeyEvents();
        DisplayPopup((PU8) GetString(STR_ID_CSB_JPEG_FAIL_TEXT), IMG_GLOBAL_ERROR, 1, CSB_NOTIFY_DURATION, 0);
        DeleteUptoScrID(SCR_ID_CSB_TESTTOOL_SCR_ID);
		return;
    }

	/* Show processing screen till all the screenshots are taken */
    TestToolProcessingScr(STR_ID_CSB_PROCESSING_TEXT);

    g_csb_index++;

    /* Delete the screens from History, as all the screens are getting added in History */
    DeleteUptoScrID(SCR_ID_CSB_TESTTOOL_SCR_ID);
	DeleteScreenIfPresent(SCR_ID_CSB_DUMMY_SCR_ID);

	if(g_csb_index < TOTAL_CATEGORY_SCREENS)
	{
		EntryCSBTestToolRun();
	}
	else
	{
		g_csb_index = 0;
		/* Once all the category screenshots are taken, show the DONE pop-up */
		DisplayPopup((PU8) GetString(STR_ID_CSB_TESTTOOL_PASS), IMG_GLOBAL_ACTIVATED, 1, CSB_NOTIFY_DURATION, 0);
		DeleteUptoScrID(SCR_ID_CSB_TESTTOOL_SCR_ID);
	}
	
}
Ejemplo n.º 3
0
void mmiapi_ui_enter_fullscreen_editor_req(mmiapi_ui_enter_fullscreen_editor_req_struct *msg, module_type mod_src)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#if 0//JiaShuo Delete
    BLOCKING_INIT(mod_src, msg);
#endif

    mmiapi_init_fullscreen_editor(msg->editor_buffer, msg->maxlen, msg->type, msg->is_must_input);
    ClearKeyEvents();   /* clear all keypad buffer */
    ClearAllKeyHandler();
    mmiapi_enter_fullscreen_editor();
}
/*****************************************************************************
 * FUNCTION
 *  mmi_fmsr_resume_record
 * DESCRIPTION
 *  Resume FM radio record
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_fmsr_resume_record(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    mdi_result result;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (g_fmsr_cntx.rec.state == FMSR_STATE_PAUSE)
    {
        result = mdi_fmr_resume_record();

        if (result == MDI_AUDIO_SUCCESS)
        {
            g_fmsr_cntx.rec.state = FMSR_STATE_RECORD;
            mmi_fmsr_start_duration();
            mmi_fmsr_restore_recording_screen();
            mmi_fmsr_redraw_LSK_up();   /* add to fix redraw LSK issue */
        }
        else
        {
            g_fmsr_cntx.rec.state = FMSR_STATE_READY;

            /* Do not show message in the FM radio stop callback. */
            g_fmsr_cntx.rec.is_show_msg = FALSE;
            mmi_fmsr_power_off();

            /* Show error message in the result screen */
            g_fmsr_cntx.rec.is_show_msg = TRUE;
            mmi_fmsr_record_error_hdlr(result);
        }

        /* clear key events to prevent external queue overflow */
        ClearKeyEvents();
    }

}