SimDetection.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:205k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * SimDetection.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file is for handle Normal Bootup
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- /**
- * Copyright Notice
- * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
- * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
- * (It is illegal to remove this copyright notice from this software or any
- * portion of it)
- */
- /**************************************************************
- FILENAME : SimDetection.c
- PURPOSE : handle Normal Bootup
- REMARKS : nil
- AUTHOR : Deepali Gupta
- DATE : 12/03/03
- **************************************************************/
- #include "MMI_features.h" /* Robin 1217 */
- #include "StdC.h"
- #include "L4Dr1.h"
- #include "HistoryGprot.h"
- #include "SubLCDHistoryGprot.h"
- #include "wgui_categories.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_categories_popup.h"
- #include "wgui_categories_CM.h"
- #include "CommonScreens.h"
- #include "MiscFunctions.h"
- #include "CustDataRes.h"
- #include "ProtocolEvents.h"
- #include "TimerEvents.h"
- #include "SimDetectionGprot.h"
- #include "SimDetectionDef.h"
- #include "PixtelDataTypes.h"
- #include "QuickAccessMenuItem_def.h"
- #include "QuickAccessMenuItemProt.h" /* diamond, 2005/10/29, keypad lock in insert sim screen */
- #include "SimDetectionGexdcl.h"
- #include "EventsDcl.h"
- #include "QueueGProt.h"
- #include "Unicodexdcl.h"
- #include "ProtocolEvents.h"
- #include "DebugInitDef.h"
- #include "UCS2prot.h"
- #include "TaskInit.h"
- #include "wgui_status_icons.h"
- #include "CustMenuRes.h"
- #include "Globaldefs.h"
- #include "IdleAppDef.h"
- #include "AlarmFrameworkProt.h"
- #include "SSCStringHandle.h"
- #include "PhoneBookTypes.h"
- #include "SettingProfile.h"
- #include "SettingGprots.h"
- #include "ProfileGprots.h"
- #include "PersonalizationDef.h"
- #include "PersonalizationProt.h"
- #include "SettingsGexdcl.h"
- #include "gpioInc.h"
- #include "KeyBrd.h"
- #include "MainMenuDef.h"
- #include "PowerOnChargerProt.h"
- #include "ProfilesGexdcl.h"
- #include "bootup.h"
- #include "CallSetUp.h"
- #include "PhoneBookGprot.h"
- #include "IdleAppProt.h"
- #include "FunAndGamesDefs.h"
- #include "GSM7BitDefaultAlphabet.h"
- #include "SecuritySetup.h"
- #include "SATGProts.h"
- #include "mmi_trc.h"
- #include "GlobalScrEnum.h"
- #include "VolumeHandler.h"
- #include "CallManagementIdDef.h" /* CM_SCR_MARKER */
- #ifdef __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__ /* 022505 Calvin added */
- #include "StatusIconRes.h"
- #endif
- #include "L4Dr.h"
- #include "SimDetectionHwMapFile.h"
- #include "custom_util.h"
- #include "CustResDef.h"
- #include "SettingDefs.h"
- #include "SettingsGdcl.h"
- #include "PhoneSetupGprots.h"
- #ifdef __MMI_USB_SUPPORT__
- #include "USBDeviceGprot.h"
- #endif
- #ifdef __MMI_BT_SUPPORT__
- #include "BTMMIScrGprots.h"
- #endif
- #ifdef __MMI_POC__
- #include "PoCGProt.h"
- #endif
- #ifdef __FS_CHECKDRIVE_SUPPORT__
- #include "Fmt_struct.h"
- #ifdef __MMI_FILE_MANAGER__
- #include "FileManagerGProt.h"
- #endif
- #endif /* __FS_CHECKDRIVE_SUPPORT__ */
- #ifdef __MMI_TOUCH_SCREEN__
- #include "Wgui_touch_screen.h"
- #endif
- #if defined(__MMI_DOWNLOAD_AGENT__)
- #include "App_mine.h"
- #include "FileMgr.h"
- #include "DLAgentDef.h"
- #include "DLAgentGProt.h"
- #endif /* defined(__MMI_DOWNLOAD_AGENT__) */
- #ifdef __MMI_IRDA_SUPPORT__
- #include "IrdaMMIGprots.h"
- #include "IrdaMMIScr.h"
- extern void mmi_irda_exec_close_menu(void);
- #endif /* __MMI_IRDA_SUPPORT__ */
- #ifdef __CTM_SUPPORT__
- #include "TextPhoneProt.h"
- #endif
- #if (defined(__MMI_VCARD__) || defined(__MMI_VCALENDAR__)) && defined(MMI_ON_HARDWARE_P)
- #include "vObjects.h"
- #endif
- #ifdef __MMI_WLAN_FEATURES__
- #include "NetworkSetupDefs.h"
- #ifdef __MMI_IMPS__
- #include "Mmi_imps_gprot.h"
- #endif
- #endif /* __MMI_WLAN_FEATURES__ */
- /* External Functions */
- extern void FillCountDownNumber(sim_chv_info_struct chv_info);
- extern void FillCountDownString(U8 TypeOfPass, U8 *PassCountdownDisp);
- extern void CallBackPowerOnAnimationComplete(GDI_RESULT ret);
- extern void DeInitSpecialMode(void);
- extern void goto_opening_screen(void);
- extern void MakeCall(PS8 strBumber);
- extern void IdleSetStatusIcon(S16);
- extern void IdleResetStatusIcon(S16);
- /* extern void RstSmuVerifyPINRspHdlr(void *); */
- extern void InitInsertSimApp(void);
- extern void RefreshDisplayOwnerNumber(U8 lineid);
- extern pBOOL isInCall(void);
- #ifdef __J2ME__
- extern void jvm_enter_idle_screen_notify(void);
- #include "javaAgencyGprot.h"
- #endif /* __J2ME__ */
- void PowerOnBatteryIndicationComplete(void);
- void InsertSimSetKeyPadLockFlag(void);
- extern void mdi_audio_set_audio_mode(U8 mode);
- extern void SATMessageWaitTimer(void);
- #ifdef __MMI_BT_SUPPORT__
- extern MMI_BOOL mmi_bt_ps_stack_and_hw_init(MMI_BOOL flight_mode, MMI_BOOL sim_inserted);
- #endif
- /* Global Variables */
- #if ( defined(__MMI_ENGINEER_MODE__) || defined(__MMI_FACTORY_MODE__))
- extern U8 gCurrentMode;
- #endif
- extern charbat_context_struct g_charbat_context;
- extern U8 isEarphonePlugged;
- /* Password buffers for PIN, PUK, phone lock and personalization lock */
- S8 gInputNewPinBufferSecondTime[MAX_PWD_LENGTH_MMI * ENCODING_LENGTH];
- S8 gInputNewPinBufferFirstTime[MAX_PWD_LENGTH_MMI * ENCODING_LENGTH];
- S8 gInputPwdBuffer[MAX_PWD_LENGTH_MMI * ENCODING_LENGTH];
- /* Service area display buffers for line 1 and line 2 */
- S8 gHomePLMNNum[MAX_PLMN_LEN_MMI + 1];
- S8 gSimEccNumList[MAX_ECC_NUMBER_LIST_LENGTH][(EMERGENCY_NUMBER_LENGTH + 1)];
- S8 gServProvderName[MAX_LENGTH_SERVICE_PROVIDER * ENCODING_LENGTH];
- S8 gOperatorName[MAX_LENGTH_OPERATOR_NAME * ENCODING_LENGTH];
- S8 gShortOperatorName[MAX_LENGTH_SHORT_OPERATOR_NAME * ENCODING_LENGTH];
- S8 gOwnerName[MAX_LENGTH_OWNER_NUMBER * ENCODING_LENGTH];
- U8 gOpNameValid = 0;
- U8 gShortOpnameValid = 0;
- U8 gSpnValid = 0;
- MMI_OWNER_NUMBER_STRUCT gDispOwnerNumber[2];
- #ifdef __MMI_WLAN_FEATURES__
- U8 gWLANProviderName[MAX_LENGTH_DISPLAY_NAME * ENCODING_LENGTH];
- #endif
- /* SIM indication structures to hold the corresponding actions after power on animation completes */
- MMISMUPASSWDREQIND gSMUPwdDataStruct;
- MMISMUFAILIND gSMUFailIndStruct;
- /* ECC buffers */
- U16 EmergencyNumber[MAX_EMERGENCYNUMBER][4] =
- {
- {0x0039, 0x0031, 0x0031, 0x00},
- #if defined(__MEXICO_ECC__)
- {0x0030, 0x0038, 0x0030, 0x00},
- {0x0030, 0x0036, 0x0030, 0x00},
- {0x0030, 0x0038, 0x00},
- #endif /* defined(__MEXICO_ECC__) */
- #if defined(__CPHS__)
- {0x0039, 0x0039, 0x0039, 0x00},
- #endif
- {0x0031, 0x0031, 0x0032, 0x00}
- };
- U8 gCPHSRetryCount = 0;
- /* extern U8 isIdleScreenReached; */
- typedef enum
- {
- SIM_ERROR_DISPLAY_INSERT_SIM,
- SIM_ERROR_DISPLAY_SIM_ACCESS_ERROR
- } SIM_ERROR_DISPLAY;
- U16 simErrorDisplayString = STR_SIM_INSERTION_MSG;
- #if defined(__FS_CHECKDRIVE_SUPPORT__)
- // NOT DONE or NONE: 0
- // SKIP: 1
- // DONE: 2
- // Processing: 3
- U8 SanityCheckDone = 0;
- #else /* defined(__FS_CHECKDRIVE_SUPPORT__) */
- U8 SanityCheckDone = 2;
- #endif /* defined(__FS_CHECKDRIVE_SUPPORT__) */
- extern pwr_context_struct g_pwr_context; /* in BootupApp.c */
- /*****************************************************************************
- * FUNCTION
- * mmi_flight_mode_popup_in_dialing_sos
- * DESCRIPTION
- * Popup "flight mode" when dial SOS from insert SIM screen (only for touch screen phones)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_flight_mode_popup_in_dialing_sos(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __FLIGHT_MODE_SUPPORT__
- DisplayPopup((U8*) GetString(STR_MENU_FLIGHT_MODE), IMG_GLOBAL_ERROR, 0, 2000, (U8) ERROR_TONE);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * InitSimDetection
- * DESCRIPTION
- * Initialize all protocol handlers for SIM Messages
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void InitSimDetection(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetProtocolEventHandler(SimECCInfoSave, PRT_SMU_STARTUP_INFO_IND);
- /* SimPasswdReqResponse: this indication implies that SIM is valid and may need security check */
- SetProtocolEventHandler(SimPasswdReqResponse, MSG_ID_GET_PIN_RES);
- /* SimQueryFailureRsp: this indication implies that SIM is invalid or not inserted */
- SetProtocolEventHandler(SimQueryFailureRsp, MSG_ID_SIM_CARD_FAILURE);
- g_keylock_context.gKeyPadLockFlag = 0;
- }
- /**************************************************************************
- * Bootup Revise *
- **************************************************************************/
- /* diamond, 2005/08/16 bootup revise */
- /*****************************************************************************
- * FUNCTION
- * mmi_sim_error_hide_menu_items
- * DESCRIPTION
- * Hide some menu items for no sim or sim blocked case
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void mmi_sim_error_hide_menu_items(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_frm_hide_menu_item(MENU_IDLE_SCR_DISP); /* Hide "Display Characteristic" in No SIM screen */
- mmi_frm_hide_menu_item(MENU9146_WELCOME_TEXT); /* Hide "Greeting Text" in No SIM screen */
- mmi_frm_hide_menu_item(MENU_SETTING_DEDICATED_KEYS); /* Hide "Dedicated key" in No SIM screen */
- #ifdef __MMI_NITZ__
- mmi_frm_hide_menu_item(MENU9145_SETTIMEANDDATENITZ); /* Hide "Auto update of date and time" in No SIM screen */
- mmi_frm_hide_menu_item(MENU_SETTING_MENU_TREE);
- #endif /* __MMI_NITZ__ */
- mmi_frm_hide_menu_item(MENU9169_SIM_LOCK); /* Hide "SIM Lock" in No SIM screen */
- mmi_frm_hide_menu_item(MENU9167_FIXED_DIAL); /* Hide "Fixed Dial" in No SIM screen */
- mmi_frm_hide_menu_item(MENU9168_BARRED_DAIL); /* Hide "Barred Dail" in No SIM screen */
- mmi_frm_hide_menu_item(MENU9174_CP_PIN1); /* Hide "Change Password/PIN1" in No SIM screen */
- mmi_frm_hide_menu_item(MENU9175_CP_PIN2); /* Hide "Change Password/PIN2" in No SIM screen */
- mmi_frm_hide_menu_item(MENU_SETTING_SPEED_DIAL); /* Hide "Speed Dial" in No SIM screen */
- #ifdef __MMI_WLAN_FEATURES__
- mmi_frm_hide_menu_item(MENU9186_SELECTION_MODE);
- mmi_frm_hide_menu_item(MENU9189_GPRS_CONNECTION_MODE);
- #if defined(__GSM_RAT__) && defined(__WCDMA_RAT__)
- mmi_frm_hide_menu_item(MENU_ID_NETSET_SERVICE_SELECTION);
- mmi_frm_hide_menu_item(MENU_ID_NETSET_NETWORK_INFO);
- #endif
- #ifdef __MMI_USER_CTRL_PLMN_SUPPORT__
- mmi_frm_hide_menu_item(MENU_ID_NETSET_USER_CTRL_PLMN);
- #endif
- mmi_frm_hide_menu_item(MESSAGES_MENU_SMS_MENUID); /* SMS */
- mmi_frm_hide_menu_item(MESSAGES_MENU_MMS_MENUID); /* MMS */
- mmi_frm_hide_menu_item(MENU_CHATAPP_ID); /* Chat */
- mmi_frm_hide_menu_item(MESSAGES_MENU_VMAIL_MENUID); /* Voice Mail */
- mmi_frm_hide_menu_item(MESSAGES_MENU_CB_MENUID); /* Cell Broadcast */
- mmi_frm_hide_menu_item(MENU_ID_UM_MAIN); /* Unified Message */
- mmi_frm_hide_menu_item(MENU_CALL_TIME_SETUP); /* Call Time */
- mmi_frm_hide_menu_item(MENU_CALL_HISTORY_CALLCOST); /* Call Cost */
- mmi_frm_hide_menu_item(MENU_CALL_HISTORY_SMSCOUNTER); /* SMS Counter */
- mmi_frm_hide_menu_item(MENU_CALL_HISTORY_GPRSCOUNTER); /* GPRS Counter */
- g_pwr_context.CurrentServiceType = LIMITED_SERVICE; /* force to enter GSM no service state */
- g_pwr_context.PowerOnNWStatus |= MMI_NW_STATUS_NETWORK_FLAG;
- mmi_idle_notify_bootup_ready_to_wap();
- #ifdef __MMI_IMPS__
- mmi_imps_notify_idle_reached();
- #endif
- #endif /* __MMI_WLAN_FEATURES__ */
- }
- /*****************************************************************************
- * FUNCTION
- * InitSimErrorScreen
- * DESCRIPTION
- * Initialize and enter SIM error screen
- * PARAMETERS
- * error [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void InitSimErrorScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- InitInsertSimApp();
- RemoveStatusIconsForSimRemoved();
- #ifdef __MMI_WLAN_FEATURES__
- mmi_netset_update_preferred_mode_menu();
- #endif
- mmi_sim_error_hide_menu_items();
- EntryScrnSimErrorScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * InitSimBlockedScreen
- * DESCRIPTION
- * Initialize and enter SIM blocked screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void InitSimBlockedScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- InitInsertSimApp();
- RemoveStatusIconsForSimRemoved();
- #ifdef __MMI_WLAN_FEATURES__
- mmi_netset_update_preferred_mode_menu();
- #endif
- mmi_sim_error_hide_menu_items();
- EntryScrnSimBlockRsp();
- }
- /*****************************************************************************
- * FUNCTION
- * InitEnterPasswordScreen
- * DESCRIPTION
- * Initialize password screen
- * PARAMETERS
- * pendingAlarm [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void InitEnterPasswordScreen(pBOOL pendingAlarm)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (mmi_bootup_is_searching_or_idle_reached() == MMI_FALSE && pendingAlarm)
- {
- PendingAlarmInPwronPeriod();
- }
- if (g_charbat_context.isChargerConnected == 1 && g_charbat_context.ChargingComplete == 0)
- {
- IdleScreenChargerConnected(KAL_FALSE);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ValidatePassword
- * DESCRIPTION
- * Validate password
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ValidatePassword(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* used to verify PIN or phone lock in power on period */
- MYQUEUE Message;
- MMISMUVERIFYPINREQ *local_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
- PRINT_INFORMATION(("@@@@@ Sending request for verifying password @@@@@"));
- Message.oslSrcId = MOD_MMI;
- Message.oslDestId = MOD_L4C;
- Message.oslMsgId = PRT_MMI_SMU_VERIFY_PIN_REQ;
- local_data = (MMISMUVERIFYPINREQ*) OslConstructDataPtr(sizeof(MMISMUVERIFYPINREQ));
- local_data->pin_type = MMI_TYPE_UNSPECIFIED;
- /* Change gInputPwdBuffer to ASCII then copy local_data->pin */
- UnicodeToAnsii((S8*) local_data->pin, (S8*) gInputPwdBuffer);
- Message.oslDataPtr = (oslParaType*) local_data;
- Message.oslPeerBuffPtr = NULL;
- OslMsgSendExtQueue(&Message);
- }
- /* end, diamond */
- /**************************************************************************
- SIM Error APIs:
- void EntryScrnSimErrorScreen(void)
- void ExitScrnSimErrorScreen(void)
- void ShowSubLCDSimError(void)
- void ExitSubLCDSimError(void)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * EntryScrnSimErrorScreen
- * DESCRIPTION
- * Entry screen when no SIM is inserted
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- #ifdef __J2ME__
- extern BOOL java_is_launch_after_install(void);
- extern void mmi_java_send_mid_start_req(game_type_enum type);
- #endif /* __J2ME__ */
- void EntryScrnSimErrorScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer; /* Buffer holding history data */
- U16 InsertSIMScreenDigits[MAX_INSERT_SCR_DIGITS] =
- {KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_STAR, KEY_POUND};
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_WLAN_FEATURES__
- if (mmi_netset_get_active_preferred_mode() != P_GSM_ONLY)
- {
- EntryIdleScreen();
- return;
- }
- #endif /* __MMI_WLAN_FEATURES__ */
- EntryNewScreen(SCR_SIM_INSERTION, ExitScrnSimErrorScreen, EntryScrnSimErrorScreen, NULL);
- DinitHistory(); /* Dinit History is called to prevent memory leak */
- DeInitSpecialMode(); /* Back from engineer mode or factory mode */
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- g_pwr_context.PrevScreenIndicator = ENTER_SIM_INSERTION;
- g_idle_context.IsOnSimErrorScreen = 1;
- /* Fix the case that caller group LED could not demo after entering FM/EM and then back to INSERT_SIM */
- #if ( defined(__MMI_ENGINEER_MODE__) || defined(__MMI_FACTORY_MODE__))
- gCurrentMode = NORMAL_MODE;
- #endif
- #ifdef __MMI_DOWNLOAD_AGENT__
- mmi_da_enter_idle_screen_notify();
- #endif
- /* Provide Java functions in the SIM error main menu */
- #ifdef __J2ME__
- jvm_enter_idle_screen_notify();
- #endif
- /* diamond, 2005/10/29, keypad lock in insert sim screen */
- mmi_idle_start_keypad_lock();
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- mmi_frm_kbd_reg_pre_key_hdlr(IdleScreenEmergencyCallCheckNKeypadLock);
- }
- /* end, diamond */
- guiBuffer = GetCurrGuiBuffer(SCR_SIM_INSERTION);
- ShowSubLCDScreen(ShowSubLCDSimError);
- DinitSubLCDHistory();
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) )
- EnableCenterSoftkey(0, IMG_CSK_DIAL_ICON);
- #endif
- if (0)
- {
- }
- #ifdef __J2ME__
- else if (mmi_java_is_launch_after_install())
- {
- mmi_java_send_mid_start_req(GAMETYPE_JAVA_GAME);
- }
- #endif /* __J2ME__ */
- #if (defined(__MMI_VCARD__) || defined(__MMI_VCALENDAR__)) && defined(MMI_ON_HARDWARE_P)
- else if (mmi_vobj_is_pending_object())
- {
- mmi_vobj_entry_recv_object(); /* unread vObjects */
- }
- #endif /* defined(__MMI_VCARD__) || defined(__MMI_VCALENDAR__)) && defined(MMI_ON_HARDWARE_P) */
- #ifdef __MMI_DOWNLOAD_AGENT__
- else if (mmi_da_launch_ring_buffer_check())
- {
- mmi_da_entry_new_push_ind();
- }
- #endif /* __MMI_DOWNLOAD_AGENT__ */
- else
- {
- if (g_keylock_context.gKeyPadLockFlag == 0) /* keypad is not locked */
- {
- ShowCategory123Screen(
- 0,
- 0,
- STR_GLOBAL_OPTIONS,
- IMG_GLOBAL_OPTIONS,
- STR_RSK_SOS,
- 0,
- simErrorDisplayString,
- IMG_SIM_INSERTION_MSG, //Old:IMG_GLOBAL_WARNING //KP Jerry modify on 2007-3-6
- NULL);
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) )
- SetCenterSoftkeyFunction(HandleInsertSIMScrDigitEntry, KEY_EVENT_UP);
- #endif
- SetLeftSoftkeyFunction(EntryScrSimOptionMenu, KEY_EVENT_UP);
- #if ( (defined __FLIGHT_MODE_SUPPORT__) && (defined __MMI_TOUCH_SCREEN__) )
- if (mmi_bootup_get_active_flight_mode() == 1)
- SetRightSoftkeyFunction(mmi_flight_mode_popup_in_dialing_sos, KEY_EVENT_UP);
- else
- #endif
- SetRightSoftkeyFunction(ShowMakeSOSCallScr, KEY_EVENT_UP);
- SetGroupKeyHandler(
- HandleInsertSIMScrDigitEntry,
- InsertSIMScreenDigits,
- MAX_INSERT_SCR_DIGITS - 1,
- KEY_EVENT_DOWN);
- SetDefaultVolumeKeyHandlers();
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_register_status_icon_pen_event_hdlr(
- STATUS_ICON_KEYPAD_LOCK,
- WGUI_STATUS_ICON_BAR_PEN_LONG_PRESS_ICON,
- InsertSimSetKeyPadLockFlag);
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- else
- {
- mmi_idle_set_keypad_lock_string();
- #if (defined __MMI_TOUCH_SCREEN__ && defined __MMI_WGUI_CSK_ENABLE__ )
- ResetCenterSoftkey();
- #endif
- ShowCategory123Screen(
- 0,
- 0,
- g_keylock_context.KeyLockLSKStringID,
- g_keylock_context.KeyLockLSKIconID,
- g_keylock_context.KeyLockRSKStringID,
- g_keylock_context.KeyLockRSKIconID,
- simErrorDisplayString,
- IMG_GLOBAL_WARNING,
- NULL);
- #if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__)
- SetGroupKeyHandler(
- EntryScrKeyPadLockOnPessingAnyKey,
- (PU16) PresentAllKeys,
- (U8) TOTAL_KEYS,
- (U16) KEY_EVENT_DOWN);
- #endif /* defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) */
- #if defined(__MMI_TOUCH_SCREEN__) && (!defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) || defined(__MMI_SLIDE__)) //KP Jerry add "!defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__)" on 2007-3-26
- mmi_idle_pen_block(); /* diamond, 2005/12/22 Disable touch panel if re-entry idle keypad lock screen */
- SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN);
- #else /* __MMI_TOUCH_SCREEN__ && !__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__ */ //KP Jerry add "!__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__" on 2007-3-26
- #if defined(__MMI_KEYPAD_LOCK_PATTERN_1__) || defined(__MMI_KEYPAD_LOCK_PATTERN_3__) || defined(__MMI_KEYPAD_LOCK_PATTERN_4__) //KP Jerry add "__MMI_KEYPAD_LOCK_PATTERN_3__" on 2007-3-27 /* Robin 1223 */
- SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_UP);
- #endif
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__ /* Robin 1223 */
- SetLeftSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_UP);
- #endif
- #endif /* __MMI_TOUCH_SCREEN__ && !__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__ */ //KP Jerry add "!__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__" on 2007-3-26
- if (g_idle_context.IsRSKPressOnScreenSaver)
- {
- EntryScrAfterPessingRSK();
- g_idle_context.IsRSKPressOnScreenSaver = 0;
- }
- }
- InitEnterPasswordScreen(MMI_FALSE);
- }
- /* max: to prevent pending alarm */
- PendingAlarmReminder();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrnSimErrorScreen
- * DESCRIPTION
- * Exit screen when no SIM is inserted
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrnSimErrorScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_idle_context.IsOnSimErrorScreen = 0;
- mmi_frm_kbd_reg_pre_key_hdlr(NULL);
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && defined (__MMI_TOUCH_SCREEN__) )
- ResetCenterSoftkey();
- #endif
- if (g_keylock_context.gKeyPadLockFlag == 1)
- {
- #ifdef __MMI_TOUCH_SCREEN__
- ChangeStatusIconImage(STATUS_ICON_KEYPAD_LOCK, IMG_SI_KEYPAD_UNLOCK);
- mmi_pen_unblock(); /* diamond, 2005/12/22 Enable touch panel if exit idle keypad lock screen */
- #else
- HideStatusIcon(STATUS_ICON_KEYPAD_LOCK);
- #endif
- }
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_reset_status_icon_pen_event_hdlr();
- #endif /* __MMI_TOUCH_SCREEN__ */
- StopTimer(IDLE_APP_AUTO_LOCK_TIMER_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowSubLCDSimError
- * DESCRIPTION
- * Entry screen for sublcd when no SIM is inserted
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowSubLCDSimError(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 stringID =
- (simErrorDisplayString ==
- SIM_ERROR_DISPLAY_SIM_ACCESS_ERROR) ? STR_SUBLCD_SIM_ACCESS_ERROR_MSG : STR_SUBLCD_SIM_INSERTION_MSG;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- #ifdef __MMI_SUBLCD_SHOW_ANALOG_CLOCK__
- if (IsClamClose())
- {
- ShowSubLCDAnalogClockScreen();
- }
- else
- {
- ShowSubLCDLogoString();
- }
- #else /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- ShowCategory301Screen((PU8) GetString(stringID), 0, NULL);
- #endif /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- SetSubLCDExitHandler(ExitSubLCDSimError);
- g_idle_context.IsSubLcdOnIdleScreen = SUBLCD_ON_IDLE_INSERT_SIM;
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLCDSimError
- * DESCRIPTION
- * Exit screen for sublcd when no SIM is inserted
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLCDSimError(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- SubLCDHistoryNode SubLCDHistory;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SubLCDHistory.entryFuncPtr = ShowSubLCDSimError;
- AddSubLCDHistory(&SubLCDHistory);
- g_idle_context.IsSubLcdOnIdleScreen = SUBLCD_NOT_ON_IDLE;
- }
- /**************************************************************************
- SIM Blocked APIs:
- void ExitScrnSimBlockRsp(void)
- void EntryScrnSimBlockRsp(void)
- void ShowSubLCDBlockedSIM(void)
- void ExitSubLCDBlockedSIM(void)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * ExitScrnSimBlockRsp
- * DESCRIPTION
- * Exit screen when SIM is blocked
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrnSimBlockRsp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_idle_context.IsOnSimErrorScreen = 0;
- mmi_frm_kbd_reg_pre_key_hdlr(NULL);
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && defined (__MMI_TOUCH_SCREEN__) )
- ResetCenterSoftkey();
- #endif
- if (g_keylock_context.gKeyPadLockFlag == 1)
- {
- #ifdef __MMI_TOUCH_SCREEN__
- ChangeStatusIconImage(STATUS_ICON_KEYPAD_LOCK, IMG_SI_KEYPAD_UNLOCK);
- mmi_pen_unblock(); /* diamond, 2005/12/22 Enable touch panel if exit idle keypad lock screen */
- #else
- HideStatusIcon(STATUS_ICON_KEYPAD_LOCK);
- #endif
- }
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_reset_status_icon_pen_event_hdlr();
- #endif /* __MMI_TOUCH_SCREEN__ */
- StopTimer(IDLE_APP_AUTO_LOCK_TIMER_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrnSimBlockRsp
- * DESCRIPTION
- * Entry screen when SIM is blocked
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrnSimBlockRsp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer; /* Buffer holding history data */
- U16 BlockSIMScreenDigits[MAX_INSERT_SCR_DIGITS] =
- {KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_STAR, KEY_POUND};
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_WLAN_FEATURES__
- if (mmi_netset_get_active_preferred_mode() != P_GSM_ONLY)
- {
- EntryIdleScreen();
- return;
- }
- #endif /* __MMI_WLAN_FEATURES__ */
- EntryNewScreen(SCR_SIM_BLOCK, ExitScrnSimBlockRsp, EntryScrnSimBlockRsp, NULL);
- DinitHistory(); /* Dinit History is called to prevent memory leak */
- DeInitSpecialMode(); /* Back from engineer mode or factory mode */
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- g_pwr_context.PrevScreenIndicator = ENTER_SIM_BLOCK;
- g_idle_context.IsOnSimErrorScreen = 1;
- #ifdef __MMI_DOWNLOAD_AGENT__
- mmi_da_enter_idle_screen_notify();
- #endif
- #ifdef __J2ME__
- jvm_enter_idle_screen_notify();
- #endif
- /* diamond, 2005/10/29, keypad lock in insert sim screen */
- mmi_idle_start_keypad_lock();
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- mmi_frm_kbd_reg_pre_key_hdlr(IdleScreenEmergencyCallCheckNKeypadLock);
- }
- /* end, diamond */
- guiBuffer = GetCurrGuiBuffer(SCR_SIM_BLOCK);
- ShowSubLCDScreen(ShowSubLCDBlockedSIM);
- DinitSubLCDHistory();
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) )
- EnableCenterSoftkey(0, IMG_CSK_DIAL_ICON);
- #endif
- if (0)
- {
- }
- #ifdef __J2ME__
- else if (mmi_java_is_launch_after_install())
- {
- mmi_java_send_mid_start_req(GAMETYPE_JAVA_GAME);
- }
- #endif /* __J2ME__ */
- #if (defined(__MMI_VCARD__) || defined(__MMI_VCALENDAR__)) && defined(MMI_ON_HARDWARE_P)
- else if (mmi_vobj_is_pending_object())
- {
- mmi_vobj_entry_recv_object(); /* unread vObjects */
- }
- #endif /* defined(__MMI_VCARD__) || defined(__MMI_VCALENDAR__)) && defined(MMI_ON_HARDWARE_P) */
- #ifdef __MMI_DOWNLOAD_AGENT__
- else if (mmi_da_launch_ring_buffer_check())
- {
- mmi_da_entry_new_push_ind();
- }
- #endif /* __MMI_DOWNLOAD_AGENT__ */
- else
- {
- if (g_keylock_context.gKeyPadLockFlag == 0) /* keypad is not locked */
- {
- ShowCategory123Screen(
- 0,
- 0,
- STR_GLOBAL_OPTIONS,
- IMG_GLOBAL_OPTIONS,
- STR_RSK_SOS,
- 0,
- simErrorDisplayString,
- IMG_GLOBAL_WARNING,
- NULL);
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) )
- SetCenterSoftkeyFunction(HandleInsertSIMScrDigitEntry, KEY_EVENT_UP);
- #endif
- SetLeftSoftkeyFunction(EntryScrSimOptionMenu, KEY_EVENT_UP);
- #if ( (defined __FLIGHT_MODE_SUPPORT__) && (defined __MMI_TOUCH_SCREEN__) )
- if (mmi_bootup_get_active_flight_mode() == 1)
- SetRightSoftkeyFunction(mmi_flight_mode_popup_in_dialing_sos, KEY_EVENT_UP);
- else
- #endif
- SetRightSoftkeyFunction(ShowMakeSOSCallScr, KEY_EVENT_UP);
- SetGroupKeyHandler(
- HandleInsertSIMScrDigitEntry,
- BlockSIMScreenDigits,
- MAX_INSERT_SCR_DIGITS - 1,
- KEY_EVENT_DOWN);
- SetDefaultVolumeKeyHandlers();
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_register_status_icon_pen_event_hdlr(
- STATUS_ICON_KEYPAD_LOCK,
- WGUI_STATUS_ICON_BAR_PEN_LONG_PRESS_ICON,
- InsertSimSetKeyPadLockFlag);
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- else
- {
- mmi_idle_set_keypad_lock_string();
- #if (defined __MMI_TOUCH_SCREEN__ && defined __MMI_WGUI_CSK_ENABLE__ )
- ResetCenterSoftkey();
- #endif
- ShowCategory123Screen(
- 0,
- 0,
- g_keylock_context.KeyLockLSKStringID,
- g_keylock_context.KeyLockLSKIconID,
- g_keylock_context.KeyLockRSKStringID,
- g_keylock_context.KeyLockRSKIconID,
- simErrorDisplayString,
- IMG_GLOBAL_WARNING,
- NULL);
- #if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__)
- SetGroupKeyHandler(
- EntryScrKeyPadLockOnPessingAnyKey,
- (PU16) PresentAllKeys,
- (U8) TOTAL_KEYS,
- (U16) KEY_EVENT_DOWN);
- #endif /* defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) */
- #if defined(__MMI_TOUCH_SCREEN__) && (!defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) || defined(__MMI_SLIDE__)) //KP Jerry add "!defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__)" on 2007-3-26
- mmi_idle_pen_block(); /* diamond, 2005/12/22 Disable touch panel if re-entry idle keypad lock screen */
- SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN);
- #else /* __MMI_TOUCH_SCREEN__ && !__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__ */ //KP Jerry add "!__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__" on 2007-3-26
- #if defined(__MMI_KEYPAD_LOCK_PATTERN_1__) || defined(__MMI_KEYPAD_LOCK_PATTERN_3__) //KP Jerry add "__MMI_KEYPAD_LOCK_PATTERN_3__" on 2007-3-27 /* Robin 1223 */
- SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_UP);
- #endif
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__ /* Robin 1223 */
- SetLeftSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_UP);
- #endif
- #endif /* __MMI_TOUCH_SCREEN__ && !__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__ */ //KP Jerry add "!__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__" on 2007-3-26
- if (g_idle_context.IsRSKPressOnScreenSaver)
- {
- EntryScrAfterPessingRSK();
- g_idle_context.IsRSKPressOnScreenSaver = 0;
- }
- }
- InitEnterPasswordScreen(MMI_FALSE);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowSubLCDBlockedSIM
- * DESCRIPTION
- * Entry screen for sulcd when SIM is blocked
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowSubLCDBlockedSIM(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- #ifdef __MMI_SUBLCD_SHOW_ANALOG_CLOCK__
- if (IsClamClose())
- {
- ShowSubLCDAnalogClockScreen();
- }
- else
- {
- ShowSubLCDLogoString();
- }
- #else /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- ShowCategory301Screen((PU8) GetString(STR_SIM_BLOCK_MSG), 0, NULL);
- #endif /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- SetSubLCDExitHandler(ExitSubLCDBlockedSIM);
- g_idle_context.IsSubLcdOnIdleScreen = SUBLCD_ON_IDLE_SIM_BLOCKED;
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLCDBlockedSIM
- * DESCRIPTION
- * Exit screen for sulcd when SIM is blocked
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLCDBlockedSIM(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- SubLCDHistoryNode SubLCDHistory;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SubLCDHistory.entryFuncPtr = ShowSubLCDBlockedSIM;
- AddSubLCDHistory(&SubLCDHistory);
- g_idle_context.IsSubLcdOnIdleScreen = SUBLCD_NOT_ON_IDLE;
- }
- /**************************************************************************
- SIM Option Menu APIs:
- void EntryScrSimOptionMenu(void)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * EntryScrSimOptionMenu
- * DESCRIPTION
- * Entry function for option button on 'insert sim' / 'blocked sim' / 'flight mode' screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSimOptionMenu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer; /* Buffer holding history data */
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nDispAttribute; /* Stores display attribue */
- U16 nStrItemList[MAX_SUB_MENUS]; /* Stores the strings id of submenus returned */
- #if defined(__MMI_VERSION_2__)
- U16 MenuOptionIconList[MAX_SUB_MENUS] =
- {
- #ifndef __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__
- #ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
- MAIN_MENU_AVZONE_TITLE,
- #endif
- #ifdef __MMI_MAINLCD_240X320__
- IMG_ID_OPTION_MENU_PHONEBOOK_ICON,
- IMG_ID_OPTION_MENU_MULTIMEDIA_ICON,
- IMG_ID_OPTION_MENU_FILEMNGR_ICON,
- IMG_ID_OPTION_MENU_FUNANDGAMES_ICON,
- IMG_ID_OPTION_MENU_PROFILES_ICON,
- IMG_ID_OPTION_MENU_ORGANIZER_ICON,
- IMG_ID_OPTION_MENU_EXTRA_ICON,
- IMG_ID_OPTION_MENU_SETTINGS_ICON /* diamond, 2005/12/23 Phone setup in option menu */
- #else /* __MMI_MAINLCD_240X320__ */
- MAIN_MENU_TITLE_PHONEBOOK_ICON,
- MAIN_MENU_TITLE_MULTIMEDIA_ICON,
- IMG_ID_FNG_FMGR_SUB_ICON,
- MAIN_MENU_TITLE_FUNANDGAMES_ICON,
- MAIN_MENU_TITLE_PROFILES_ICON,
- MAIN_MENU_TITLE_ORGANIZER_ICON,
- MAIN_MENU_TITLE_EXTRA_APP_ICON,
- MAIN_MENU_TITLE_SETTINGS_ICON /* diamond, 2005/12/23 Phone setup in option menu */
- #endif /* __MMI_MAINLCD_240X320__ */
- #else /* __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__ */
- IMG_GLOBAL_L1,
- IMG_GLOBAL_L2,
- IMG_GLOBAL_L3,
- IMG_GLOBAL_L4,
- IMG_GLOBAL_L5,
- IMG_GLOBAL_L6,
- IMG_GLOBAL_L7,
- IMG_GLOBAL_L8,
- #if defined(__MMI_BI_DEGREE_MAIN_MENU_STYLE__)
- IMG_GLOBAL_L9
- #endif
- #endif /* __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__ */
- };
- #else /* defined(__MMI_VERSION_2__) */
- U16 MenuOptionIconList[MAX_SUB_MENUS] =
- {
- #ifndef __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__
- #ifdef __MMI_MAINLCD_240X320__
- IMG_ID_OPTION_MENU_MULTIMEDIA_ICON,
- IMG_ID_OPTION_MENU_FUNANDGAMES_ICON,
- IMG_ID_OPTION_MENU_PROFILES_ICON,
- IMG_ID_OPTION_MENU_ORGANIZER_ICON,
- #else /* __MMI_MAINLCD_240X320__ */
- MAIN_MENU_TITLE_MULTIMEDIA_ICON,
- MAIN_MENU_TITLE_FUNANDGAMES_ICON,
- MAIN_MENU_TITLE_PROFILES_ICON,
- MAIN_MENU_TITLE_ORGANIZER_ICON
- #endif /* __MMI_MAINLCD_240X320__ */
- #else /* __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__ */
- IMG_GLOBAL_L1,
- IMG_GLOBAL_L2,
- IMG_GLOBAL_L3,
- IMG_GLOBAL_L4
- #endif /* __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__ */
- };
- #endif /* defined(__MMI_VERSION_2__) */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifndef __MMI_TOUCH_SCREEN__
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
- g_idle_context.ToMainMenuScrFromIdleApp = 1; /* diamond, 2005/10/29, keypad lock in insert sim screen */
- #endif
- #endif /* __MMI_TOUCH_SCREEN__ */
- EntryNewScreen(SCR_SIM_OPTION, NULL, EntryScrSimOptionMenu, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_SIM_OPTION);
- SetParentHandler(MENU_SIM_OPTION_ID);
- nNumofItem = GetNumOfChild(MENU_SIM_OPTION_ID);
- nDispAttribute = GetDispAttributeOfItem(MENU_SIM_OPTION_ID);
- GetSequenceStringIds(MENU_SIM_OPTION_ID, nStrItemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory15Screen(
- STR_SIM_OPTION_CAPTION,
- 0,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- nStrItemList,
- MenuOptionIconList,
- LIST_MENU,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* diamond, 2005/10/29, keypad lock in insert sim screen */
- #ifndef __MMI_TOUCH_SCREEN__
- #if (defined(__MMI_KEYPAD_LOCK_PATTERN_2__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__))
- if (g_idle_context.ToMainMenuScrFromIdleApp == 1)
- {
- StartTimer(KEYPAD_LOCK_TIMER, KEYPAD_LOCK_TIMEOUT, IdleHandleKeypadLockProcess);
- SetKeyHandler(IdleHandlePoundKeyForKeypadLock, KEY_POUND, KEY_EVENT_UP);
- }
- #endif /* (defined(__MMI_KEYPAD_LOCK_PATTERN_2__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__)) */
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- /**************************************************************************
- Enter PIN APIs:
- void EntryScrEnterPIN(void)
- void ShowSubLCDEnterPIN(void)
- void ExitSubLCDEnterPIN(void)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * EntryScrEnterPIN
- * DESCRIPTION
- * Function inputs PIN from the user
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrEnterPIN(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 PassCountdownDisp[MAX_PASS_COUNTDOWN_DISP];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ENTER_PIN, NULL, EntryScrEnterPIN, NULL);
- DinitHistory();
- //if(!g_pwr_context.idleScreenFirst)
- // g_pwr_context.PowerOnPeriod = 0;
- g_pwr_context.PowerOnMMIStatus = MMI_POWER_ON_SECURITY_SIM_LOCK; /* 0x12: SIM lock */
- g_pwr_context.PrevScreenIndicator = ENTER_PIN_SCR;
- /* If user is entring this screen after SOS call then memset the buffer */
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave)
- {
- memset((S8*) gInputPwdBuffer, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- }
- /* Callback to check input password length */
- RegisterInputBoxValidationFunction(RstrSettingPasswdScrSoftKeyFunc);
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- FillCountDownString(MMI_SETTING_TYPE_CHV1, PassCountdownDisp);
- ShowCategory111Screen(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_RSK_SOS,
- 0,
- STR_ENTER_PIN_MSG,
- INPUT_TYPE_NUMERIC_PASSWORD,
- (U8*) gInputPwdBuffer,
- MAX_PWD_LENGTH_MMI,
- PassCountdownDisp,
- NULL);
- ShowSubLCDEnterPIN(); //ShowSubLCDScreen(ShowSubLCDEnterPIN);
- DinitSubLCDHistory();
- SetLeftSoftkeyFunction(ValidatePassword, KEY_EVENT_UP);
- if (mmi_bootup_get_active_flight_mode() == 1)
- {
- SetCategory111RightSoftkeyFunction(mmi_flight_mode_popup_in_dialing_sos, KEY_EVENT_UP);
- }
- else
- {
- SetCategory111RightSoftkeyFunction(ShowMakeSOSCallScr,KEY_EVENT_UP);
- SetKeyHandler(GoToSOSDialScr,KEY_SEND,KEY_EVENT_UP);
- }
- SetKeyHandler(ValidatePassword,KEY_POUND,KEY_EVENT_UP);
- /* Disable LSK if the input password length isn't enough */
- gSecuritySetupContext.PasswdLenCheckCallBack = ValidatePassword;
- if (pfnUnicodeStrlen((S8*) gInputPwdBuffer) < MMI_MIN_PASSWORD_LENGTH)
- {
- ChangeLeftSoftkey(0, 0);
- ClearKeyHandler(KEY_POUND, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowSubLCDEnterPIN
- * DESCRIPTION
- * Entry function for sublcd for enter pin
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowSubLCDEnterPIN(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- #ifdef __MMI_SUBLCD_SHOW_ANALOG_CLOCK__
- if (IsClamClose())
- {
- ShowSubLCDAnalogClockScreen();
- }
- else
- {
- ShowSubLCDLogoString();
- }
- #else /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- ShowCategory301Screen((PU8) GetString(STR_SUBLCD_ENTER_PIN_MSG), 0, NULL);
- #endif /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- SetSubLCDExitHandler(ExitSubLCDEnterPIN);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLCDEnterPIN
- * DESCRIPTION
- * Exit function for sublcd for enter pin
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLCDEnterPIN(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- SubLCDHistoryNode SubLCDHistory;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SubLCDHistory.entryFuncPtr = ShowSubLCDEnterPIN;
- AddSubLCDHistory(&SubLCDHistory);
- }
- /**************************************************************************
- Enter Phone Lock APIs:
- void EntryScrEnterPhoneLock(void)
- void ShowSubLCDEnterPhoneLock(void)
- void ExitSubLCDEnterPhoneLock(void)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * EntryScrEnterPhoneLock
- * DESCRIPTION
- * Entry screen for entring phone lock
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrEnterPhoneLock(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* diamond, 2006/02/22 Avoid to re-entry phone lock screen by AT emergency call if phone lock is verified */
- if (g_pwr_context.PowerOnMMIStatus == MMI_POWER_ON_SECURITY_NO_PSWD)
- {
- goto_opening_screen();
- return;
- }
- EntryNewScreen(SCR_ENTER_PHONELOCK, NULL, EntryScrEnterPhoneLock, NULL);
- DinitHistory();
- //if(!g_pwr_context.idleScreenFirst)
- // g_pwr_context.PowerOnPeriod = 0;
- g_pwr_context.PowerOnMMIStatus = MMI_POWER_ON_SECURITY_PHONE_LOCK; /* 0x11: Phone lock */
- g_pwr_context.PrevScreenIndicator = ENTER_PHONELOCK;
- /* If user is entring this screen after SOS call then memset the buffer */
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave)
- {
- memset((S8*) gInputPwdBuffer, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- }
- /* Callback to check input password length */
- RegisterInputBoxValidationFunction(RstrSettingPasswdScrSoftKeyFunc);
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- ShowCategory111Screen(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_RSK_SOS,
- 0,
- STR_ENTER_PHONELOCK_MSG,
- INPUT_TYPE_NUMERIC_PASSWORD,
- (U8*) gInputPwdBuffer,
- MAX_PWD_LENGTH_MMI,
- NULL,
- NULL);
- ShowSubLCDEnterPhoneLock(); //ShowSubLCDScreen(ShowSubLCDEnterPhoneLock);
- DinitSubLCDHistory();
- SetLeftSoftkeyFunction(ValidatePassword, KEY_EVENT_UP);
- if (mmi_bootup_get_active_flight_mode() == 1)
- {
- SetCategory111RightSoftkeyFunction(mmi_flight_mode_popup_in_dialing_sos, KEY_EVENT_UP);
- }
- else
- {
- SetCategory111RightSoftkeyFunction(ShowMakeSOSCallScr,KEY_EVENT_UP);
- SetKeyHandler(GoToSOSDialScr,KEY_SEND,KEY_EVENT_UP);
- }
- SetKeyHandler(ValidatePassword,KEY_POUND,KEY_EVENT_UP);
- /* Disable LSK if the input password length isn't enough */
- gSecuritySetupContext.PasswdLenCheckCallBack = ValidatePassword;
- if (pfnUnicodeStrlen((S8*) gInputPwdBuffer) < MMI_MIN_PASSWORD_LENGTH)
- {
- ChangeLeftSoftkey(0, 0);
- ClearKeyHandler(KEY_POUND, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowSubLCDEnterPhoneLock
- * DESCRIPTION
- * Entry screen of sublcd for entring phone lock
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowSubLCDEnterPhoneLock(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- #ifdef __MMI_SUBLCD_SHOW_ANALOG_CLOCK__
- if (IsClamClose())
- {
- ShowSubLCDAnalogClockScreen();
- }
- else
- {
- ShowSubLCDLogoString();
- }
- #else /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- ShowCategory301Screen((PU8) GetString(STR_SUBLCD_ENTER_PHONELOCK_MSG), 0, NULL);
- #endif /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- SetSubLCDExitHandler(ExitSubLCDEnterPhoneLock);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLCDEnterPhoneLock
- * DESCRIPTION
- * Exit screen of sublcd for entring phone lock
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLCDEnterPhoneLock(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- SubLCDHistoryNode SubLCDHistory;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SubLCDHistory.entryFuncPtr = ShowSubLCDEnterPhoneLock;
- AddSubLCDHistory(&SubLCDHistory);
- }
- /**************************************************************************
- Enter PUK APIs:
- void EntryScrEnterPUK(void)
- void ShowSubLCDEnterPUK(void)
- void ExitSubLCDEnterPUK(void)
- void EntryScrEnterNewPINFirstTime(void)
- void EntryScrEnterNewPINSecondTime(void)
- void ValidatePUK(void)
- void ValidateFirstAndSecondPin(void)
- void EntryScrPinDoNotMatch(void)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * EntryScrEnterPUK
- * DESCRIPTION
- * Function inputs PUK from the user
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrEnterPUK(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 PassCountdownDisp[MAX_PASS_COUNTDOWN_DISP];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ENTER_PUK, NULL, EntryScrEnterPUK, NULL);
- DinitHistory();
- g_pwr_context.PrevScreenIndicator = ENTER_PUK_SCR;
- //if(!g_pwr_context.idleScreenFirst)
- // g_pwr_context.PowerOnPeriod = 0;
- g_pwr_context.PowerOnMMIStatus = MMI_POWER_ON_SECURITY_SIM_LOCK; /* 0x12: SIM lock */
- /* If user is entring this screen after SOS call then memset the buffer */
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave)
- {
- memset((S8*) gInputPwdBuffer, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- }
- /* Callback to check input password length */
- RegisterInputBoxValidationFunction(ScrSettingPukValidation);
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- FillCountDownString(MMI_SETTING_TYPE_UBCHV1, PassCountdownDisp);
- sprintf(g_idle_context.DialPadCallBuffer, ""); /* reset dial pad for input * to start ssc */
- ShowCategory111Screen(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_RSK_SOS,
- 0,
- STR_ENTER_PUK_MSG,
- INPUT_TYPE_NUMERIC_PASSWORD,
- (U8*) gInputPwdBuffer,
- MAX_PWD_LENGTH_MMI,
- PassCountdownDisp,
- NULL);
- ShowSubLCDScreen(ShowSubLCDEnterPUK);
- DinitSubLCDHistory();
- SetLeftSoftkeyFunction(EntryScrEnterNewPINFirstTime, KEY_EVENT_UP);
- SetKeyHandler(EntryScrEnterNewPINFirstTime, KEY_POUND, KEY_EVENT_UP);
- SetKeyHandler(SSCHandleEnterPUK, KEY_STAR, KEY_EVENT_DOWN); /* Allow enter SSC in PUK screen */
- if (mmi_bootup_get_active_flight_mode() == 1)
- {
- SetCategory111RightSoftkeyFunction(mmi_flight_mode_popup_in_dialing_sos, KEY_EVENT_UP);
- }
- else
- {
- SetCategory111RightSoftkeyFunction(ShowMakeSOSCallScr, KEY_EVENT_UP);
- SetKeyHandler(GoToSOSDialScr, KEY_SEND, KEY_EVENT_UP);
- }
- /* Disable LSK if the input password length isn't enough */
- gSecuritySetupContext.PasswdLenCheckCallBack = EntryScrEnterNewPINFirstTime;
- if (pfnUnicodeStrlen((S8*) gInputPwdBuffer) < MMI_MIN_PUK_LENGTH)
- {
- ChangeLeftSoftkey(0, 0);
- ClearKeyHandler(KEY_POUND, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowSubLCDEnterPUK
- * DESCRIPTION
- * Entry function for sublcd screen enter PUK
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowSubLCDEnterPUK(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- #ifdef __MMI_SUBLCD_SHOW_ANALOG_CLOCK__
- if (IsClamClose())
- {
- ShowSubLCDAnalogClockScreen();
- }
- else
- {
- ShowSubLCDLogoString();
- }
- #else /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- ShowCategory301Screen((PU8) GetString(STR_SUBLCD_ENTER_PUK_MSG), 0, NULL);
- #endif /* __MMI_SUBLCD_SHOW_ANALOG_CLOCK__ */
- SetSubLCDExitHandler(ExitSubLCDEnterPUK);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLCDEnterPUK
- * DESCRIPTION
- * Exit function for sublcd screen enter PUK
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLCDEnterPUK(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- SubLCDHistoryNode SubLCDHistory;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SubLCDHistory.entryFuncPtr = ShowSubLCDEnterPUK;
- AddSubLCDHistory(&SubLCDHistory);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrEnterNewPINFirstTime
- * DESCRIPTION
- * Function inputs new PIN first time from the user
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrEnterNewPINFirstTime(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //if(!g_pwr_context.idleScreenFirst)
- // g_pwr_context.PowerOnPeriod = 0;
- g_pwr_context.PowerOnMMIStatus = MMI_POWER_ON_SECURITY_SIM_LOCK; /* 0x12: SIM lock */
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave)
- {
- memset((S8*) gInputNewPinBufferFirstTime, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- }
- /* else if(pfnUnicodeStrlen((S8*)gInputPwdBuffer) < MMI_MIN_PUK_LENGTH)
- {
- if(pfnUnicodeStrlen((S8*)gInputPwdBuffer) <=0)
- {
- return;
- }
- else
- {
- memset((S8*)gInputPwdBuffer,0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- EntryScrInvalidPINPUKPLOCKLength();
- return;
- }
- } */
- EntryNewScreen(SCR_ENTER_NEW_PIN, NULL, EntryScrEnterNewPINFirstTime, NULL);
- g_pwr_context.PrevScreenIndicator = ENTER_NEW_PIN;
- RegisterInputBoxValidationFunction(RstrSettingPasswdScrSoftKeyFunc);
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- ShowCategory111Screen(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- STR_ENTER_NEW_PIN_MSG,
- INPUT_TYPE_NUMERIC_PASSWORD,
- (U8*) gInputNewPinBufferFirstTime,
- MAX_PWD_LENGTH_MMI,
- NULL,
- NULL);
- SetLeftSoftkeyFunction(EntryScrEnterNewPINSecondTime, KEY_EVENT_UP);
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- SetKeyHandler(GoToSOSDialScr,KEY_SEND,KEY_EVENT_UP);
- }
- SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(EntryScrEnterNewPINSecondTime,KEY_POUND,KEY_EVENT_UP);
- gSecuritySetupContext.PasswdLenCheckCallBack = EntryScrEnterNewPINSecondTime;
- if (pfnUnicodeStrlen((S8*) gInputNewPinBufferFirstTime) < MMI_MIN_PASSWORD_LENGTH)
- {
- ChangeLeftSoftkey(0, 0);
- ClearKeyHandler(KEY_POUND, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrEnterNewPINSecondTime
- * DESCRIPTION
- * Function confirms new PIN from user
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrEnterNewPINSecondTime(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_pwr_context.PowerOnMMIStatus = MMI_POWER_ON_SECURITY_SIM_LOCK; /* 0x12: SIM lock */
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave)
- {
- memset((S8*) gInputNewPinBufferSecondTime, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- }
- /* else if(pfnUnicodeStrlen((S8*)gInputNewPinBufferFirstTime) < MMI_MIN_PASSWORD_LENGTH)
- {
- if(pfnUnicodeStrlen((S8*)gInputNewPinBufferFirstTime) <=0)
- {
- return;
- }
- else
- {
- memset((S8*)gInputNewPinBufferFirstTime,0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- EntryScrInvalidPINPUKPLOCKLength();
- return;
- }
- } */
- EntryNewScreen(SCR_ENTER_CONFIRM_PIN, NULL, EntryScrEnterNewPINSecondTime, NULL);
- g_pwr_context.PrevScreenIndicator = ENTER_CONFIRM_PIN;
- RegisterInputBoxValidationFunction(RstrSettingPasswdScrSoftKeyFunc);
- g_pwr_context.SOSCallFlagTOAvoidHistorySave = 0;
- ShowCategory111Screen(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- STR_ENTER_PIN_AGAIN_MSG,
- INPUT_TYPE_NUMERIC_PASSWORD,
- (U8*) gInputNewPinBufferSecondTime,
- MAX_PWD_LENGTH_MMI,
- NULL,
- NULL);
- SetLeftSoftkeyFunction(ValidateFirstAndSecondPin, KEY_EVENT_UP);
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- SetKeyHandler(GoToSOSDialScr,KEY_SEND,KEY_EVENT_UP);
- }
- SetKeyHandler(ValidateFirstAndSecondPin,KEY_POUND,KEY_EVENT_UP);
- SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- gSecuritySetupContext.PasswdLenCheckCallBack = ValidateFirstAndSecondPin;
- if (pfnUnicodeStrlen((S8*) gInputNewPinBufferSecondTime) < MMI_MIN_PASSWORD_LENGTH)
- {
- ChangeLeftSoftkey(0, 0);
- ClearKeyHandler(KEY_POUND, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ValidatePUK
- * DESCRIPTION
- * Function to validate PUK
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ValidatePUK(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* Validate password send message to L4 MSG_ID_MMI_VERIFY_PIN_REQ */
- MYQUEUE Message;
- MMISMUVERIFYPINREQ *local_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
- PRINT_INFORMATION(("@@@@@ Sending request for verifying pin @@@@@"));
- Message.oslSrcId = MOD_MMI;
- Message.oslDestId = MOD_L4C;
- Message.oslMsgId = PRT_MMI_SMU_VERIFY_PIN_REQ;
- local_data = (MMISMUVERIFYPINREQ*) OslConstructDataPtr(sizeof(MMISMUVERIFYPINREQ));
- local_data->pin_type = MMI_TYPE_UBCHV1;
- UnicodeToAnsii((S8*) local_data->pin, (S8*) gInputPwdBuffer);
- UnicodeToAnsii((S8*) local_data->new_pin, (S8*) gInputNewPinBufferFirstTime);
- Message.oslDataPtr = (oslParaType*) local_data;
- Message.oslPeerBuffPtr = NULL;
- OslMsgSendExtQueue(&Message);
- }
- /*****************************************************************************
- * FUNCTION
- * ValidateFirstAndSecondPin
- * DESCRIPTION
- * Function to validate First and Second PIN
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ValidateFirstAndSecondPin(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //if(!g_pwr_context.idleScreenFirst)
- // g_pwr_context.PowerOnPeriod = 1;
- /* if(pfnUnicodeStrlen((S8*)gInputNewPinBufferSecondTime) < MMI_MIN_PASSWORD_LENGTH)
- {
- if(pfnUnicodeStrlen((S8*)gInputNewPinBufferSecondTime) <=0)
- {
- return;
- }
- else
- {
- memset((S8*)gInputNewPinBufferSecondTime,0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- EntryScrInvalidPINPUKPLOCKLength();
- return;
- }
- } */
- if (memcmp
- ((S8*) gInputNewPinBufferSecondTime, (S8*) gInputNewPinBufferFirstTime,
- (MAX_PWD_LENGTH_MMI - 1) * ENCODING_LENGTH) == 0)
- {
- PRINT_INFORMATION(("Both Pin matches , calling ValidatePUK"));
- ValidatePUK(); /* Also Store new pin to the Simulator [Manish to be done later] */
- }
- else
- {
- EntryScrPinDoNotMatch();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrPinDoNotMatch
- * DESCRIPTION
- * Display Message 'PIN inputs do not match'
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrPinDoNotMatch(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset((S8*) gInputNewPinBufferSecondTime, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- memset((S8*) gInputNewPinBufferFirstTime, 0, MAX_PWD_LENGTH_MMI * ENCODING_LENGTH);
- DisplayPopup((U8*) GetString(STR_PIN_DONOT_MATCH), IMG_GLOBAL_ERROR, 0, 2000, (U8) ERROR_TONE);
- DeleteUptoScrID(SCR_ENTER_NEW_PIN);
- }
- /**************************************************************************
- S.O.S APIs:
- void GoToSOSDialScr(void)
- void HandleInsertSIMScrDigitEntry(void)
- void DialSOSNumber(void)
- void ExitDialSOSNumber(void)
- void ShowMakeSOSCallScr(void)
- void ExitShowMakeSOSCallScr(void)
- pBOOL IsSOSCall(void)
- void EntryScrSOSErrorMessage(U16 string_id)
- void EntryScrEmergencyCallDialing(void)
- pBOOL IsSOSPossible(void)
- pBOOL CheckSIMSOSEntries(S8* tempbuffer)
- pBOOL CheckValidEmergencyNo1(S8 *tempbuffer)
- void SimECCInfoSave(void *inMsg)
- **************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * GoToSOSDialScr
- * DESCRIPTION
- * Function takes care that from which buffer DialPadBuffer should be filled up
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void GoToSOSDialScr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_pwr_context.PrevScreenIndicator == ENTER_NEW_PIN)
- {
- pfnUnicodeStrcpy(g_idle_context.DialPadCallBuffer, (S8*) gInputNewPinBufferFirstTime);
- }
- else if (g_pwr_context.PrevScreenIndicator == ENTER_CONFIRM_PIN)
- {
- pfnUnicodeStrcpy(g_idle_context.DialPadCallBuffer, (S8*) gInputNewPinBufferSecondTime);
- }
- else
- {
- pfnUnicodeStrcpy(g_idle_context.DialPadCallBuffer, (S8*) gInputPwdBuffer);
- }
- if (gSecuritySetupContext.PINBlocked)
- {
- pfnUnicodeStrcpy(g_idle_context.DialPadCallBuffer, (S8*) gSecuritySetupContext.NewPassword);
- }
- EntryScrEmergencyCallDialing();
- }
- /*****************************************************************************
- * FUNCTION
- * HandleInsertSIMScrDigitEntry
- * DESCRIPTION
- * Handle digit entry on insert SIM
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HandleInsertSIMScrDigitEntry(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 Keycode, Keytype;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GetkeyInfo(&Keycode, &Keytype);
- sprintf(g_idle_context.DialPadCallBuffer, "");
- g_idle_context.IdleScreenDigitKeyCode = Keycode;
- DialSOSNumber();
- }
- /*****************************************************************************
- * FUNCTION
- * DialSOSNumber
- * DESCRIPTION
- * Function to make SOS calls
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void DialSOSNumber(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_idle_context.IsOnSimErrorDialerScreen = 1;
- EntryNewScreen(SCR_DIAL_SOS_NUM, ExitDialSOSNumber, NULL, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_SIM_INSERTION);
- ShowCategory16Screen(
- STR_GLOBAL_SAVE,
- 0,
- STR_GLOBAL_BACK,
- 0,
- (U8*) g_idle_context.DialPadCallBuffer,
- MAX_DIAL_PAD,
- guiBuffer);
- if (g_idle_context.IdleScreenDigitKeyCode >= 0)
- {
- ExecuteCurrKeyHandler(g_idle_context.IdleScreenDigitKeyCode, KEY_EVENT_DOWN);
- }
- /* 090605 Dialing Calvin Start */
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && defined (__MMI_TOUCH_SCREEN__) )
- #if defined (__MMI_TOUCH_DIAL_SCREEN_WITH_FUNCTION__)
- SetDialingKeypadCallHandler(EntryScrEmergencyCallDialing);
- #else
- SetCenterSoftkeyFunction(EntryScrEmergencyCallDialing, KEY_EVENT_UP);
- #endif
- #endif /* ( (defined __MMI_WGUI_CSK_ENABLE__) && defined (__MMI_TOUCH_SCREEN__) ) */
- /* 090605 Dialing Calvin Start */
- #ifdef __FLIGHT_MODE_SUPPORT__
- if (mmi_bootup_get_active_flight_mode() == 0) /* 2005/11/01 Cannot allow to dial in flight mode insert SIM screen */
- #endif
- SetKeyHandler(EntryScrEmergencyCallDialing, KEY_SEND, KEY_EVENT_UP);
- SetCategory16RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* diamond, 2005/11/20 Allow to entry phonebook in insert SIM screen */
- SetLeftSoftkeyFunction(IdleDialPadSavePhoneBook, KEY_EVENT_UP);
- /* For processing SSC */
- if ((g_pwr_context.PrevScreenIndicator == ENTER_SIM_INSERTION) ||
- (g_pwr_context.PrevScreenIndicator == ENTER_SIM_BLOCK))
- {
- SetKeyHandler(SSCStringParsing1, KEY_POUND, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ExitDialSOSNumber
- * DESCRIPTION
- * Exit Function for dial SOS screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitDialSOSNumber(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave != 1) /* to avoid history save */
- {
- GenericExitScreen(SCR_DIAL_SOS_NUM, DialSOSNumber);
- }
- g_idle_context.IdleScreenDigitKeyCode = -1;
- g_idle_context.IsOnSimErrorDialerScreen = 0;
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) )
- ResetCenterSoftkey();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * ShowMakeSOSCallScr
- * DESCRIPTION
- * Function to make SOS calls
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ShowMakeSOSCallScr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if !defined(__MMI_TOUCH_SCREEN__) || ( defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) && !defined(__MMI_SLIDE__)) //KP Jerry add "defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__)" on 2007-3-27
- #if defined(__MMI_KEYPAD_LOCK_PATTERN_1__) || defined(__MMI_KEYPAD_LOCK_PATTERN_3__) || defined(__MMI_KEYPAD_LOCK_PATTERN_4__) //KP Jerry add "__MMI_KEYPAD_LOCK_PATTERN_3__" on 2007-3-26
- if (GetActiveScreenId() == SCR_SIM_INSERTION || GetActiveScreenId() == SCR_SIM_BLOCK)
- {
- g_idle_context.RskPressedFromIdleApp = 1; /* diamond, 2005/10/29, keypad lock in insert sim screen */
- }
- #endif /* __MMI_KEYPAD_LOCK_PATTERN_1__ || __MMI_KEYPAD_LOCK_PATTERN_3__ || __MMI_KEYPAD_LOCK_PATTERN_4__ */ //KP Jerry add "__MMI_KEYPAD_LOCK_PATTERN_3__" on 2007-3-27
- #endif /* (!__MMI_TOUCH_SCREEN__) || (__MMI_TOUCH_SCREEN__ && !__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) */ //KP Jerry add "__MMI_TOUCH_SCREEN__ && __MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__" on 2007-3-27
- EntryNewScreen(SCR_MAKE_SOS_CALL, ExitShowMakeSOSCallScr, NULL, NULL);
- #ifdef __MMI_TOUCH_SCREEN__
- if (g_keylock_context.gKeyPadLockFlag)
- {
- mmi_pen_unblock();
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- AnsiiToUnicodeString(g_idle_context.DialPadCallBuffer, "112");
- ShowCategory165Screen(
- STR_GLOBAL_YES,
- IMG_GLOBAL_YES,
- STR_GLOBAL_NO,
- IMG_GLOBAL_NO,
- get_string(STR_DIAL_EMERGENCY_NUMBER),
- IMG_GLOBAL_QUESTION,
- NULL);
- SetLeftSoftkeyFunction(EntryScrEmergencyCallDialing, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* changed end key press from up to down to clear END key mapping to DisplayIdleScreen which is done at time of ExecuteCurrExitHandler(). --vanita */
- SetKeyHandler(GoBackHistory, KEY_END, KEY_EVENT_DOWN);
- playRequestedTone(WARNING_TONE);
- /* diamond, 2005/10/29, keypad lock in insert sim screen */
- #if !defined(__MMI_TOUCH_SCREEN__) || ( defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) && !defined(__MMI_SLIDE__)) //KP Jerry add "defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__)" on 2007-3-27
- #if (defined(__MMI_KEYPAD_LOCK_PATTERN_1__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__))
- /* if(g_idle_context.ToNameScrFromIdleApp==1) */
- if (g_idle_context.RskPressedFromIdleApp == 1)
- {
- StartTimer(KEYPAD_LOCK_TIMER, KEYPAD_LOCK_TIMEOUT, IdleHandleKeypadLockProcess);
- SetKeyHandler(IdleHandlePoundKeyForKeypadLock, KEY_POUND, KEY_EVENT_UP);
- }
- #endif /* (defined(__MMI_KEYPAD_LOCK_PATTERN_1__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__)) */
- //KP Jerry add on 2007-3-26 start
- #if (defined(__MMI_KEYPAD_LOCK_PATTERN_3__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__))
- /* if(g_idle_context.ToNameScrFromIdleApp==1) */
- if (g_idle_context.RskPressedFromIdleApp == 1)
- {
- StartTimer(KEYPAD_LOCK_TIMER, KEYPAD_LOCK_TIMEOUT, IdleHandleKeypadLockProcess);
- SetKeyHandler(IdleHandlePoundKeyForKeypadLock, KEY_STAR, KEY_EVENT_UP);
- }
- #endif /* (defined(__MMI_KEYPAD_LOCK_PATTERN_3__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__)) */
- //KP Jerry add on 2007-3-26 end
- //KP Jerry add on 2007-4-23 start
- #if (defined(__MMI_KEYPAD_LOCK_PATTERN_4__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__))
- /* if(g_idle_context.ToNameScrFromIdleApp==1) */
- if (g_idle_context.RskPressedFromIdleApp == 1)
- {
- StartTimer(KEYPAD_LOCK_TIMER, KEYPAD_LOCK_TIMEOUT, IdleHandleKeypadLockProcess);
- SetKeyHandler(IdleHandlePoundKeyForKeypadLock, KEY_CAMERA, KEY_EVENT_UP);
- }
- #endif /* (defined(__MMI_KEYPAD_LOCK_PATTERN_4__) && !defined(__MMI_DISABLE_KEYPAD_LOCK__)) */
- //KP Jerry add on 2007-4-23 end
- #endif /* (!__MMI_TOUCH_SCREEN__) || (__MMI_TOUCH_SCREEN__ && !__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) */ //KP Jerry add "__MMI_TOUCH_SCREEN__ && __MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__" on 2007-3-27
- }
- /*****************************************************************************
- * FUNCTION
- * ExitShowMakeSOSCallScr
- * DESCRIPTION
- * Exit Function for make SOS call screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitShowMakeSOSCallScr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_pwr_context.SOSCallFlagTOAvoidHistorySave != 1)
- {
- /* GenericExitScreen(SCR_MAKE_SOS_CALL, ShowMakeSOSCallScr); */
- }
- stopRequestedTone(WARNING_TONE);
- }
- /*****************************************************************************
- * FUNCTION
- * IsSOSCall
- * DESCRIPTION
- * Function for CM to notify is SOS
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- pBOOL IsSOSCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_pwr_context.ForCMToIdentifySOSCall;
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSOSErrorMessage
- * DESCRIPTION
- * Popup error message for SOS screen
- * PARAMETERS
- * string_id [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSOSErrorMessage(U16 string_id)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- historyNode *History;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- DisplayPopup((U8*) GetString(string_id), IMG_GLOBAL_ERROR, 0, 2000, (U8) ERROR_TONE);
- if (IsScreenPresent(SCR_ID_SECSET_PUK1))
- {
- if (GetHistoryScrID(SCR_ID_SECSET_PUK1, &History) == ST_SUCCESS)
- {
- if (History->inputBuffer != NULL)
- {
- memset(History->inputBuffer, 0, ENCODING_LENGTH);
- }
- if (History->guiBuffer != NULL)
- {
- memset(History->guiBuffer, 0, 2);
- }
- }
- DeleteUptoScrID(SCR_ID_SECSET_PUK1);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrEmergencyCallDialing
- * DESCRIPTION
- * Show the message Emergency Call Dialing
- * PARAMETERS
- * void
- * RETURNS
- * void