SSCStringHandle.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:166k
源码类别:
MTK
开发平台:
C/C++
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_SLOVAK_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_SLOVAK), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_SLOVAK__) */
- #if defined(__MMI_LANG_DUTCH__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngDutch
- * DESCRIPTION
- * Set Dutch language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngDutch(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Dutch language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_DUTCH) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_DUTCH_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_DUTCH), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_DUTCH__) */
- /* Norwegian start */
- #if defined(__MMI_LANG_NORWEGIAN__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngNorwegian
- * DESCRIPTION
- * Set Norwegian language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngNorwegian(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Norwegian language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_NORWEGIAN) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_NORWEGIAN_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_NORWEGIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_NORWEGIAN__) */
- //Norwegian end
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_LANG_SWEDISH__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngSwedish
- * DESCRIPTION
- * Set SWEDISH language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngSwedish(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to set SWEDISH language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_SWEDISH) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE:
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_SWEDISH_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_SWEDISH), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_SWEDISH__) */
- //PMT END SWEDISH 20050916
- //PMT START CR_ROM_SLO 20050923
- #if defined(__MMI_LANG_CROATIAN__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngCroatian
- * DESCRIPTION
- * Set CROATIAN language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngCroatian(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to set CROATIAN language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_CROATIAN) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE:
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_CROATIAN_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_CROATIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_CROATIAN__) */
- #if defined(__MMI_LANG_ROMANIAN__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngRomanian
- * DESCRIPTION
- * Set Romanian language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngRomanian(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Romanian language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_ROMANIAN) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_ROMANIAN_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_ROMANIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_ROMANIAN__) */
- #if defined(__MMI_LANG_SLOVENIAN__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngSlovenian
- * DESCRIPTION
- * Set SLOVENIAN language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngSlovenian(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to set SLOVENIAN language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_SLOVENIAN) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE:
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_SLOVENIAN_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_SLOVENIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_SLOVENIAN__) */
- //PMT END CR_ROM_SLO 20050923
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- #if defined(__MMI_LANG_GREEK__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngGreek
- * DESCRIPTION
- * Set GREEK language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngGreek(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to set GREEK language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_GREEK) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE:
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_GREEK_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_GREEK), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_GREEK__) */
- /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
- /* MTK end */
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngArabic
- * DESCRIPTION
- * Set Thai language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- /* PMT START 20060714 */
- #if defined (__MMI_LANG_ARABIC__)
- /* PMT END 20060714 */
- void SSCHandleLngArabic(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Arabic language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_ARABIC) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_ARABIC_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_ARABIC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- /* PMT START 20060714 */
- #endif /* defined (__MMI_LANG_ARABIC__) */
- /* PMT START PERSIAN */
- #if defined (__MMI_LANG_PERSIAN__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngPersian
- * DESCRIPTION
- * Set Persian language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngPersian(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Persian language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_PERSIAN) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_PERSIAN_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_PERSIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined (__MMI_LANG_PERSIAN__) */
- /* PMT END PERSIAN */
- #if defined (__MMI_LANG_HEBREW__)
- /* PMT END 20060714 */
- /**************************************************************
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- FUNCTION NAME : SSCHandleLngHebrew
- PURPOSE : Set Hebrew language
- INPUT PARAMETERS : nil
- OUTPUT PARAMETERS : nil
- RETURNS : void
- REMARKS :
- **************************************************************/
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngHebrew
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngHebrew(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Hebrew language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_HEBREW) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_HEBREW_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_HEBREW), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- /* PMT START 20060714 */
- #endif /* defined (__MMI_LANG_HEBREW__) */
- #if defined (__MMI_LANG_HINDI__)
- /* PMT END 20060714 */
- /**************************************************************
- //PMT END GR_HE_CZ_FI_DA_HU 20051007
- FUNCTION NAME : SSCHandleLngHindi
- PURPOSE : Set Thai language
- INPUT PARAMETERS : nil
- OUTPUT PARAMETERS : nil
- RETURNS : void
- REMARKS :
- **************************************************************/
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngHindi
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngHindi(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Hindi language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_HINDI) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_HINDI_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_HINDI), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- /* PMT START 20060714 */
- #endif /* defined (__MMI_LANG_HINDI__) */
- /* PMT END 20060714 */
- /* PMT RAKESH START 20061006 */
- #if defined(__MMI_LANG_MARATHI__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLngMarathi
- * DESCRIPTION
- * Set Marathi language
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLngMarathi(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is set Marathi language"));
- DisplayIdleScreen();
- for (count = 0; count < MAX_LANGUAGES; count++)
- {
- if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_MARATHI) == 0)
- {
- if (gCurrLangIndex != count)
- {
- SetCurrentLanguage(count);
- WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
- RefreshNwProviderName(gPLMN);
- /************************************************/
- /* Robin 0602, Remove set AT command profile functions */
- /* AT command will query MMI when needed */
- /* Send to PS for AT+CLAE */
- /************************************************/
- SendLangChange2AT(count);
- #ifdef __MMI_SUBLCD__
- switch (g_idle_context.IsSubLcdOnIdleScreen)
- {
- case SUBLCD_ON_IDLE_NORMAL:
- ShowIdleAppSubLcd();
- break;
- case SUBLCD_ON_IDLE_INSERT_SIM:
- ShowSubLCDSimError();
- break;
- case SUBLCD_ON_IDLE_SIM_BLOCKED:
- ShowSubLCDBlockedSIM();
- break;
- case SUBLCD_NOT_ON_IDLE: /* Lisen 0617: could switch to other screen, like receiving an SMS */
- break;
- default:
- ASSERT(0);
- }
- #endif /* __MMI_SUBLCD__ */
- }
- DisplayPopup(
- (U8*) GetString(SSC_SCR_LANGUAGE_MARATHI_STR_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- SSC_POP_UP_TIME,
- (U8) SUCCESS_TONE);
- return;
- }
- }
- DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_MARATHI), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- #endif /* defined(__MMI_LANG_MARATHI__) */
- /* PMT RAKESH END 20061006 */
- /*****************************************************************************
- * FUNCTION
- * SSCHandleSoftwareVersion
- * DESCRIPTION
- * Display sofeware version.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleSoftwareVersion(void)
- {
- #ifdef MMI_ON_HARDWARE_P
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 strSWVersionNo[(MAX_SW_VER_LEN + 1) * ENCODING_LENGTH];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(strSWVersionNo, 0, sizeof(strSWVersionNo));
- #ifdef __ASCII
- strcpy(strSWVersionNo, (S8*) release_verno());
- #endif
- #ifdef __UCS2_ENCODING
- AnsiiNToUnicodeString(strSWVersionNo, (S8*) release_verno(), MAX_SW_VER_LEN);
- #endif
- #endif /* MMI_ON_HARDWARE_P */
- PRINT_INFORMATION(("This is to show software version"));
- EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleSoftwareVersion, NULL);
- #ifdef MMI_ON_HARDWARE_P
- ShowCategory152Screen(SSC_SCR_SW_VERSION_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (PU8) strSWVersionNo, NULL);
- #else /* MMI_ON_HARDWARE_P */
- ShowCategory152Screen(
- SSC_SCR_SW_VERSION_CAPTION_ID,
- 0,
- STR_GLOBAL_OK,
- 0,
- 0,
- 0,
- (U8*) GetString(SSC_SCR_SW_VERSION_CAPTION_ID),
- NULL);
- #endif /* MMI_ON_HARDWARE_P */
- SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
- }
- /* Lisen 0921 */
- /*****************************************************************************
- * FUNCTION
- * SSCHandleSoftwareVersionSummary
- * DESCRIPTION
- * Display sofeware version.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleSoftwareVersionSummary(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to show Version Summary Info"));
- #ifdef __MMI_FACTORY_MODE__ /* MTK Add Robin 1001 for saperate MMI feature by project */
- EntryFMVersionSummaryMenu();
- #else /* __MMI_FACTORY_MODE__ */
- DisplayIdleScreen();
- DisplayPopup(
- (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
- IMG_GLOBAL_WARNING,
- 0,
- SSC_POP_UP_TIME,
- (U8) ERROR_TONE);
- #endif /* __MMI_FACTORY_MODE__ */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleLCDContrastSetting
- * DESCRIPTION
- * Display LCD Contrast Setting screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleLCDContrastSetting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to show Version Summary Info"));
- #ifdef __MMI_FACTORY_MODE__ /* MTK Add Robin 1001 for saperate MMI feature by project */
- EntryFMLCDContrastMenuHdlr();
- #else /* __MMI_FACTORY_MODE__ */
- DisplayIdleScreen();
- DisplayPopup(
- (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
- IMG_GLOBAL_WARNING,
- 0,
- SSC_POP_UP_TIME,
- (U8) ERROR_TONE);
- #endif /* __MMI_FACTORY_MODE__ */
- }
- #ifdef __MMI_HW_VERSION__
- /*****************************************************************************
- * FUNCTION
- * SSCHandleHardwareVersion
- * DESCRIPTION
- * Execute the sofeware version dispaly
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleHardwareVersion(void)
- {
- #ifdef MMI_ON_HARDWARE_P
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 strHWVersionNo[(MAX_SW_VER_LEN + 1) * ENCODING_LENGTH];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(strHWVersionNo, 0, sizeof(strHWVersionNo));
- #ifdef __ASCII
- strcpy(strHWVersionNo, (S8*) release_hw_ver());
- #endif
- #ifdef __UCS2_ENCODING
- AnsiiNToUnicodeString(strHWVersionNo, (S8*) release_hw_ver(), MAX_SW_VER_LEN);
- #endif
- #endif /* MMI_ON_HARDWARE_P */
- PRINT_INFORMATION(("This is to show hardware version"));
- EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleHardwareVersion, NULL);
- #ifdef MMI_ON_HARDWARE_P
- ShowCategory7Screen(SSC_SCR_HW_VERSION_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (PU8) strHWVersionNo, NULL);
- #else /* MMI_ON_HARDWARE_P */
- ShowCategory7Screen(
- SSC_SCR_HW_VERSION_CAPTION_ID,
- 0,
- STR_GLOBAL_OK,
- 0,
- 0,
- 0,
- (U8*) GetString(SSC_SCR_HW_VERSION_CAPTION_ID),
- NULL);
- #endif /* MMI_ON_HARDWARE_P */
- SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
- }
- #endif /* __MMI_HW_VERSION__ */
- /*****************************************************************************
- * FUNCTION
- * SSCHandleEngineerMode
- * DESCRIPTION
- * Set Engineering Mode
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleEngineerMode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to handle Engineering Mode"));
- #ifdef __MMI_ENGINEER_MODE__ /* MTK Add Robin 1001 for saperate MMI feature by project */
- EntryEngineerModeMenu();
- #else /* __MMI_ENGINEER_MODE__ */
- DisplayIdleScreen();
- DisplayPopup(
- (U8*) GetString(SSC_SCR_ENGINEER_MODE_STR_ID),
- IMG_GLOBAL_WARNING,
- 0,
- SSC_POP_UP_TIME,
- (U8) ERROR_TONE);
- #endif /* __MMI_ENGINEER_MODE__ */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleFactoryMode
- * DESCRIPTION
- * Set Factory Mode
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleFactoryMode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("this is to handle Factory Mode"));
- #ifdef __MMI_FACTORY_MODE__ /* MTK Add Robin 1001 for saperate MMI feature by project */
- /* Lisen 0630 */
- EntryFMMenu();
- #else /* __MMI_FACTORY_MODE__ */
- DisplayIdleScreen();
- DisplayPopup(
- (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
- IMG_GLOBAL_WARNING,
- 0,
- SSC_POP_UP_TIME,
- (U8) ERROR_TONE);
- #endif /* __MMI_FACTORY_MODE__ */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleFactoryModeAutoTest
- * DESCRIPTION
- * Set Factory Mode
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleFactoryModeAutoTest(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("this is to handle Factory Mode Auto Test"));
- /* MTK: Lisen added, for factory auto test mode */
- #ifdef __MMI_FACTORY_MODE__ /* MTK Add Robin 1001 for saperate MMI feature by project */
- /* Lisen 0630 */
- EntryFMMenuAutoTest();
- #else /* __MMI_FACTORY_MODE__ */
- DisplayIdleScreen();
- DisplayPopup(
- (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
- IMG_GLOBAL_WARNING,
- 0,
- SSC_POP_UP_TIME,
- (U8) ERROR_TONE);
- #endif /* __MMI_FACTORY_MODE__ */
- /* MTK: Lisen end */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleIMEI
- * DESCRIPTION
- * Send req to get the IMEI number
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleIMEI(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- MYQUEUE Message;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is show the IMEI"));
- ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
- Message.oslMsgId = MSG_ID_MMI_NW_GET_IMEI_REQ;
- Message.oslDataPtr = NULL;
- Message.oslPeerBuffPtr = NULL;
- Message.oslSrcId = MOD_MMI;
- Message.oslDestId = MOD_L4C;
- OslMsgSendExtQueue(&Message);
- SetProtocolEventHandler(mmi_ssc_get_imei_rsp, MSG_ID_MMI_NW_GET_IMEI_RSP);
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleSerialNumber
- * DESCRIPTION
- * Display IMEI number
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleSerialNumber(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 strSerial_Num[(MAX_SW_VER_LEN + 1) * ENCODING_LENGTH];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("This is to show Serial number"));
- memset(strSerial_Num, 0, (MAX_SW_VER_LEN + 1) * ENCODING_LENGTH);
- #ifdef __ASCII
- memcpy(strSerial_Num, (S8*) Serial_num(), MAX_SW_VER_LEN);
- #endif
- #ifdef __UCS2_ENCODING
- AnsiiNToUnicodeString(strSerial_Num, (S8*) Serial_num(), MAX_SW_VER_LEN);
- #endif
- EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleSerialNumber, NULL);
- ShowCategory152Screen(SSC_SCR_SERIAL_NUMBER_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (U8*) strSerial_Num, NULL);
- SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * SendReqPIN1Status
- * DESCRIPTION
- * Send request to L4 to know the status of PIN1
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SendReqPIN1Status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsScreenPresent(SCR_ID_SECSET_PUK1))
- {
- DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- else
- {
- if (!g_pwr_context.SSCFromEnterPukAtBootUp) /* if not from PUK Screen of Bootup */
- {
- MYQUEUE msgStruct;
- ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
- SetProtocolEventHandler(SSCChangePIN1, PRT_MMI_SMU_CHECK_PIN_STATUS_RSP);
- msgStruct.oslSrcId = MOD_MMI;
- msgStruct.oslDestId = MOD_L4C;
- /* micha1229 */
- msgStruct.oslMsgId = PRT_MMI_SMU_CHECK_PIN_STATUS_REQ;
- msgStruct.oslSapId = INVALID_SAP;
- msgStruct.oslDataPtr = NULL;
- msgStruct.oslPeerBuffPtr = NULL;
- OslMsgSendExtQueue(&msgStruct);
- }
- else
- {
- DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- DeleteUptoScrID(IDLE_SCREEN_ID);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * SSCChangePIN1
- * DESCRIPTION
- * Veirfy PIN1, if Ok then Change PIN1
- * PARAMETERS
- * info [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SSCChangePIN1(void *info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_smu_check_pin_status_rsp_struct *resp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- resp = (mmi_smu_check_pin_status_rsp_struct*) (info);
- FillCountDownNumber(resp->chv_info);
- if (resp->chv_status.chv1_status == CHV_RETRY_ALLOW || resp->chv_status.chv1_status == CHV_VERIFIED)
- {
- SetProtocolEventHandler(SECSETChangePasswordPIN1Rsp, PRT_MMI_SMU_CHANGE_PASSWORD_RSP);
- g_idle_context.AvoidHistoryofDialerScreen = 1;
- MakeCall(g_idle_context.DialPadCallBuffer);
- return;
- }
- else if (resp->chv_status.chv1_status == CHV_DISABLED)
- {
- DisplayPopup((PU8) GetString(STR_ENABLE_PIN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, ERROR_TONE);
- }
- else if (resp->chv_status.chv1_status == CHV_DEAD || resp->chv_status.chv1_status == CHV_INVALID_TYPE || resp->chv_status.chv1_status == CHV_BLOCKED || resp->chv_status.chv1_status == CHV_NOTINITED) /* CHV_DEAD...display err scr-vanita */
- {
- DisplayPopup(
- (PU8) GetString(STR_ID_PIN_NOT_SUPPORT),
- IMG_GLOBAL_ERROR,
- 0,
- SSC_POP_UP_TIME,
- ERROR_TONE);
- }
- DeleteUptoScrID(IDLE_SCREEN_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * SendReqPIN2Status
- * DESCRIPTION
- * Send req to L4 to know the status of PIN2
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SendReqPIN2Status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsScreenPresent(SCR_ID_SECSET_PUK1))
- {
- DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- else
- {
- if (!g_pwr_context.SSCFromEnterPukAtBootUp) /* If not from PUK screen of Bootup */
- {
- MYQUEUE msgStruct;
- ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
- SetProtocolEventHandler(SSCChangePIN2, PRT_MMI_SMU_CHECK_PIN_STATUS_RSP);
- msgStruct.oslSrcId = MOD_MMI;
- msgStruct.oslDestId = MOD_L4C;
- /* micha1229 */
- msgStruct.oslMsgId = PRT_MMI_SMU_CHECK_PIN_STATUS_REQ;
- msgStruct.oslSapId = INVALID_SAP;
- msgStruct.oslDataPtr = NULL;
- msgStruct.oslPeerBuffPtr = NULL;
- OslMsgSendExtQueue(&msgStruct);
- }
- else /* if from PUK screen then its a invalid SSC */
- {
- DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- DeleteUptoScrID(IDLE_SCREEN_ID);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * SSCChangePIN2
- * DESCRIPTION
- * verify PIN2, if Ok then change PIN2
- * PARAMETERS
- * info [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SSCChangePIN2(void *info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_smu_check_pin_status_rsp_struct *resp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- resp = (mmi_smu_check_pin_status_rsp_struct*) (info);
- FillCountDownNumber(resp->chv_info);
- if (resp->chv_status.chv2_status == CHV_RETRY_ALLOW || resp->chv_status.chv2_status == CHV_VERIFIED)
- {
- SetProtocolEventHandler(SECSETChangePasswordPIN2Rsp, PRT_MMI_SMU_CHANGE_PASSWORD_RSP); /* MSG_ID_MMI_SMU_CHANGE_PASSWORD_RSP */
- g_idle_context.AvoidHistoryofDialerScreen = 1;
- MakeCall(g_idle_context.DialPadCallBuffer);
- return;
- }
- else if (resp->chv_status.chv2_status == CHV_BLOCKED)
- {
- DisplayPopup((PU8) GetString(STR_SETTING_PIN2_BLOCK_TITLE), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, ERROR_TONE);
- }
- else if (resp->chv_status.chv2_status == CHV_DEAD || resp->chv_status.chv2_status == CHV_INVALID_TYPE || resp->chv_status.chv2_status == CHV_DISABLED || resp->chv_status.chv2_status == CHV_NOTINITED) /* CHV_DEAD...display err scr-vanita */
- {
- DisplayPopup(
- (PU8) GetString(STR_ID_PIN2_NOT_SUPPORT),
- IMG_GLOBAL_ERROR,
- 0,
- SSC_POP_UP_TIME,
- ERROR_TONE);
- }
- DeleteUptoScrID(IDLE_SCREEN_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * SSCEntryPUK1Success
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCEntryPUK1Success(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /*
- * DisplayPopup((PU8) GetString(STR_PIN_CHANGE), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
- */
- gSecuritySetupContext.SimLockStatus = CHV_VERIFIED;
- DisplayPopup((PU8) GetString(STR_SETTING_CODE_VERIFIED), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
- DeleteUptoScrID(IDLE_SCREEN_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * SSCEntryPUK1
- * DESCRIPTION
- * Enter PUK1, if verify ok PIN1 is set to a new PIN1
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCEntryPUK1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsScreenPresent(SCR_ID_SECSET_PUK1))
- {
- gSecuritySetupContext.VerifyPassSuccessCallBack = SSCEntryPUK1Success;
- SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP);
- g_idle_context.AvoidHistoryofDialerScreen = 1;
- MakeCall(g_idle_context.DialPadCallBuffer);
- return;
- }
- else
- {
- if (g_pwr_context.SSCFromEnterPukAtBootUp == 1) /* if from PUK screen of Bootup */
- {
- MakeCall(g_idle_context.DialPadCallBuffer);
- }
- else /* if from Idle screen */
- {
- gSecuritySetupContext.VerifyPassSuccessCallBack = SSCEntryPUK1Success;
- SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP);
- g_idle_context.AvoidHistoryofDialerScreen = 1;
- MakeCall(g_idle_context.DialPadCallBuffer);
- return;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * SSCEntryPUK2Success
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCEntryPUK2Success(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /*
- * DisplayPopup((PU8) GetString(STR_PIN2_CHANGE), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
- */
- DisplayPopup((PU8) GetString(STR_SETTING_CODE_VERIFIED), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
- DeleteUptoScrID(IDLE_SCREEN_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * SSCEntryPUK2
- * DESCRIPTION
- * Enter PUK2, if verify ok PIN2 is set to a new PIN2
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCEntryPUK2(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsScreenPresent(SCR_ID_SECSET_PUK1))
- {
- DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- else
- {
- if (!g_pwr_context.SSCFromEnterPukAtBootUp) /* If from idle screen */
- {
- gSecuritySetupContext.VerifyPassSuccessCallBack = SSCEntryPUK2Success;
- SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP);
- g_idle_context.AvoidHistoryofDialerScreen = 1;
- MakeCall(g_idle_context.DialPadCallBuffer);
- return;
- }
- else /* If from PUK screen of Bootup then its a invalid SSC */
- {
- DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- }
- }
- }
- #ifdef __MMI_IRDA_SUPPORT__
- #include "IrdaMMIGprots.h"
- #endif
- /*****************************************************************************
- * FUNCTION
- * SSCHandleIrOpen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleIrOpen(void)
- {
- #ifdef __MMI_IRDA_SUPPORT__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_irda_force_ir_open();
- DisplayPopup(
- (U8*) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- MMI_FALSE,
- UI_POPUP_NOTIFYDURATION_TIME,
- (U8) SUCCESS_TONE);
- DeleteScreenIfPresent(SCR_DIAL_SOS_NUM);
- DeleteScreenIfPresent(IDLE_SCREEN_DIGIT_HANDLER_ID);
- #endif /* __MMI_IRDA_SUPPORT__ */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleIrClose
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandleIrClose(void)
- {
- #ifdef __MMI_IRDA_SUPPORT__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_irda_force_ir_close();
- DisplayPopup(
- (U8*) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- MMI_FALSE,
- UI_POPUP_NOTIFYDURATION_TIME,
- (U8) SUCCESS_TONE);
- DeleteScreenIfPresent(SCR_DIAL_SOS_NUM);
- DeleteScreenIfPresent(IDLE_SCREEN_DIGIT_HANDLER_ID);
- #endif /* __MMI_IRDA_SUPPORT__ */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_ssc_get_imei_rsp
- * DESCRIPTION
- * Response handler fn of request to get IMEI number.
- * PARAMETERS
- * buf [?]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_ssc_get_imei_rsp(void *buf)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #if defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__)
- U8 tempbuf[(MAX_IMEI_LEN + 1) * ENCODING_LENGTH];
- #endif
- mmi_nw_get_imei_rsp_struct *imeiresponse = (mmi_nw_get_imei_rsp_struct*) buf;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(gstrIMEI, 0, MAX_IMEISV_DISPLAY_LEN * ENCODING_LENGTH);
- if (imeiresponse->result == 1)
- {
- #ifdef __ASCII
- memcpy(gstrIMEI, (S8*) imeiresponse->imei, MAX_IMEI_LEN);
- #endif
- #ifdef __UCS2_ENCODING
- #if defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__)
- AnsiiToUnicodeString((S8*) tempbuf, "IMEI:");
- pfnUnicodeStrcpy(gstrIMEI, (const S8*)tempbuf);
- AnsiiToUnicodeString((S8*) tempbuf, (S8*) imeiresponse->imei);
- pfnUnicodeStrcat(gstrIMEI, (const S8*)tempbuf);
- AnsiiToUnicodeString((S8*) tempbuf, "nIMEISV:");
- pfnUnicodeStrcat(gstrIMEI, (const S8*)tempbuf);
- AnsiiToUnicodeString((S8*) tempbuf, (S8*) imeiresponse->svn);
- pfnUnicodeStrcat(gstrIMEI, (const S8*)tempbuf);
- #else /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */
- AnsiiNToUnicodeString(gstrIMEI, (S8*) imeiresponse->imei, MAX_IMEI_LEN);
- #endif /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */
- #endif /* __UCS2_ENCODING */
- }
- ShowIMEIScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowIMEIScreen
- * DESCRIPTION
- * Display IMEI Number
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowIMEIScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ENTER_SSC, NULL, ShowIMEIScreen, NULL);
- /* ShowCategory152Screen(SSC_SCR_IMEI_CAPTION_ID, 0, */
- #if defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__)
- ShowCategory74Screen(
- SSC_SCR_IMEI_CAPTION_ID,
- 0,
- STR_GLOBAL_OK,
- 0,
- 0,
- 0,
- (U8*) gstrIMEI,
- MAX_IMEISV_DISPLAY_LEN * ENCODING_LENGTH,
- NULL);
- #else /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */
- ShowCategory152Screen(SSC_SCR_IMEI_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (U8*) gstrIMEI, NULL);
- #endif /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */
- /* If user press SSC to see IMEI in a call, not display dial pad again if he press OK to leave IMEI screen */
- if (isInCall())
- {
- DeleteScreenIfPresent(DTMF_SCR_DISPLAY_ID);
- }
- SetLeftSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* SetLeftSoftkeyFunction(GoBack2TheHistory, KEY_EVENT_UP); */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCStringParsing1
- * DESCRIPTION
- * Check the Supplement Service Control String table 1
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCStringParsing1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 index = 0;
- #ifdef __UCS2_ENCODING
- U8 temp_str[MAX_SSC_STRING];
- #endif
- U8 *pTemp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (index = 0; index < (sizeof(ssc_table1) / sizeof(ssc_table1[0])); index++)
- {
- #ifdef __UCS2_ENCODING
- AnsiiToUnicodeString((S8*) temp_str, (S8*) ssc_table1[index].ssc_string);
- pTemp = (U8*) temp_str;
- #endif /* __UCS2_ENCODING */
- #ifdef __ASCII
- pTemp = (U8*) ssc_table1[index].ssc_string;
- #endif
- if (pfnUnicodeStrcmp((S8*) pTemp, (S8*) g_idle_context.DialPadCallBuffer) == 0)
- if (ssc_table1[index].func_ptr != NULL)
- {
- if (ssc_disable_flag && ssc_table1[index].ssc_disable_ctrl) /* diamond, 2005/05/13 for SSC disable */
- {
- return;
- }
- ssc_table1[index].func_ptr();
- return;
- }
- }
- #ifdef MMI_ON_HARDWARE_P
- #ifdef DEBUG_BUF
- AnsiiToUnicodeString((S8*) temp_str, (S8*) MEM_CTRL_BUF_DBG);
- if (pfnUnicodeStrncmp
- ((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer,
- (U32) pfnUnicodeStrlen((const S8*)temp_str)) == 0)
- {
- U8 temp_str2[100], temp_str3[100];
- U32 value;
- extern void kal_monitor_buffer(kal_uint32 index);
- memset(temp_str2, 0, sizeof(temp_str2));
- pfnUnicodeStrncpy(
- (S8*) temp_str2,
- (const S8*)&g_idle_context.DialPadCallBuffer[ENCODING_LENGTH * (pfnUnicodeStrlen(MEM_CTRL_BUF_DBG) - 1)],
- (U32) (pfnUnicodeStrlen(g_idle_context.DialPadCallBuffer) - pfnUnicodeStrlen(MEM_CTRL_BUF_DBG)));
- #ifdef __UCS2_ENCODING
- UnicodeToAnsii((S8*) temp_str3, (S8*) temp_str2);
- value = atoi((S8*) temp_str3);
- #else /* __UCS2_ENCODING */
- value = atoi((S8*) temp_str2);
- #endif /* __UCS2_ENCODING */
- DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- kal_monitor_buffer(value);
- return;
- }
- AnsiiToUnicodeString((S8*) temp_str, (S8*) MEM_CTRL_BUF_QRY);
- if (pfnUnicodeStrcmp((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer) == 0)
- {
- U8 temp_str[100], temp_str2[100];
- extern kal_uint32 buff_pool_debug_mask_g[];
- sprintf((S8*) temp_str, "Ctrl Buffer=%d", buff_pool_debug_mask_g[0]);
- #ifdef __UCS2_ENCODING
- AnsiiToUnicodeString((S8*) temp_str2, (S8*) temp_str);
- DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- #else /* __UCS2_ENCODING */
- DisplayPopup((U8*) temp_str, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- #endif /* __UCS2_ENCODING */
- SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
- return;
- }
- #endif /* DEBUG_BUF */
- AnsiiToUnicodeString((S8*) temp_str, (S8*) TASK_CTRL_BUF_DBG);
- if (pfnUnicodeStrncmp
- ((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer,
- (U32) pfnUnicodeStrlen((const S8*)temp_str)) == 0)
- {
- U8 temp_str2[100], temp_str3[100];
- U32 value;
- extern kal_uint32 task_debug_mask_g[];
- memset(temp_str2, 0, sizeof(temp_str2));
- pfnUnicodeStrncpy(
- (S8*) temp_str2,
- (const S8*)&g_idle_context.DialPadCallBuffer[ENCODING_LENGTH * (pfnUnicodeStrlen(TASK_CTRL_BUF_DBG) - 1)],
- (U32) (pfnUnicodeStrlen(g_idle_context.DialPadCallBuffer) - pfnUnicodeStrlen(TASK_CTRL_BUF_DBG)));
- #ifdef __UCS2_ENCODING
- UnicodeToAnsii((S8*) temp_str3, (S8*) temp_str2);
- value = atoi((S8*) temp_str3);
- #else /* __UCS2_ENCODING */
- value = atoi((S8*) temp_str2);
- #endif /* __UCS2_ENCODING */
- DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- task_debug_mask_g[0] = value;
- return;
- }
- AnsiiToUnicodeString((S8*) temp_str, (S8*) TASK_CTRL_BUF_QRY);
- if (pfnUnicodeStrcmp((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer) == 0)
- {
- U8 temp_str[100], temp_str2[100];
- extern kal_uint32 task_debug_mask_g[];
- sprintf((S8*) temp_str, "Task dbg mask=%d", task_debug_mask_g[0]);
- #ifdef __UCS2_ENCODING
- AnsiiToUnicodeString((S8*) temp_str2, (S8*) temp_str);
- DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- #else /* __UCS2_ENCODING */
- DisplayPopup((U8*) temp_str, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
- #endif /* __UCS2_ENCODING */
- SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
- return;
- }
- #endif /* MMI_ON_HARDWARE_P */
- }
- /*****************************************************************************
- * FUNCTION
- * SSCStringParsing2
- * DESCRIPTION
- * Check the Supplement Service Control String table 2
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- pBOOL SSCStringParsing2(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 index = 0;
- #ifdef __UCS2_ENCODING
- U8 temp_str[MAX_SSC_STRING];
- #endif
- U8 *pTemp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (index = 0; index < (sizeof(ssc_table2) / sizeof(ssc_table2[0])); index++)
- {
- #ifdef __UCS2_ENCODING
- AnsiiToUnicodeString((S8*) temp_str, (S8*) ssc_table2[index].ssc_string);
- pTemp = (U8*) temp_str;
- #endif /* __UCS2_ENCODING */
- #ifdef __ASCII
- pTemp = (U8*) ssc_table2[index].ssc_string;
- #endif
- if (pfnUnicodeStrcmp((S8*) pTemp, (S8*) g_idle_context.DialPadCallBuffer) == 0)
- {
- if (ssc_table2[index].func_ptr != NULL)
- {
- ssc_table2[index].func_ptr();
- }
- return MMI_TRUE;
- }
- }
- return MMI_FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * SSCStringParsing3
- * DESCRIPTION
- * Chech the Supplement Service Control String table 3
- * PARAMETERS
- * void
- * RETURNS
- * pBOOL
- *****************************************************************************/
- pBOOL SSCStringParsing3(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 index = 0;
- #ifdef __UCS2_ENCODING
- U8 temp_str[MAX_SSC_STRING];
- #endif
- U8 *pTemp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (index = 0; index < (sizeof(sim_table) / sizeof(sim_table[0])); index++)
- {
- #ifdef __UCS2_ENCODING
- AnsiiToUnicodeString((S8*) temp_str, (S8*) sim_table[index].sim_string);
- pTemp = (U8*) temp_str;
- #endif /* __UCS2_ENCODING */
- #ifdef __ASCII
- pTemp = (U8*) sim_table[index].sim_string;
- #endif
- if (pfnUnicodeStrncmp((S8*) pTemp, (S8*) g_idle_context.DialPadCallBuffer, sim_table[index].sim_length) == 0)
- {
- if (sim_table[index].func_ptr != NULL)
- {
- sim_table[index].func_ptr();
- }
- return MMI_TRUE;
- }
- }
- return MMI_FALSE;
- }
- /********************************Stub****************************/
- /*****************************************************************************
- * FUNCTION
- * Serial_num
- * DESCRIPTION
- * Stub fn to return Serial Number
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- PS8 Serial_num(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return "123456789012340";
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandleDisable
- * DESCRIPTION
- * SSC disable for shipment
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- /* diamond, 2005/05/13 for SSC disable */
- void SSCHandleDisable(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* S8 strAsciiMsg[32], strDisplayMsg[64]; */
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!ssc_disable_flag)
- {
- ssc_disable_flag = MMI_TRUE;
- WriteValue(NVRAM_SSC_DISABLE_FLAG, &ssc_disable_flag, DS_BYTE, &error);
- DisplayIdleScreen();
- DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
- /*
- * PRINT_INFORMATION(("This is to disable SSC"));
- * EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleDisable, NULL);
- * strcpy(strAsciiMsg, "Disable SSC of engineering mode");
- * memset(strDisplayMsg, 0, (strlen(strAsciiMsg)+1)*ENCODING_LENGTH);
- * #ifdef __ASCII
- * memcpy(strDisplayMsg, strAsciiMsg, strlen(strAsciiMsg));
- * #endif
- * #ifdef __UCS2_ENCODING
- * AnsiiNToUnicodeString(strDisplayMsg, strAsciiMsg, strlen(strAsciiMsg));
- * #endif
- * ShowCategory152Screen(SSC_SCR_SERIAL_NUMBER_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (U8*)strDisplayMsg, NULL);
- * SetKeyHandler(DisplayIdleScreen,KEY_LSK,KEY_EVENT_UP);
- */
- }
- }
- /* diamond, end */
- #ifdef __MMI_A2DP_SUPPORT__
- #if defined(__MMI_BT_MTK_SUPPORT__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandle_BT_A2DP_Toggle_PTS_Mode
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandle_BT_A2DP_Toggle_PTS_Mode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_string_type text[2] = {L"A2DP Normal mode", L"A2DP PTS mode"};
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_ssc_bt_a2dp_mode)
- {
- g_ssc_bt_a2dp_mode = 0;
- }
- else
- {
- g_ssc_bt_a2dp_mode = 1;
- }
- DisplayPopup((PU8) text[g_ssc_bt_a2dp_mode], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
- }
- #elif defined(__MMI_BT_BCHS_SUPPORT__)
- /*****************************************************************************
- * FUNCTION
- * SSCHandle_BT_A2DP_Toggle_INT_ACP_Mode
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandle_BT_A2DP_Toggle_INT_ACP_Mode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_string_type text[2] = {L"A2DP INT mode", L"A2DP ACP mode" };
- U8 idx;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_ssc_bt_a2dp_mode)
- {
- g_ssc_bt_a2dp_mode = 0;
- idx = 0;
- }
- else
- {
- g_ssc_bt_a2dp_mode = 2;
- idx = 1;
- }
- DisplayPopup((PU8) text[idx], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandle_BT_A2DP_Close_Stream
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandle_BT_A2DP_Close_Stream(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_string_type text[3] = {L"A2DP Close Stream", L"A2DP Open Stream", L"A2DP Not Connected" };
- U8 text_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (mmi_profiles_bt_is_connected(MMI_PROFILES_BT_A2DP_SIG))
- {
- if (mmi_profiles_bt_is_connected(MMI_PROFILES_BT_A2DP_STR))
- {
- mmi_profiles_bt_disconnect_req(MMI_PROFILES_BT_A2DP_STR);
- text_index = 0;
- }
- else
- {
- mmi_profiles_bt_connect_req(MMI_PROFILES_BT_A2DP_STR);
- text_index = 1;
- }
- }
- else
- {
- text_index = 2;
- }
- DisplayPopup((PU8) text[text_index], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
- }
- #endif
- #endif /* __MMI_A2DP_SUPPORT__ */
- /*****************************************************************************
- * FUNCTION
- * SSCHandleVendorApp
- * DESCRIPTION
- * SSC handler for Vendor App
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void SSCHandleVendorApp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* enter testbed screen */
- mmi_entry_dev_app_scr();
- }
- #ifdef __BTMTK__
- extern void BTPowerOn(void);
- extern void BTPowerOff(void);
- /*****************************************************************************
- * FUNCTION
- * SSCHandle_BT_POWER_ON
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandle_BT_POWER_ON(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_string_type text[2] = {L"BT Power On", L"BT Power Off" };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- BTPowerOn();
- DisplayPopup((PU8) text[0], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
- }
- /*****************************************************************************
- * FUNCTION
- * SSCHandle_BT_POWER_OFF
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SSCHandle_BT_POWER_OFF(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_string_type text[2] = {L"BT Power On", L"BT Power Off" };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- BTPowerOff();
- DisplayPopup((PU8) text[1], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
- }
- #endif /* __BTMTK__ */