📄 mmitask.c
字号:
#include "MMI_features.h"
#include "stdC.h"
#include "L4Dr.h"
#include "MMIDataType.h"
#include "GlobalStruct.h"
#include "GlobalConstants.h"
#include "FrameworkGprot.h"
#include "FrameworkProt.h"
/* __CUSTPACK_MULTIBIN Terry BEGIN */
#include "wgui_categories_inputs.h"
#include "IMERes.h"
/* __CUSTPACK_MULTIBIN Terry END */
#if defined(__MMI_RESOURCE_ENFB_SUPPORT__)
#include "ResMemMgrGprot.h"
#endif /* __MMI_RESOURCE_ENFB_SUPPORT__ */
#include "ThrdOsInterface.h"
#include "DebugInitDef.h"
#include "MMI_trc.h"
#include "ProtocolEvents.h"
#include "AsyncEventsGprot.h"
#include "ATHandlerProt.h"
#include "AlarmFrameWorkProt.h"
#include "CallManagementGprot.h"
#include "CallManagementStruct.h"
#include "SettingProfile.h"
#include "ProfileGprots.h"
#include "Service.h"
#include "SATGProts.h"
#include "CPHSProtocolHandlers.h"
#include "EngineerModeProt.h"
#include "FactoryModeProt.h"
#include "gpioInc.h"
#include "PhoneBookGProt.h"
#include "CallHistoryMain.h"
#include "FunAndGamesProts.h"
#include "MessagesResourceData.h"
#include "OrganizerGprot.h"
#include "AlarmGprot.h"
#include "ScheduledPowerOnOffGprot.h"
#include "Unicodedef.h"
#include "Unicodexdcl.h"
#include "Unicodedcl.h" /* define the string function pointer */
#include "OrganizerGProt.h"
#include "ExtraGProt.h"
#include "IdleAppProt.h"
#include "Conversions.h"
#include "datetimetype.h"
#include "app_datetime.h"
#include "MessagesExDcl.h"
#ifdef __MMI_USB_SUPPORT__
#include "USBDeviceGprot.h"
extern kal_bool INT_USBBoot(void);
#endif /* __MMI_USB_SUPPORT__ */
#ifdef __MMI_IRDA_SUPPORT__
#include "IrdaMMIGprots.h"
#endif
#ifdef __MMI_BT_SUPPORT__
#include "BTMMIScrGprots.h"
#endif
#ifdef __MMI_FILE_MANAGER__
#include "FileManagerGProt.h"
#include "msdc_def.h"
#endif /* __MMI_FILE_MANAGER__ */
#ifdef __MMI_WEBCAM__
#include "mdi_datatype.h"
#include "mdi_webcam.h"
#endif /* __MMI_WEBCAM__ */
#include "SoundEffect.h"
#include "vObjects.h"
#include "vCalendar.h"
#include "ShortcutsProts.h"
#include "ToDoListDef.h"
#include "DataAccountGProt.h"
#include "WPSSProtos.h"
#include "CallerIdGprot.h"
#if defined(__MMI_STOPWATCH__)
#include "StopwatchGprot.h"
#endif
#if defined(__MMI_EMAIL__)
#include "EmailAppGProt.h"
#endif /* def __MMI_EMAIL__ */
#include "OSThreadInterfaceGprot.h"
#include "AllAppGprot.h"
#include "WrapperGprot.h"
#ifdef __MMI_EBOOK_READER__
#include "EbookProt.h"
#endif
#include "SimDetectionGprot.h"
#include "wgui_status_icons.h"
#include "PowerOnChargerProt.h"
#include "SettingGprots.h"
#include "SimDetectionGexdcl.h"
#include "PhoneSetupGprots.h" /* PhnsetReadNvramCalibrationData */
#include "MExEGProt.h"
#if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
#include "SmsGuiInterfaceType.h"
#endif
#ifdef __MMI_VOIP__
#include "VoIPGProt.h"
#endif
#ifdef __MMI_VIDEO_TELEPHONY__
#include "VTGProt.h"
#endif /* __MMI_VIDEO_TELEPHONY__ */
#ifdef __MMI_POC__
#include "PoCGProt.h"
#endif
#ifdef __MMI_AVATAR__
#include "avatargprot.h"
#endif
#ifdef __SYNCML_SUPPORT__
#include "SyncMLGProt.h" /* mmi_syncml_init */
#endif
#ifdef __MMI_MMS_2__
#include "MMSAppGprot.h"
#endif
#ifdef __MMI_MOBILE_SERVICE__
#include "MobileServiceGProt.h"
#endif
#ifdef __MMI_CUSTOMER_SERVICE__
#include "CustSerGProt.h"
#endif
#ifdef __MMI_MY_FAVORITE__
#include "MyFavoriteGProt.h"
#endif
extern void InitAlarmHandler(void);
#if defined(__MMI_THEMES_APPLICATION__)
extern void InitThemes(void);
#endif
#ifdef __FLIGHT_MODE_SUPPORT__
#include "WallpaperDefs.h"
#include "DownloadDefs.h"
#include "PhoneSetup.h"
#endif /* __FLIGHT_MODE_SUPPORT__ */
extern void ATHandlerInit(void);
#if defined(__MMI_NITZ__)
extern void NITZHandlerInit(void);
#endif
extern void PhnsetInitSetTimeNDateNvram(void);
extern void ReadValueCityNVRAM(void);
#include "lcd_sw.h"
#include "lcd_sw_inc.h"
#include "sublcd.h"
#include "ComposeRingToneProts.h"
#ifdef __MMI_IMPS__
#include "mmi_imps_gprot.h"
#endif
#include "gdi_include.h"
#ifdef __MMI_UNIFIED_MESSAGE__
#include "UnifiedMessageGProt.h"
#endif
#ifdef __MMI_UNIFIED_COMPOSER__
#include "UnifiedComposerGProt.h"
#endif
#ifdef __MMI_WLAN_FEATURES__
#include "NetworkSetupDefs.h"
#endif
#ifdef __MMI_PICT_BRIDGE_SUPPORT__
#include "PictBridgeGProt.h"
#endif
#ifdef __MMI_MMS_2__
#include "MMSViewerAPPDefs.h"
#endif /* __MMI_MMS_2__ */
#ifdef SYNCML_DM_SUPPORT
#include "dmuigprot.h"
#endif
#ifdef __MMI_DM_SELF_REGISTER_SUPPORT__
#include "DmSelfRegisterGprot.h"
#endif /* __MMI_DM_SELF_REGISTER_SUPPORT__ */
#ifdef __DRM_SUPPORT__
#include "RightsMgrGProt.h"
#endif
#ifdef __MMI_MAPBAR_GIS__
#include "MB_GISGProt.h"
#endif
#ifdef __MMI_SUNAVI_GIS__
#include "SN_GISGProt.h"
#endif
#ifdef __MMI_DUAL_SIM_MASTER__
#include "MTPNP_AD_master_header.h"
#include "MTPNP_AD_resdef.h"
#include "MTPNP_PFAL_DM_Setup.h"
#include "MTPNP_PFAL_HelpInfo.h"
#include "MTPNP_PFAL_Master_MM.h"
#include "customer_ps_inc.h"
#include "mmi_msg_context.h"
#endif /* __MMI_DUAL_SIM_MASTER__ */
#ifdef __MMI_DUAL_SIM_DUAL_CALL_SLAVE__
#include "MTPNP_AD_slave_header.h"
#include "MTPNP_PFAL_Slave_MM.h"
#endif /* __MMI_DUAL_SIM_DUAL_CALL_SLAVE__ */
/*****************************************************************************
* Define
*****************************************************************************/
#ifdef __MMI_SUPPORT_DUMP_SCREEN_STRING__
// #define ENABLE_DUMP_SCREEN_STRING_TRACE
#endif /* __MMI_SUPPORT_DUMP_SCREEN_STRING__ */
/*****************************************************************************
* Typedef
*****************************************************************************/
/*****************************************************************************
* Local Variable
*****************************************************************************/
/*****************************************************************************
* Extern Global Variable
*****************************************************************************/
oslMsgqid mmi_ext_qid;
MMI_BOOL g_keypad_flag = MMI_FALSE;
drv_get_key_func keypad_ptr = NULL;
U8 gInitAllAppFlag = 0;
U8 gInsertSimAppFlag = 0;
MYTIME StartUpTime, LastDuration;
#ifdef __MMI_DUAL_SIM_SINGLE_CALL__
U8 g_sim_insert_state;
U8 g_dual_mode_value;
#endif
extern kal_mutexid mmi_mutex_trace;
extern U8 isEarphonePlugged;
extern U8 gMMIClamState;
/* __CUSTPACK_MULTIBIN Terry BEGIN */
extern U8 MMI_english_input_mode_set[INPUT_MODE_MAX_NUM];
extern U8 MMI_qsearch_input_mode_set[INPUT_MODE_MAX_NUM];
extern U8 MMI_all_input_mode_set[INPUT_MODE_MAX_NUM];
/* __CUSTPACK_MULTIBIN Terry END */
#ifdef __MMI_PREFER_INPUT_METHOD__
extern U16 MMI_all_prefered_input_mode_set[INPUT_MODE_MAX_NUM];
#endif
extern const sIMEModeDetails *gIMEModeArray;
extern const sIMEModeDetails *gIMEQSearchModeArray;
extern const U8 MMI_implement_input_mode_set[];
#ifdef __FLIGHT_MODE_SUPPORT__
extern PHNSET_CNTX g_phnset_cntx;
#endif /* __FLIGHT_MODE_SUPPORT__ */
#if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
extern nsm_msg_struct g_nsm_msg_context;
#endif
/*****************************************************************************
* Local Function
*****************************************************************************/
static void InitializeAll(void);
static void InitEventHandlersBeforePowerOn(void);
static U8 mmi_frm_check_is_valid_msg(MYQUEUE *base, MYQUEUE *msg);
static BOOL IMECheck(U8 IME_Mode, const U8 all_implement_IME[]);
static void InitIME(void);
static void InitIMEQSearch(const sIMEModeDetails *IMEQArray, U8 *QuickIME);
static void InitIMESetting(const sIMEModeDetails *IMEArray, U8 *allIME, U8 *englishOnlyIME, U16 *PreferedIME);
static void mmi_enable_str_dump(void *info);
static void mmi_str_cmd_ind(void *info);
#ifdef __MMI_SUPPORT_DUMP_SCREEN_STRING__
static void mmi_no_more_str_hdlr(void);
#endif /* __MMI_SUPPORT_DUMP_SCREEN_STRING__ */
/*****************************************************************************
* Extern Global Function
*****************************************************************************/
#ifdef __VOIP__
extern void em_voip_log_init(void);
#endif /* __VOIP__ */
extern void goto_opening_screen(void);
#ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
extern void PmgInitExtMelodyStruct(void);
#endif
extern void InitAllApplications(void);
extern void InitDownloadNVRAM(void);
extern void ReadThemesFromNVRAM(void);
extern void initnvramprofapp(void);
extern void InitializeChargingScr(void);
extern void QuitSystemOperation(void);
extern void mmi_pwron_entry_animation_screen(void);
/*
* for MDI
*/
extern void mdi_audio_init(void);
extern void mdi_audio_init_event_hdlrs(void);
extern void setup_UI_wrappers(void);
/* __CUSTPACK_MULTIBIN Terry BEGIN */
/*
* For Input method
*/
#ifdef __MMI_T9__
extern void InitInputMethod(void);
#elif defined __MMI_ZI__
extern void InitZiInputMethod(void);
#elif defined __MMI_CSTAR__
extern void InitCstarInputMethod(void);
#elif defined(__MMI_KA__)
extern void InitKonkaInputMethod(void);
#elif defined(__MMI_ITAP__)
/* under construction !*/
#endif
/* __CUSTPACK_MULTIBIN Terry BEGIN */
extern U8 MMI_english_input_mode_set[INPUT_MODE_MAX_NUM];
extern U8 MMI_qsearch_input_mode_set[INPUT_MODE_MAX_NUM];
extern U8 MMI_all_input_mode_set[INPUT_MODE_MAX_NUM];
#ifdef __MMI_PREFER_INPUT_METHOD__
extern U16 MMI_all_prefered_input_mode_set[INPUT_MODE_MAX_NUM];
#endif
#if defined(__MMI_MIXED_LANG_SUPPORT__) || defined(__MMI_PREFER_WRITING_LANG__)
extern ime_writing_lang_struct g_ime_writing_lang_array[12]; /* for 123 and null end */
extern S16 g_ime_main_writing_lang;
#if defined(__MMI_MIXED_LANG_SUPPORT__)
extern S16 g_ime_sub_writing_lang;
#endif /* defined(__MMI_MIXED_LANG_SUPPORT__) */
#endif
extern const sIMEModeDetails *gIMEModeArray;
extern const sIMEModeDetails *gIMEQSearchModeArray;
extern const U8 MMI_implement_input_mode_set[];
/* __CUSTPACK_MULTIBIN Terry END */
extern void mmiapi_init_engine(void);
/*
* Move InitPhoneSetupApp() to InitializeAll() for text encoding
*/
extern void InitPhoneSetupApp(void);
extern void InitPhoneSetupCntx(void);
extern void InitAppMem(void);
extern void CheckAndPrintMsgId(U16 Id);
#if defined(__MMI_VRSD__)
extern void mmi_vrsd_init(void);
#endif
#if defined(__MMI_VRSI__)
extern mmi_vrsi_init(void);
#endif
#ifndef __MTK_TARGET__
extern void mmi_vrsi_setting_init_simulator(void);
#endif
#if defined(__MMI_SOUND_RECORDER__)
extern void InitSoundRecorderApp(void);
#endif
extern void mmi_phb_sos_list_init(void);
#ifdef __MMI_MESSAGES_CHAT__
extern void InitializeChatApp(void);
#endif
#ifdef __MMI_IRDA_SUPPORT__
extern void mmi_irda_init_menu_hdlr(void);
#endif
#ifndef __DISABLE_SHORTCUTS_IMPL__
extern void ShctInit(void);
#endif
extern void SetDateTime(void *t);
extern void mmi_frm_sms_init(void);
/* diamond, 2005/07/05 Flight mode */
#ifdef __FLIGHT_MODE_SUPPORT__
extern void PowerOnFlightMode(void);
extern void PowerOnNormalMode(void);
extern void EntryQueryFlightModeScreen(void);
extern void PhnsetFlightModeQueryBackground(void); /* diamond, 2006/01/01 Force to draw the background */
extern void PhnsetFlightModePowerOnException(void);
extern void mmi_flight_mode_set_mode(U8 bFlightMode); /* send the mode to L4C ASAP to speed up the L4C startup time */
#endif /* __FLIGHT_MODE_SUPPORT__ */
/* end, diamond */
#ifdef __MMI_BG_SOUND_EFFECT__
extern void mmi_bgsnd_init(void);
#endif
#if defined(__MMI_FM_RADIO_SCHEDULE_REC__)
extern void mmi_fmsr_init_app(void);
#endif
#if defined(__MMI_DOWNLOAD_AGENT__)
extern void mmi_da_init_app(void);
#endif
extern void mdi_audio_set_audio_mode(U8 mode);
extern void PhnsetReadGPIOSetting(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -