PowerOnOffDisplay.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:78k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  * PowerOnOffDisplay.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   This file is intends for Resource IDs for the Power ON/Off Display
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  *
  83.  * removed!
  84.  * removed!
  85.  * removed!
  86.  *
  87.  * removed!
  88.  * removed!
  89.  * removed!
  90.  *
  91.  * removed!
  92.  * removed!
  93.  * removed!
  94.  *
  95.  * removed!
  96.  * removed!
  97.  * removed!
  98.  *
  99.  * removed!
  100.  * removed!
  101.  * removed!
  102.  *
  103.  * removed!
  104.  * removed!
  105.  * removed!
  106.  *
  107.  * removed!
  108.  * removed!
  109.  * removed!
  110.  *
  111.  * removed!
  112.  * removed!
  113.  * removed!
  114.  *
  115.  * removed!
  116.  * removed!
  117.  * removed!
  118.  *
  119.  * removed!
  120.  * removed!
  121.  * removed!
  122.  *
  123.  * removed!
  124.  * removed!
  125.  * removed!
  126.  *
  127.  * removed!
  128.  * removed!
  129.  * removed!
  130.  *
  131.  * removed!
  132.  * removed!
  133.  * removed!
  134.  *
  135.  * removed!
  136.  * removed!
  137.  * removed!
  138.  *
  139.  * removed!
  140.  * removed!
  141.  * removed!
  142.  *
  143.  * removed!
  144.  * removed!
  145.  * removed!
  146.  *
  147.  * removed!
  148.  * removed!
  149.  * removed!
  150.  *
  151.  * removed!
  152.  * removed!
  153.  * removed!
  154.  *
  155.  * removed!
  156.  * removed!
  157.  * removed!
  158.  *
  159.  * removed!
  160.  * removed!
  161.  * removed!
  162.  *
  163.  * removed!
  164.  * removed!
  165.  * removed!
  166.  *
  167.  * removed!
  168.  * removed!
  169.  * removed!
  170.  *
  171.  * removed!
  172.  * removed!
  173.  * removed!
  174.  *
  175.  * removed!
  176.  * removed!
  177.  * removed!
  178.  *
  179.  * removed!
  180.  * removed!
  181.  * removed!
  182.  *
  183.  * removed!
  184.  * removed!
  185.  * removed!
  186.  *
  187.  * removed!
  188.  * removed!
  189.  * removed!
  190.  *
  191.  * removed!
  192.  * removed!
  193.  * removed!
  194.  *
  195.  * removed!
  196.  * removed!
  197.  * removed!
  198.  *
  199.  * removed!
  200.  * removed!
  201.  * removed!
  202.  *
  203.  * removed!
  204.  * removed!
  205.  * removed!
  206.  *
  207.  * removed!
  208.  * removed!
  209.  * removed!
  210.  *
  211.  * removed!
  212.  * removed!
  213.  * removed!
  214.  *
  215.  * removed!
  216.  * removed!
  217.  * removed!
  218.  *
  219.  * removed!
  220.  * removed!
  221.  * removed!
  222.  *
  223.  *------------------------------------------------------------------------------
  224.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  225.  *============================================================================
  226.  ****************************************************************************/
  227. #ifndef POWERONOFFDISPLAY_C
  228. #define POWERONOFFDISPLAY_C
  229. /***************************************************************************** 
  230. * Include
  231. *****************************************************************************/
  232. #include "MMI_features.h"
  233. #ifdef __MMI_POWER_ON_OFF_DISPLAY__
  234. #include "stdC.h"
  235. #include "L4Dr1.h"
  236. #include "PixtelDataTypes.h"
  237. #include "Unicodexdcl.h"
  238. #include "NVRAMType.h"
  239. #include "NVRAMProt.h"
  240. #include "NVRAMEnum.h"
  241. #include "DownloadProtos.h"
  242. #include "CommonScreens.h"
  243. #include "EventsGprot.h"
  244. #include "historyGprot.h"
  245. #include "ProtocolEvents.h"
  246. #include "wgui_categories.h"
  247. #include "wgui_categories_idlescreen.h"
  248. #include "wgui_categories_multimedia.h"
  249. #include "MainMenuDef.h"
  250. #include "TimerEvents.h"
  251. #include "GlobalDefs.h"
  252. #include "SettingProt.h"
  253. #include "wgui_inline_edit.h"
  254. #include "DebugInitDef.h"
  255. #include "HistoryGprot.h"
  256. #include "WPSSProtos.h"
  257. #include "SettingGprots.h"
  258. #include "WallpaperDefs.h"
  259. #include "PowerOnOffDisplayDefs.h"
  260. #include "SettingDefs.h"
  261. #include "SettingProfile.h"
  262. #include "ProfileGprots.h"
  263. #include "DownloadDefs.h"
  264. #include "DownloadProtos.h"
  265. #include "PhoneSetup.h"
  266. #include "FileManagerGProt.h"
  267. #include "FileManagerDef.h"     /* error string id */
  268. #include "IdleAppDef.h"
  269. /* For user defined file image */
  270. #ifdef __MMI_POWER_ON_OFF_DISPLAY_VIDEO__
  271. #include "VdoPlyStrEnum.h"
  272. #include "VdoPlyGProt.h"
  273. #endif /* __MMI_POWER_ON_OFF_DISPLAY_VIDEO__ */ 
  274. #ifdef __MMI_FILE_MANAGER__
  275. #include "FileMgr.h"
  276. #endif 
  277. #include "Conversions.h"
  278. #include "Gdi_include.h"        /* GDI_RESULT */
  279. #include "wgui_categories_multimedia.h" /* ShowCategory222Screen() */
  280. #if defined(__MMI_RESOURCE_ENFB_SUPPORT__)
  281. #include "ResMemMgrGprot.h"
  282. #endif /* defined(__MMI_RESOURCE_ENFB_SUPPORT__) */
  283. /***************************************************************************** 
  284. * External Function
  285. *****************************************************************************/
  286. extern U8 PhnsetGetDefEncodingType(void);
  287. /***************************************************************************** 
  288. * External Variable
  289. *****************************************************************************/
  290. /***************************************************************************** 
  291. * Local Variable
  292. *****************************************************************************/
  293. static PHNSET_PWRONOFF_FILENAME_STRUCT phnset_pwronoff_filename;
  294. #ifdef __MMI_FILE_MANAGER__
  295. static FuncPtr phnset_pwronoff = NULL;
  296. #endif 
  297. static FuncPtr CallbackPWRLSK = NULL;   /* allow mix order of callback and user press OK */
  298. static U8 item_amount;
  299. /***************************************************************************** 
  300. * Local Function
  301. *****************************************************************************/
  302. static void PhnsetPwrOnOffUsrDefFreeBuf(void);
  303. static void PhnsetPwrOnOffUsrDefGoBack(void);
  304. static void ExitPhnsetPwrOnOffSysView(void);
  305. /*****************************************************************************
  306.  * FUNCTION
  307.  *  PhnsetReadPwrOnOffDisp
  308.  * DESCRIPTION
  309.  *  This function is to read power on/off display from NVRAM at initialization
  310.  *  , and set as current
  311.  *  Functionality: Referenced at InitNvramData when bootup
  312.  * PARAMETERS
  313.  *  void
  314.  *  a(?)        [IN/OUT]        Void *
  315.  *  b(?)        [IN]            
  316.  * RETURNS
  317.  *  void
  318.  *****************************************************************************/
  319. void PhnsetReadPwrOnOffDisp(void)
  320. {
  321.     /*----------------------------------------------------------------*/
  322.     /* Local Variables                                                */
  323.     /*----------------------------------------------------------------*/
  324.     S16 error;
  325.     PHNSET_TYPE_DISP type;
  326.     phnset_wpss_type_enum temp_type = g_phnset_cntx_p->wpss_type;
  327.     /*----------------------------------------------------------------*/
  328.     /* Code Body                                                      */
  329.     /*----------------------------------------------------------------*/
  330.     mmi_dispchar_get_img_id(NVRAM_CURRENT_POWER_ON_DISPLAY, &(g_phnset_cntx_p->curtPwrOnID));
  331.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetReadPwrOnOffDisp: On, id=%dn", g_phnset_cntx_p->curtPwrOnID));
  332.     if ((type = PhnsetGetDisplayType(g_phnset_cntx_p->curtPwrOnID)) == PHNSET_TYPE_DISP_INVALID)
  333.     {
  334.         PhnsetRstPwrOnDisplayDefault();
  335.     }
  336.     else if (type == PHNSET_TYPE_DISP_USER)
  337.     {
  338.         ReadRecord(NVRAM_EF_WPSS_FILENAME_LID, 2, &phnset_pwronoff_filename, sizeof(phnset_pwronoff_filename), &error);
  339.     }
  340.     mmi_dispchar_get_img_id(NVRAM_CURRENT_POWER_OFF_DISPLAY, &(g_phnset_cntx_p->curtPwrOffID));
  341.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetReadPwrOnOffDisp: Off, id=%dn", g_phnset_cntx_p->curtPwrOffID));
  342.     if ((type = PhnsetGetDisplayType(g_phnset_cntx_p->curtPwrOffID)) == PHNSET_TYPE_DISP_INVALID)
  343.     {
  344.         PhnsetRstPwrOffDisplayDefault();
  345.     }
  346.     else if (type == PHNSET_TYPE_DISP_USER && (g_phnset_cntx_p->curtPwrOnID) != 0x00)
  347.     {
  348.         ReadRecord(NVRAM_EF_WPSS_FILENAME_LID, 2, &phnset_pwronoff_filename, sizeof(phnset_pwronoff_filename), &error);
  349.     }
  350.     g_phnset_cntx_p->wpss_type = temp_type;
  351. }
  352. /*****************************************************************************
  353.  * FUNCTION
  354.  *  HighlightPhnsetPowerOn
  355.  * DESCRIPTION
  356.  *  hilight handler when move to power on display option
  357.  * PARAMETERS
  358.  *  void
  359.  * RETURNS
  360.  *  void
  361.  *****************************************************************************/
  362. void HighlightPhnsetPowerOn(void)
  363. {
  364.     /*----------------------------------------------------------------*/
  365.     /* Local Variables                                                */
  366.     /*----------------------------------------------------------------*/
  367.     /*----------------------------------------------------------------*/
  368.     /* Code Body                                                      */
  369.     /*----------------------------------------------------------------*/
  370.     ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
  371.     ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
  372.     g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWRON;
  373. #if (defined(__MMI_FILE_MANAGER__) && !defined(__MMI_FILE_MANAGER_HIDE_MENU__))
  374.     /* Go to menu with 2 items: System, Download */
  375.     SetLeftSoftkeyFunction(EntryPhnsetPowerOnOffSel, KEY_EVENT_UP);
  376.     SetKeyHandler(EntryPhnsetPowerOnOffSel, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  377.     g_phnset_cntx_p->ScrAnchor = SCR_ID_PHNSET_POWER_ON;
  378. #else /* (defined(__MMI_FILE_MANAGER__) && !defined(__MMI_FILE_MANAGER_HIDE_MENU__)) */ 
  379.     /* Direct enter system wallpaper list menu */
  380.     SetLeftSoftkeyFunction(EntryPhnsetPowerOnOffSys, KEY_EVENT_UP);
  381.     SetKeyHandler(EntryPhnsetPowerOnOffSys, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  382.     g_phnset_cntx_p->ScrAnchor = SCR_ID_PHNSET_POWER_ON_SYSTEM_LIST;
  383. #endif /* (defined(__MMI_FILE_MANAGER__) && !defined(__MMI_FILE_MANAGER_HIDE_MENU__)) */ 
  384.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  385.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  386. }
  387. /*****************************************************************************
  388.  * FUNCTION
  389.  *  HighlightPhnsetPowerOff
  390.  * DESCRIPTION
  391.  *  hilight handler when move to power off display option
  392.  * PARAMETERS
  393.  *  void
  394.  * RETURNS
  395.  *  void
  396.  *****************************************************************************/
  397. void HighlightPhnsetPowerOff(void)
  398. {
  399.     /*----------------------------------------------------------------*/
  400.     /* Local Variables                                                */
  401.     /*----------------------------------------------------------------*/
  402.     /*----------------------------------------------------------------*/
  403.     /* Code Body                                                      */
  404.     /*----------------------------------------------------------------*/
  405.     ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
  406.     ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
  407.     g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWROFF;
  408. #if (defined(__MMI_FILE_MANAGER__) && !defined(__MMI_FILE_MANAGER_HIDE_MENU__))
  409.     /* Go to menu with 2 items: System, Download */
  410.     SetLeftSoftkeyFunction(EntryPhnsetPowerOnOffSel, KEY_EVENT_UP);
  411.     SetKeyHandler(EntryPhnsetPowerOnOffSel, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  412.     g_phnset_cntx_p->ScrAnchor = SCR_ID_PHNSET_POWER_OFF;
  413. #else /* (defined(__MMI_FILE_MANAGER__) && !defined(__MMI_FILE_MANAGER_HIDE_MENU__)) */ 
  414.     /* Direct enter system wallpaper list menu */
  415.     SetLeftSoftkeyFunction(EntryPhnsetPowerOnOffSys, KEY_EVENT_UP);
  416.     SetKeyHandler(EntryPhnsetPowerOnOffSys, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  417.     g_phnset_cntx_p->ScrAnchor = SCR_ID_PHNSET_POWER_OFF_SYSTEM_LIST;
  418. #endif /* (defined(__MMI_FILE_MANAGER__) && !defined(__MMI_FILE_MANAGER_HIDE_MENU__)) */ 
  419.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  420.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  421. }
  422. /*****************************************************************************
  423.  * FUNCTION
  424.  *  HighlightPhnsetPwrOnFmgr
  425.  * DESCRIPTION
  426.  *  hilight handler when move to power on display "user define" option
  427.  * PARAMETERS
  428.  *  void
  429.  * RETURNS
  430.  *  void
  431.  *****************************************************************************/
  432. void HighlightPhnsetPwrOnFmgr(void)
  433. {
  434.     /*----------------------------------------------------------------*/
  435.     /* Local Variables                                                */
  436.     /*----------------------------------------------------------------*/
  437.     /*----------------------------------------------------------------*/
  438.     /* Code Body                                                      */
  439.     /*----------------------------------------------------------------*/
  440.     g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWRON;
  441.     SetLeftSoftkeyFunction(EntryPhnsetWallpaperFmgr, KEY_EVENT_UP);
  442.     SetKeyHandler(EntryPhnsetWallpaperFmgr, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  443. }
  444. /*****************************************************************************
  445.  * FUNCTION
  446.  *  HighlightPhnsetPwrOffFmgr
  447.  * DESCRIPTION
  448.  *  hilight handler when move to power off display "user define" option
  449.  * PARAMETERS
  450.  *  void
  451.  * RETURNS
  452.  *  void
  453.  *****************************************************************************/
  454. void HighlightPhnsetPwrOffFmgr(void)
  455. {
  456.     /*----------------------------------------------------------------*/
  457.     /* Local Variables                                                */
  458.     /*----------------------------------------------------------------*/
  459.     /*----------------------------------------------------------------*/
  460.     /* Code Body                                                      */
  461.     /*----------------------------------------------------------------*/
  462.     g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWROFF;
  463.     SetLeftSoftkeyFunction(EntryPhnsetWallpaperFmgr, KEY_EVENT_UP);
  464.     SetKeyHandler(EntryPhnsetWallpaperFmgr, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  465. }
  466. /*****************************************************************************
  467.  * FUNCTION
  468.  *  HighlightPhnsetPowerOnSys
  469.  * DESCRIPTION
  470.  *  hilight handler when move to power on display "System" option
  471.  * PARAMETERS
  472.  *  void
  473.  * RETURNS
  474.  *  void
  475.  *****************************************************************************/
  476. void HighlightPhnsetPowerOnSys(void)
  477. {
  478.     /*----------------------------------------------------------------*/
  479.     /* Local Variables                                                */
  480.     /*----------------------------------------------------------------*/
  481.     /*----------------------------------------------------------------*/
  482.     /* Code Body                                                      */
  483.     /*----------------------------------------------------------------*/
  484.     g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWRON;
  485.     SetLeftSoftkeyFunction(EntryPhnsetPowerOnOffSys, KEY_EVENT_UP);
  486.     SetKeyHandler(EntryPhnsetPowerOnOffSys, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  487. }
  488. /*****************************************************************************
  489.  * FUNCTION
  490.  *  HighlightPhnsetPowerOffSys
  491.  * DESCRIPTION
  492.  *  hilight handler when move to power off display "System" option
  493.  * PARAMETERS
  494.  *  void
  495.  * RETURNS
  496.  *  void
  497.  *****************************************************************************/
  498. void HighlightPhnsetPowerOffSys(void)
  499. {
  500.     /*----------------------------------------------------------------*/
  501.     /* Local Variables                                                */
  502.     /*----------------------------------------------------------------*/
  503.     /*----------------------------------------------------------------*/
  504.     /* Code Body                                                      */
  505.     /*----------------------------------------------------------------*/
  506.     g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWROFF;
  507.     SetLeftSoftkeyFunction(EntryPhnsetPowerOnOffSys, KEY_EVENT_UP);
  508.     SetKeyHandler(EntryPhnsetPowerOnOffSys, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  509. }
  510. /*****************************************************************************
  511.  * FUNCTION
  512.  *  HintPhnsetPwrOnDisplay
  513.  * DESCRIPTION
  514.  *  hint handler when move to power on display
  515.  * PARAMETERS
  516.  *  index       [IN]        
  517.  * RETURNS
  518.  *  void
  519.  *****************************************************************************/
  520. void HintPhnsetPwrOnDisplay(U16 index)
  521. {
  522.     /*----------------------------------------------------------------*/
  523.     /* Local Variables                                                */
  524.     /*----------------------------------------------------------------*/
  525.     PS8 p;
  526.     /*----------------------------------------------------------------*/
  527.     /* Code Body                                                      */
  528.     /*----------------------------------------------------------------*/
  529.     if (g_phnset_cntx_p->curtPwrOnID == 0)
  530.     {
  531.         if (phnset_pwronoff_filename.isPwrOnShort == 1)
  532.         {
  533.             U8 *temp = phnset_dispchar_temp;
  534.             /* rename short name file should pass converted short name to editor,
  535.                so that the display will be the same as in File Manager */
  536.             p = PhnsetGetFileNamePointer((PS8) phnset_pwronoff_filename.pwrondisplay);
  537.             mmi_chset_mixed_text_to_ucs2_str(
  538.                 (U8*) temp,
  539.                 (FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH,
  540.                 (U8*) p,
  541.                 (mmi_chset_enum) PhnsetGetDefEncodingType());
  542.             p = (PS8) & temp[0];
  543.         }
  544.         else
  545.         {
  546.             p = PhnsetGetFileNamePointer((PS8) phnset_pwronoff_filename.pwrondisplay);
  547.         }
  548.     }
  549.     else
  550.     {
  551.     #if defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__)
  552.         if (PhnsetGetDisplayType(g_phnset_cntx_p->curtPwrOnID) == PHNSET_TYPE_DISP_VIDEO)
  553.         {
  554.             p = GetString((U16)
  555.                           (STR_ID_PHNSET_DISPCHAR_VDOID_START +
  556.                            (g_phnset_cntx_p->curtPwrOnID - IMG_ID_PHNSET_ON_VDO_START)));
  557.         }
  558.         else
  559.     #endif /* defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__) */ 
  560.         {
  561.             p = GetString((U16)
  562.                           (STR_ID_PHNSET_DISPCHAR_ANMID_START +
  563.                            (g_phnset_cntx_p->curtPwrOnID - IMG_ID_PHNSET_ON_START)));
  564.         }
  565.     }
  566.     if (p)
  567.     {
  568.         pfnUnicodeStrcpy((PS8) hintData[index], p);
  569.     }
  570. }
  571. /*****************************************************************************
  572.  * FUNCTION
  573.  *  HintPhnsetPwrOffDisplay
  574.  * DESCRIPTION
  575.  *  hint handler when move to power off display
  576.  * PARAMETERS
  577.  *  index       [IN]        
  578.  * RETURNS
  579.  *  void
  580.  *****************************************************************************/
  581. void HintPhnsetPwrOffDisplay(U16 index)
  582. {
  583.     /*----------------------------------------------------------------*/
  584.     /* Local Variables                                                */
  585.     /*----------------------------------------------------------------*/
  586.     PS8 p;
  587.     /*----------------------------------------------------------------*/
  588.     /* Code Body                                                      */
  589.     /*----------------------------------------------------------------*/
  590.     if (g_phnset_cntx_p->curtPwrOffID == 0)
  591.     {
  592.         if (phnset_pwronoff_filename.isPwrOffShort == 1)
  593.         {
  594.             U8 temp[(FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH];
  595.             /* rename short name file should pass converted short name to editor,
  596.                so that the display will be the same as in File Manager */
  597.             p = PhnsetGetFileNamePointer((PS8) phnset_pwronoff_filename.pwroffdisplay);
  598.             mmi_chset_mixed_text_to_ucs2_str(
  599.                 (U8*) temp,
  600.                 (FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH,
  601.                 (U8*) p,
  602.                 (mmi_chset_enum) PhnsetGetDefEncodingType());
  603.             p = (PS8) & temp[0];
  604.         }
  605.         else
  606.         {
  607.             p = PhnsetGetFileNamePointer((PS8) phnset_pwronoff_filename.pwroffdisplay);
  608.         }
  609.     }
  610.     else
  611.     {
  612.     #if defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__)
  613.         if (PhnsetGetDisplayType(g_phnset_cntx_p->curtPwrOffID) == PHNSET_TYPE_DISP_VIDEO)
  614.         {
  615.             p = GetString((U16)
  616.                           (STR_ID_PHNSET_DISPCHAR_VDOID_START +
  617.                            (g_phnset_cntx_p->curtPwrOffID - IMG_ID_PHNSET_OFF_VDO_START)));
  618.         }
  619.         else
  620.     #endif /* defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__) */ 
  621.         {
  622.             p = GetString((U16)
  623.                           (STR_ID_PHNSET_DISPCHAR_ANMID_START +
  624.                            (g_phnset_cntx_p->curtPwrOffID - IMG_ID_PHNSET_OFF_START)));
  625.         }
  626.     }
  627.     if (p)
  628.     {
  629.         pfnUnicodeStrcpy((PS8) hintData[index], p);
  630.     }
  631. }
  632. /*****************************************************************************
  633.  * FUNCTION
  634.  *  EntryPhnsetPowerOnOffSel
  635.  * DESCRIPTION
  636.  *  To enter the menu shows "System" and "User Defined"
  637.  * PARAMETERS
  638.  *  void
  639.  * RETURNS
  640.  *  void
  641.  *****************************************************************************/
  642. void EntryPhnsetPowerOnOffSel(void)
  643. {
  644.     /*----------------------------------------------------------------*/
  645.     /* Local Variables                                                */
  646.     /*----------------------------------------------------------------*/
  647.     U8 *guiBuffer;
  648.     U16 nNumofItem;
  649.     U16 menuID = 0, scrID = 0, strID = 0, menuIDSys = 0, menuIDUsr = 0;
  650.     U16 PowerOnOffSelectList[MAX_SUB_MENUS];
  651.     FuncPtr hiliteFnSys = NULL, hiliteFnUsr = NULL;
  652.     /*----------------------------------------------------------------*/
  653.     /* Code Body                                                      */
  654.     /*----------------------------------------------------------------*/
  655.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  656.     {
  657.         menuID = MENU_SETTING_POWER_ON_DISPLAY;
  658.         scrID = SCR_ID_PHNSET_POWER_ON;
  659.         strID = STR_SETTING_POWER_ON_DISPLAY;
  660.         menuIDSys = MENU_SETTING_POWER_ON_SYSTEM;
  661.         menuIDUsr = MENU_SETTING_POWER_ON_DOWNLOAD;
  662.         hiliteFnSys = HighlightPhnsetPowerOnSys;
  663.         hiliteFnUsr = HighlightPhnsetPwrOnFmgr;
  664.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPowerOnOffSel: Onn"));
  665.     }
  666.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  667.     {
  668.         menuID = MENU_SETTING_POWER_OFF_DISPLAY;
  669.         scrID = SCR_ID_PHNSET_POWER_OFF;
  670.         strID = STR_SETTING_POWER_OFF_DISPLAY;
  671.         menuIDSys = MENU_SETTING_POWER_OFF_SYSTEM;
  672.         menuIDUsr = MENU_SETTING_POWER_OFF_DOWNLOAD;
  673.         hiliteFnSys = HighlightPhnsetPowerOffSys;
  674.         hiliteFnUsr = HighlightPhnsetPwrOffFmgr;
  675.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPowerOnOffSel: Offn"));
  676.     }
  677.     else
  678.     {
  679.         MMI_ASSERT(0);
  680.     }
  681.     guiBuffer = GetCurrGuiBuffer(scrID);
  682.     EntryNewScreen(scrID, NULL, EntryPhnsetPowerOnOffSel, NULL);
  683.     nNumofItem = GetNumOfChild(menuID);
  684.     GetSequenceStringIds(menuID, PowerOnOffSelectList);
  685.     SetParentHandler(menuID);
  686.     SetHiliteHandler(menuIDSys, hiliteFnSys);
  687. #if defined(__MMI_FILE_MANAGER__)
  688.     SetHiliteHandler(menuIDUsr, hiliteFnUsr);
  689. #endif 
  690.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  691.     ShowCategory15Screen(
  692.         strID,
  693.         IMG_SCR_SETTING_CAPTION,
  694.         STR_GLOBAL_OK,
  695.         IMG_GLOBAL_OK,
  696.         STR_GLOBAL_BACK,
  697.         IMG_GLOBAL_BACK,
  698.         nNumofItem,
  699.         PowerOnOffSelectList,
  700.         (PU16) gIndexIconsImageList,
  701.         1,
  702.         0,
  703.         guiBuffer);
  704.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  705.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  706. }
  707. /*****************************************************************************
  708.  * FUNCTION
  709.  *  EntryPhnsetPowerOnOffSys
  710.  * DESCRIPTION
  711.  *  To view build-in image/video list
  712.  * PARAMETERS
  713.  *  void
  714.  * RETURNS
  715.  *  void
  716.  *****************************************************************************/
  717. void EntryPhnsetPowerOnOffSys(void)
  718. {
  719.     /*----------------------------------------------------------------*/
  720.     /* Local Variables                                                */
  721.     /*----------------------------------------------------------------*/
  722.     U8 *guiBuffer = NULL;
  723.     /*----------------------------------------------------------------*/
  724.     /* Code Body                                                      */
  725.     /*----------------------------------------------------------------*/
  726.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  727.     {
  728.         EntryNewScreen(SCR_ID_PHNSET_POWER_ON_SYSTEM_LIST, NULL, EntryPhnsetPowerOnOffSys, NULL);
  729.         guiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_POWER_ON_SYSTEM_LIST);
  730.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPowerOnOffSys: Onn"));
  731.     }
  732.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  733.     {
  734.         EntryNewScreen(SCR_ID_PHNSET_POWER_OFF_SYSTEM_LIST, NULL, EntryPhnsetPowerOnOffSys, NULL);
  735.         guiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_POWER_OFF_SYSTEM_LIST);
  736.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPowerOnOffSys: Offn"));
  737.     }
  738.     else
  739.     {
  740.         ASSERT(0);
  741.     }
  742.     RegisterHighlightHandler(PhnsetPowerOnOffSysHiliteHandler);
  743.     g_phnset_cntx_p->curHightlightItem = 0;
  744.     item_amount = PhnsetConstSysPwrOnOffList(
  745.                     subMenuDataPtrs,
  746.                     g_phnset_cntx_p->SysWPSSList,
  747.                     (S16*) & (g_phnset_cntx_p->curHightlightItem));
  748.     g_phnset_cntx_p->WPSSPreviewScrFlag = 1;
  749.     if ((g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON && !g_phnset_cntx_p->curtPwrOnID) ||
  750.         (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF && !g_phnset_cntx_p->curtPwrOffID))
  751.         g_phnset_cntx_p->curHightlightItem = 0;
  752.     ShowCategory36Screen(
  753.         STR_ID_PHNSET_ON_OFF_SYSTEM,
  754.         IMG_SCR_SETTING_CAPTION,
  755.         STR_GLOBAL_VIEW,
  756.         0,
  757.         STR_GLOBAL_BACK,
  758.         IMG_GLOBAL_BACK,
  759.         item_amount,
  760.         subMenuDataPtrs,
  761.         (U16) (g_phnset_cntx_p->curHightlightItem),
  762.         guiBuffer);
  763.     SetLeftSoftkeyFunction(EntryPhnsetPwrOnOffSysView, KEY_EVENT_UP);
  764.     SetKeyHandler(EntryPhnsetPwrOnOffSysView, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  765.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  766.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  767. }
  768. /*****************************************************************************
  769.  * FUNCTION
  770.  *  EntryPhnsetPwrOnOffSysView
  771.  * DESCRIPTION
  772.  *  To preview build-in image/video
  773.  * PARAMETERS
  774.  *  void
  775.  * RETURNS
  776.  *  void
  777.  *****************************************************************************/
  778. void EntryPhnsetPwrOnOffSysView(void)
  779. {
  780.     /*----------------------------------------------------------------*/
  781.     /* Local Variables                                                */
  782.     /*----------------------------------------------------------------*/
  783.     U16 strID;
  784.     U16 resID;
  785.     U8 *guiBuffer = NULL;
  786.     /*----------------------------------------------------------------*/
  787.     /* Code Body                                                      */
  788.     /*----------------------------------------------------------------*/
  789.     CallbackPWRLSK = PhnsetSetPwrOnOffDisplay;
  790.     g_phnset_cntx_p->isCorrectSet = 0;
  791.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  792.     {
  793.         guiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_POWER_ON_SYSTEM_VIEW);
  794.         if (g_phnset_cntx_p->WPSSPreviewScrFlag)
  795.         {
  796.             EntryNewScreen(
  797.                 SCR_ID_PHNSET_POWER_ON_SYSTEM_VIEW,
  798.                 ExitPhnsetPwrOnOffSysView,
  799.                 EntryPhnsetPwrOnOffSysView,
  800.                 NULL);
  801.         }
  802.     #if defined(__MMI_RESOURCE_ENFB_SUPPORT__)
  803.         else
  804.         {
  805.             mmi_frm_resmem_reset(MMI_FRM_RESMEM_TYPE_LOD_ON_DEMAND);
  806.         }    
  807.     #endif /* defined(__MMI_RESOURCE_ENFB_SUPPORT__) */
  808.     }
  809.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  810.     {
  811.         guiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_POWER_OFF_SYSTEM_VIEW);
  812.         if (g_phnset_cntx_p->WPSSPreviewScrFlag)
  813.         {
  814.             EntryNewScreen(
  815.                 SCR_ID_PHNSET_POWER_OFF_SYSTEM_VIEW,
  816.                 ExitPhnsetPwrOnOffSysView,
  817.                 EntryPhnsetPwrOnOffSysView,
  818.                 NULL);
  819.         }
  820.     #if defined(__MMI_RESOURCE_ENFB_SUPPORT__)
  821.         else
  822.         {
  823.             mmi_frm_resmem_reset(MMI_FRM_RESMEM_TYPE_LOD_ON_DEMAND);
  824.         }    
  825.     #endif /* defined(__MMI_RESOURCE_ENFB_SUPPORT__) */
  826.     }
  827.     else
  828.     {
  829.         MMI_ASSERT(0);
  830.     }
  831.     wgui_set_touch_title_bar_buttons(); /* enable the display of title bar buttons */
  832. #if defined(__MMI_TOUCH_SCREEN__)
  833.     /* register the handlers for pen down event. */
  834.     register_touch_button_handlers(NULL, PhnsetPwrOnOffSysViewPre, NULL, PhnsetPwrOnOffSysViewNext);
  835. #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  836.     resID = g_phnset_cntx_p->SysWPSSList[g_phnset_cntx_p->curHightlightItem];
  837. #if defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__)
  838.     if ((g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON) && (g_phnset_cntx_p->curHightlightItem < MAX_POWER_ON_VDO)
  839.         || (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF) &&
  840.         (g_phnset_cntx_p->curHightlightItem < MAX_POWER_OFF_VDO))
  841.     {
  842.         /* This bucket handle build-in videos */
  843.         strID = STR_ID_PHNSET_DISPCHAR_VDOID_START + g_phnset_cntx_p->curHightlightItem;
  844.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPwrOnOffSysView: Video strID=%d, resID=%dn", strID,
  845.                              resID));
  846.         ShowCategory225Screen(
  847.             strID,                      /* title_str */
  848.             0,                          /* title_icon */
  849.             STR_GLOBAL_OK,              /* lsk_str */
  850.             IMG_GLOBAL_OK,              /* lsk_icon */
  851.             STR_GLOBAL_BACK,            /* rsk_str */
  852.             IMG_GLOBAL_BACK,            /* rsk_icon */
  853.             resID,                      /* video_id */
  854.             NULL,                       /* video_filename */
  855.             1,                          /* repeat_count */
  856.             TRUE,                       /* is_visual_update */
  857.             !IsSilentModeActivated(),   /* is_play_audio */
  858.             TRUE,                       /* is_lcd_no_sleep */
  859.             GDI_COLOR_BLACK,            /* bg_color */
  860.             PhnsetPwrOnOffPlayCallBack, /* callback */
  861.             guiBuffer);                 /* gui_buffer */
  862.         SetLeftSoftkeyFunction(CallbackPWRLSK, KEY_EVENT_UP);
  863.         SetRightSoftkeyFunction(PhnsetPwrOnOffUsrDefGoBack, KEY_EVENT_UP);
  864.     }
  865.     else
  866. #endif /* defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__) */ 
  867.     {
  868.         /* This bucket handle build-in images */
  869.         U8 imgName[MAX_IMAGE_NAME_WIDTH];
  870.     #ifdef __MMI_SWFLASH__
  871.         if (PhnsetGetDisplayType(resID) == PHNSET_TYPE_DISP_SWFLASH)
  872.         {
  873.            strID = STR_ID_DISPCHAR_SWFLASH_START + (resID - IMG_ID_DISPCHAR_SWFLASH_START);
  874.         }
  875.         else
  876.     #endif /* __MMI_SWFLASH__ */
  877.         if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  878.         {
  879.             strID = STR_ID_PHNSET_DISPCHAR_ANMID_START + (resID - IMG_ID_PHNSET_ON_START);
  880.         }
  881.         else
  882.         {
  883.             strID = STR_ID_PHNSET_DISPCHAR_ANMID_START + (resID - IMG_ID_PHNSET_OFF_START);
  884.         }
  885.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPwrOnOffSysView: Image strID=%d, resID=%dn", strID,
  886.                              resID));
  887.         pfnUnicodeStrcpy((PS8) imgName, GetString(strID));
  888.     #ifdef __MMI_SWFLASH__
  889.         if (PhnsetGetDisplayType(resID) == PHNSET_TYPE_DISP_SWFLASH)
  890.         {
  891.             ShowCategory229Screen(
  892.                 imgName,                            /* title_str */
  893.                 IMG_SCR_SETTING_CAPTION,            /* title_icon */
  894.                 STR_GLOBAL_OK,                      /* lsk_str */
  895.                 IMG_GLOBAL_OK,                      /* lsk_icon */
  896.                 STR_GLOBAL_BACK,                    /* rsk_str */
  897.                 IMG_GLOBAL_BACK,                    /* rsk_icon */
  898.                 resID,                              /* resource_id */
  899.                 NULL,                               /* resource_filename */
  900.                 1,                                  /* repeat_count */
  901.                 !IsSilentModeActivated(),           /* is_play_audio */
  902.                 MMI_FALSE,                          /* is_vibrate_on */
  903.                 MMI_FALSE,                          /* is_interaction_on */
  904.                 MMI_TRUE,                           /* is_lcd_no_sleep */
  905.                 MMI_TRUE,                          /* is_full_screen */
  906.                 GDI_COLOR_WHITE,                    /* bg_color */
  907.                 PhnsetPwrOnOffPlayCallBack,
  908.                 guiBuffer);
  909.     
  910.     
  911.         }
  912.         else
  913.     #endif
  914.             ShowCategory129Screen(
  915.                 imgName,
  916.                 0,
  917.                 STR_GLOBAL_OK,
  918.                 IMG_GLOBAL_OK,
  919.                 STR_GLOBAL_BACK,
  920.                 IMG_GLOBAL_BACK,
  921.                 resID,
  922.                 guiBuffer);
  923.         SetLeftSoftkeyFunction(PhnsetSetPwrOnOffDisplay, KEY_EVENT_UP);
  924.         SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  925.     }
  926.     /* changed the up-down arrow key handlers to left-right arrow key handlers
  927.        for having the similar behaviour of keypad and touchscreen. */
  928.     SetKeyHandler(PhnsetPwrOnOffSysViewPre, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  929.     SetKeyHandler(PhnsetPwrOnOffSysViewNext, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  930. }
  931. /*****************************************************************************
  932.  * FUNCTION
  933.  *  PhnsetPwrOnOffUsrDefFreeBuf
  934.  * DESCRIPTION
  935.  *  To release buffer
  936.  * PARAMETERS
  937.  *  void
  938.  * RETURNS
  939.  *  void
  940.  *****************************************************************************/
  941. static void PhnsetPwrOnOffUsrDefFreeBuf(void)
  942. {
  943.     /*----------------------------------------------------------------*/
  944.     /* Local Variables                                                */
  945.     /*----------------------------------------------------------------*/
  946.     /*----------------------------------------------------------------*/
  947.     /* Code Body                                                      */
  948.     /*----------------------------------------------------------------*/
  949.     if (phnset_dispchar_strp)
  950.     {
  951.         OslMfree(phnset_dispchar_strp);
  952.         phnset_dispchar_strp = NULL;
  953.     }
  954. }
  955. /*****************************************************************************
  956.  * FUNCTION
  957.  *  PhnsetPwrOnOffUsrDefGoBack
  958.  * DESCRIPTION
  959.  *  To release buffer before GoBackHistory
  960.  * PARAMETERS
  961.  *  void
  962.  * RETURNS
  963.  *  void
  964.  *****************************************************************************/
  965. static void PhnsetPwrOnOffUsrDefGoBack(void)
  966. {
  967.     /*----------------------------------------------------------------*/
  968.     /* Local Variables                                                */
  969.     /*----------------------------------------------------------------*/
  970.     /*----------------------------------------------------------------*/
  971.     /* Code Body                                                      */
  972.     /*----------------------------------------------------------------*/
  973.     PhnsetPwrOnOffUsrDefFreeBuf();
  974.     GoBackHistory();
  975. }
  976. /*****************************************************************************
  977.  * FUNCTION
  978.  *  PhnsetPwrOnOffSysViewPre
  979.  * DESCRIPTION
  980.  *  To preview previous build-in image/video
  981.  * PARAMETERS
  982.  *  void
  983.  * RETURNS
  984.  *  void
  985.  *****************************************************************************/
  986. void PhnsetPwrOnOffSysViewPre(void)
  987. {
  988.     /*----------------------------------------------------------------*/
  989.     /* Local Variables                                                */
  990.     /*----------------------------------------------------------------*/
  991.     /*----------------------------------------------------------------*/
  992.     /* Code Body                                                      */
  993.     /*----------------------------------------------------------------*/
  994.     ExitCategoryFunction();
  995.     if (g_phnset_cntx_p->curHightlightItem <= 0)
  996.     {
  997.         g_phnset_cntx_p->curHightlightItem = item_amount;
  998.     }
  999.     g_phnset_cntx_p->curHightlightItem--;
  1000.     g_phnset_cntx_p->WPSSPreviewScrFlag = 0;
  1001.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffSysViewPre: highlight=%dn",
  1002.                          g_phnset_cntx_p->curHightlightItem));
  1003.     EntryPhnsetPwrOnOffSysView();
  1004. }
  1005. /*****************************************************************************
  1006.  * FUNCTION
  1007.  *  PhnsetPwrOnOffSysViewNext
  1008.  * DESCRIPTION
  1009.  *  To preview next build-in image/video
  1010.  * PARAMETERS
  1011.  *  void
  1012.  * RETURNS
  1013.  *  void
  1014.  *****************************************************************************/
  1015. void PhnsetPwrOnOffSysViewNext(void)
  1016. {
  1017.     /*----------------------------------------------------------------*/
  1018.     /* Local Variables                                                */
  1019.     /*----------------------------------------------------------------*/
  1020.     /*----------------------------------------------------------------*/
  1021.     /* Code Body                                                      */
  1022.     /*----------------------------------------------------------------*/
  1023.     ExitCategoryFunction();
  1024.     if (g_phnset_cntx_p->curHightlightItem >= item_amount - 1)
  1025.     {
  1026.         g_phnset_cntx_p->curHightlightItem = -1;
  1027.     }
  1028.     g_phnset_cntx_p->curHightlightItem++;
  1029.     g_phnset_cntx_p->WPSSPreviewScrFlag = 0;
  1030.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffSysViewNext: highlight=%dn",
  1031.                          g_phnset_cntx_p->curHightlightItem));
  1032.     EntryPhnsetPwrOnOffSysView();
  1033. }
  1034. /*****************************************************************************
  1035.  * FUNCTION
  1036.  *  PhnsetPowerOnOffSysHiliteHandler
  1037.  * DESCRIPTION
  1038.  *  Callback of highlight moving
  1039.  * PARAMETERS
  1040.  *  nIndex      [IN]        
  1041.  * RETURNS
  1042.  *  void
  1043.  *****************************************************************************/
  1044. void PhnsetPowerOnOffSysHiliteHandler(S32 nIndex)
  1045. {
  1046.     /*----------------------------------------------------------------*/
  1047.     /* Local Variables                                                */
  1048.     /*----------------------------------------------------------------*/
  1049.     /*----------------------------------------------------------------*/
  1050.     /* Code Body                                                      */
  1051.     /*----------------------------------------------------------------*/
  1052. #if defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__)
  1053.     {
  1054.         U8 max_video = 0;
  1055.         if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  1056.         {
  1057.             max_video = MAX_POWER_ON_VDO;
  1058.         }
  1059.         else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  1060.         {
  1061.             max_video = MAX_POWER_OFF_VDO;
  1062.         }
  1063.         if (nIndex < max_video)
  1064.         {
  1065.             ChangeLeftSoftkey(STR_ID_VDOPLY_PLAY, 0);
  1066.         }
  1067.         else
  1068.         {
  1069.             ChangeLeftSoftkey(STR_GLOBAL_VIEW, 0);
  1070.         }
  1071.     }
  1072. #endif /* defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__) */ 
  1073.     g_phnset_cntx_p->curHightlightItem = (U16) nIndex;
  1074. }
  1075. /*****************************************************************************
  1076.  * FUNCTION
  1077.  *  PhnsetConstSysPwrOnOffList
  1078.  * DESCRIPTION
  1079.  *  To construct build-in power on/off disp. image/video list
  1080.  * PARAMETERS
  1081.  *  pSysPwrOnOffStrList         [IN]        
  1082.  *  pSysPwrOnOffImgIDList       [?]         
  1083.  *  HighliteItem                [?]         
  1084.  * RETURNS
  1085.  *  void
  1086.  *****************************************************************************/
  1087. U8 PhnsetConstSysPwrOnOffList(U8 **pSysPwrOnOffStrList, U16 *pSysPwrOnOffImgIDList, S16 *HighliteItem)
  1088. {
  1089.     /*----------------------------------------------------------------*/
  1090.     /* Local Variables                                                */
  1091.     /*----------------------------------------------------------------*/
  1092.     U8 i;
  1093.     U16 currentID = 0;
  1094.     U16 max_animation = 0, max_video = 0;
  1095.     U16 vdoStart = 0, imgStart = 0;
  1096.     U16 strID = 0, imgID = 0;
  1097. #ifdef __MMI_SWFLASH__
  1098.         U8 index_swflash = 0;
  1099. #endif
  1100.         U8 index_img = 0; /* count of image */
  1101.         U8 index_vdo = 0; /* count of video */
  1102.     /*----------------------------------------------------------------*/
  1103.     /* Code Body                                                      */
  1104.     /*----------------------------------------------------------------*/
  1105.     /* Layout
  1106.      *
  1107.      * -- Video         --
  1108.      *
  1109.      * -- Normal Images --
  1110.      * -- Normal Images -- SVG
  1111.      * -- Normal Images -- M3D
  1112.      * -- SWFLASH        --
  1113.      * 
  1114.      */
  1115.     max_animation = MAX_POWER_ON_IMG; /* same as MAX_POWER_OFF_IMG */
  1116.     max_video = MAX_POWER_ON_VDO; /* same as MAX_POWER_OFF_VDO */
  1117.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  1118.     {
  1119.         if (max_video)
  1120.         {
  1121.             vdoStart = IMG_ID_PHNSET_ON_VDO_START;
  1122.         }
  1123.         imgStart = IMG_ID_PHNSET_ON_START;
  1124.         currentID = g_phnset_cntx_p->curtPwrOnID;
  1125.     }
  1126.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  1127.     {
  1128.         if (max_video)
  1129.         {
  1130.             vdoStart = IMG_ID_PHNSET_OFF_VDO_START;
  1131.         }
  1132.         imgStart = IMG_ID_PHNSET_OFF_START;
  1133.         currentID = g_phnset_cntx_p->curtPwrOffID;
  1134.     }
  1135.     for (i = 0; i < (max_animation + max_video); i++)
  1136.     {
  1137.         if (i < max_video)
  1138.         {
  1139.            imgID = vdoStart + i;
  1140.         }
  1141.         else if (i >= max_video && 
  1142.                  i < (max_video + max_animation - MAX_DISPCHAR_SWFLASH))
  1143.         {
  1144.            imgID = imgStart + (i - max_video);
  1145.         }
  1146.         else
  1147.         {
  1148.             imgID = IMG_ID_DISPCHAR_SWFLASH_START + (i - (max_video + max_animation - MAX_DISPCHAR_SWFLASH));
  1149.         }
  1150.         
  1151.         
  1152.         if (imgID >= vdoStart && imgID < (vdoStart + max_video))
  1153.         {
  1154.             strID = STR_ID_PHNSET_DISPCHAR_VDOID_START + index_vdo;
  1155.             ++index_vdo;
  1156.         }
  1157.         else if ((imgID >= IMG_ID_PHNSET_ON_START && imgID <= IMG_ID_PHNSET_ON_MAX) ||
  1158.                  (imgID >= IMG_ID_PHNSET_OFF_START && imgID <= IMG_ID_PHNSET_OFF_MAX))
  1159.         {
  1160.             strID = STR_ID_PHNSET_DISPCHAR_ANMID_START + index_img;
  1161.             index_img++;
  1162.         }
  1163.     #ifdef __MMI_SWFLASH__
  1164.         else
  1165.         {
  1166.                 strID = STR_ID_DISPCHAR_SWFLASH_START + index_swflash;
  1167.                 ++index_swflash;
  1168.         }
  1169.     #endif /* __MMI_SWFLASH__*/
  1170.             
  1171.             
  1172.         if (pSysPwrOnOffImgIDList)
  1173.         {
  1174.             pSysPwrOnOffImgIDList[i] = imgID;
  1175.         }
  1176.         if (pSysPwrOnOffStrList)
  1177.         {
  1178.             pSysPwrOnOffStrList[i] = (PU8) GetString(strID);
  1179.         }
  1180.         if (currentID == pSysPwrOnOffImgIDList[i])
  1181.         {
  1182.             *HighliteItem = i;
  1183.         }
  1184.     }
  1185.     i = max_video + max_animation;
  1186.     return i;   /* amount, will be used to construct list */
  1187. }
  1188. /*****************************************************************************
  1189.  * FUNCTION
  1190.  *  PhnsetGetPwrOnDisp
  1191.  * DESCRIPTION
  1192.  *  To get power on disp. id
  1193.  * PARAMETERS
  1194.  *  id      [?]     
  1195.  * RETURNS
  1196.  *  void
  1197.  *****************************************************************************/
  1198. void PhnsetGetPwrOnDisp(U16 *id)
  1199. {
  1200.     /*----------------------------------------------------------------*/
  1201.     /* Local Variables                                                */
  1202.     /*----------------------------------------------------------------*/
  1203.     /*----------------------------------------------------------------*/
  1204.     /* Code Body                                                      */
  1205.     /*----------------------------------------------------------------*/
  1206.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetGetPwrOnDisp: ID=%dn", g_phnset_cntx_p->curtPwrOnID));
  1207.     *id = g_phnset_cntx_p->curtPwrOnID;
  1208. }
  1209. /*****************************************************************************
  1210.  * FUNCTION
  1211.  *  PhnsetGetPwrOnFileName
  1212.  * DESCRIPTION
  1213.  *  To get power on disp. path
  1214.  * PARAMETERS
  1215.  *  void
  1216.  * RETURNS
  1217.  *  void
  1218.  *****************************************************************************/
  1219. PS8 PhnsetGetPwrOnFileName(void)
  1220. {
  1221.     /*----------------------------------------------------------------*/
  1222.     /* Local Variables                                                */
  1223.     /*----------------------------------------------------------------*/
  1224.     /*----------------------------------------------------------------*/
  1225.     /* Code Body                                                      */
  1226.     /*----------------------------------------------------------------*/
  1227.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetGetPwrOnFileName: path=%sn",
  1228.                          phnset_pwronoff_filename.pwrondisplay));
  1229.     return (PS8) phnset_pwronoff_filename.pwrondisplay;
  1230. }
  1231. /*****************************************************************************
  1232.  * FUNCTION
  1233.  *  PhnsetGetPwrOffDisp
  1234.  * DESCRIPTION
  1235.  *  To get power off disp. id
  1236.  * PARAMETERS
  1237.  *  id      [?]     
  1238.  * RETURNS
  1239.  *  void
  1240.  *****************************************************************************/
  1241. void PhnsetGetPwrOffDisp(U16 *id)
  1242. {
  1243.     /*----------------------------------------------------------------*/
  1244.     /* Local Variables                                                */
  1245.     /*----------------------------------------------------------------*/
  1246.     /*----------------------------------------------------------------*/
  1247.     /* Code Body                                                      */
  1248.     /*----------------------------------------------------------------*/
  1249.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetGetPwrOffDisp: ID=%dn", g_phnset_cntx_p->curtPwrOffID));
  1250.     *id = g_phnset_cntx_p->curtPwrOffID;
  1251. }
  1252. /*****************************************************************************
  1253.  * FUNCTION
  1254.  *  PhnsetGetPwrOffFileName
  1255.  * DESCRIPTION
  1256.  *  To get power off disp. path
  1257.  * PARAMETERS
  1258.  *  void
  1259.  * RETURNS
  1260.  *  void
  1261.  *****************************************************************************/
  1262. PS8 PhnsetGetPwrOffFileName(void)
  1263. {
  1264.     /*----------------------------------------------------------------*/
  1265.     /* Local Variables                                                */
  1266.     /*----------------------------------------------------------------*/
  1267.     /*----------------------------------------------------------------*/
  1268.     /* Code Body                                                      */
  1269.     /*----------------------------------------------------------------*/
  1270.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetGetPwrOffFileName: path=%sn",
  1271.                          phnset_pwronoff_filename.pwroffdisplay));
  1272.     return (PS8) phnset_pwronoff_filename.pwroffdisplay;
  1273. }
  1274. /*****************************************************************************
  1275.  * FUNCTION
  1276.  *  PhnsetRstPwrOnDisplayDefault
  1277.  * DESCRIPTION
  1278.  *  To restore default power on build-in id
  1279.  * PARAMETERS
  1280.  *  void
  1281.  * RETURNS
  1282.  *  void
  1283.  *****************************************************************************/
  1284. void PhnsetRstPwrOnDisplayDefault(void)
  1285. {
  1286.     /*----------------------------------------------------------------*/
  1287.     /* Local Variables                                                */
  1288.     /*----------------------------------------------------------------*/
  1289.     /*----------------------------------------------------------------*/
  1290.     /* Code Body                                                      */
  1291.     /*----------------------------------------------------------------*/
  1292.     mmi_dispchar_get_img_id(NVRAM_RESTORE_POWER_ON_DISPLAY, &(g_phnset_cntx_p->curtPwrOnID));
  1293. #ifdef MMI_ON_WIN32
  1294.     g_phnset_cntx_p->curtPwrOnID = IMG_ID_PHNSET_ON_START;
  1295. #endif 
  1296.     mmi_dispchar_set_img_id(NVRAM_CURRENT_POWER_ON_DISPLAY, &(g_phnset_cntx_p->curtPwrOnID));
  1297.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetRstPwrOnDisplayDefault: On ID=%dn", g_phnset_cntx_p->curtPwrOnID));
  1298. }
  1299. /*****************************************************************************
  1300.  * FUNCTION
  1301.  *  PhnsetGetPwrOnDisplayDefault
  1302.  * DESCRIPTION
  1303.  *  To get default power on build-in id
  1304.  * PARAMETERS
  1305.  *  void
  1306.  * RETURNS
  1307.  *  void
  1308.  *****************************************************************************/
  1309. U16 PhnsetGetPwrOnDisplayDefault(void)
  1310. {
  1311.     /*----------------------------------------------------------------*/
  1312.     /* Local Variables                                                */
  1313.     /*----------------------------------------------------------------*/
  1314.     U16 id;
  1315.     /*----------------------------------------------------------------*/
  1316.     /* Code Body                                                      */
  1317.     /*----------------------------------------------------------------*/
  1318.     mmi_dispchar_get_img_id(NVRAM_RESTORE_POWER_ON_DISPLAY, &id);
  1319.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetGetPwrOnDisplayDefault: On ID=%dn", id));
  1320.     return id;
  1321. }
  1322. /*****************************************************************************
  1323.  * FUNCTION
  1324.  *  PhnsetRstPwrOffDisplayDefault
  1325.  * DESCRIPTION
  1326.  *  To restore default power off build-in id
  1327.  * PARAMETERS
  1328.  *  void
  1329.  * RETURNS
  1330.  *  void
  1331.  *****************************************************************************/
  1332. void PhnsetRstPwrOffDisplayDefault(void)
  1333. {
  1334.     /*----------------------------------------------------------------*/
  1335.     /* Local Variables                                                */
  1336.     /*----------------------------------------------------------------*/
  1337.     /*----------------------------------------------------------------*/
  1338.     /* Code Body                                                      */
  1339.     /*----------------------------------------------------------------*/
  1340.     mmi_dispchar_get_img_id(NVRAM_RESTORE_POWER_OFF_DISPLAY, &(g_phnset_cntx_p->curtPwrOffID));
  1341. #ifdef MMI_ON_WIN32
  1342.     g_phnset_cntx_p->curtPwrOffID = IMG_ID_PHNSET_OFF_START;
  1343. #endif 
  1344.     mmi_dispchar_set_img_id(NVRAM_CURRENT_POWER_OFF_DISPLAY, &(g_phnset_cntx_p->curtPwrOffID));
  1345.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetRstPwrOffDisplayDefault: Off ID=%dn",
  1346.                          g_phnset_cntx_p->curtPwrOffID));
  1347. }
  1348. /*****************************************************************************
  1349.  * FUNCTION
  1350.  *  PhnsetGetPwrOffDisplayDefault
  1351.  * DESCRIPTION
  1352.  *  To get default power on build-in id
  1353.  * PARAMETERS
  1354.  *  void
  1355.  * RETURNS
  1356.  *  void
  1357.  *****************************************************************************/
  1358. U16 PhnsetGetPwrOffDisplayDefault(void)
  1359. {
  1360.     /*----------------------------------------------------------------*/
  1361.     /* Local Variables                                                */
  1362.     /*----------------------------------------------------------------*/
  1363.     U16 id;
  1364.     /*----------------------------------------------------------------*/
  1365.     /* Code Body                                                      */
  1366.     /*----------------------------------------------------------------*/
  1367.     mmi_dispchar_get_img_id(NVRAM_RESTORE_POWER_OFF_DISPLAY, &id);
  1368.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetGetPwrOffDisplayDefault: Off ID=%dn", id));
  1369.     return id;
  1370. }
  1371. /*****************************************************************************
  1372.  * FUNCTION
  1373.  *  PhnsetPwrOnOffPlayCallBack
  1374.  * DESCRIPTION
  1375.  *  This function is to set current wallpaper using index by AT command
  1376.  * PARAMETERS
  1377.  *  result      [IN]        Play result
  1378.  * RETURNS
  1379.  *  void
  1380.  *****************************************************************************/
  1381. void PhnsetPwrOnOffPlayCallBack(S32 result)
  1382. {
  1383.     /*----------------------------------------------------------------*/
  1384.     /* Local Variables                                                */
  1385.     /*----------------------------------------------------------------*/
  1386.     /*----------------------------------------------------------------*/
  1387.     /* Code Body                                                      */
  1388.     /*----------------------------------------------------------------*/
  1389.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffPlayCallBack: result=%dn", result));
  1390.     if (result >= 0)
  1391.     {
  1392.         ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1393.         CallbackPWRLSK = PhnsetSetPwrOnOffDisplay;
  1394.     }
  1395.     else
  1396.     {
  1397.         ChangeLeftSoftkey(0, 0);
  1398.         ChangeRightSoftkey(0, 0);
  1399.         CallbackPWRLSK = UI_dummy_function;
  1400.         PhnsetPwrOnOffBadDisplayPopup(NULL);
  1401.         PhnsetPwrOnOffUsrDefFreeBuf();
  1402.         /* delete to file select screen again */
  1403.         DeleteNHistory(1);
  1404.     }
  1405.     SetLeftSoftkeyFunction(CallbackPWRLSK, KEY_EVENT_UP);
  1406. }
  1407. /*****************************************************************************
  1408.  * FUNCTION
  1409.  *  PhnsetPwrOnOffBadDisplayPopup
  1410.  * DESCRIPTION
  1411.  *  Popup string when select/detect an invalid file
  1412.  * PARAMETERS
  1413.  *  error_str       [IN]        
  1414.  * RETURNS
  1415.  *  void
  1416.  *****************************************************************************/
  1417. void PhnsetPwrOnOffBadDisplayPopup(PS8 error_str)
  1418. {
  1419.     /*----------------------------------------------------------------*/
  1420.     /* Local Variables                                                */
  1421.     /*----------------------------------------------------------------*/
  1422.     /*----------------------------------------------------------------*/
  1423.     /* Code Body                                                      */
  1424.     /*----------------------------------------------------------------*/
  1425.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffBadDisplayPopupn"));
  1426.     if (error_str == NULL)
  1427.     {
  1428.         DisplayPopup(
  1429.             (PU8) GetString(STR_FMGR_INVALID_FORMAT),
  1430.             IMG_GLOBAL_ERROR,
  1431.             1,
  1432.             UI_POPUP_NOTIFYDURATION_TIME,
  1433.             ERROR_TONE);
  1434.     }
  1435.     else
  1436.     {
  1437.         DisplayPopup((PU8) error_str, IMG_GLOBAL_ERROR, 1, UI_POPUP_NOTIFYDURATION_TIME, ERROR_TONE);
  1438.     }
  1439. }
  1440. /*****************************************************************************
  1441.  * FUNCTION
  1442.  *  ExitPhnsetPwrOnOffSysView
  1443.  * DESCRIPTION
  1444.  *  Release/reset buffer/variables/history
  1445.  * PARAMETERS
  1446.  *  void
  1447.  * RETURNS
  1448.  *  void
  1449.  *****************************************************************************/
  1450. void ExitPhnsetPwrOnOffSysView(void)
  1451. {
  1452.     /*----------------------------------------------------------------*/
  1453.     /* Local Variables                                                */
  1454.     /*----------------------------------------------------------------*/
  1455.     /*----------------------------------------------------------------*/
  1456.     /* Code Body                                                      */
  1457.     /*----------------------------------------------------------------*/
  1458.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "ExitPhnsetPwrOnOffSysView: isCorrectSet=%dn",
  1459.                          g_phnset_cntx_p->isCorrectSet));
  1460.     if (g_phnset_cntx_p->isCorrectSet)
  1461.     {
  1462.     #ifdef __MMI_FILE_MANAGER__
  1463.         PhnsetPwrOnOffUsrDefFreeBuf();
  1464.     #endif 
  1465.         DeleteUptoScrID(g_phnset_cntx_p->ScrAnchor);
  1466.     }
  1467.     g_phnset_cntx_p->WPSSPreviewScrFlag = 1;
  1468. }
  1469. /*****************************************************************************
  1470.  * FUNCTION
  1471.  *  PhnsetSetPwrOnOffDisplay
  1472.  * DESCRIPTION
  1473.  *  Set Current Power on/off disp. by current highlight or selected path
  1474.  * PARAMETERS
  1475.  *  void
  1476.  * RETURNS
  1477.  *  void
  1478.  *****************************************************************************/
  1479. void PhnsetSetPwrOnOffDisplay(void)
  1480. {
  1481.     /*----------------------------------------------------------------*/
  1482.     /* Local Variables                                                */
  1483.     /*----------------------------------------------------------------*/
  1484.     /*----------------------------------------------------------------*/
  1485.     /* Code Body                                                      */
  1486.     /*----------------------------------------------------------------*/
  1487.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetSetPwrOnOffDisplayn"));
  1488.     if (phnset_dispchar_strp)
  1489.     {
  1490.         PhnsetSetPwrOnOffDisplayByFileName(phnset_dispchar_strp);
  1491.     }
  1492.     else
  1493.     {
  1494.         PhnsetSetPwrOnOffDisplayByImgID(g_phnset_cntx_p->SysWPSSList[g_phnset_cntx_p->curHightlightItem]);
  1495.     }
  1496.     g_phnset_cntx_p->isCorrectSet = 1;
  1497.     DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, SUCCESS_TONE);
  1498.     if (IsScreenPresent(SCR_ID_PHNSET_POWER_ON) || IsScreenPresent(SCR_ID_PHNSET_POWER_OFF))
  1499.     {
  1500.         fmgr_reset_app_select();    /* not forword from fmgr */
  1501.     }
  1502. }
  1503. /*****************************************************************************
  1504.  * FUNCTION
  1505.  *  PhnsetSetPwrOnOffDisplayByImgID
  1506.  * DESCRIPTION
  1507.  *  This function is to set current wallpaper using index by AT command
  1508.  *  * PARAMETERS
  1509.  *  imgID    IN       image id
  1510.  * RETURNS
  1511.  *  void
  1512.  *****************************************************************************/
  1513. void PhnsetSetPwrOnOffDisplayByImgID(U16 imgID)
  1514. {
  1515.     /*----------------------------------------------------------------*/
  1516.     /* Local Variables                                                */
  1517.     /*----------------------------------------------------------------*/
  1518.     /*----------------------------------------------------------------*/
  1519.     /* Code Body                                                      */
  1520.     /*----------------------------------------------------------------*/
  1521.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  1522.     {
  1523.         g_phnset_cntx_p->curtPwrOnID = imgID;
  1524.         mmi_dispchar_set_img_id(NVRAM_CURRENT_POWER_ON_DISPLAY, &(g_phnset_cntx_p->curtPwrOnID));
  1525.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetSetPwrOnOffDisplayByImgID: On ID=%dn", imgID));
  1526.     }
  1527.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  1528.     {
  1529.         g_phnset_cntx_p->curtPwrOffID = imgID;
  1530.         mmi_dispchar_set_img_id(NVRAM_CURRENT_POWER_OFF_DISPLAY, &(g_phnset_cntx_p->curtPwrOffID));
  1531.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetSetPwrOnOffDisplayByImgID: Off ID=%dn", imgID));
  1532.     }
  1533.     if (g_idle_context.IsOnIdleScreen)
  1534.     {
  1535.         EntryIdleScreen();
  1536.     }
  1537. }
  1538. /*****************************************************************************
  1539.  * FUNCTION
  1540.  *  PhnsetSetPwrOnOffDisplayByFileName
  1541.  * DESCRIPTION
  1542.  *  Set Current Power on/off disp. by given path
  1543.  * PARAMETERS
  1544.  *  path        [?]     
  1545.  * RETURNS
  1546.  *  void
  1547.  *****************************************************************************/
  1548. void PhnsetSetPwrOnOffDisplayByFileName(S8 *path)
  1549. {
  1550.     /*----------------------------------------------------------------*/
  1551.     /* Local Variables                                                */
  1552.     /*----------------------------------------------------------------*/
  1553.     /*----------------------------------------------------------------*/
  1554.     /* Code Body                                                      */
  1555.     /*----------------------------------------------------------------*/
  1556.     S16 error;
  1557.     /*----------------------------------------------------------------*/
  1558.     /* Code Body                                                      */
  1559.     /*----------------------------------------------------------------*/
  1560.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  1561.     {
  1562.         if (g_phnset_cntx_p->isShort)
  1563.         {
  1564.             phnset_pwronoff_filename.isPwrOnShort = 1;
  1565.         }
  1566.         else
  1567.         {
  1568.             phnset_pwronoff_filename.isPwrOnShort = 0;
  1569.         }
  1570.         g_phnset_cntx_p->curtPwrOnID = 0;
  1571.         mmi_dispchar_set_img_id(NVRAM_CURRENT_POWER_ON_DISPLAY, &(g_phnset_cntx_p->curtPwrOnID));
  1572.         pfnUnicodeStrcpy((S8*) phnset_pwronoff_filename.pwrondisplay, (S8*) path);
  1573.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetSetPwrOnOffDisplayByFileName: On path=%s, short=%dn",
  1574.                              phnset_dispchar_strp, g_phnset_cntx_p->isShort));
  1575.     }
  1576.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  1577.     {
  1578.         if (g_phnset_cntx_p->isShort)
  1579.         {
  1580.             phnset_pwronoff_filename.isPwrOffShort = 1;
  1581.         }
  1582.         else
  1583.         {
  1584.             phnset_pwronoff_filename.isPwrOffShort = 0;
  1585.         }
  1586.         g_phnset_cntx_p->curtPwrOffID = 0;
  1587.         mmi_dispchar_set_img_id(NVRAM_CURRENT_POWER_OFF_DISPLAY, &(g_phnset_cntx_p->curtPwrOffID));
  1588.         pfnUnicodeStrcpy((S8*) phnset_pwronoff_filename.pwroffdisplay, (S8*) path);
  1589.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetSetPwrOnOffDisplayByFileName: Off path=%s, short=%dn",
  1590.                              phnset_dispchar_strp, g_phnset_cntx_p->isShort));
  1591.     }
  1592.     WriteRecord(NVRAM_EF_WPSS_FILENAME_LID, 2, &phnset_pwronoff_filename, sizeof(phnset_pwronoff_filename), &error);
  1593.     if (g_idle_context.IsOnIdleScreen)
  1594.     {
  1595.         EntryIdleScreen();
  1596.     }
  1597. }
  1598. #ifdef __MMI_FILE_MANAGER__
  1599. /*****************************************************************************
  1600.  * FUNCTION
  1601.  *  PhnsetPwrOnOffUsrDefPreViewScrDelCB
  1602.  * DESCRIPTION
  1603.  *  ...
  1604.  * PARAMETERS
  1605.  *  ptr     [?]     
  1606.  * RETURNS
  1607.  *  
  1608.  *****************************************************************************/
  1609. U8 PhnsetPwrOnOffUsrDefPreViewScrDelCB(void *ptr)
  1610. {
  1611.     /*----------------------------------------------------------------*/
  1612.     /* Local Variables                                                */
  1613.     /*----------------------------------------------------------------*/
  1614.     /*----------------------------------------------------------------*/
  1615.     /* Code Body                                                      */
  1616.     /*----------------------------------------------------------------*/
  1617.     PhnsetPwrOnOffUsrDefFreeBuf();
  1618.     return MMI_FALSE;
  1619. }
  1620. /*****************************************************************************
  1621.  * FUNCTION
  1622.  *  PhnsetPwrOnOffUsrDefPreViewENDKeyHdlr
  1623.  * DESCRIPTION
  1624.  *  END key handler when preview image/video in file manager
  1625.  * PARAMETERS
  1626.  *  void
  1627.  * RETURNS
  1628.  *  void
  1629.  *****************************************************************************/
  1630. void PhnsetPwrOnOffUsrDefPreViewENDKeyHdlr(void)
  1631. {
  1632.     /*----------------------------------------------------------------*/
  1633.     /* Local Variables                                                */
  1634.     /*----------------------------------------------------------------*/
  1635.     /*----------------------------------------------------------------*/
  1636.     /* Code Body                                                      */
  1637.     /*----------------------------------------------------------------*/
  1638.     /* Has to free the file name string buffer  */
  1639.     PhnsetPwrOnOffUsrDefFreeBuf();
  1640.     /* Execute the stored END key handler */
  1641.     if (phnset_pwronoff)
  1642.     {
  1643.         (*phnset_pwronoff) ();
  1644.     }
  1645. }
  1646. /*****************************************************************************
  1647.  * FUNCTION
  1648.  *  EntryPhnsetPwrOnOffUserView
  1649.  * DESCRIPTION
  1650.  *  Preview image/video in file manager
  1651.  * PARAMETERS
  1652.  *  void
  1653.  * RETURNS
  1654.  *  void
  1655.  *****************************************************************************/
  1656. void EntryPhnsetPwrOnOffUserView(void)
  1657. {
  1658.     /*----------------------------------------------------------------*/
  1659.     /* Local Variables                                                */
  1660.     /*----------------------------------------------------------------*/
  1661.     U8 file_type = 0;
  1662.     PU8 gui_buffer = NULL;
  1663.     /*----------------------------------------------------------------*/
  1664.     /* Code Body                                                      */
  1665.     /*----------------------------------------------------------------*/
  1666.     CallbackPWRLSK = PhnsetSetPwrOnOffDisplay;
  1667.     g_phnset_cntx_p->isCorrectSet = 0;
  1668.     file_type = mmi_fmgr_get_file_group(phnset_dispchar_strp);
  1669.     
  1670.     if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWRON)
  1671.     {
  1672.         gui_buffer = GetCurrGuiBuffer(SCR_ID_PHNSET_POWER_ON_USER_VIEW);
  1673.         EntryNewScreen(
  1674.             SCR_ID_PHNSET_POWER_ON_USER_VIEW,
  1675.             ExitPhnsetPwrOnOffSysView,
  1676.             EntryPhnsetPwrOnOffUserView,
  1677.             NULL);
  1678.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPwrOnOffUserView: On path=%sn", phnset_dispchar_strp));
  1679.     }
  1680.     else if (g_phnset_cntx_p->wpss_type == MMI_PHNSET_TYPE_PWROFF)
  1681.     {
  1682.         gui_buffer = GetCurrGuiBuffer(SCR_ID_PHNSET_POWER_OFF_USER_VIEW);
  1683.         EntryNewScreen(
  1684.             SCR_ID_PHNSET_POWER_OFF_USER_VIEW,
  1685.             ExitPhnsetPwrOnOffSysView,
  1686.             EntryPhnsetPwrOnOffUserView,
  1687.             NULL);
  1688.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPwrOnOffUserView: Off path=%sn",
  1689.                              phnset_dispchar_strp));
  1690.     }
  1691.     else
  1692.     {
  1693.         MMI_ASSERT(0);
  1694.     }
  1695. #if defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__)
  1696.     if (file_type == FMGR_GROUP_VIDEO)
  1697.     {
  1698.         ShowCategory225Screen(
  1699.             STR_GLOBAL_VIEW,            /* title_str */
  1700.             IMG_SCR_SETTING_CAPTION,    /* title_icon */
  1701.             STR_GLOBAL_OK,              /* lsk_str */
  1702.             IMG_GLOBAL_OK,              /* lsk_icon */
  1703.             STR_GLOBAL_BACK,            /* rsk_str */
  1704.             IMG_GLOBAL_BACK,            /* rsk_icon */
  1705.             0,                          /* video_id */
  1706.             (S8*) phnset_dispchar_strp, /* video_filename */
  1707.             1,                          /* repeat_count */
  1708.             TRUE,                       /* is_visual_update */
  1709.             !IsSilentModeActivated(),   /* is_play_audio */
  1710.             TRUE,                       /* is_lcd_no_sleep */
  1711.             GDI_COLOR_WHITE,            /* bg_color */
  1712.             PhnsetPwrOnOffPlayCallBack,
  1713.             gui_buffer);
  1714.     }
  1715.     else 
  1716. #endif /* defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__) */ 
  1717. #ifdef __MMI_SWFLASH__
  1718.     if (file_type == FMGR_GROUP_SWFLASH)
  1719.     {
  1720.         ShowCategory229Screen(
  1721.             (U8 *)GetString(STR_GLOBAL_VIEW),   /* title_str */
  1722.             IMG_SCR_SETTING_CAPTION,            /* title_icon */
  1723.             STR_GLOBAL_OK,                      /* lsk_str */
  1724.             IMG_GLOBAL_OK,                      /* lsk_icon */
  1725.             STR_GLOBAL_BACK,                    /* rsk_str */
  1726.             IMG_GLOBAL_BACK,                    /* rsk_icon */
  1727.             0,                                 /* resource_id */
  1728.             phnset_dispchar_strp,               /* resource_filename */
  1729.             1,                                  /* repeat_count */
  1730.             !IsSilentModeActivated(),           /* is_play_audio */
  1731.             MMI_FALSE,                          /* is_vibrate_on */
  1732.             MMI_FALSE,                          /* is_interaction_on */
  1733.             MMI_TRUE,                           /* is_lcd_no_sleep */
  1734.             MMI_FALSE,                          /* is_full_screen */
  1735.             GDI_COLOR_WHITE,                    /* bg_color */
  1736.             PhnsetPwrOnOffPlayCallBack,
  1737.             gui_buffer);
  1738.     }
  1739.     else
  1740. #endif
  1741.     if (file_type == FMGR_GROUP_IMAGE)
  1742.     {
  1743.         ShowCategory222Screen(
  1744.             STR_GLOBAL_VIEW,
  1745.             GetRootTitleIcon(MENU_SETTING_POWER_ON_DOWNLOAD),
  1746.             STR_GLOBAL_OK,
  1747.             IMG_GLOBAL_OK,
  1748.             STR_GLOBAL_BACK,
  1749.             IMG_GLOBAL_BACK,
  1750.             GDI_COLOR_WHITE,
  1751.             NULL,
  1752.             (S8*) phnset_dispchar_strp,
  1753.             FALSE,
  1754.             PhnsetPwrOnOffPlayCallBack);
  1755.         PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "EntryPhnsetPwrOnOffUserView: On path=%sn", phnset_dispchar_strp));
  1756.     }
  1757.     SetDelScrnIDCallbackHandler(SCR_ID_PHNSET_POWER_OFF_USER_VIEW, PhnsetPwrOnOffUsrDefPreViewScrDelCB);
  1758.     phnset_pwronoff = GetKeyHandler(KEY_END, KEY_EVENT_DOWN);
  1759.     SetKeyHandler(PhnsetPwrOnOffUsrDefPreViewENDKeyHdlr, KEY_END, KEY_EVENT_DOWN);
  1760.     SetLeftSoftkeyFunction(CallbackPWRLSK, KEY_EVENT_UP);
  1761.     SetRightSoftkeyFunction(PhnsetPwrOnOffUsrDefGoBack, KEY_EVENT_UP);
  1762. }
  1763. /*****************************************************************************
  1764.  * FUNCTION
  1765.  *  PhnsetPwrOnOffSelectFmgrCallBack
  1766.  * DESCRIPTION
  1767.  *  Callback function from filemanager after file selection
  1768.  * PARAMETERS
  1769.  *  path            [IN]        Selected file path
  1770.  *  is_short        [IN]        
  1771.  * RETURNS
  1772.  *  void
  1773.  * BOOL
  1774.  *****************************************************************************/
  1775. void PhnsetPwrOnOffSelectFmgrCallBack(void *path, int is_short)
  1776. {
  1777.     /*----------------------------------------------------------------*/
  1778.     /* Local Variables                                                */
  1779.     /*----------------------------------------------------------------*/
  1780.     PS8 error_str_ptr;
  1781.     /*----------------------------------------------------------------*/
  1782.     /* Code Body                                                      */
  1783.     /*----------------------------------------------------------------*/
  1784.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffSelectFmgrCallBack: path=%s, is_short=%dn", path,
  1785.                          is_short));
  1786.     g_phnset_cntx_p->isShort = (S32) is_short;
  1787.     if (path)
  1788.     {
  1789.         /* Prevent memory leck, after buffer is free, set pointer to NULL */
  1790.         ASSERT(phnset_dispchar_strp == NULL);
  1791.         phnset_dispchar_strp = OslMalloc(FMGR_PATH_BUFFER_SIZE);
  1792.         if (phnset_dispchar_strp)
  1793.         {
  1794.             pfnUnicodeStrcpy((S8*) phnset_dispchar_strp, (S8*) path);
  1795.         }
  1796.         else
  1797.         {
  1798.             GoBackToHistory(SCR_IDLE_SCR_DISP);
  1799.             return;
  1800.         }
  1801.         if (mmi_fmgr_forwardable_path((PS8) phnset_dispchar_strp))
  1802.         {
  1803.             error_str_ptr = (PS8) GetString(STR_ID_PHNSET_DISPCHAR_INVALID_PATH);
  1804.             PhnsetPwrOnOffBadDisplayPopup(error_str_ptr);
  1805.             PhnsetPwrOnOffUsrDefFreeBuf();
  1806.             return;
  1807.         }
  1808.         /* file limitation check - limitation is define in file manager util */
  1809.         if (!mmi_fmgr_util_file_limit_check(FMGR_LIMIT_POWER_ON_OFF_DSPL, (PS8) phnset_dispchar_strp, &error_str_ptr))
  1810.         {
  1811.             PhnsetPwrOnOffBadDisplayPopup(error_str_ptr);
  1812.             PhnsetPwrOnOffUsrDefFreeBuf();
  1813.             return;
  1814.         }
  1815.         EntryPhnsetPwrOnOffUserView();
  1816.     }
  1817.     else
  1818.     {
  1819.         GoBackToHistory(g_phnset_cntx_p->ScrAnchor);
  1820.     }
  1821. }
  1822. /*****************************************************************************
  1823.  * FUNCTION
  1824.  *  PhnsetPwrOnOffForwardFromFmgr
  1825.  * DESCRIPTION
  1826.  *  Call back for File manager forwarding
  1827.  * PARAMETERS
  1828.  *  path            [?]         
  1829.  *  action          [IN]        
  1830.  *  is_short        [IN]        
  1831.  * RETURNS
  1832.  *  void
  1833.  *****************************************************************************/
  1834. void PhnsetPwrOnOffForwardFromFmgr(void *path, FMGR_FILTER *filter, fmgr_tree_action_enum action, int is_short)
  1835. {
  1836.     /*----------------------------------------------------------------*/
  1837.     /* Local Variables                                                */
  1838.     /*----------------------------------------------------------------*/
  1839.     PS8 error_str_ptr;
  1840.     /*----------------------------------------------------------------*/
  1841.     /* Code Body                                                      */
  1842.     /*----------------------------------------------------------------*/
  1843.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffForwardFromFmgr: path=%s, action=%d, is_short=%dn", path,
  1844.                          action, is_short));
  1845.     if (!FMGR_FILTER_IS_SET(filter, FMGR_TYPE_GIF) &&
  1846. #ifdef JPG_DECODE
  1847.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_JPG) &&
  1848.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_JPEG) &&
  1849. #endif /* JPG_DECODE */ 
  1850. #if defined(GDI_USING_PNG)
  1851.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_PNG) &&
  1852. #endif 
  1853. #if defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__)
  1854. #ifdef MP4_CODEC
  1855.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_3GP) &&
  1856.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_MP4) &&
  1857.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_MPG) &&
  1858. #endif /* MP4_CODEC */ 
  1859. #ifdef MJPG_SUPPORT
  1860.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_AVI) &&
  1861. #endif 
  1862. #endif /* defined(__MMI_POWER_ON_OFF_DISPLAY_VIDEO__) && defined(__MTK_TARGET__) */ 
  1863. #ifdef M3D_MMI_SUPPORT
  1864.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_M3D) &&
  1865. #endif 
  1866. #ifdef SVG_SUPPORT
  1867.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_SVG) &&
  1868. #endif
  1869. #ifdef __MMI_SWFLASH__
  1870.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_CMP) &&
  1871. #endif
  1872.         !FMGR_FILTER_IS_SET(filter, FMGR_TYPE_BMP))
  1873.     {
  1874.         DisplayPopup((PU8) GetString(STR_GLOBAL_UNSUPPORTED_FORMAT), IMG_GLOBAL_ERROR, 0, 1000, ERROR_TONE);
  1875.         return;
  1876.     }
  1877.     if (path)
  1878.     {
  1879.         /* Prevent memory leck, after buffer is free, set pointer to NULL */
  1880.         ASSERT(phnset_dispchar_strp == NULL);
  1881.         g_phnset_cntx_p->isShort = (S32) is_short;
  1882.         phnset_dispchar_strp = OslMalloc(FMGR_PATH_BUFFER_SIZE);
  1883.         if (phnset_dispchar_strp)
  1884.         {
  1885.             pfnUnicodeStrcpy((S8*) phnset_dispchar_strp, (S8*) path);
  1886.         }
  1887.         else
  1888.         {
  1889.             GoBackToHistory(SCR_IDLE_SCR_DISP);
  1890.             return;
  1891.         }
  1892.         if (mmi_fmgr_forwardable_path((PS8) phnset_dispchar_strp))
  1893.         {
  1894.             error_str_ptr = (PS8) GetString(STR_ID_PHNSET_DISPCHAR_INVALID_PATH);
  1895.             PhnsetPwrOnOffBadDisplayPopup(error_str_ptr);
  1896.             PhnsetPwrOnOffUsrDefFreeBuf();
  1897.             return;
  1898.         }
  1899.         /* file limitation check - limitation is define in file manager util */
  1900.         if (!mmi_fmgr_util_file_limit_check(FMGR_LIMIT_POWER_ON_OFF_DSPL, (PS8) phnset_dispchar_strp, &error_str_ptr))
  1901.         {
  1902.             PhnsetPwrOnOffBadDisplayPopup(error_str_ptr);
  1903.             PhnsetPwrOnOffUsrDefFreeBuf();
  1904.             return;
  1905.         }
  1906.         if (action == FMGR_ACTION_FWD_POWER_ON)
  1907.         {
  1908.             g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWRON;
  1909.         }
  1910.         else if (action == FMGR_ACTION_FWD_POWER_OFF)
  1911.         {
  1912.             g_phnset_cntx_p->wpss_type = MMI_PHNSET_TYPE_PWROFF;
  1913.         }
  1914.         g_phnset_cntx_p->ScrAnchor = GetCurrScrnId();
  1915.         EntryPhnsetPwrOnOffUserView();
  1916.     }
  1917.     else
  1918.         /* run to here means some kinds of image error occur */
  1919.     {
  1920.         DisplayPopup(
  1921.             (PU8) GetString(STR_GLOBAL_UNFINISHED),
  1922.             IMG_GLOBAL_UNFINISHED,
  1923.             1,
  1924.             UI_POPUP_NOTIFYDURATION_TIME,
  1925.             ERROR_TONE);
  1926.     }
  1927. }
  1928. #endif /* __MMI_FILE_MANAGER__ */ 
  1929. #ifdef __USB_IN_NORMAL_MODE__
  1930. /*****************************************************************************
  1931.  * FUNCTION
  1932.  *  PhnsetPwrOnOffUseDefault
  1933.  * DESCRIPTION
  1934.  *  Use default build-in image/video
  1935.  * PARAMETERS
  1936.  *  void
  1937.  * RETURNS
  1938.  *  void
  1939.  *****************************************************************************/
  1940. void PhnsetPwrOnOffUseDefault(void)
  1941. {
  1942.     /*----------------------------------------------------------------*/
  1943.     /* Local Variables                                                */
  1944.     /*----------------------------------------------------------------*/
  1945.     PHNSET_TYPE_DISP type;
  1946.     /*----------------------------------------------------------------*/
  1947.     /* Code Body                                                      */
  1948.     /*----------------------------------------------------------------*/
  1949.     if ((type = PhnsetGetDisplayType(g_phnset_cntx_p->curtPwrOnID)) == PHNSET_TYPE_DISP_USER
  1950.         && (mmi_usb_check_path_exported((S8*) phnset_pwronoff_filename.pwrondisplay)))
  1951.     {
  1952.         g_phnset_cntx_p->curtPwrOnID = PhnsetGetPwrOnDisplayDefault();
  1953.     }
  1954.     if ((type = PhnsetGetDisplayType(g_phnset_cntx_p->curtPwrOffID)) == PHNSET_TYPE_DISP_USER
  1955.         && (mmi_usb_check_path_exported((S8*) phnset_pwronoff_filename.pwroffdisplay)))
  1956.     {
  1957.         g_phnset_cntx_p->curtPwrOffID = PhnsetGetPwrOffDisplayDefault();
  1958.     }
  1959.     PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "PhnsetPwrOnOffUseDefault: On ID=%d, Off ID=%dn",
  1960.                          g_phnset_cntx_p->curtPwrOnID, g_phnset_cntx_p->curtPwrOffID));
  1961. }
  1962. #endif /* __USB_IN_NORMAL_MODE__ */ 
  1963. #endif /* __MMI_POWER_ON_OFF_DISPLAY__ */ 
  1964. #endif /* POWERONOFFDISPLAY_C */