IdleApp.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:269k
- /*****************************************************************************
- * 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:
- * ---------
- * IdleApp.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file is for The Idle screen application
- *
- * 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!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * 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!!
- *============================================================================
- ****************************************************************************/
- /****************************************************************************
- * Include Files
- *****************************************************************************/
- #include "stdC.h"
- #include "MMI_Features.h"
- #include "L4Dr.h"
- #include "L4Dr1.h"
- #include "MiscFunctions.h"
- #include "KeyBrd.h"
- #include "DebugInitDef.h"
- #include "gdi_include.h"
- #include "CustDataRes.h"
- #include "CustMenuRes.h"
- #include "gui_themes.h"
- #include "GlobalConstants.h"
- #include "HistoryGprot.h"
- #include "DateTimeGprot.h"
- #include "CommonScreens.h" /* DisplayPopup */
- #include "wgui_categories.h"
- #include "wgui_categories_CM.h"
- #include "wgui_categories_multimedia.h"
- #include "wgui_categories_idlescreen.h"
- #include "wgui_status_icons.h"
- #include "wgui_softkeys.h"
- #include "UCS2prot.h"
- #include "worldclock.h"
- #include "IdleAppDef.h"
- #include "IdleAppProt.h"
- #include "Globaldefs.h"
- #include "CallHistoryGProts.h"
- #include "SettingProfile.h"
- #include "ProfileGprots.h"
- #include "SimDetectionGexdcl.h"
- #include "SimDetectionGprot.h"
- #include "FontRes.h"
- #include "KeyBrd.h"
- #include "CallManagementGprot.h"
- #include "CallHistoryMain.h" /* CHISTResetCallLogIndex */
- #include "SSCStringHandle.h"
- #include "SettingGprots.h"
- #include "audioinc.h"
- #include "gpioInc.h"
- #include "SettingProfile.h"
- #include "Unicodexdcl.h"
- #include "SpeedDial.h"
- #include "MessagesResourceData.h"
- #include "SubLCDHistoryGprot.h"
- #include "WPSSProtos.h"
- #include "PowerOnChargerProt.h"
- #include "FunAndGamesDefs.h"
- #include "NVRAMType.h"
- #include "NVRAMProt.h"
- #include "NVRAMEnum.h"
- #include "DownloadDefs.h"
- #include "QuickAccessMenuItemProt.h"
- #include "AlarmFrameworkProt.h"
- #include "ProfilesGexdcl.h"
- #include "PhoneBookDef.h"
- #include "PhoneBookTypes.h"
- #include "PhoneBookProt.h"
- #include "PhoneBookGprot.h"
- #include "mdi_datatype.h"
- #include "mdi_audio.h"
- #include "PhoneSetupGprots.h"
- #include "OrganizerGprot.h" /* OrgDeInit */
- #include "SettingDefs.h" /* ST_NOTIFYDURATION define */
- #include "SettingProfile.h" /* SUCCESS_TONE define */
- #include "GlobalScrEnum.h" /* GLOBAL_SCR_DUMMY */
- #include "Fat_fs.h"
- #include "FileSystemDef.h" /* file function */
- #include "FileManagerGProt.h" /* file path / file error */
- #include "FileManagerDef.h" /* error string id */
- #include "statusiconres.h"
- #include "FlightModeGProt.h"
- #include "VolumeHandler.h"
- #if defined(__MMI_DATE_TIME_SETTING_REMINDER__)
- #include "rtc_sw.h"
- #endif
- /* JBRW Sandeep */
- #if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
- #include "JBrowserMMIGProts.h"
- #endif
- /* Manish - adding for JMMS */
- #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
- #include "JMMSPushHandling.h"
- #include "JMMSMainMMS.h"
- #endif /* (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT)) */
- /* Dara */
- #if defined (JATAAYU_SUPPORT) && (defined (WAP_SUPPORT) || (defined (MMS_SUPPORT)))
- #include "JProvProts.h"
- #endif
- #include "TimerEvents.h"
- #include "wgui_status_icons.h"
- #include "wgui_ems.h"
- #include "ShortcutsProts.h" /* for 4-dedicated shortcuts 0101 */
- #include "SATGProts.h"
- #ifdef WAP_SUPPORT
- #include "Wapadp.h"
- #endif
- #ifdef __MMI_USB_SUPPORT__
- #include "USBDeviceGprot.h"
- #endif
- #ifdef __J2ME__
- #include "javaAgencyGprot.h"
- #include "jvm_adaptor.h"
- #endif /* __J2ME__ */
- #ifdef __MMI_SWFLASH__
- #include "SWFlashGprot.h"
- #endif /* __MMI_SWFLASH__ */
- #ifdef __MMI_IRDA_SUPPORT__
- #include "IrdaMMIGprots.h"
- #endif
- #ifdef __MMI_OPP_SUPPORT__
- #include "OPPMMIGprots.h"
- #endif
- #ifdef __MOD_SMSAL__
- #include "MessagesExDcl.h"
- #include "SMSApi.h"
- #endif /* __MOD_SMSAL__ */
- #ifdef __MMI_CAMERA__
- #include "lcd_if.h" /* LCD layer enable flag */
- #include "gdi_lcd_config.h"
- #include "MMI_features_camera.h"
- #include "mdi_datatype.h"
- #include "mdi_camera.h" /* camera lib */
- #include "CameraApp.h"
- #endif /* __MMI_CAMERA__ */
- #ifdef MMI_ON_HARDWARE_P
- #include "mmi_trc.h"
- #include "custom_util.h"
- #endif /* MMI_ON_HARDWARE_P */
- #include "NITZ.h"
- #include "vObjects.h"
- #include "KeyBrd.h"
- #include "OSThreadInterfaceGprot.h"
- #include "EventsGprot.h"
- #include "NetworkSetupDefs.h" /* Cylen, __MANUAL_MODE_NW_SEL__ */
- #include "NetworkSetupGProt.h"
- #ifdef __MMI_IMPS__
- #include "mmi_imps_gprot.h"
- #endif
- /* micha_POC */
- #ifdef __MMI_POC__
- #include "PoCGProt.h"
- #endif
- #ifdef __MMI_VOIP__
- #include "VoIPDef.h"
- #include "VoIPGProt.h"
- #endif /* __MMI_VOIP__ */
- #ifdef __MMI_TOUCH_SCREEN__
- #include "TouchScreenGProt.h"
- #include "wgui_touch_screen.h"
- #endif /* __MMI_TOUCH_SCREEN__ */
- #ifdef __MMI_UNIFIED_MESSAGE__
- #include "UnifiedMessageGProt.h"
- #endif
- #if defined(__MMI_DOWNLOAD_AGENT__)
- #include "App_mine.h"
- #include "DLAgentDef.h"
- #include "DLAgentGProt.h"
- #endif /* defined(__MMI_DOWNLOAD_AGENT__) */
- #ifdef __MMI_SML_MENU__
- #include "PersonalizationProt.h"
- #endif
- #ifdef __SYNCML_SUPPORT__
- #include "SyncMLGProt.h"
- #endif
- #if defined(__FOTA_ENABLE__)
- #include "DeviceManagementGProt.h"
- #endif
- //KP Jerry add on 2007-4-12 start
- #ifdef __MMI_MESSAGES_SENDMSG_QUICKLY__
- #include "SmsGuiInterfaceType.h"
- #endif
- //KP Jerry add on 2007-4-12 end
- //KP Jerry add for third sevice on 2007-03-26 start
- #ifdef __KONG_NET_SP__
- //#include "custom_mmi_default_value_pluto.h"
- #include "NVRAMProt.h"
- #include "GlobalDefs.h"
- #include "NVRAMType.h"
- #include "CustResDef.h"
- #include "SmsGuiInterfaceType.h"
- #include "WrapperGprot.h"
- #include "DateTimeType.h"
- #include "Wap.h"
- #include "wap_ps_struct.h"
- #include "SmsGuiInterfaceType.h"
- #include "MessagesResourceData.h"
- #endif
- //KP Jerry add for third sevice on 2007-03-26 end
- #undef __NEWSIMULATOR
- /*****************************************************************************
- * Define
- *****************************************************************************/
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /* diamond, 2005/10/12 idle revise */
- typedef void (*FuncPtr) (void);
- typedef U8(*FuncPtrRtn) (void);
- typedef struct _idle_callback_info
- {
- FuncPtrRtn idle_callback_chk_f; /* callback to check if there is any pending event in idle screen */
- FuncPtr idle_callback_exe_f; /* callback to execute the corresponding function in idle screen */
- } IDLECALLBACKINFO;
- /* end, diamond */
- /****************************************************************************
- * Global Variable
- *****************************************************************************/
- extern U16 gCurrLangIndex;
- extern U16 gMaxDeployedLangs;
- /* extern U8 isIdleScreenReached; */
- extern S32 MAIN_LCD_device_width;
- extern sLanguageDetails *gLanguageArray;
- #ifdef __HOMEZONE_SUPPORT__
- extern U8 *gHomezoneText;
- #endif
- extern U16 simErrorDisplayString;
- /****************************************************************************
- * Global Function
- *****************************************************************************/
- //KP Jerry add on 2007-4-24 start
- #ifdef __MMI_SLIDE__
- extern U8 gMMIClamState;
- #endif
- extern void mmi_audply_entry_main(void); //KP Jerry add on 2007-4-24
- //KP Jerry add on 2007-4-24 end
- extern void EmergencyCallCheck(S16 keyCode, S16 keyType);
- extern void mmi_java_entry_mid_launch(void);
- extern void MMIProcessActionMsg(void);
- extern U8 *GetDeliverdReportMessage(void);
- extern kal_bool INT_USBBoot(void);
- extern EMSData *GetClass0MessagePtr(void);
- extern U8 *GetClass0MessageHeader(void);
- extern BOOL IsMyTimerExist(U16 nTimerId);
- extern void SATEVDLIdleScreenAvaliable(void);
- extern void mmiapi_enter_idle_screen_notify(void);
- #ifdef WAP_SUPPORT
- extern void wap_internet_key_hdlr(void);
- #endif
- #ifdef __J2ME__
- extern void j2me_enter_idle_screen_notify(void);
- #endif
- #ifdef __MMI_AUDIO_PLAYER__
- extern BOOL mmi_audply_is_playing(void);
- extern void mmi_audply_set_subLCD_shown(BOOL is_shown);
- #endif /* __MMI_AUDIO_PLAYER__ */
- #ifdef __MMI_FM_RADIO__
- extern BOOL mmi_fmrdo_is_power_on(void);
- extern void mmi_fmrdo_set_subLCD_shown(BOOL is_shown);
- void mmi_fmrdo_power_on(BOOL turn_on);
- #endif /* __MMI_FM_RADIO__ */
- #if defined(__MMI_VRSD__)
- extern void mmi_vrsd_rcg_pre_entry(void);
- #endif
- #if defined(__MMI_VRSD_DIAL__)
- extern BOOL mmi_vrsddial_check_sim_change(void);
- #endif
- #if defined(__MMI_VRSI__)
- extern void mmi_vrsi_rcg_pre_entry(void);
- #endif
- #ifdef MMI_ON_WIN32
- extern void MMI_system_keybord_handler(S32 key_code, S32 key_state);
- #endif
- /* Associate caller group in SIM card entry */
- #if defined(__MMI_PHB_CALLERGROUP_IN_SIM__)
- extern BOOL mmi_phb_init_check_sim_change(void);
- #endif
- #ifdef __MMI_WGUI_MINI_TAB_BAR__
- extern void ClndrPreEntryApp(void);
- extern void fmgr_launch(void);
- #endif /* __MMI_WGUI_MINI_TAB_BAR__ */
- /* diamond, 2005/07/05 Flight mode */
- #ifdef __FLIGHT_MODE_SUPPORT__
- extern void EntryScrSimOptionMenu(void);
- void EntryFlightModeIdleScreen(void);
- void EntryFlightModeKeypadLockScreen(void);
- void FlightModeDigitHandler(void);
- #endif /* __FLIGHT_MODE_SUPPORT__ */
- /* end, diamond */
- extern void InsertSimSetKeyPadLockFlag(void);
- extern void UI_set_font(UI_font_type f);
- static U8 mmi_idle_missed_call_check(void);
- #ifdef __MMI_NITZ__
- static U8 mmi_idle_pending_nitz_check(void);
- #endif
- #if defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT)
- static U8 mmi_idle_widget_check_and_display_new_msg(void);
- #endif
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- idle_context_struct g_idle_context =
- {
- 0, /* IsOnIdleScreen */
- SUBLCD_NOT_ON_IDLE, /* IsSubLcdOnIdleScreen */
- 0, /* IsOnDialerScreen */
- 0, /* IsOnSimErrorScreen */
- 0, /* IsOnSimErrorDialerScreen */
- 0, /* IsScrSvrSleepIn */
- 0, /* IsRSKPressOnScreenSaver */
- 0, /* LongPressEnable */
- 0, /* AvoidHistoryofDialerScreen */
- 0, /* ScreenSaverRunFlag */
- 0, /* ToNameScrFromIdleApp */
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
- 0, /* ToMainMenuScrFromIdleApp */
- #endif
- 0, /* RskPressedFromIdleApp */
- -1, /* IdleScreenDigitKeyCode */
- SET_CURRENT_PROFILE, /* ToggleProfile */
- 0, /* AutoLockTimeOut */
- {0} /* All dialled digits from idle screen */
- };
- idle_keylock_struct g_keylock_context =
- {
- 0, /* gKeyPadLockFlag */
- 0, /* KeyLockLSKStringID */
- 0, /* KeyLockRSKStringID */
- 0, /* KeyLockLSKIconID */
- 0, /* KeyLockRSKIconID */
- NULL /* diamond, 2006/03/26 Generic exit function for keypad lock callback screens */
- };
- #ifdef __MMI_NITZ__
- static idle_nitz_struct g_nitz_display =
- {
- 0, /* opname_from_nitz */
- 0, /* country_init */
- {0}, /* plmn[] */
- {0} /* display_name[] */
- };
- #endif /* __MMI_NITZ__ */
- static const IDLECALLBACKINFO mmi_idle_callbacks[] =
- {
- /* How to add callbacks for idle screen/keypad lock ? */
- /* 1. Fill the callbacks into this array */
- /* Notice that the function type ! */
- /* 1. Checking function should be U8 XXX(void) */
- /* 2. Execution function should be void XXX(void) */
- #ifdef __MMI_SAT_DISPLAY_TEXT_WITH_KEYPAD_LOCK__
- {mmi_sat_is_pending_idle_sat_cmd, mmi_sat_execute_idle_sat_cmd},
- #endif
- #ifdef __J2ME__
- {mmi_java_is_launch_after_install, mmi_java_entry_mid_launch}, /* new Java midlet */
- #endif
- {mmi_idle_missed_call_check, EntryCHISTNotifyMissedCall}, /* missed call */
- {mmi_msg_need_class0_msg_ind, mmi_msg_entry_class0_msg_ind}, /* new class 0 message */
- #ifdef __MMI_UNIFIED_MESSAGE__
- {mmi_um_check_new_msg, mmi_um_pre_entry_new_msg_ind}, /* new unified message */
- #else
- {mmi_msg_need_new_msg_ind, mmi_msg_entry_new_msg_ind}, /* new short message */
- #endif
- {mmi_msg_need_mem_exceed_ind, mmi_msg_entry_mem_exceed_ind}, /* memory exceed notification */
- {mmi_msg_need_delivery_report_ind, mmi_msg_entry_deliver_report_ind}, /* deliver report */
- {mmi_msg_need_waiting_ind, mmi_msg_entry_msg_waiting_ind}, /* waiting message */
- #ifdef __MMI_VOIP__
- {mmi_voip_need_msg_waiting_ind, mmi_voip_entry_msg_waiting_ind},
- #endif
- #ifdef __MMI_IMPS__
- {mmi_imps_check_invite_in_idle, NULL}, /* IMPS invitation */
- #endif
- #if (defined(__MMI_VCARD__) || defined(__MMI_VCALENDAR__)) && defined(MMI_ON_HARDWARE_P)
- {mmi_vobj_is_pending_object, mmi_vobj_entry_recv_object}, /* unread vObjects */
- #endif
- #if defined(__MMI_IRDA_SUPPORT__)
- {mmi_irda_get_recv_files_cnt, mmi_irda_entry_idle_notify_scr}, /* files from IrDA */
- #endif
- #if (defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) && defined(__MMI_IRDA_SUPPORT__))
- {mmi_irda_is_any_theme_file_rcv, mmi_irda_theme_show_idle_notify_scr}, /* downloadable theme from IrDA */
- #endif
- #if defined(__MMI_NITZ__)
- {mmi_idle_pending_nitz_check, EntryNitzScreen}, /* NITZ */
- #endif
- {mmi_msg_need_new_cb_ind, mmi_msg_entry_new_cb_ind}, /* new CB message */
- #if defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT)
- {mmi_idle_widget_check_and_display_new_msg, NULL}, /* new message from widget */
- #endif
- #if defined(__MMI_PHB_CALLERGROUP_IN_SIM__)
- {mmi_phb_init_check_sim_change, NULL}, /* associate caller group in SIM card entry */
- #endif
- #if defined(__MMI_VRSD_DIAL__)
- {mmi_vrsddial_check_sim_change, NULL}, /* VRSD dial */
- #endif
- #if defined(__MMI_OPP_SUPPORT__)
- {mmi_opp_get_recv_files_cnt, mmi_opp_entry_idle_notify_scr}, /* files from Bluetooth */
- #endif
- #if defined(__MMI_DOWNLOAD_AGENT__)
- {mmi_da_launch_ring_buffer_check, mmi_da_entry_new_push_ind}, /* download agent */
- #endif
- #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
- {mmi_jmms_need_mms_ind, mmi_jmms_entry_new_mms_ind}, /* new mms message */
- #endif
- #if !defined (__MMI_UNIFIED_MESSAGE__) && defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
- {mmi_brw_new_push_msg_ind, mmi_brw_entry_new_push_msg_ind}, /* new wap push message */
- #endif
- #if defined (JATAAYU_SUPPORT) && (defined (WAP_SUPPORT) || (defined (MMS_SUPPORT)))
- {mmi_prov_check_and_install_new_settings, mmi_prov_show_install_settings_dialog},
- #endif
- #ifdef __SYNCML_SUPPORT__
- {mmi_syncml_is_sync_alarm_expired, mmi_syncml_sync_alarm_hdlr}, /* sync */
- #endif
- #ifdef __MMI_USER_CTRL_PLMN_SUPPORT__
- {mmi_netset_unknown_operator_check, mmi_netset_unknown_operator_query}, /* user control plmn */
- #endif
- #if defined(__FOTA_ENABLE__)
- {mmi_dm_fwu_check_download_finish, mmi_dm_fwu_entry_download_finish_ind}, /* firmware upgrade finished */
- #endif
- {NULL, NULL} /* dummy one, please add callbacks before this entity */
- };
- extern S8 *idle_screen_wallpaper_name;
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- static U16 idleLRStringtID = 0; /* for __MANUAL_MODE_NW_SEL__ */
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_exe_callback
- * DESCRIPTION
- * Execute callbacks before entry idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static pBOOL mmi_idle_exe_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i;
- pBOOL rtn = MMI_FALSE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; mmi_idle_callbacks[i].idle_callback_chk_f != NULL; i++)
- {
- //if(mmi_idle_callbacks[i].idle_callback_chk_f != NULL)
- //{
- if ((*mmi_idle_callbacks[i].idle_callback_chk_f) ())
- {
- rtn = MMI_TRUE;
- if (mmi_idle_callbacks[i].idle_callback_exe_f != NULL)
- {
- (*mmi_idle_callbacks[i].idle_callback_exe_f) ();
- }
- break;
- }
- /* } */
- }
- return rtn;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_missed_call_check
- * DESCRIPTION
- * Wrapper for idle screen callback
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static U8 mmi_idle_missed_call_check(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetMissedCallFlag() && CHISTGetMissedCallCountBeforeView())
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- #ifdef __MMI_NITZ__
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_pending_nitz_check
- * DESCRIPTION
- * Wrapper for idle screen callback
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static U8 mmi_idle_pending_nitz_check(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (U8) g_nitz_cntx.IsNITZPending;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_update_opname_from_nitz
- * DESCRIPTION
- * Update NITZ network name if a new message is received
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_update_opname_from_nitz(void)
- {
- if (mmi_idle_is_on_idle_screen())
- {
- EntryIdleScreen(); /* IdleRefreshServiceIndicationArea(); */
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_update_nitz_content
- * DESCRIPTION
- * Update NITZ network name from NVRAM
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_update_nitz_content(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 max_display_length = MAX_LENGTH_DISPLAY_NAME;
- U8 mcc_tmp_unicode[4 * ENCODING_LENGTH];
- U8 tmp_plmn[MAX_PLMN_LEN_MMI + 1];
- U8 tmp_display_name[MAX_LENGTH_DISPLAY_NAME * ENCODING_LENGTH];
- U8 iCnt = 0;
- S32 StringWidth, StringHeight;
- stFontAttribute prev_f;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(tmp_plmn, 0 , MAX_PLMN_LEN_MMI + 1);
- memset(tmp_display_name, 0, MAX_LENGTH_DISPLAY_NAME);
- mmi_nitz_get_nitz_nw_name(tmp_plmn, tmp_display_name, (U8) MAX_LENGTH_DISPLAY_NAME - 1, &g_nitz_display.country_init);
- if (strlen((S8*)tmp_plmn) != 0 && strlen((S8*)tmp_display_name) != 0)
- {
- strcpy((S8*)g_nitz_display.plmn, (S8*)tmp_plmn);
- if (g_nitz_display.country_init)
- {
- max_display_length -= 4; /* 1 space char and 3 mcc digits */
- }
-
- if (pfnUnicodeStrlen((S8*) tmp_display_name) >= max_display_length)
- {
- pfnUnicodeStrncpy((S8*) g_nitz_display.display_name, (S8*) tmp_display_name, max_display_length);
- }
- else
- {
- pfnUnicodeStrcpy((S8*) g_nitz_display.display_name, (S8*) tmp_display_name);
- }
- /* add check if the NITZ display name exceeds the LCD width */
- memcpy(&prev_f, UI_font, sizeof(stFontAttribute));
- UI_set_font(&UI_DEFAULT_FONT);
- for (iCnt = (U8) pfnUnicodeStrlen((PS8) g_nitz_display.display_name); iCnt > 0; iCnt--)
- {
- Get_StringWidthHeight((U8*) g_nitz_display.display_name, &StringWidth, &StringHeight);
- if ((StringWidth + 1) >= MAIN_LCD_device_width - (ICON_WIDTH << 1))
- {
- g_nitz_display.display_name[iCnt * ENCODING_LENGTH] = 0x0;
- g_nitz_display.display_name[iCnt * ENCODING_LENGTH + 1] = 0x0;
- }
- else
- {
- break;
- }
- }
- UI_set_font(&prev_f);
- if (g_nitz_display.country_init)
- {
- AnsiiNToUnicodeString((S8*) mcc_tmp_unicode, (S8*) g_nitz_display.plmn, 3);
- pfnUnicodeStrcat((S8*) g_nitz_display.display_name, " ");
- pfnUnicodeStrcat((S8*) g_nitz_display.display_name, (S8*) mcc_tmp_unicode);
- }
- g_nitz_display.opname_from_nitz = 1;
- }
- else
- {
- g_nitz_display.opname_from_nitz = 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_check_nitz_display_validation
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- pBOOL mmi_idle_check_nitz_display_validation(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (memcmp(g_nitz_display.plmn, gPLMN, MAX_PLMN_LEN_MMI) != 0)
- {
- g_nitz_display.opname_from_nitz = 0;
- return MMI_FALSE;
- }
- else
- {
- return MMI_TRUE;
- }
- }
- #endif /* __MMI_NITZ__ */
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_widget_check_and_display_new_msg
- * DESCRIPTION
- * Wrapper for idle screen callback
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- #if defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT)
- static U8 mmi_idle_widget_check_and_display_new_msg(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_keylock_context.gKeyPadLockFlag)
- {
- if (widget_MMI_check_and_display_new_msg_when_keypad_lock
- (g_keylock_context.KeyLockLSKStringID, g_keylock_context.KeyLockLSKIconID,
- g_keylock_context.KeyLockRSKStringID, g_keylock_context.KeyLockRSKIconID))
- {
- return MMI_TRUE;
- }
- }
- else
- {
- if (widget_MMI_check_and_display_new_msg())
- {
- return MMI_TRUE;
- }
- }
- return MMI_FALSE;
- }
- #endif /* defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT) && !defined (__UNIFIED_MSG_SUPPORT__) */
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_pen_block
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- #ifdef __MMI_TOUCH_SCREEN__
- void mmi_idle_pen_block(void)
- {
- #ifndef __MMI_GPIO_DISABLE_SLEEP_MODE__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- extern BOOL gIsInSleepMode;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (gIsInSleepMode != 1)
- #endif /* __MMI_GPIO_DISABLE_SLEEP_MODE__ */
- mmi_pen_block();
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_set_keypad_lock_string
- * DESCRIPTION
- * This function is used to set keypad lock RSK string
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_set_keypad_lock_string(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_keylock_context.KeyLockRSKStringID = 0;
- g_keylock_context.KeyLockRSKIconID = 0;
- g_keylock_context.KeyLockLSKStringID = 0;
- g_keylock_context.KeyLockLSKIconID = 0;
- if (g_idle_context.IsOnIdleScreen == 1 || g_idle_context.IsOnSimErrorScreen == 1)
- {
- #ifdef __MMI_TOUCH_SCREEN__
- ChangeStatusIconImage(STATUS_ICON_KEYPAD_LOCK, IMG_SI_KEYPAD_LOCK);
- #else
- ShowStatusIcon(STATUS_ICON_KEYPAD_LOCK);
- #endif
- #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
- #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
- g_keylock_context.KeyLockRSKStringID = SCREEN_LOCKED_TEXT;
- #else
- g_keylock_context.KeyLockRSKStringID = KEYPAD_LOCKED_RSK_TEXT;
- #endif
- #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
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
- #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
- g_keylock_context.KeyLockLSKStringID = SCREEN_LOCKED_TEXT;
- #else
- g_keylock_context.KeyLockLSKStringID = KEYPAD_LOCKED_RSK_TEXT;
- #endif
- #endif /* __MMI_KEYPAD_LOCK_PATTERN_2__ */
- }
- else
- {
- /* If active screen is not idle, pen is not blocked */
- /* Set RSK/LSK string to "unlock" because it is allowed to click the touch screen to unlock */
- #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
- g_keylock_context.KeyLockRSKStringID = KEYPAD_LOCKED_RSK_TEXT;
- #endif
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
- g_keylock_context.KeyLockLSKStringID = KEYPAD_LOCKED_RSK_TEXT;
- #endif
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_dummy_key_handler
- * DESCRIPTION
- * This function is a dummy handler for idle screen keys
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static FuncPtr dummyKeyHandler[MAX_KEYS];
- extern FuncPtr currKeyFuncPtrs[MAX_KEYS][MAX_KEY_TYPE];
- static void mmi_idle_dummy_key_handler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 ScreenSaverStatus, ScreenSaverWait;
- U16 keyCode, keyType;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PhnsetGetScrSvrSetings(&ScreenSaverStatus, &ScreenSaverWait);
- GetkeyInfo(&keyCode, &keyType);
- if (g_idle_context.IsOnIdleScreen)
- {
- /* postpone the screensaver after press keys */
- if (dummyKeyHandler[keyCode] != NULL && !g_keylock_context.gKeyPadLockFlag)
- {
- (*dummyKeyHandler[keyCode]) ();
- }
- if (keyCode == KEY_ENTER && dummyKeyHandler[keyCode] == NULL && currKeyFuncPtrs[keyCode][KEY_LONG_PRESS] == NULL
- && !g_keylock_context.gKeyPadLockFlag)
- {
- (*dummyKeyHandler[KEY_LSK]) (); /* special case for KEY ENTER with null handler */
- ClearKeyHandler(KEY_ENTER, KEY_EVENT_DOWN);
- }
- }
- if (g_idle_context.IsOnIdleScreen)
- {
- StopTimer(SCREENSAVER_TIMER);
- StartTimer(SCREENSAVER_TIMER, ScreenSaverWait * 1000, EntryIdleSetScreenSaver);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_date_time_reminder
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void mmi_idle_date_time_reminder(void)
- {
- #if defined(__MMI_DATE_TIME_SETTING_REMINDER__)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- static BOOL datejust_reminder_shown = MMI_FALSE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef MMI_ON_HARDWARE_P
- if (!datejust_reminder_shown && RTC_is_MS_FirstPowerOn())
- #else
- if (!datejust_reminder_shown)
- #endif
- {
- DisplayPopup((PU8) GetString(STR_DATE_TIME_UPDATE_REMINDER), IMG_GLOBAL_OK, 0, 2000, 0);
- datejust_reminder_shown = MMI_TRUE;
- }
- #endif /* defined(__MMI_DATE_TIME_SETTING_REMINDER__) */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_dummy_key_in_screensaver
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void mmi_idle_dummy_key_in_screensaver(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i;
- U8 ScreenSaverStatus, ScreenSaverWait;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PhnsetGetScrSvrSetings(&ScreenSaverStatus, &ScreenSaverWait);
- /* Compensatory key handler registration for screen saver. */
- /* The idea here is to set those keys which are not set with handlers to a dummy handler. */
- /* But not that END key is still being set a handler (DisplayIdleScreen) */
- /* for KEY_EVENT_DOWN in PowerAndEndKeyHandler. */
- if (g_keylock_context.gKeyPadLockFlag)
- {
- if (ScreenSaverStatus == 1) /* Screensaver is set to on */
- {
- for (i = KEY_0; i < MAX_KEYS; i++)
- {
- if ((GetKeyHandler(i, KEY_EVENT_DOWN) == NULL) && (GetKeyHandler(i, KEY_EVENT_UP) == NULL))
- {
- SetKeyHandler(mmi_idle_dummy_key_handler, i, KEY_EVENT_DOWN);
- }
- }
- /* add this because of PowerAndEndKeyHandler */
- #ifndef __MMI_KEYPAD_LOCK_PROMPT_TEXT__
- /* diamond, 2005/12/20 END key is registered to prompt text if __MMI_KEYPAD_LOCK_PROMPT_TEXT__ is on */
- SetKeyHandler(mmi_idle_dummy_key_handler, KEY_END, KEY_EVENT_DOWN);
- #endif /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */
- }
- }
- else
- {
- if (ScreenSaverStatus == 1) /* Screensaver is set to on */
- {
- for (i = KEY_0; i < MAX_KEYS; i++)
- {
- dummyKeyHandler[i] = GetKeyHandler(i, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_idle_dummy_key_handler, i, KEY_EVENT_DOWN);
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_set_eg_events
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- extern void nor_sweep_device(void);
- static void mmi_idle_set_eg_events(void)
- {
- #ifdef __MTK_TARGET__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- pBOOL egIsSet = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!egIsSet)
- {
- nor_sweep_device();
- egIsSet = 1;
- }
- #endif /* __MTK_TARGET__ */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_start_keypad_lock
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_start_keypad_lock(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //KP Jerry add on 2007-4-25 start
- #ifdef __MMI_SLIDE__
- if(!gMMIClamState)
- {
- #endif
- //KP Jerry add on 2007-4-25 end
-
- mmi_idle_set_eg_events();
- if (!g_keylock_context.gKeyPadLockFlag) /* keypad isn't lock now */
- {
- SETTING_AKPL_TIME GetAutoLockTimeOut = GetAutoKeypadLockTime();
- switch (GetAutoLockTimeOut)
- {
- case TIME_0:
- g_idle_context.AutoLockTimeOut = 0;
- break;
- case TIME_5:
- g_idle_context.AutoLockTimeOut = 5000;
- break;
- case TIME_30:
- g_idle_context.AutoLockTimeOut = 30000;
- break;
- case TIME_60:
- g_idle_context.AutoLockTimeOut = 60000;
- break;
- case TIME_2:
- g_idle_context.AutoLockTimeOut = 300000;
- break;
- }
- if (g_idle_context.AutoLockTimeOut != 0)
- {
- PRINT_INFORMATION(("[Keypad Lock] mmi_idle_start_keypad_lock: Timer %d start",
- g_idle_context.AutoLockTimeOut));
- if (mmi_bootup_is_sim_valid() == MMI_TRUE)
- {
- StartTimer(IDLE_APP_AUTO_LOCK_TIMER_ID, g_idle_context.AutoLockTimeOut, IdleSetKeyPadLockFlag);
- }
- else
- {
- StartTimer(IDLE_APP_AUTO_LOCK_TIMER_ID, g_idle_context.AutoLockTimeOut, InsertSimSetKeyPadLockFlag);
- }
- }
- }
- //KP Jerry add on 2007-4-25 start
- #ifdef __MMI_SLIDE__
- }
- #endif
- //KP Jerry add on 2007-4-25 end
-
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_restart_keypad_lock_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_restart_keypad_lock_timer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //KP Jerry add on 2007-4-25 start
- #ifdef __MMI_SLIDE__
- if(!gMMIClamState)
- {
- #endif
- //KP Jerry add on 2007-4-25 end
-
- if (g_keylock_context.gKeyPadLockFlag == 1)
- {
- return;
- }
- if (g_idle_context.AutoLockTimeOut != 0 &&
- (g_idle_context.IsOnIdleScreen == 1 || g_idle_context.IsOnSimErrorScreen == 1))
- {
- StopTimer(IDLE_APP_AUTO_LOCK_TIMER_ID);
- if (g_idle_context.IsOnIdleScreen == 1)
- {
- StartTimer(IDLE_APP_AUTO_LOCK_TIMER_ID, g_idle_context.AutoLockTimeOut, IdleSetKeyPadLockFlag);
- }
- if (g_idle_context.IsOnSimErrorScreen == 1)
- {
- StartTimer(IDLE_APP_AUTO_LOCK_TIMER_ID, g_idle_context.AutoLockTimeOut, InsertSimSetKeyPadLockFlag);
- }
- }
- //KP Jerry add on 2007-4-25 start
- #ifdef __MMI_SLIDE__
- }
- #endif
- //KP Jerry add on 2007-4-25 end
-
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_start_screensaver
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_start_screensaver(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 ScreenSaverStatus, ScreenSaverWait;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PhnsetGetScrSvrSetings(&ScreenSaverStatus, &ScreenSaverWait);
- if (ScreenSaverStatus == 0xFF)
- {
- PhnsetRstScrSvrDefault();
- }
- if (ScreenSaverStatus == 1) /* Screensaver is set to on */
- {
- StartTimer(SCREENSAVER_TIMER, ScreenSaverWait * 1000, EntryIdleSetScreenSaver);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_restart_screensaver_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_restart_screensaver_timer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 ScreenSaverStatus, ScreenSaverWait;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_idle_context.ScreenSaverRunFlag == 1) /* screensaver is running */
- {
- return;
- }
- if (g_idle_context.IsOnIdleScreen == 1)
- {
- PhnsetGetScrSvrSetings(&ScreenSaverStatus, &ScreenSaverWait);
- if (ScreenSaverStatus == 0xFF)
- {
- PhnsetRstScrSvrDefault();
- }
- if (ScreenSaverStatus == 1) /* screensaver is active */
- {
- StopTimer(SCREENSAVER_TIMER);
- StartTimer(SCREENSAVER_TIMER, ScreenSaverWait * 1000, EntryIdleSetScreenSaver);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_is_on_idle_screen
- * DESCRIPTION
- * Is on idle screen?
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- pBOOL mmi_idle_is_on_idle_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_idle_context.IsOnIdleScreen == 1)
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_is_screensaver_running
- * DESCRIPTION
- * Is screensaver running?
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- pBOOL mmi_idle_is_screensaver_running(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_idle_context.ScreenSaverRunFlag == 1)
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- //jerson add begin 20070622
- #ifdef __MMI_ONEKEY_SNDREC_SUPPORT__
- extern void mmi_sndrec_send_record_req(void);
- #endif
- //jerson add end 20070622
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_entry_idle_screen
- * DESCRIPTION
- * Idle screen with/without keypad lock
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_entry_idle_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 IdleScreenDigits[MAX_IDLE_SCREEN_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};
-
- U8 *guiBuffer;
- EntryNewScreen(IDLE_SCREEN_ID, NULL, mmi_idle_entry_idle_screen, NULL);
- guiBuffer = GetCurrGuiBuffer(IDLE_SCREEN_ID);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- IdleRefreshServiceIndicationArea(); /* Refresh Service Indication Area */
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) && !(defined __MMI_TOUCH_IDLESCREEN_SHORTCUTS__)) /* PMT MANISH 20050623 */
- EnableCenterSoftkey(0, IMG_CSK_DIAL_ICON);
- #endif
- #ifdef __MMI_SWFLASH__
- if (dispchar_iswp_swflash())
- {
- ShowCategory34Screen(IDLE_SCREEN_LSK_TEXT, IDLE_SCREEN_LSK_ICON, idleLRStringtID, IDLE_SCREEN_RSK_ICON, PhnsetGetCurWallPaperIdx(), idle_screen_wallpaper_name, NULL);
- }
- else
- #endif /* _MMI_SWFLASH__ */
- #ifdef __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__
- ShowCategory33Screen(IDLE_SCREEN_RSK_TEXT, IDLE_SCREEN_RSK_ICON, idleLRStringtID, IDLE_SCREEN_LSK_ICON, 0,guiBuffer);
- #else
- ShowCategory33Screen(IDLE_SCREEN_LSK_TEXT, IDLE_SCREEN_LSK_ICON, idleLRStringtID, IDLE_SCREEN_RSK_ICON, 0,guiBuffer);
- #endif
- g_idle_context.LongPressEnable = 0;
- SetGroupKeyHandler(HandleIdleScreenDigitEntry, IdleScreenDigits, MAX_IDLE_SCREEN_DIGITS - 1, KEY_EVENT_DOWN);
- IdleSetLRKey(); /* __MANUAL_MODE_NW_SEL__ */
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_register_status_icon_pen_event_hdlr(
- STATUS_ICON_KEYPAD_LOCK,
- WGUI_STATUS_ICON_BAR_PEN_LONG_PRESS_ICON,
- IdleSetKeyPadLockFlag);
- #endif /* __MMI_TOUCH_SCREEN__ */
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) && !(defined __MMI_TOUCH_IDLESCREEN_SHORTCUTS__)) /* PMT MANISH 20050623 */
- SetCenterSoftkeyFunction(IdleScreenDigitHandler, KEY_EVENT_UP);
- #endif
- #ifdef __MMI_TOUCH_DIAL_SCREEN__
- memset((U8*) g_idle_context.DialPadCallBuffer, 0, sizeof((U8*) g_idle_context.DialPadCallBuffer));
- #endif
- /* Voice Recognition */
- #if defined(__MMI_VRSD__)
- SetRightSoftkeyFunction(mmi_vrsd_rcg_pre_entry, KEY_LONG_PRESS);
- #endif
- #if defined(__MMI_VRSI__)
- SetRightSoftkeyFunction(mmi_vrsi_rcg_pre_entry, KEY_LONG_PRESS);
- #endif
- /* for 4-dedicated shortcuts */
- #if defined(__MMI_DEDICATED_KEY_SHORTCUTS__)
- //RegisterDedicatedKeyHandlers();
- #elif !defined(__DISABLE_SHORTCUTS_MENU__)
- SetKeyHandler(EntryShctInIdle, KEY_UP_ARROW, KEY_EVENT_DOWN);
- #endif
- SetLeftSoftkeyFunction(EntryPopupMatrix, KEY_LONG_PRESS);
- SetKeyHandler(EntryMainMenuFromIdleScreen,KEY_ENTER,KEY_EVENT_UP);
- //jerson add begin 20070622
- #ifdef __MMI_ONEKEY_SNDREC_SUPPORT__
- SetKeyHandler(mmi_sndrec_send_record_req,KEY_ENTER,KEY_EVENT_LONG_PRESS);
- #endif
- //jerson add end 20070622
- /* sync the behavior with DisplayIdleScreen */
- CHISTResetCallLogIndex();
- #ifdef __MMI_KLG__
- SetKeyHandler(fmgr_launch, KEY_EXTRA_1, KEY_EVENT_UP);
- SetKeyHandler(ClndrPreEntryApp, KEY_EXTRA_2, KEY_EVENT_UP);
- #endif /* __MMI_KLG__ */
- #ifdef __MMI_UI_CALL_LOG_IN_TAB_PANE__
- SetKeyHandler(EntryCHISTTabPaneIdleScreen, KEY_SEND, KEY_EVENT_DOWN); /* diamond, 2005/09/13 key event DOWN to UP */
- #else
- SetKeyHandler(CHISTGetCallLogBySENDKey, KEY_SEND, KEY_EVENT_DOWN); /* diamond, 2005/09/13 key event DOWN to UP */
- #endif
- #if defined(WAP_SUPPORT) && defined(__MMI_WITH_WAP_KEY__)
- SetKeyHandler(wap_internet_key_hdlr, KEY_WAP, KEY_LONG_PRESS);
- #endif
- //KP Jerry add on 2007-4-24 start
- SetKeyHandler(EntryPhbSpeedDial, KEY_LEFT_SHORTCUT, KEY_EVENT_DOWN);
- #ifdef __MMI_VALUE_ADDED_SERVICE__
- SetKeyHandler(wap_internet_key_hdlr, KEY_RIGHT_SHORTCUT, KEY_EVENT_DOWN);
- #else
- // SetKeyHandler(goto_mobile_suite_screen, KEY_RIGHT_SHORTCUT, KEY_EVENT_DOWN);
- #endif
- //KP Jerry add on 2007-4-24 end
- /* camera fast access key */
- #ifdef __MMI_CAMERA__
- #ifndef __MMI_SCREEN_SNAPSHOT__
- #ifdef __MMI_IDLE_CAMERA_KEY_TO_STOP_AUDIOPLAYER__
- SetKeyHandler(CheckAndStopAudioPlayer, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- #else
- #ifdef __MMI_SUBLCD_CAMERA__
- if (IsClamClose())
- SetKeyHandler(mmi_sublcd_camera_entry_option_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- else
- //KP Jerry modify on 2007-03-31 start
- #ifdef __MMI_PROFILE_POWER_SAVING__
- {
- SetKeyHandler(IdleTogglePowerSavingProfile, CAMERA_SHORTCUT_KEY, KEY_LONG_PRESS);
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_UP);
- }
- #else
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- #endif
- //KP Jerry modify on 2007-03-31 end
- #else
- //KP Jerry modify on 2007-03-31 start
- #ifdef __MMI_PROFILE_POWER_SAVING__
- SetKeyHandler(IdleTogglePowerSavingProfile, CAMERA_SHORTCUT_KEY, KEY_LONG_PRESS);
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_UP);
- #else
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- #endif
- //KP Jerry modify on 2007-03-31 end
- #endif
- #endif
- #else /* __MMI_SCREEN_SNAPSHOT__ */
- #ifdef __MMI_IDLE_CAMERA_KEY_TO_STOP_AUDIOPLAYER__
- SetKeyHandler(CheckAndStopAudioPlayer, CAMERA_SHORTCUT_KEY, KEY_EVENT_UP);
- #else
- #ifdef __MMI_SUBLCD_CAMERA__
- if (IsClamClose())
- SetKeyHandler(mmi_sublcd_camera_entry_option_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- else
- //KP Jerry modify on 2007-03-31 start
- #ifdef __MMI_PROFILE_POWER_SAVING__
- {
- SetKeyHandler(IdleTogglePowerSavingProfile, CAMERA_SHORTCUT_KEY, KEY_LONG_PRESS);
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_UP);
- }
- #else
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- #endif
- //KP Jerry modify on 2007-03-31 end
- #else
- //KP Jerry modify on 2007-03-31 start
- #ifdef __MMI_PROFILE_POWER_SAVING__
- SetKeyHandler(IdleTogglePowerSavingProfile, CAMERA_SHORTCUT_KEY, KEY_LONG_PRESS);
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_UP);
- #else
- SetKeyHandler(mmi_camera_entry_app_screen, CAMERA_SHORTCUT_KEY, KEY_EVENT_DOWN);
- #endif
- //KP Jerry modify on 2007-03-31 end
- #endif
- #endif
- #endif /* __MMI_SCREEN_SNAPSHOT__ */
- #endif /* __MMI_CAMERA__ */
- /* volume key */
- SetDefaultVolumeKeyHandlers();
- ForceSubLCDScreen(ShowIdleAppSubLcd);
- /*
- * Compensatory key handler registration for screen saver
- * The idea here is to set those keys which are not set with handlers to a dummy handler.
- * But not that END key is still being set a handler (DisplayIdleScreen) for KEY_EVENT_DOWN in PowerAndEndKeyHandler.
- */
- mmi_idle_dummy_key_in_screensaver();
- #if defined(__MMI_WLAN_FEATURES__) && defined(__MMI_VOIP__)
- if (mmi_netset_get_active_preferred_mode() == P_WLAN_ONLY || mmi_netset_get_active_preferred_mode() == P_WLAN_PREFERRED)
- {
- mmi_netset_set_dial_mode(DIAL_MODE_WLAN);
- }
- else
- {
- mmi_netset_set_dial_mode(DIAL_MODE_GSM);
- }
- #endif /* defined(__MMI_WLAN_FEATURES__) && defined(__MMI_VOIP__) */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_entry_searching_screen
- * DESCRIPTION
- * Searching screen with/without keypad lock
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_entry_searching_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 IdleScreenDigits[MAX_IDLE_SCREEN_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 */
- /*----------------------------------------------------------------*/
- if (!g_keylock_context.gKeyPadLockFlag)
- {
- /* diamond, 2005/07/22 240x320 sync searching screen style with idle screen style */
- #ifdef __MMI_MAINLCD_240X320__
- IdleRefreshServiceIndicationArea();
-
- #ifdef __MMI_SWFLASH__
- if (dispchar_iswp_swflash())
- {
- ShowCategory34Screen(IDLE_SCREEN_LSK_TEXT, IDLE_SCREEN_LSK_ICON, idleLRStringtID, IDLE_SCREEN_RSK_ICON, PhnsetGetCurWallPaperIdx(), idle_screen_wallpaper_name, NULL);
- }
- else
- #endif /* _MMI_SWFLASH__ */
- #ifdef __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__
- ShowCategory33Screen(IDLE_SCREEN_RSK_TEXT, IDLE_SCREEN_RSK_ICON, idleLRStringtID, IDLE_SCREEN_LSK_ICON, 0,NULL);
- #else
- ShowCategory33Screen(IDLE_SCREEN_LSK_TEXT, IDLE_SCREEN_LSK_ICON, idleLRStringtID, IDLE_SCREEN_RSK_ICON, 0,NULL);
- #endif
- #else /* __MMI_MAINLCD_240X320__ */ /* not defined __MMI_MAINLCD_240X320__ */
- #ifdef __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__
- ShowCategory120Screen(
- IDLE_SCREEN_RSK_TEXT,
- 0,
- IDLE_SCREEN_LSK_TEXT,
- 0,
- STR_IDLE_NETWORK_SRCH_SCR,
- IMG_IDLE_NETWORK_SRCH_SCR,
- NULL);
- #else /* __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__ */
- ShowCategory120Screen(
- IDLE_SCREEN_LSK_TEXT,
- 0,
- IDLE_SCREEN_RSK_TEXT,
- 0,
- STR_IDLE_NETWORK_SRCH_SCR,
- IMG_IDLE_NETWORK_SRCH_SCR,
- NULL);
- #endif /* __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__ */
- #endif /* __MMI_MAINLCD_240X320__ */
- /* end, diamond */
- SetGroupKeyHandler(HandleIdleScreenDigitEntry, IdleScreenDigits, MAX_IDLE_SCREEN_DIGITS - 1, KEY_EVENT_DOWN);
- g_idle_context.LongPressEnable = 0;
- #ifdef __MMI_TOUCH_DIAL_SCREEN__
- memset((U8*) g_idle_context.DialPadCallBuffer, 0, sizeof((U8*) g_idle_context.DialPadCallBuffer));
- #endif
- #ifdef __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__
- SetRightSoftkeyFunction(EntryMainMenuFromIdleScreen, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(mmi_phb_idle_enter_phb_list, KEY_EVENT_UP);
- #else /* __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__ */
- SetLeftSoftkeyFunction(EntryMainMenuFromIdleScreen, KEY_EVENT_UP);
- SetRightSoftkeyFunction(mmi_phb_idle_enter_phb_list, KEY_EVENT_UP);
- #endif /* __MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN__ */
- /* Voice Recognition */
- #if defined(__MMI_VRSD__)
- SetRightSoftkeyFunction(mmi_vrsd_rcg_pre_entry, KEY_LONG_PRESS);
- #endif
- #if defined(__MMI_VRSI__)
- SetRightSoftkeyFunction(mmi_vrsi_rcg_pre_entry, KEY_LONG_PRESS);
- #endif
- #if defined(__MMI_DEDICATED_KEY_SHORTCUTS__)
- RegisterDedicatedKeyHandlers();
- #elif !defined(__DISABLE_SHORTCUTS_MENU__)
- SetKeyHandler(EntryShctInIdle, KEY_UP_ARROW, KEY_EVENT_DOWN);
- #endif
- #ifdef __MMI_UI_CALL_LOG_IN_TAB_PANE__
- SetKeyHandler(EntryCHISTTabPaneIdleScreen, KEY_SEND, KEY_EVENT_DOWN); /* diamond, 2005/09/13 key event DOWN to UP */
- #else
- SetKeyHandler(CHISTGetCallLogBySENDKey, KEY_SEND, KEY_EVENT_DOWN); /* diamond, 2005/09/13 key event DOWN to UP */
- #endif
- #if defined(WAP_SUPPORT) && defined(__MMI_WITH_WAP_KEY__)
- SetKeyHandler(wap_internet_key_hdlr, KEY_WAP, KEY_LONG_PRESS);
- #endif
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_register_status_icon_pen_event_hdlr(
- STATUS_ICON_KEYPAD_LOCK,
- WGUI_STATUS_ICON_BAR_PEN_LONG_PRESS_ICON,
- IdleSetKeyPadLockFlag);
- #endif /* __MMI_TOUCH_SCREEN__ */
- ForceSubLCDScreen(ShowIdleAppSubLcd);
- }
- else
- {
- /* diamond, 2005/07/22 240x320 sync searching screen style with idle screen style */
- mmi_idle_set_keypad_lock_string();
- #ifdef __MMI_MAINLCD_240X320__
- IdleRefreshServiceIndicationArea();
- #ifdef __MMI_SWFLASH__
- if (dispchar_iswp_swflash())
- {
- ShowCategory34Screen(
- g_keylock_context.KeyLockLSKStringID,
- g_keylock_context.KeyLockLSKIconID,
- g_keylock_context.KeyLockRSKStringID,
- g_keylock_context.KeyLockRSKIconID,
- PhnsetGetCurWallPaperIdx(), idle_screen_wallpaper_name, NULL);
- }
- else
- #endif /* _MMI_SWFLASH__ */
- ShowCategory33Screen(
- g_keylock_context.KeyLockLSKStringID,
- g_keylock_context.KeyLockLSKIconID,
- g_keylock_context.KeyLockRSKStringID,
- g_keylock_context.KeyLockRSKIconID,
- 0,
- NULL);
- #else /* __MMI_MAINLCD_240X320__ */
- ShowCategory120Screen(
- g_keylock_context.KeyLockLSKStringID,
- g_keylock_context.KeyLockLSKIconID,
- g_keylock_context.KeyLockRSKStringID,
- g_keylock_context.KeyLockRSKIconID,
- STR_IDLE_NETWORK_SRCH_SCR,
- IMG_IDLE_NETWORK_SRCH_SCR,
- NULL);
- #endif /* __MMI_MAINLCD_240X320__ */
- /* end, diamond */
- /* diamond, 2006/06/09 Generic exit function for keypad lock callback screens */
- g_keylock_context.keypad_lock_screen_exit = GetCurrExitFuncPtr();
- SetCurrExitFuncPtr(mmi_idle_generic_keypad_lock_screen_exit_hdlr);
- #ifdef __MMI_TOUCH_SCREEN__
- mmi_idle_pen_block();
- SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN);
- #else /* __MMI_TOUCH_SCREEN__ */
- SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN);
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_key_event_backlight_check
- * DESCRIPTION
- * Check backlight when key event occurs
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_key_event_backlight_check(void)
- {
- #ifdef MMI_ON_HARDWARE_P
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((g_keylock_context.gKeyPadLockFlag && g_idle_context.IsOnIdleScreen)
- || (g_keylock_context.gKeyPadLockFlag && g_idle_context.ScreenSaverRunFlag))
- {
- HalfModeBacklight();
- }
- else
- {
- TurnOnBacklight(1);
- }
- #else /* MMI_ON_HARDWARE_P */
- if (g_idle_context.IsOnIdleScreen)
- {
- TurnOnBacklight(1);
- }
- #endif /* MMI_ON_HARDWARE_P */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_idle_key_event_keypad_lock_check
- * DESCRIPTION
- * Handle the case of keypad timer is running in idle screen but the key event is not POUND key
- * PARAMETERS
- * eventKey [?]
- * KEYBRD_MESSAGE(?) [IN] *eventKey
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_idle_key_event_keypad_lock_check(KEYBRD_MESSAGE *eventKey)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsMyTimerExist(KEYPAD_LOCK_TIMER) == MMI_TRUE)
- {
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_1__
- if ((S16) eventKey->nKeyCode != KEY_POUND)
- {
- IdleHandleKeypadLockProcess();
- }
- #endif /* __MMI_KEYPAD_LOCK_PATTERN_1__ */
- #if defined(__MMI_KEYPAD_LOCK_PATTERN_2__) || defined(__MMI_KEYPAD_LOCK_PATTERN_3__) //KP Jerry add "__MMI_KEYPAD_LOCK_PATTERN_3__" on 2007-3-27
- if ((S16) eventKey->nKeyCode != KEY_STAR)
- {
- IdleHandleKeypadLockProcess();
- }
- #endif /* __MMI_KEYPAD_LOCK_PATTERN_2__ || __MMI_KEYPAD_LOCK_PATTERN_3__ */ //KP Jerry add "__MMI_KEYPAD_LOCK_PATTERN_3__" on 2007-3-27
- }
- //KP Jerry add on 2007-4-23 start
- #ifdef __MMI_KEYPAD_LOCK_PATTERN_4__
- if ((S16) eventKey->nKeyCode != KEY_CAMERA)
- {
- IdleHandleKeypadLockProcess();
- }
- #endif /* __MMI_KEYPAD_LOCK_PATTERN_4__ */
- //KP Jerry add on 2007-4-23 end
- }
- /*****************************************************************************
- * FUNCTION
- * DeInitSpecialMode
- * DESCRIPTION
- * DeInit Special Mode
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- #if (defined(__MMI_ENGINEER_MODE__) || defined(__MMI_FACTORY_MODE__))
- U8 gCurrentMode = NORMAL_MODE;
- #endif
- /* Reset special function for special mode */
- void DeInitSpecialMode(void)
- {
- #ifdef __MMI_ENGINEER_MODE__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (gCurrentMode == ENGINEERING_MODE)
- {
- gCurrentMode = NORMAL_MODE;
- mdi_audio_resume_background_play();
- StartLEDPatternBackGround();
- }
- #endif /* __MMI_ENGINEER_MODE__ */
- }
- /*****************************************************************************
- * FUNCTION
- * SearchingSrceenTimeOutHandler
- * DESCRIPTION
- * This function is a call back for searching screen expire
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SearchingSrceenTimeOutHandler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */