Browse Source

[WallPadDevService]
1. 현장 진행 완료된 버전

[WallPadHomeCtrl]
1. 현장 진행 완료된 버전

DESKTOP-FBA840V\icontrols 4 years ago
parent
commit
a6af996363
100 changed files with 15056 additions and 9588 deletions
  1. 6499 6464
      WallPadAPI/src/main/java/com/artncore/WallPadDataMgr/WallpadStatusData.java
  2. 7 0
      WallPadAPI/src/main/java/com/artncore/wallpadapi/CurtainAPI.java
  3. 42 24
      WallPadDevService/src/main/java/com/artncore/wallpaddevservice/driver/CurtainV1_Controller.java
  4. 5 5
      WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_curtain/CurTainV1MainScreen.java
  5. BIN
      WallPadMain/libs/WallPadAPI.jar
  6. 3 3
      WallPadMain/src/main/AndroidManifest.xml
  7. 11 3
      WallPadMain/src/main/java/com/artncore/devicectr/WallPadInterface.java
  8. 15 3
      WallPadMain/src/main/java/com/artncore/deviceinterface/WallPadInterface.java
  9. 32 8
      WallPadMain/src/main/java/kr/co/icontrols/gledeviceinterface/jni.java
  10. 180 49
      WallPadMain/src/main/java/kr/co/icontrols/hdcftp/HDCFTPManager.java
  11. 41 13
      WallPadMain/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface.java
  12. 41 13
      WallPadMain/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface2.java
  13. 395 119
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/IOInterface.java
  14. 411 153
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/MainActivity.java
  15. 12 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/ManualActivity.java
  16. 39 15
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/PopupActivity.java
  17. 83 28
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/Common.java
  18. 12 5
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/DataClasses.java
  19. 67 68
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/ID.java
  20. 43 14
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/Notice_visitor_upload_complete.java
  21. 43 14
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/Request_visitor_access_info.java
  22. 8 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPAlarmOperation.java
  23. 13 6
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPCarParking.java
  24. 10 5
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPCarParking_UPIS.java
  25. 17 7
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPElecCarChargingInfo.java
  26. 16 7
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEmptyMessage.java
  27. 48 19
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEnergyServer_EnergyMeter.java
  28. 42 17
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEnergyServer_EnergyModule.java
  29. 42 17
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEnergyServer_Realmeter.java
  30. 4 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPKNXDeviceEvent.java
  31. 11 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPKNXDeviceInfo.java
  32. 1 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPLobbyOnePass.java
  33. 12 7
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPRemotemeter.java
  34. 4 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPSmartLightEvent.java
  35. 11 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPSmartLightInfo.java
  36. 4 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAP_Chat_Sequence.java
  37. 21 11
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAP_Evacuation_ladder_open.java
  38. 22 11
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAP_hn_config_read.java
  39. 27 10
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_HYOSUNGUI_MAIN_HN.java
  40. 40 14
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_MAIN.java
  41. 26 8
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_METROUI_MAIN.java
  42. 26 8
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_METROUI_SUB_GROUP.java
  43. 19 6
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/PopupInfoIGALOnOff.java
  44. 174 63
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/menu/CallSubMenuScreen.java
  45. 86 29
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AddShortcut.java
  46. 29 9
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AdminPWInput.java
  47. 33 23
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AlarmUseEnergy_ServerConnect.java
  48. 32 10
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/BandLocationAlarmReceived.java
  49. 8 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ChargingElectricVehicle.java
  50. 14 4
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/CollectiveLightCTRL.java
  51. 115 36
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ConfigurePreset.java
  52. 87 29
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DeleteShortcut.java
  53. 32 10
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DeviceLoading.java
  54. 67 16
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DiagnosticMode.java
  55. 67 23
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DuplicatedShortcut.java
  56. 95 29
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ElevatorCall.java
  57. 8 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/EnergyUsageAlert.java
  58. 99 32
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/EventNotification.java
  59. 152 26
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupAdd.java
  60. 125 17
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupCtrl.java
  61. 126 15
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupEnergy.java
  62. 124 16
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupSecurity.java
  63. 126 15
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupSetting.java
  64. 125 17
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupTalk.java
  65. 12 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/InterFloorNoiseError.java
  66. 12 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/InterFloorNoiseOccured.java
  67. 13 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ModeLamp.java
  68. 50 16
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/MorningCall.java
  69. 67 23
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/NoMoreShortcut.java
  70. 38 12
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/NoticeDetectStranger.java
  71. 26 8
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ParcelReceived.java
  72. 32 10
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/PostReceived.java
  73. 39 12
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ReleaseInMode.java
  74. 26 8
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ReleaseOutMode.java
  75. 8 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ScheduleNotification.java
  76. 32 10
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/SmartKeyEmergency.java
  77. 38 12
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/VehicleArrived.java
  78. 138 44
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/EASYUI_MAIN.java
  79. 281 261
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/HYOSUNGUI_MAIN_HA.java
  80. 515 208
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/HYOSUNGUI_MAIN_HN.java
  81. 407 147
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/MAIN.java
  82. 617 109
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_MAIN.java
  83. 44 14
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_SUB_01.java
  84. 44 15
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_SUB_02.java
  85. 339 108
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_SUB_GROUP.java
  86. 50 17
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/SUB_01.java
  87. 74 25
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/SUB_02.java
  88. 68 22
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/EnergyAlramPopupMgr.java
  89. 214 145
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ExternalMobileService.java
  90. 108 30
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IGW200.java
  91. 103 30
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IGW300.java
  92. 316 221
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IconManager.java
  93. 13 4
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MainDatabaseManager.java
  94. 353 155
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MobileProcService.java
  95. 91 34
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ShortcutBox.java
  96. 81 26
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ShortcutManager.java
  97. 29 17
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/StringUtil.java
  98. 253 114
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/WallPadiMAPUpgrade.java
  99. 396 124
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/iMapServer.java
  100. BIN
      WallPadMain/src/main/jniLibs/armeabi-v7a/libwpd_v40interface2-jni.so

+ 6499 - 6464
WallPadAPI/src/main/java/com/artncore/WallPadDataMgr/WallpadStatusData.java

@@ -1,6464 +1,6499 @@
-package com.artncore.WallPadDataMgr;
-
-import android.content.ComponentName;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.database.Cursor;
-import android.database.SQLException;
-import android.util.Log;
-
-import com.artncore.commons.APIErrorCode;
-import com.artncore.commons.define;
-import com.artncore.wallpadimap.WallPadiMAPNotifyAPI;
-import com.util.LogUtil;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-
-public class WallpadStatusData extends wallpaddbmgr {
-
-	public static final String   TAG             = "WallpadStatusData";
-
-	public static final String   ALARM_STATUS    = "ALARM_STATUS";
-	/** 평상시 */
-	public static final int      ALARM_NONE      = 0;
-	/** 알람발생 */
-	public static final int      ALARM_ARISE     = 1;
-	/** 알람정지 */
-	public static final int      ALARM_STOP      = 2;
-	/** 외출방범모드 */
-	public static final int      GUARD_OUT       = 3;
-	/** 재택방범 */
-	public static final int      GUARD_IN        = 4;
-	/** 외출방범모드 대기중 (설정진행중) */
-	public static final int      GUARD_OUT_WAIT  = 5;
-	/** 그냥 외출모드 - 대외향 스마트 스위치 연동 및 LH향  */
-	public static final int 	OUT_MODE		= 6;
-	/** 취침방범 모드 - LH향 */
-	public static final int 	GUARD_BED		= 7;
-	/** 그냥 취침모드 - LH향 */
-	public static final int 	BED_MODE		= 8;
-
-	public static final String[] ALARMTEXT  = {String.valueOf(ALARM_NONE),String.valueOf(ALARM_ARISE), String.valueOf(ALARM_STOP),String.valueOf(GUARD_OUT),String.valueOf(GUARD_IN),String.valueOf(GUARD_OUT_WAIT),String.valueOf(OUT_MODE),String.valueOf(GUARD_BED),String.valueOf(BED_MODE)};
-
-	public static final String   ALARM_TYPE      ="ALARM_TYPE";
-	public static final int      ALARM_EMM       = 1;
-	public static final int      ALARM_ALERT     = 2;
-	public static final int      ALARM_INVADE    = 3;
-	public static final int      ALARM_EVAC      = 4;
-	public static final int      ALARM_HEATING_LEAK = 5;
-	public static final String[] ALARMTYPETEXT  = {String.valueOf(ALARM_NONE), String.valueOf(ALARM_EMM),String.valueOf(ALARM_ALERT),String.valueOf(ALARM_INVADE),String.valueOf(ALARM_EVAC),String.valueOf(ALARM_HEATING_LEAK)};
-
-	public static final String   MORNINGCALL_STATUS    = "MCALL_STATUS";
-	public static final int      MORNINGCALL_OFF       = 0;
-	public static final int      MORNINGCALL_ON        = 1;
-	public static final String[] MORNINGCALLTEXT       = {String.valueOf(MORNINGCALL_OFF),String.valueOf(MORNINGCALL_ON)};
-
-	public static final String   MANAGER_PW          = "MANAGER_PW";
-	public static final String   MANAGER_PW_DEFAULT  = "55554444";
-
-	public static final String   USER_PW             = "USER_PW";
-	public static final String   USER_PW_DEFAULT     = "0000";
-
-	public static final String   WEB_CTR_PW             = "WEB_CTR_PW";
-	public static final String   WEB_CTR_PW_DEFAULT     = "000000";
-
-	public static final String   SUBMENU_TYPE      = "SUBMENU_TYPE";
-	public static final int      SUBMENU_TYPE1     = 0;
-	public static final int      SUBMENU_TYPE2     = 1;
-	public static final String[] SUBMENUTYPETEXT   = {String.valueOf(SUBMENU_TYPE1),String.valueOf(SUBMENU_TYPE2)};
-
-	public static final String PSTN_STATUS       = "PSTN_STATUS";
-	public static final int    PSTN_NOINIT       = 0;
-	public static final int    PSTN_INITSTART    = 1;
-	public static final int    PSTN_INITCMD      = 2;
-	public static final int    PSTN_INITDATA     = 3;
-	public static final int    PSTN_INITCCODE    = 4;
-	public static final int    PSTN_INITCIDSET   = 5;
-	public static final int    PSTN_VMODESET     = 6;
-	public static final int    PSTN_DTMFSET      = 7;
-	public static final int    PSTN_VRA          = 8;
-	public static final int    PSTN_VRN          = 9;
-	public static final int    PSTN_INITOK       = 10;
-	public static final String[] PSTN_STATUSTEXT = {String.valueOf(PSTN_NOINIT),String.valueOf(PSTN_INITSTART), String.valueOf(PSTN_INITCMD), String.valueOf(PSTN_INITDATA), String.valueOf(PSTN_INITCCODE),String.valueOf(PSTN_INITCIDSET),String.valueOf(PSTN_VMODESET),String.valueOf(PSTN_DTMFSET),String.valueOf(PSTN_VRA),String.valueOf(PSTN_VRN),String.valueOf(PSTN_INITOK)};
-
-	public static final String   DEV_STATUS         = "DEV_STATUS";
-	public static final int      DEV_NORMAL         = 0;
-	public static final int      DEV_BSPUPDATE      = 1;
-	public static final int      DEV_APPUPDATE      = 2;
-	public static final int      DEV_INIT           = 3;
-	public static final String[] DEV_STATUSTEXT = {String.valueOf(DEV_NORMAL),String.valueOf(DEV_BSPUPDATE),String.valueOf(DEV_APPUPDATE),String.valueOf(DEV_INIT)};
-
-	public static final String SERVER_IP                   = "SERVER_IP";
-	public static final String SERVER_IP_DEFAULT           = "10.0.1.1:10000";
-
-	public static final String GW_IP                       = "GWIP";
-	public static final String GW_IP_DEFAULT               = "10.0.1.1";
-
-	public static final String SUBNET                      = "SUBNET";
-	public static final String SUBNET_DEFAULT              = "255.255.0.0";
-
-	public static final String MANAGEPC_IP                 = "MANAGEPC_IP";
-	public static final String MANAGEPC_IP_DEFAULT         = "10.0.1.10:10000";
-
-	public static final String FTP_IP                      = "FTP_IP";
-	public static final String FTP_IP_DEFAULT              = "10.0.1.1";
-
-	public static final String APP_VER                     = "APP_VER";
-	public static final String APP_VER_DEFAULT             = "2014.00.00.00";
-
-	public static final String NOTICE_VER                  = "NOTICE_VER";
-	public static final String NOTICE_VER_DEFAULT          = "2014.00.00.00";
-
-	public static final String WEATHER_VER                 = "WEATHER_VER";
-	public static final String WEATHER_VER_DEFAULT         = "2014.00.00.00";
-
-	public static final String WEATHER_CODE				   = "WEATHER_CODE";
-	public static final String CODE_DEFAULT                = "1";
-
-	public static final String SETTING_VER                 = "SETTING_VER";
-	public static final String SETTING_VER_DEFAULT         = "2014.00.00.00";
-
-	public static final String SERVER_VERSION			   = "SERVER_VERSION";
-	public static final String SERVER_VERSION_DEFAULT	   = "1.0";
-
-	public static final String DEV_LIGHT_CNT               = "LIGHT_CNT";
-	public static final String LIGHTCNT_DEFAULT            = "6";
-
-	public static final String DEV_GAS_CNT                 = "GAS_CNT";
-	public static final String GASCNT_DEFAULT              = "0";
-
-	public static final String DOORCALLTIMEOUT             = "DOORCALLTIMEOUT";
-	public static final String DOORCALLTIMEOUT_DEFAULT     = "30";
-
-	public static final String DOORCONNECTTIMEOUT          = "DOORCONNECTTIMEOUT";
-	public static final String DOORCONNECTTIMEOUT_DEFAULT  = "60";
-
-	public static final String DEV_HEATING_CNT             = "HEATING_CNT";
-	public static final String HEATINGCNT_DEFAULT          = "0";
-
-	public static final String HEARTBEAT_PERIOD            = "HEARTBEAT_PERIOD";
-	public static final String HEARTBEATPERIOD_DEFAULT     = "30";
-
-	public static final String LAST_HEARTBEAT              = "LAST_HEARTBEAT";
-	public static final String LAST_HEARTBEAT_DEFAULT      = "2014.00.00.00.00.00";
-
-	public static final String SET_SYSTEMTIME              = "SET_SYSTEMTIME";
-	public static final String SET_SYSTEMTIME_DEFAULT      = "0";
-
-	public static final String NEWS_CNT 				   = "NEWS_CNT";
-	public static final String NEWS_CNT_DEFAULT 		   = "0";
-
-	public static final String   MAINBGTYPE      = "MAINBGTYPE";
-	public static final int      MAINBG_DEFAULT  = 0;
-	public static final int      MAINBG_USER     = 1;
-	public static final int      MAINBG_WEATHER  = 2;
-	public static final String[] MAINBGTYPE_TEXT = {String.valueOf(MAINBG_DEFAULT),String.valueOf(MAINBG_USER),String.valueOf(MAINBG_WEATHER)};
-
-	public static final String MAINBGSLIDSHOWTIME              = "MAINBGSLIDSHOWTIME";
-	public static final String MAINBGSLIDSHOWTIMEDEFAULT       = "60";
-
-	public static final String   GUARD_ADDRESS         = "GUARDADDR";
-	public static final String   LOBBY_ADDRESS         = "LOBBYADDR";
-
-	public static final String   MORNINGCALL_TYPE      = "MORNINGCALL_TYPE";
-	public static final int      MORNINGCALL_ONCE     = 0;   //한번만
-	public static final int      MORNINGCALL_WORKDAY  = 1;   //월~금
-	public static final int      MORNINGCALL_EWORKDAY = 2;   //월~토
-	public static final int      MORNINGCALL_EVERYDAY = 3;   //매일
-	public static final String[] MORNINGCALLTYPETEXT   = {String.valueOf(MORNINGCALL_ONCE),String.valueOf(MORNINGCALL_WORKDAY),String.valueOf(MORNINGCALL_EWORKDAY),String.valueOf(MORNINGCALL_EVERYDAY)};
-
-	public static final String   MORNINGCALL_BELLTYPE      = "MORNINGCALL_BELLTYPE";
-	public static final int      MORNINGCALL_BELL_NONE     = 0;
-	public static final int      MORNINGCALL_BELL1 = 1;
-	public static final int      MORNINGCALL_BELL2 = 2;
-	public static final int      MORNINGCALL_BELL3 = 3;
-	public static final String[] MORNINGCALL_BELLTYPETEXT   = {String.valueOf(MORNINGCALL_BELL_NONE),String.valueOf(MORNINGCALL_BELL1),String.valueOf(MORNINGCALL_BELL2),String.valueOf(MORNINGCALL_BELL3)};
-
-	public static final String   MORNINGCALL_RESERVE = "MORNINGCALL_RESERVE";
-	public static final int	     MCALLR_LIGHT_ON     = 1;
-	public static final int	     MCALLR_VENTIL_ON    = 2;
-	public static final int      MCALLR_CURTAIN_OPEN = 4;
-	public static final int[]    MCCommandList = {MCALLR_LIGHT_ON, MCALLR_VENTIL_ON, MCALLR_CURTAIN_OPEN};
-	public static final String   MORNINGCALL_RESERVE_DEFAULT = "0";
-
-	public static final String   ARSONOFF = "ARSONOFF";
-	public static final int      ARSON   = 1;
-	public static final int      ARSOFF  = 0;
-	public static final String[] ARSONOFFTEXT   = {String.valueOf(ARSOFF),String.valueOf(ARSON)};
-
-	public static final int      INDEX_CALL_DOORCAM_SOUND      = 0;
-	public static final int      INDEX_CALL_LOBBY_SOUND        = 1;
-	public static final int      INDEX_CALL_GUARD_SOUND        = 2;
-	public static final int      INDEX_CALL_NEIGHBOR_SOUND     = 3;
-	public static final int      INDEX_CALL_PSTN_SOUND         = 4;
-	public static final int      INDEX_CALL_DOORCAM_BRIGHTNESS = 5;
-	public static final int      INDEX_CALL_DOORCAM_CONTRAST   = 6;
-
-	public static final String DEV_SMARTLIGHT_STATUS                  = "SMARTLIGHTSTATUS";
-	public static final String SMARTLIGHT_STATUS_DEFAULT              = "normal";
-	public static final String DEV_SMARTLIGHT_DEVICE                  = "SMARTLIGHTDEVICE";
-	public static final String SMARTLIGHT_DEVICE_DEFAULT              = "null";
-
-	public static final String DEV_KNXDEVICE_STATUS					  = "KNXDEVICEALARMSTATUS";
-	public static final String KNXDEVICE_STATUS_DEFAULT				  = "normal";
-	public static final String DEV_KNXDEVICE_CAUSE					  = "KNXDEVICEALARMCAUSE";
-	public static final String KNXDEVICE_CAUSE_DEFAULT				  = "null";
-
-	public boolean GetARSOnoff()
-	{
-		try
-		{
-			int ret = Integer.parseInt(GetWallPADData(ARSONOFF));
-			return (ret==ARSON)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-	public void SetARSOnoff(boolean onoff)
-	{
-		UpdateWallPADData(ARSONOFF, ARSONOFFTEXT[onoff?ARSON:ARSOFF]);
-	}
-
-	public static final String   CARARRIVALSND = "CARARRIVALSND";
-	public static final int      CARARRIVALON   = 1;
-	public static final int      CARARRIVALOFF  = 0;
-	public static final String[] CARARRIVALSNDTEXT   = {String.valueOf(CARARRIVALOFF),String.valueOf(CARARRIVALON)};
-
-
-	// 대외향 485 스마트 스위치 연동 현장
-	public static final String   	GUARD_RELEASE_PW_INPUT = "GUARD_RELEASE_PW_INPUT";
-	// 외출 방범 설정
-	public static final String 		GUARD_SENSOR_CHECK = "GUARD_SENSOR_CHECK";
-	public static final String 		GUARD_BED_SENSOR_CHECK = "GUARD_BED_SENSOR_CHECK";
-	public static final int      ENALBLE   = 1;
-	public static final int      DISABEL   = 0;
-
-	// 대외향 485 스마트 스위치 연동 현장의 경우 비밀번호 입력없이 즉시 취소가 가능한 기능이 있음
-	// 방범 해제시 패스워드 사용여부 설정
-	public boolean GetUseGuardReleasePW()
-	{
-		try {
-
-			int ret = Integer.parseInt(GetWallPADData(GUARD_RELEASE_PW_INPUT));
-			return (ret==ENALBLE)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			// 기본값 사용
-			return true;
-		}
-	}
-
-	public void SetUseGuardReleasePw( boolean Use )
-	{
-		try
-		{
-			if( Use == true )UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(ENALBLE));
-			else UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(DISABEL));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	// 대외향 485 스마트 스위치 연동 현장의 경우 방범외출과 외출모드를 분리 처리함
-	// LH향의 경우도 동일하게 방범외출과 외출모드를 분리 처리함
-	// 센서 사용여부를 체크해서 외출모드로 처리할지 외출방범모드로 처리할지 구분하도록 한다.
-	public boolean GetUseGuardSensorCheck()
-	{
-		try {
-
-			int ret = Integer.parseInt(GetWallPADData(GUARD_SENSOR_CHECK));
-			return (ret==ENALBLE)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			// 기본값 사용
-			return true;
-		}
-	}
-
-	public void SetUseGuardSensorCheck( boolean Use )
-	{
-		try
-		{
-			if( Use == true )UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(ENALBLE));
-			else UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(DISABEL));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public boolean GetCarArrivalSoundOnoff()
-	{
-		try {
-
-			int ret = Integer.parseInt(GetWallPADData(CARARRIVALSND));
-			return (ret==CARARRIVALON)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-	public void SetCarArrivalSoundOnoff(boolean onoff)
-	{
-		UpdateWallPADData(CARARRIVALSND, CARARRIVALSNDTEXT[onoff?CARARRIVALON:CARARRIVALOFF]);
-	}
-
-	public static final String   ICMDONOFF = "ICMDONOFF";
-	public static final int      ICMDON   = 1;
-	public static final int      ICMDOFF  = 0;
-	public static final String[] ICMDONOFFTEXT   = {String.valueOf(ICMDOFF),String.valueOf(ICMDON)};
-
-	public boolean GetiCMDOnoff()
-	{
-		try {
-			int ret = Integer.parseInt(GetWallPADData(ICMDONOFF));
-
-			return (ret==ICMDON)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-	public void SetiCMDOnoff(boolean onoff)
-	{
-		UpdateWallPADData(ICMDONOFF, ICMDONOFFTEXT[onoff?ICMDON:ICMDOFF]);
-	}
-
-	public static final String   UPGRADESTATE = "UPGRADESTATE";
-	public static final int      UPGRADEON   = 1;
-	public static final int      UPGRADEOFF  = 0;
-	public static final String[] UPGRADESTATETEXT   = {String.valueOf(UPGRADEOFF),String.valueOf(UPGRADEON)};
-	public static final String   UPGRADESTATEDEFAULT = String.valueOf(UPGRADEOFF);
-	public boolean GetUpgradeState()
-	{
-		try {
-			int ret = Integer.parseInt(GetWallPADData(UPGRADESTATE));
-
-			return (ret==UPGRADEON)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-	public void SetUpgradeState(boolean onoff)
-	{
-		UpdateWallPADData(UPGRADESTATE, UPGRADESTATETEXT[onoff?UPGRADEON:UPGRADEOFF]);
-	}
-
-	public static final String   GUIDESND       = "GUIDESND";
-	public static final int      GUIDESNDON     = 1;
-	public static final int      GUIDESNDOFF    = 0;
-	public static final String[] GUIDESNDTEXT   = {String.valueOf(GUIDESNDOFF),String.valueOf(GUIDESNDON)};
-
-	public boolean GetGUIDESNDOnoff()
-	{
-		try {
-			int ret = Integer.parseInt(GetWallPADData(GUIDESND));
-
-			return (ret==GUIDESNDON)?true:false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return false;
-		}
-	}
-
-	public void SetGUIDESNDOnoff(boolean onoff)
-	{
-		UpdateWallPADData(GUIDESND, GUIDESNDTEXT[onoff?ICMDON:ICMDOFF]);
-	}
-
-	public static final String   NOTICECNT = "NOTICECNT";
-	public static final String NOTICECNTDEFAULT   = String.valueOf(0);
-
-	public int GetNoticeCNT()
-	{
-		try {
-			int ret = Integer.parseInt(GetWallPADData(NOTICECNT));
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return -1;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return -1;
-		}
-	}
-
-	public void SetNoticeCNT(int cnt)
-	{
-		String data = String.valueOf(cnt);
-		UpdateWallPADData(NOTICECNT, data);
-	}
-
-	public static final String   MEMOCNT = "MEMOCNT";
-	public static final String   MEMOCNTDEFAULT   = String.valueOf(0);
-
-	public int GetMemoCNT()
-	{
-		try
-		{
-			int ret = Integer.parseInt(GetWallPADData(MEMOCNT));
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetMemoCNT(int cnt)
-	{
-		String data = String.valueOf(cnt);
-		UpdateWallPADData(MEMOCNT, data);
-	}
-
-	public static final String   VISITORVIDEOCNT = "VISITORVIDEOCNT";
-	public static final String   VISITORVIDEOCNT_DEFAULT   = String.valueOf(0);
-
-	public int GetVisitorVideoCNT()
-	{
-		try
-		{
-			int ret = Integer.parseInt(GetWallPADData(VISITORVIDEOCNT));
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetVisitorVideoCNT(int cnt)
-	{
-		String data = String.valueOf(cnt);
-		UpdateWallPADData(VISITORVIDEOCNT, data);
-	}
-
-	public static final String   ENERGYDATA = "ENERGYDATA";
-	public static final String 	 ENERGYDATADEFAULT   = "NONE";
-
-	public String GetEnergyData()
-	{
-		return GetWallPADData(ENERGYDATA);
-	}
-
-	public void SetEnergyData(String Edata)
-	{
-		UpdateWallPADData(ENERGYDATA, Edata);
-	}
-	public static final String   LASTCHECKENERGY = "LASTCHECKENERGY";
-	public static final String 	 LASTCHECKENERGYDEFAULT   = "00000000";
-
-	public String GetEnergyCheckDate()
-	{
-		return GetWallPADData(LASTCHECKENERGY);
-	}
-
-	public void SetEnergyCheckDate(String Edata)
-	{
-		UpdateWallPADData(LASTCHECKENERGY, Edata);
-	}
-
-	public static final String   ENERGYMONDATA = "ENERGYMONDATA";
-	public static final String 	 ENERGYMONDATADEFAULT   = "NONE";
-
-	public String GetEnergyMonData()
-	{
-		return GetWallPADData(ENERGYMONDATA);
-	}
-
-	public void SetEnergyMonData(String Edata)
-	{
-		UpdateWallPADData(ENERGYMONDATA, Edata);
-	}
-	public static final String   LASTCHECKMONENERGY = "LASTCHECKMONENERGY";
-	public static final String 	 LASTCHECKMONENERGYDEFAULT   = "00000000";
-
-	public String GetEnergyCheckMonth()
-	{
-		return GetWallPADData(LASTCHECKMONENERGY);
-	}
-
-	public void SetEnergyCheckMonth(String Edata)
-	{
-		UpdateWallPADData(LASTCHECKMONENERGY, Edata);
-	}
-
-	public static final String   ELEVATORSTATUS = "ELEVATORSTATUS";
-	public static final String 	 ELEVATORSTATUSDEFAULT   = "0";
-
-	public int GetElevatorStatus()
-	{
-		try {
-			return Integer.parseInt(GetWallPADData(ELEVATORSTATUS));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetElevatorStatus(int Edata)
-	{
-		UpdateWallPADData(ELEVATORSTATUS, String.valueOf(Edata));
-	}
-
-	public static final String   ELEVATORCALLUP = "ELEVATORCALLUP";
-	public static final String 	 ELEVATORCALLUPDEFAULT   = "0";
-
-	public void SetElevatorCallUpTime()
-	{
-		UpdateWallPADData(ELEVATORCALLUP, String.valueOf(System.currentTimeMillis()));
-	}
-
-	public void FreeElevatorCallUpTime()
-	{
-		UpdateWallPADData(ELEVATORCALLUP, ELEVATORCALLUPDEFAULT);
-	}
-
-	public long GetElevatorCallUpTime()
-	{
-		try {
-			return Long.parseLong(GetWallPADData(ELEVATORCALLUP));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-	public static final String   ELEVATORCALLDN = "ELEVATORCALLDN";
-	public static final String 	 ELEVATORCALLDNDEFAULT   = "0";
-
-	public void SetElevatorCallDnTime()
-	{
-		UpdateWallPADData(ELEVATORCALLDN, String.valueOf(System.currentTimeMillis()));
-	}
-
-	public void FreeElevatorCallDnTime()
-	{
-		UpdateWallPADData(ELEVATORCALLDN, ELEVATORCALLDNDEFAULT);
-	}
-
-	public long GetElevatorCallDnTime()
-	{
-		try {
-			return Long.parseLong(GetWallPADData(ELEVATORCALLDN));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public static final String   POSTCNT = "POSTCNT";
-	public static final String 	 POSTCNTDEFAULT   = "0";
-
-	public void SetPostCNT(int cnt)
-	{
-		UpdateWallPADData(POSTCNT, String.valueOf(cnt));
-	}
-
-	public int GetPostCNT()
-	{
-		try {
-			return Integer.parseInt(GetWallPADData(POSTCNT));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public static final String   PARCELCNT = "PARCELCNT";
-	public static final String 	 PARCELCNTDEFAULT   = "0";
-
-	public void SetParcelCNT(int cnt)
-	{
-		UpdateWallPADData(PARCELCNT, String.valueOf(cnt));
-	}
-
-	public int GetParcelCNT()
-	{
-		try {
-			return Integer.parseInt(GetWallPADData(PARCELCNT));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception  e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-	public static final String   RESETSCHEDULE = "RESETSCHEDULE";
-	public static final int      RESET_WEEK  = 1000;
-	public static final int      RESET_MONTH = 1001;
-	public static final int      RESET_FREE  = 1002;
-	public static final String   RESETSCHEDULEDEFAULT = "NONE;0;0";
-
-	public String[] GetResetSchedule()
-	{
-		return GetWallPADData(RESETSCHEDULE).split(define.DEVCTR_CMD_SPLITER);
-	}
-
-	public boolean SetResetSchedule(int type, int date, int time)
-	{
-		if (type == RESET_WEEK && (date < 0 || date >6))
-			return false;
-		if (type == RESET_MONTH && (date <1 || 28 < date))
-			return false;
-		if ((type != RESET_FREE) && time < 0 || time >23) return false;
-		String SetVal;
-		if (type == RESET_FREE) SetVal = RESETSCHEDULEDEFAULT;
-		else SetVal = type+define.DEVCTR_CMD_SPLITER+date+define.DEVCTR_CMD_SPLITER+time;
-		UpdateWallPADData(RESETSCHEDULE,SetVal);
-		return true;
-	}
-
-	public static final String   SETSYSTEMUPDATE = "SETSYSTEMUPDATE";
-	public static final String   SETSYSTEMUPDATEDEFAULT = "NONE;0;0";
-
-	public void SetSystemUpdate(String BSPfule, String APPFile)
-	{
-		String datafile;
-		if (BSPfule== null && APPFile == null)
-		{
-			datafile = SETSYSTEMUPDATEDEFAULT;
-		}
-		else {
-			datafile = "SET;";
-			datafile+=(BSPfule==null)?"no":BSPfule;
-			datafile+=";";
-			datafile+=(APPFile==null)?"no":APPFile;
-		}
-		UpdateWallPADData(SETSYSTEMUPDATE,datafile);
-	}
-
-	public String[] GetSystemUpdateStatus()
-	{
-		return GetWallPADData(SETSYSTEMUPDATE).split(define.DEVCTR_CMD_SPLITER);
-	}
-
-	public static final String   LASTTIMESYNC = "LASTTIMESYNC";
-	public static final String   LASTTIMESYNCDEFAULT = "0";
-
-	public void SetLastTimeSyncDate(int date)
-	{
-		UpdateWallPADData(LASTTIMESYNC,String.valueOf(date));
-	}
-
-	public int GetLastTimeSyncDate()
-	{
-		try {
-			return Integer.parseInt(GetWallPADData(LASTTIMESYNC));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public static final String   EMMLIGHTSTATUS = "EMMLIGHTSTATUS";
-	public static final int      EMMLIGHTON  = 1;
-	public static final int      EMMLIGHTOFF = 0;
-	public static final String   EMMLIGHTSTATUSDEFAULT = String.valueOf(EMMLIGHTOFF);
-
-
-	public void SetEmmLightStatus(boolean status)
-	{
-		UpdateWallPADData(EMMLIGHTSTATUS,String.valueOf(status?EMMLIGHTON:EMMLIGHTOFF));
-	}
-
-	public int GetEmmLightStatus()
-	{
-		try {
-			return Integer.parseInt(GetWallPADData(EMMLIGHTSTATUS));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////
-	//////////////////////////////////////   icontrols /////////////////////////////////////////////////////
-	public static final String OUTMODE_WAITTIME             		= "OUTMODE_WAITTIME";
-	public static final String OUTMODE_WAITTIME_DEFAULT       = "30";
-
-	public static final String COMEBACK_WAITTIME             		= "COMEBACK_WAITTIME";
-	public static final String COMEBACK_WAITTIME_DEFAULT       = "30";
-
-	public static final String OUTMODE_LINK_DEVICE			= "OUTMODE_LINKDEVICE";
-	public static final String INMODE_LINK_DEVICE				= "INMODE_LINKDEVICE";
-
-	public static final String IN_BED_LINK_DEVICE			= "IN_BED_LINK_DEVICE";
-	public static final String OUT_BED_LINK_DEVICE				= "OUT_BED_LINK_DEVICE";
-
-	public static final String CALL_APK_STATUS				= "CALL_APK_STATUS";
-	public static final String GLOBALSCREEN_APK_RUN				= "GLOBALSCREEN_APK_RUN";
-	public static final String REMOTECALL_USER_POPUP_RUN		= "REMOTECALL_USER_POPUP_RUN";
-	public static final String CALL_STATUS					= "CALL_STATUS";
-
-	public static final String SOUND_OUTPUT_EVENT_ALARM  = "EVENT_ALARM_SOUND";
-	public static final String SOUND_OUTPUT_CAR_ALARM 	= "CAR_ALARM_SOUND";
-	public static final String SOUND_OUTPUT_CALL_ALARM = "CALL_ALARM_SOUND";
-	public static final String SOUND_OUTPUT_BAND_LOCATION 	= "BAND_LOCATION_ALARM_SOUND";
-
-	/** 스마트키 감지시 알람 (사운드 및 토스트메시지) */
-	public static final String SMARTKEY_DETECTION_ALARM  = "SMARTKEY_DETECTION_ALARM";
-
-	/** 환기 예약 ON/OFF */
-	public static final String VEN_RESERVE_ONOFF  = "VEN_RESERVE_ONOFF";
-
-	public static final String LED_BUTTON_BRIGHTNESS_LEVEL	= "LED_BUTTON_BRIGHTNESS_LEVEL"; //GLE 모델 LED 버튼 밝기 조절
-	public static final String LED_BUTTON_BRIGHTNESS_LEVEL_DEFAULT	= "2";
-
-	public static final String MODE_LAMP_BR_LEVEL			= "MODE_LAMP_BR_LEVEL";
-	public static final String MODE_LAMP_BR_LEVEL_DEFAULT	= "4";
-
-	public static final String WALLPAD_MASTER_VOLUME		= "WALLPAD_MASTER_VOLUME";
-	public static final String WALLPAD_MASTER_VOLUME_DEFAULT	="8";
-
-
-	public static final String BLACK_OUT_ENERGY					= "BLACK_OUT_ENERGY";				// 정전 APU 감지시
-
-	public static final String MAIN_SELECTED_SCREEN				= "MAIN_SELECTED_SCREEN";		// 메인 스크린 3가지 ( 즐겨찾기 , 메인, 에너지관리 )
-	public static final int MAIN_DEFAULT_SCREEN					= 0;
-	public static final int MAIN_BOOKMARK_SCREEN				= 1;
-	public static final int MAIN_ENERGY_SCREEN					= 2;
-
-	public static final String MOOD_LAMP_STATE					= "MOOD_LAMP_STATE";
-
-
-	public static final String ARS_CONTROL_DEVICE				= "ARS_CONTROL_DEVICE";
-	public static final String REMOTE_CONTROLS_DEVICE		= "REMOTE_CONTROLS_DEVICE";
-
-	//전자액자 시작
-	List<String> AutoPicturefilesList = new ArrayList<String>();
-
-	public static final String AUTOPICTURE_SET_INDEX = "AUTOPICTURE_SET_INDEX";
-	public static final String AUTOPICTURE_SET_INDEX_DEFAULT = "0";
-
-	public static final String AUTOPICTURE_START_TIME_HOUR_INDEX = "AUTOPICTURE_START_TIME_HOUR_INDEX";
-	public static final String AUTOPICTURE_START_TIME_HOUR_INDEX_DEFAULT = "18";
-
-	public static final String AUTOPICTURE_START_TIME_MIN_INDEX = "AUTOPICTURE_START_TIME_MIN_INDEX";
-	public static final String AUTOPICTURE_START_TIME_MIN_INDEX_DEFAULT = "0";
-
-	public static final String AUTOPICTURE_END_TIME_HOUR_INDEX = "AUTOPICTURE_END_TIME_HOUR_INDEX";
-	public static final String AUTOPICTURE_END_TIME_HOUR_INDEX_DEFAULT = "22";
-
-	public static final String AUTOPICTURE_END_TIME_MIN_INDEX = "AUTOPICTURE_END_TIME_MIN_INDEX";
-	public static final String AUTOPICTURE_END_TIME_MIN_INDEX_DEFAULT = "0";
-
-	public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX = "AUTOPICTURE_SLIDE_INTERVAL_INDEX";
-	public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX_DEFAULT = "0";
-
-	public static final String AUTOPICTURE_ANIMATION_INDEX = "AUTOPICTURE_ANIMATION_INDEX";
-	public static final String AUTOPICTURE_ANIMATION_INDEX_DEFAULT = "0";
-
-	//전자액자 끝
-
-	/** 안심통화 **/
-	public static final String RELIEFCALL_DEGREE = "RELIEFCALL_DEGREE";
-	public static final String RELIEFCALL_DEGREE_DEFAULT_VALUE = "1:4:7:10";
-
-	/** 방문객원격통화 **/
-	public static final String REMOTECALL_REGISTRATION = "REMOTECALL_REGISTRATION";
-	public static final String REMOTECALL_REGISTRATION_DEFAULT_VALUE = "false";
-	public static final String REMOTECALL_USERCNT = "REMOTECALL_USERCNT";
-	public static final String REMOTECALL_USERCNT_DEFAULT_VALUE = "0";
-
-	/** 스마트현관카메라 거동수상자 녹화 설정 관련 **/
-	public static final String SMARTIOT_RECORDING_STRANGER_ONOFF  = "SMARTIOT_RECORDING_STRANGER_ONOFF";
-	public static final String SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT = "false";
-	public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF  = "SMARTIOT_TAKINGPIC_STRANGER_ONOFF";
-	public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT = "true";
-	public static final String SMARTIOT_CAM_BRIGHTNESS = "SMARTIOT_CAM_BRIGHTNESS";
-	public static final String SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT = "5";
-	public static final String SMARTIOT_RECORD_TIME = "SMARTIOT_RECORD_TIME";
-	public static final String SMARTIOT_RECORD_TIME_VALUE_DEFAULT = "30";
-	public static final String SMARTIOT_SENSOR_SENSITIVITY = "SMARTIOT_SENSOR_SENSITIVITY";
-	public static final String SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT = "5";
-	public static final String SMARTIOT_SENSOR_DURATION = "SMARTIOT_SENSOR_DURATION";
-	public static final String SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT = "30";
-	public static final String SMARTIOT_SENSOR_PERIOD = "SMARTIOT_SENSOR_PERIOD";
-	public static final String SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT = "15";
-
-	// 간편모드UX 관련
-	public static final String EASYMODE_UX_USE = "EASYMODE_UX_USE";
-	public static final String EASYMODE_UX_USE_DEFAULT = "false";
-	public static final String EASYMODE_UX_SUPPORT = "EASYMODE_UX_SUPPORT";
-	public static final String EASYMODE_UX_USE_SUPPORT_DEFAULT = "false";
-
-	//원격검침 정보 시작
-	public static final String REMOTE_METERING_EMS_ENABLE = "REMOTE_METERING_EMS_ENABLE_DEFAULT";
-	public static final String REMOTE_METERING_EMS_ENABLE_DEFAULT = "true"; //false면 EMS 사용안함, true이면 EMS 사용함
-
-	public static final String REMOTE_METERING_NUMBER_OF_KIND = "REMOTE_METERING_NUMBER_OF_KIND_DEFAULT";
-	public static final String REMOTE_METERING_NUMBER_OF_KIND_DEFAULT = "5";
-
-	//원격검침 - 목표량 저장 시작
-	public static final String REMOTE_METERING_TARGET_VALUE_ELECT = "REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT";
-	public static final String REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT = "300";
-
-	public static final String REMOTE_METERING_TARGET_VALUE_WATER = "REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT";
-	public static final String REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT = "25";
-
-	public static final String REMOTE_METERING_TARGET_VALUE_GAS = "REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT";
-	public static final String REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT = "7";
-
-	public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER = "REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT";
-	public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT = "4";
-
-	public static final String REMOTE_METERING_TARGET_VALUE_HEATING = "REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT";
-	public static final String REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT = "1.5";
-
-	public static final String REMOTE_METERING_TARGET_VALUE_CARBON = "REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT";
-	public static final String REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT = "0";
-	//원격검침 - 목표량 저장 끝
-
-	//원격검침 정보 끝
-
-	//에너지관리서버의 검침일 설정 - 검침일 or 말일 두가지 중 하나 선택 가능
-	public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE = "REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT";
-	public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT = "false"; //false면 검침일 사용, true이면 말일 사용함
-	//에너지관리서버 연동 시 목표량 대비 사용량 알림 여부
-	public static final String REMOTE_METERING_ALARM_USE = "REMOTE_METERING_ALARM_USE_DEFAULT";
-	public static final String REMOTE_METERING_ALARM_USE_DEFAULT = "false";
-	//에너지관리서버 연동 - 사용량 알림 시간 설정
-	public static final String REMOTE_METERING_ALARM_TIME = "REMOTE_METERING_ALARM_TIME";
-	public static final String REMOTE_METERING_ALARM_TIME_DEFAULT = "12";
-
-	/** 통화 음량 및 현관카메라 밝기/대비 **/
-	//현관 통화 음량
-	public static final String CALL_DOORCAM_SOUND_VALUE = "CALL_DOORCAM_SOUND_VALUE";
-	public static final String CALL_DOORCAM_SOUND_VALUE_DEFAULT = "5";
-
-	//로비 통화 음량
-	public static final String CALL_LOBBY_SOUND_VALUE = "CALL_LOBBY_SOUND_VALUE";
-	public static final String CALL_LOBBY_SOUND_VALUE_DEFAULT = "5";
-
-	//경비 통화 음량
-	public static final String CALL_GUARD_SOUND_VALUE = "CALL_GUARD_SOUND_VALUE";
-	public static final String CALL_GUARD_SOUND_VALUE_DEFAULT = "5";
-
-	//이웃 통화 음량
-	public static final String CALL_NEIGHBOR_SOUND_VALUE = "CALL_NEIGHBOR_SOUND_VALUE";
-	public static final String CALL_NEIGHBOR_SOUND_VALUE_DEFAULT = "5";
-
-	//국선 통화 음량
-	public static final String CALL_PSTN_SOUND_VALUE = "CALL_PSTN_SOUND_VALUE";
-	public static final String CALL_PSTN_SOUND_VALUE_DEFAULT = "5";
-
-	//현관 카메라 밝기(Brightness)
-	public static final String CALL_DOORCAM_BRIGHTNESS_VALUE = "CALL_DOORCAM_BRIGHTNESS_VALUE";
-	public static final String CALL_DOORCAM_BRIGHTNESS_VALUE_DEFAULT = "5";
-
-	//현관 카메라 대비(Contrast)
-	public static final String CALL_DOORCAM_CONTRAST_VALUE = "CALL_DOORCAM_CONTRAST_VALUE";
-	public static final String CALL_DOORCAM_CONTRAST_VALUE_DEFAULT = "5";
-
-	//엘리베이터 위젯 복구용
-	public static final String ELEVATOR_WIDGET_RESTORE = "ELEVATOR_WIDGET_RESTORE";
-	public static final String ELEVATOR_WIDGET_RESTORE_VALUE_DEFAULT = "false";
-
-	//환기 욕실배기 기능 연동기능
-	public static final String VENTI_BATHROOM = "VENTI_BATHROOM";
-	public static final String VENTI_BATHROOM_VALUE_DEFAULT = "true";
-
-	//거실 조명 그룹설정
-	public static final String LIVING_LIGHT_GROUP = "LIVING_LIGHT_GROUP";
-	public static final String LIVING_LIGHT_GROUP_VALUE_DEFAULT = "1:1:1";
-
-	//현산향 게이트웨이 command
-	public static final String DB_WALLPAD_IGW_COMMAND_COUNT = "DB_WALLPAD_REBOOTING_COUNT";
-
-	//메인월패드 난방 방 개수
-	public static final String DB_WALLPAD_HEATING_ROOM_NUM = "DB_WALLPAD_HEATING_ROOM_NUM";
-
-	//근접 센서 민감도
-	public static final String CLOSE_SENSOR_VALUE = "CLOSE_SENSOR_VALUE";
-	public static final String CLOSE_SENSOR_VALUE_DEFAULT = "5";
-
-	//현재 화면 번호
-	public static final String CURRENT_SCREEN_ID_VALUE = "CURRENT_SCREEN_ID_VALUE";
-	public static final String CURRENT_SCREEN_ID_VALUE_DEFAULT = "0";
-
-	// 스마트분전반 현재/월누적 선택값 저장
-	public static final String NOW_MONTH_SELECT = "NOW_MONTH_SELECT";
-	public static final String NOW_MONTH_SELECT_DEFAULT = "NOW";
-
-	// 실시간검침기 전력 - 누적전력사용량 저장
-	public static final String REALTIMEMETER__ELEC_ACC = "REALTIMEMETER__ELEC_ACC";
-
-	// 메인화면 GUI 선택
-	public static final String MAIN_GUI_SELECT = "MAIN_GUI_SELECT";
-	public static final String MAIN_GUI_SELECT_DEFAULT = "BASIC";
-
-	// 거실조명 모드제어 설정값 (Preset)
-    // "조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    // 그룹제어시에는 조명1의 값만 사용한다. (조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10, 미설정시 0)
-	public static final String LIVINGLIGHT_PRESET_00 = "LIVINGLIGHT_PRESET_00";
-	public static final String LIVINGLIGHT_PRESET_00_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-	public static final String LIVINGLIGHT_PRESET_01 = "LIVINGLIGHT_PRESET_01";
-	public static final String LIVINGLIGHT_PRESET_01_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_02 = "LIVINGLIGHT_PRESET_02";
-    public static final String LIVINGLIGHT_PRESET_02_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_03 = "LIVINGLIGHT_PRESET_03";
-    public static final String LIVINGLIGHT_PRESET_03_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_04 = "LIVINGLIGHT_PRESET_04";
-    public static final String LIVINGLIGHT_PRESET_04_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_05 = "LIVINGLIGHT_PRESET_05";
-    public static final String LIVINGLIGHT_PRESET_05_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_06 = "LIVINGLIGHT_PRESET_06";
-    public static final String LIVINGLIGHT_PRESET_06_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_07 = "LIVINGLIGHT_PRESET_07";
-    public static final String LIVINGLIGHT_PRESET_07_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-    public static final String LIVINGLIGHT_PRESET_08 = "LIVINGLIGHT_PRESET_08";
-    public static final String LIVINGLIGHT_PRESET_08_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
-
-	// 층간소음 팝업 발생
-	public static final String INTERLAYER_NOISE_POPUP_USE = "INTERLAYER_NOISE_POPUP_USE";
-	public static final String INTERLAYER_NOISE_POPUP_USE_DEFAULT = "false";
-
-	// 층간소음 장비 상태
-	public static final String INTERLAYER_NOISE_SENSOR_STATUS = "INTERLAYER_NOISE_SENSOR_STATUS";
-	public static final String INTERLAYER_NOISE_SENSOR_STATUS_DEFAULT = "NORMAL";
-
-	// 멀티스위치 콘센트 사용여부
-	public static final String MULTISWITCH_CONCENT_USE = "MULTISWITCH_CONCENT_USE";
-	public static final String MULTISWITCH_CONCENT_USE_DEFAULT = "false";
-
-	// 웰컴조명 - 거실등,복도등,주방등 선택유무
-	public static final String WELCOMELIGHT_SELECT_ITEMS = "WELCOMELIGHT_SELECT_ITEMS";
-	public static final String WELCOMELIGHT_SELECT_ITEMS_DEFAULT = "0/0/0";
-
-	// 재실센서 시나리오-기본모드1 사용여부
-	public static final String INROOMDETECT_SCENARIO_NORMAL1 = "INROOMDETECT_SCENARIO_NORMAL1";
-	public static final String INROOMDETECT_SCENARIO_NORMAL1_DEFAULT = "false";
-
-	// 재실센서 시나리오-기본모드2 사용여부
-	public static final String INROOMDETECT_SCENARIO_NORMAL2 = "INROOMDETECT_SCENARIO_NORMAL2";
-	public static final String INROOMDETECT_SCENARIO_NORMAL2_DEFAULT = "false";
-
-	// 재실센서 시나리오-사용자설정 사용여부
-	public static final String INROOMDETECT_SCENARIO_USERSET = "INROOMDETECT_SCENARIO_USERSET";
-	public static final String INROOMDETECT_SCENARIO_USERSET_DEFAULT = "false";
-
-	// 재실센서 시나리오-전기레인지 안전모드 사용여부
-	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE";
-	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_DEFAULT = "false";
-
-	// 재실센서 시나리오-기본모드1 설정
-	public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO = "INROOMDETECT_SCENARIO_NORMAL1_INFO";
-	public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO_DEFAULT = "KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
-																			"LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
-
-	// 재실센서 시나리오-기본모드2 설정
-	public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO = "INROOMDETECT_SCENARIO_NORMAL2_INFO";
-	public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO_DEFAULT = "KIND-NORMAL2/START-PM:09:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
-																			"LOC-TBL/TIME1-0/ACT1-STAT:ON;DIM:10/TIME2-10/ACT2-STAT:OFF";
-
-	// 재실센서 시나리오-사용자모드 설정
-	public static final String INROOMDETECT_SCENARIO_USERSET_INFO = "INROOMDETECT_SCENARIO_USERSET_INFO";
-	public static final String INROOMDETECT_SCENARIO_USERSET_INFO_DEFAULT = "KIND-USERSET/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
-																			"LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
-
-	// 재실센서 시나리오-전기레인지 안전모드 설정
-	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO";
-	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO_DEFAULT = "KIND-ELECRANGE_SAFE/START-PM:06:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
-																			"LOC-ELECRANGE/TIME1-20/ACT1-POPUP/TIME2-20/ACT2-ALARM";
-
-	public static final String CAMERA_ENCODING_ERROR  = "CAMERA_ENCODING_ERROR";
-	public static final String CAMERA_ENCODING_ERROR_DEFAULT = "false";
-
-	// 통화기능 설정
-	public static final String CALLFUNCTION_FRONT_USE = "CALLFUNCTION_FRONT_USE";
-	public static final String CALLFUNCTION_FRONT_USE_DEFAULT = "true";
-	public static final String CALLFUNCTION_LOBBY_USE = "CALLFUNCTION_LOBBY_USE";
-	public static final String CALLFUNCTION_LOBBY_USE_DEFAULT = "true";
-	public static final String CALLFUNCTION_GUARD_USE = "CALLFUNCTION_GUARD_USE";
-	public static final String CALLFUNCTION_GUARD_USE_DEFAULT = "true";
-	public static final String CALLFUNCTION_RESIDENCE_USE = "CALLFUNCTION_RESIDENCE_USE";
-	public static final String CALLFUNCTION_RESIDENCE_USE_DEFAULT = "true";
-	public static final String CALLFUNCTION_PSTN_USE = "CALLFUNCTION_PSTN_USE";
-	public static final String CALLFUNCTION_PSTN_USE_DEFAULT = "true";
-	public static final String CALLFUNCTION_CALLHISTORY_USE = "CALLFUNCTION_CALLHISTORY_USE";
-	public static final String CALLFUNCTION_CALLHISTORY_USE_DEFAULT = "true";
-	public static final String CALLFUNCTION_VISITORPIC_USE = "CALLFUNCTION_VISITORPIC_USE";
-	public static final String CALLFUNCTION_VISITORPIC_USE_DEFAULT = "true";
-
-	//////////////////////////////////////icontrols End/////////////////////////////////////////////////////
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////
-	public static final String   DEVICE_ROOM               = "DEVICE_ROOM";
-	public static final String   DEVICE_ROOM_LIGHT         = "DEVICE_ROOM_LIGHT";
-	public static final String   DEVICE_ROOM_DEFAULT       = "1:3:4:5:6:7"; //GetEachRoomNameInfo == false 일 시
-	public static final String   DEVICE_ROOM_DEFAULT_LIGHT = "1:15:3:4:5:6"; //GetEachRoomNameInfo == true 일 시 조명&콘센트 방 명칭
-
-
-	public static final String[] RoomTitle = {"거실","안방","방1","방2","방3","방4","방5","방6","방7","방8","작은방","작은방1","작은방2","서재","주방","큰방","공부방","알파룸",
-			"할아버지","할머니","아버지","어머니","아들","큰아들","작은아들","딸","큰딸","작은딸","막내","침실1","침실2","침실3","침실4","침실5","침실6"};
-
-	/**
-	 *
-	 * @return
-	 */
-	public String [] GetDevRoomName()
-	{
-		try
-		{
-			String ret = GetWallPADData(DEVICE_ROOM);
-			String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
-
-			for (int i = 0; i<getidx.length; i++)
-				getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
-
-			return getidx;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return null;
-		}
-	}
-
-	/**
-	 * 난방 조명 방명칭 설정 값을 가져온다
-	 * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
-	 * @return String [] 해당 방 명칭 String 배열
-	 */
-	public String [] GetDevRoomName(String DeviceType)
-	{
-		try
-		{
-			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
-			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
-			wallpadDeviceSet.closeDB();
-
-			String[] getidx = null;
-			String ret;
-
-			ret = GetWallPADData(DEVICE_ROOM);
-			getidx = ret.split(define.DEVCTR_DATA_SPLITER);
-
-			for (int i = 0; i<getidx.length; i++)
-				getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
-
-			if(UseEachRoomName == false)
-			{
-				return getidx;
-			}
-			else
-			{
-				if(DeviceType.equalsIgnoreCase("light") == true)
-				{
-					ret = GetWallPADData(DEVICE_ROOM_LIGHT);
-					getidx = ret.split(define.DEVCTR_DATA_SPLITER);
-
-					for (int i = 0; i<getidx.length; i++)
-						getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
-				}
-				else if(DeviceType.equalsIgnoreCase("heating") == true)
-				{
-					return getidx;
-				}
-			}
-			return getidx;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return null;
-		}
-	}
-
-	public int[] GetDevRoomIdx()
-	{
-		try
-		{
-			String ret = GetWallPADData(DEVICE_ROOM);
-			String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
-			int[] retdata = new int[getidx.length];
-			for (int i = 0; i<getidx.length; i++)
-				retdata[i] = Integer.parseInt(getidx[i]);
-			return retdata;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return null;
-		}
-	}
-
-	/**
-	 * 난방 조명 방명칭 설정 index값을 가져온다
-	 * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
-	 * @return int [] 해당 방 명칭 int 배열
-	 */
-	public int[] GetDevRoomIdx(String DeviceType)
-	{
-		try
-		{
-			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
-			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
-			wallpadDeviceSet.closeDB();
-
-			String ret = GetWallPADData(DEVICE_ROOM);
-			String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
-			int[] retdata = new int[getidx.length];
-			for (int i = 0; i<getidx.length; i++)
-				retdata[i] = Integer.parseInt(getidx[i]);
-
-			if(UseEachRoomName == false)
-			{
-				return retdata;
-			}
-			else
-			{
-				if(DeviceType.equalsIgnoreCase("light") == true)
-				{
-					ret = GetWallPADData(DEVICE_ROOM_LIGHT);
-					getidx = ret.split(define.DEVCTR_DATA_SPLITER);
-					retdata = new int[getidx.length];
-					for (int i = 0; i<getidx.length; i++)
-						retdata[i] = Integer.parseInt(getidx[i]);
-				}
-				else if(DeviceType.equalsIgnoreCase("heating") == true)
-				{
-					return retdata;
-				}
-			}
-			return retdata;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return null;
-		}
-	}
-
-	public int SetDevRoomIdx(int[] set)
-	{
-		try{
-			String indata=String.valueOf(set[0]);
-			for(int i =1; i<set.length;i++)
-				indata+=(":"+set[i]);
-			return (UpdateWallPADData(DEVICE_ROOM, indata))?0:-1;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return APIErrorCode.EXCEPTION;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return APIErrorCode.EXCEPTION;
-		}
-	}
-
-	/**
-	 * 난방 조명 방명칭 설정한다
-	 * @param DeviceType = "light"이면 조명 설정하고, "heating"이면 난방 설정함
-	 * @return int 0보다 작으면 실패
-	 */
-	public int SetDevRoomIdx(int[] set, String DeviceType)
-	{
-		try
-		{
-			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
-			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
-			wallpadDeviceSet.closeDB();
-
-			String indata = String.valueOf(set[0]);
-			for (int i = 1; i < set.length; i++)
-				indata += (":" + set[i]);
-
-			if(UseEachRoomName == false)
-			{
-				return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
-			}
-			else
-			{
-				if(DeviceType.equalsIgnoreCase("light") == true)
-				{
-					return (UpdateWallPADData(DEVICE_ROOM_LIGHT, indata)) ? 0 : -1;
-				}
-				else if(DeviceType.equalsIgnoreCase("heating") == true)
-				{
-					return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
-				}
-			}
-			return -1;
-
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return APIErrorCode.EXCEPTION;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return APIErrorCode.EXCEPTION;
-		}
-	}
-
-	public WallpadStatusData(Context ctx) {
-		super(ctx);
-	}
-
-
-	public void SetAlarmStatus(int status)
-	{
-		int alarmfree;
-		if (status > ALARMTEXT.length-1 || status < 0 ) return;
-		alarmfree = GetAlarmStatus();
-		UpdateWallPADData(ALARM_STATUS, ALARMTEXT[status]);
-
-		if(alarmfree != status)
-		{
-			// 상태가 변경되었다면 상태 변경 BR을 송신한다.
-			Intent notiIntent = new Intent();
-			notiIntent.setAction(define.NOTIFY_ACNAME);
-			notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARM_CHANGE);
-			CTX.sendBroadcast(notiIntent);
-		}
-
-		if (status == ALARM_NONE ||status == GUARD_IN || status == GUARD_OUT)
-		{
-			String modeStr = null;
-			if (status == ALARM_NONE)
-			{
-				modeStr = "normal";
-				if (alarmfree==ALARM_STOP || alarmfree == ALARM_ARISE)
-				{
-					Intent notiIntent = new Intent();
-					notiIntent.setAction(define.NOTIFY_ACNAME);
-					notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARMFREED);
-					CTX.sendBroadcast(notiIntent);
-				}
-			}
-			else if (status == GUARD_IN)
-				modeStr = "occupied";
-			else
-			{
-				modeStr = "unoccupied";
-				Intent notiIntent = new Intent();
-				notiIntent.setAction(define.NOTIFY_ACNAME);
-				notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_OUTGOINGSETTED);
-				CTX.sendBroadcast(notiIntent);
-			}
-
-			if( alarmfree == GUARD_OUT_WAIT && status == ALARM_NONE )
-			{
-				// 단지서버로 메세지를 보내지 않도록 한다.
-			}
-			else
-			{
-				WallPadiMAPNotifyAPI notif = new WallPadiMAPNotifyAPI(CTX);
-				notif.ModeChanged(modeStr);
-			}
-		}
-	}
-
-	public int GetAlarmStatus()
-	{
-		try
-		{
-			String ret = GetWallPADData(ALARM_STATUS);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetAlarmType(int type)
-	{
-		try {
-			if (type > ALARMTYPETEXT.length-1 || type < 0 ) return;
-			UpdateWallPADData(ALARM_TYPE, ALARMTYPETEXT[type]);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public int GetAlarmType()
-	{
-		try {
-			String ret = GetWallPADData(ALARM_TYPE);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetMorningCall(int set, int hour, int min)
-	{
-		if (set > MORNINGCALLTEXT.length-1 || set < 0 ) return;
-		String mcallStr = MORNINGCALLTEXT[set]+":"+hour+":"+min;
-		UpdateWallPADData(MORNINGCALL_STATUS, mcallStr);
-	}
-
-	public int GetMorningCallStatus()
-	{
-		try {
-			String ret = GetWallPADData(MORNINGCALL_STATUS);
-			String retarr[] = ret.split(":");
-			MorningHour = Integer.parseInt(retarr[1]);
-			MorningMin = Integer.parseInt(retarr[2]);
-			return Integer.parseInt(retarr[0]);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return -1;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return -1;
-		}
-	}
-	public int MorningHour = 0;
-	public int MorningMin  = 0;
-
-	public void SetManagerPW(String pw)
-	{
-		UpdateWallPADData(MANAGER_PW, pw);
-	}
-
-	public String GetManagerPW()
-	{
-		String ret = GetWallPADData(MANAGER_PW);
-		return ret;
-	}
-
-
-	public void SetUserPW(String pw)
-	{
-		UpdateWallPADData(USER_PW, pw);
-	}
-
-	public String GetUserPW()
-	{
-		String ret = GetWallPADData(USER_PW);
-		return ret;
-	}
-
-	public void SetWebCtrPW(String pw)
-	{
-		UpdateWallPADData(WEB_CTR_PW, pw);
-	}
-
-	public String GetWebCtrPW()
-	{
-		String ret = GetWallPADData(WEB_CTR_PW);
-		return ret;
-	}
-
-
-	public void SetPSTNStatus(int status)
-	{
-		if (status > PSTN_STATUSTEXT.length-1 || status < 0 ) return;
-		UpdateWallPADData(PSTN_STATUS, PSTN_STATUSTEXT[status]);
-	}
-
-	public int GetPSTNStatus()
-	{
-		try {
-			String ret = GetWallPADData(PSTN_STATUS);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetDevStatus(int status, String data)
-	{
-		String ipdata = DEV_STATUSTEXT[status]+":"+data;
-		UpdateWallPADData(DEV_STATUS, ipdata);
-	}
-
-	public String GetDevStatus()
-	{
-		String ret = GetWallPADData(DEV_STATUS);
-		return ret;
-	}
-
-	public void SetServerIP(String svrIP, int port)
-	{
-		String ipdata = String.format("%s:%d", svrIP, port);
-		UpdateWallPADData(SERVER_IP, ipdata);
-	}
-
-	public String GetServerIP()
-	{
-		String ret = GetWallPADData(SERVER_IP);
-		String[] retdata = ret.split(":");
-		return retdata[0];
-	}
-
-	public int GetServerPort()
-	{
-		try {
-			String ret = GetWallPADData(SERVER_IP);
-			String[] retdata = ret.split(":");
-			return Integer.parseInt(retdata[1]);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-
-	}
-	public void SetManagePC(String svrIP, int port)
-	{
-		String ipdata = String.format("%s:%d", svrIP, port);
-		UpdateWallPADData(MANAGEPC_IP, ipdata);
-	}
-
-	public String GetManagePCIP()
-	{
-		String ret;
-		//단지서버 1.0/2.0 구분하여 처리 (2.0일시는 단지서버로 보내도록 수정)
-		WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
-		boolean bNewDanjiServer = wallpadDeviceSet.GetNewDanjiServer();
-		wallpadDeviceSet.closeDB();
-
-		if(bNewDanjiServer == false)
-		{
-			ret = GetWallPADData(MANAGEPC_IP);
-		}
-		else
-		{
-			ret = GetWallPADData(SERVER_IP);
-		}
-
-		String[] retdata = ret.split(":");
-		return retdata[0];
-
-	}
-
-	public int GetManagePCPort()
-	{
-		try {
-			String ret = GetWallPADData(MANAGEPC_IP);
-			String[] retdata = ret.split(":");
-			return Integer.parseInt(retdata[1]);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetFTPIP(String svrIP)
-	{
-		UpdateWallPADData(FTP_IP, svrIP);
-	}
-
-	public String GetFTPIP()
-	{
-		String ret = GetWallPADData(FTP_IP);
-		return ret;
-	}
-
-	public void SetGatewayIP(String IPaddr)
-	{
-		UpdateWallPADData(GW_IP, IPaddr);
-	}
-
-	public String GetGatewayIP()
-	{
-		String ret = GetWallPADData(GW_IP);
-
-		return ret;
-	}
-
-	public void SetSubnetmask(String IPaddr)
-	{
-		UpdateWallPADData(SUBNET, IPaddr);
-	}
-
-	public String GetSubnetmask()
-	{
-		String ret = GetWallPADData(SUBNET);
-
-		return ret;
-	}
-
-	public void SetAppVer(String Ver)
-	{
-		UpdateWallPADData(APP_VER, Ver);
-	}
-
-	public String GetAPPVer()
-	{
-		String ret = GetWallPADData(APP_VER);
-		return ret;
-	}
-
-	public void SetNoticeVer(String Ver)
-	{
-		UpdateWallPADData(NOTICE_VER, Ver);
-	}
-
-	public String GetNoticeVer()
-	{
-		String ret = GetWallPADData(NOTICE_VER);
-		if(ret.length() < NOTICE_VER_DEFAULT.length())
-		{
-			return NOTICE_VER_DEFAULT;
-		}
-		return ret;
-	}
-
-	public void SetWeatherVer(String Ver)
-	{
-		UpdateWallPADData(WEATHER_VER, Ver);
-	}
-
-	public String GetWeatherVer()
-	{
-		String ret = GetWallPADData(WEATHER_VER);
-		return ret;
-	}
-
-	public String[] GetCurWeatherData()
-	{
-		String[] ret = GetWallPADData(WEATHER_VER).split(define.DEVCTR_DATA_SPLITER);
-		return ret;
-	}
-
-	public void SetCurWeatherCode(String code)
-	{
-		try {
-			UpdateWallPADData(WEATHER_CODE, code);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG , "[Exception] SetCurWeatherCode input fail ");
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public String GetCurWeatherCode()
-	{
-		try {
-			String ret = GetWallPADData(WEATHER_CODE);
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return CODE_DEFAULT;
-		}
-		catch (Exception e)
-		{
-			Log.e(TAG , "[Exception] GetCurWeatherCode fail ");
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return CODE_DEFAULT;
-		}
-	}
-	public void SetSettingVer(String Ver)
-	{
-		UpdateWallPADData(SETTING_VER, Ver);
-	}
-
-	public String GetSettingVer()
-	{
-		String ret = GetWallPADData(SETTING_VER);
-		return ret;
-	}
-
-	public void SetServerVer(String Ver)
-	{
-		UpdateWallPADData(SERVER_VERSION, Ver);
-	}
-
-	public String GetServerVer()
-	{
-		String ret = GetWallPADData(SERVER_VERSION);
-		return ret;
-	}
-
-	public void SetLightCNT(int CNT)
-	{
-		UpdateWallPADData(DEV_LIGHT_CNT, String.valueOf(CNT));
-	}
-
-	public int GetLightCNT()
-	{
-		try {
-			String ret = GetWallPADData(DEV_LIGHT_CNT);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetGasCNT(int CNT)
-	{
-		UpdateWallPADData(DEV_GAS_CNT, String.valueOf(CNT));
-	}
-
-	public int GetGasCNT()
-	{
-		try {
-			String ret = GetWallPADData(DEV_GAS_CNT);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetHeatingCNT(int CNT)
-	{
-		UpdateWallPADData(DEV_HEATING_CNT, String.valueOf(CNT));
-	}
-
-	public int GetHeatingCNT()
-	{
-		try {
-			String ret = GetWallPADData(DEV_HEATING_CNT);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetHeartbeatPeriod(int period)
-	{
-		UpdateWallPADData(HEARTBEAT_PERIOD, String.valueOf(period));
-	}
-
-	public int GetHeartbeatPeriod()
-	{
-		try {
-			String ret = GetWallPADData(HEARTBEAT_PERIOD);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetLastHeartbeat(String timedata)
-	{
-		UpdateWallPADData(LAST_HEARTBEAT, timedata);
-	}
-
-	public String GetLastHeartbeat()
-	{
-		String ret = GetWallPADData(LAST_HEARTBEAT);
-		return ret;
-	}
-
-	public static final String LAST_STATUSBEAT              = "LAST_STATUSBEAT";
-	public static final String LAST_STATUSBEAT_DEFAULT      = "0000.00.00.00.00.00";
-
-	public void SetLastStatusbeat(String timedata)
-	{
-		UpdateWallPADData(LAST_STATUSBEAT, timedata);
-	}
-
-	public String GetLastStatusbeat()
-	{
-		String ret = GetWallPADData(LAST_STATUSBEAT);
-		return ret;
-	}
-
-	public void SetNewsCnt(String cnt)
-	{
-		UpdateWallPADData(NEWS_CNT, cnt);
-	}
-
-	public String GetNewsCnt()
-	{
-		String ret = GetWallPADData(NEWS_CNT);
-		return ret;
-	}
-
-	public void SetMainBG(int bgtype, String locate)
-	{
-		String setdata = MAINBGTYPE_TEXT[bgtype]+":"+locate;
-		UpdateWallPADData(MAINBGTYPE, setdata );
-	}
-
-	public int GetMainBGType()
-	{
-		try {
-			String ret = GetWallPADData(MAINBGTYPE);
-			String[] bgtype = ret.split(":");
-			return Integer.parseInt(bgtype[0]);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-	public String GetMainBGLocate()
-	{
-		String ret = GetWallPADData(MAINBGTYPE);
-		String[] bgtype = ret.split(":");
-		return bgtype[1];
-	}
-
-	/////////////////////////////////////////////////////////////////////////////////////////////////
-	/////////////////////////////////////////// icontrols //////////////////////////////////////////
-	public void SetOutModeWaitTime( int nSecond )
-	{
-		try
-		{
-
-			UpdateWallPADData(OUTMODE_WAITTIME, String.valueOf(nSecond));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public int GetOutModeWaitTime()
-	{
-		try
-		{
-			String ret = GetWallPADData(OUTMODE_WAITTIME);
-
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetComeBackWaitTime(int nSecond)
-	{
-		try
-		{
-
-			UpdateWallPADData(COMEBACK_WAITTIME, String.valueOf(nSecond));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public int GetComeBackWaitTime()
-	{
-		try
-		{
-			String ret = GetWallPADData(COMEBACK_WAITTIME);
-
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return 0;
-		}
-	}
-
-	public void SetOutModeLinkDevice( String DeviceList )
-	{
-		try
-		{
-
-			UpdateWallPADData(OUTMODE_LINK_DEVICE, DeviceList );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public String GetOutModeLinkDevice()
-	{
-		try
-		{
-			String ret = GetWallPADData(OUTMODE_LINK_DEVICE);
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-			return "";
-		}
-	}
-
-	public void SetComeBackLinkDevice( String DeviceList )
-	{
-		try
-		{
-
-			UpdateWallPADData(INMODE_LINK_DEVICE, DeviceList );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			//e.printStackTrace();
-			LogUtil.errorLogInfo("", TAG, e);
-		}
-	}
-
-	public String GetComeBackLinkDevice()
-	{
-		try
-		{
-			String ret = GetWallPADData(INMODE_LINK_DEVICE);
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-
-	public void SetInBedLinkDevice( String DeviceList )
-	{
-		try
-		{
-
-			UpdateWallPADData(IN_BED_LINK_DEVICE, DeviceList );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public String GetInBedLinkDevice()
-	{
-		try
-		{
-			String ret = GetWallPADData(IN_BED_LINK_DEVICE);
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-
-	public void SetOutBedLinkDevice( String DeviceList )
-	{
-		try
-		{
-
-			UpdateWallPADData(OUT_BED_LINK_DEVICE, DeviceList );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public String GetOutBedLinkDevice()
-	{
-		try
-		{
-			String ret = GetWallPADData(OUT_BED_LINK_DEVICE);
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-
-	public void SetCallAPKStatus( boolean Running )
-	{
-		try
-		{
-			if( Running == true )
-				UpdateWallPADData(CALL_APK_STATUS, "1" );
-			else
-				UpdateWallPADData(CALL_APK_STATUS, "0" );
-
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetCallAPKStatusRunning()
-	{
-		try
-		{
-			String ret = GetWallPADData(CALL_APK_STATUS);
-			if( ret.equals("1"))
-				return true;
-			else
-				return false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public void SetCallStatus(boolean bTalking)
-	{
-		try
-		{
-			if (bTalking)
-				UpdateWallPADData(CALL_STATUS, "1" );
-			else
-				UpdateWallPADData(CALL_STATUS, "0" );
-
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetCallStatus()
-	{
-		try
-		{
-			String ret = GetWallPADData(CALL_STATUS);
-			if (ret.equals("1"))
-				return true;
-			else
-				return false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public boolean setRemoteCallUserPopupRun(boolean bRun) {
-		try {
-			if (bRun) {
-				return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "1" );
-			}
-			else {
-				return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "0" );
-			}
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] setRemoteCallUserPopupRun(boolean bRun)");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public boolean getRemoteCallUserPopupRun() {
-		try {
-			String strResult = GetWallPADData(REMOTECALL_USER_POPUP_RUN);
-			if (strResult.equals("1")) return true;
-			else return false;
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public boolean setGlobalScreenAPKRun(boolean bRun) {
-		try {
-			if (bRun) {
-			    return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "1" );
-            }
-			else {
-			    return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "0" );
-            }
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] setGlobalScreenAPKStatusRun(boolean bRun)");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public boolean getGlobalScreenAPKRun() {
-		try {
-			String strResult = GetWallPADData(GLOBALSCREEN_APK_RUN);
-			if (strResult.equals("1")) return true;
-			else return false;
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public void SetModeLampBrLevel( int nLevel )
-	{
-		try
-		{
-			if( nLevel >= 0 && nLevel <=4 )
-			{
-				UpdateWallPADData(MODE_LAMP_BR_LEVEL, String.valueOf(nLevel) );
-			}
-			else
-			{
-				Log.d(TAG , "SetModeLampBrLevel input fail ");
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public int GetModeLampBrLevel()
-	{
-		try
-		{
-			String ret = GetWallPADData(MODE_LAMP_BR_LEVEL);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-
-	}
-
-	public void SetWallPadMasterVolume( int nLevel )
-	{
-		try
-		{
-			UpdateWallPADData(WALLPAD_MASTER_VOLUME, String.valueOf(nLevel) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public int GetWallPadMasterVolume( )
-	{
-		try
-		{
-			String ret = GetWallPADData(WALLPAD_MASTER_VOLUME);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-
-	}
-
-	public void SetSoundOutputOfEventAlarm( boolean OutSount )
-	{
-		try
-		{
-
-			UpdateWallPADData(SOUND_OUTPUT_EVENT_ALARM, String.valueOf(OutSount) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetSoundOutputOfEventAlarm()
-	{
-		try
-		{
-			String ret = GetWallPADData(SOUND_OUTPUT_EVENT_ALARM);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return true;
-		}
-	}
-
-	public void Set_MultiSwitch_Concent_Use( boolean value)
-	{
-		try
-		{
-			UpdateWallPADData(MULTISWITCH_CONCENT_USE, String.valueOf(value) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean Get_MultiSwitch_Concent_Use()
-	{
-		try
-		{
-			String ret = GetWallPADData(MULTISWITCH_CONCENT_USE);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 웰컴조명 선택된 조명 설정한다.<br>
-	 * 거실등/복도등/주방등 순으로 설정
-	 * @param value
-	 */
-	public void Set_WelcomeLight_Selected( String value)
-	{
-		try
-		{
-			String[] split = value.split("/");
-			if(split.length != 3)
-			{
-				Log.e(TAG, "[Set_WelcomeLight_Selected] - LEN ERROR !!!");
-				return;
-			}
-
-			for(int i = 0; i < split.length; i++)
-			{
-				int ival = Integer.parseInt(split[i]);
-				if(ival < 0 || ival > 1)
-				{
-					Log.e(TAG, "[Set_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
-					return;
-				}
-			}
-
-			UpdateWallPADData(WELCOMELIGHT_SELECT_ITEMS, value );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 웰컴조명 선택된 조명을 가져온다.<br>
-	 * 거실등/복도등/주방등 순으로 저장되어 있음<br>
-	 * 저장된 값의 형식이 틀린 경우 모두 사용안함 반환 : 0/0/0
-	 */
-	public String Get_WelcomeLight_Selected()
-	{
-		try
-		{
-			String ret = GetWallPADData(WELCOMELIGHT_SELECT_ITEMS);
-			String[] split = ret.split("/");
-			if(split.length != 3)
-			{
-				Log.e(TAG, "[Get_WelcomeLight_Selected] - LEN ERROR !!!");
-				return "0/0/0";
-			}
-
-			for(int i = 0; i < split.length; i++)
-			{
-				int ival = Integer.parseInt(split[i]);
-				if(ival < 0 || ival > 1)
-				{
-					Log.e(TAG, "[Get_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
-					return "0/0/0";
-				}
-			}
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "0/0/0";
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "0/0/0";
-		}
-	}
-
-	public void SetCloseSensorValue( int value)
-	{
-		try
-		{
-			UpdateWallPADData(CLOSE_SENSOR_VALUE, String.valueOf(value) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public int GetCloseSensorValue()
-	{
-		try
-		{
-			String ret = GetWallPADData(CLOSE_SENSOR_VALUE);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
-		}
-	}
-
-	public void Set_InterlayerSensor_Status( String value)
-	{
-		try
-		{
-			UpdateWallPADData(INTERLAYER_NOISE_SENSOR_STATUS, value );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public String Get_InterlayerSensor_Status()
-	{
-		try
-		{
-			String ret = GetWallPADData(INTERLAYER_NOISE_SENSOR_STATUS);
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "EXCEPTION";
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "EXCEPTION";
-		}
-	}
-
-	public void SetCurrentScreenIDValue( int value)
-	{
-		try
-		{
-			UpdateWallPADData(CURRENT_SCREEN_ID_VALUE, String.valueOf(value) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public String GetNowMonthSelect()
-	{
-		try
-		{
-			String ret = GetWallPADData(NOW_MONTH_SELECT);
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "NOW";
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			Log.w(TAG, "[GetNowMonthSelect] Exception - Default");
-			return "NOW";
-		}
-	}
-
-	public void SetNowMonthSelect( String value)
-	{
-		try
-		{
-			UpdateWallPADData(NOW_MONTH_SELECT, value );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 저장된 실시간검침기 전력 누적사용량을 가져온다.
-	 *
-	 * @return - (double) 전력 누적사용량
-	 */
-	public double Get_RealTimeMeter_ElecAcc()
-	{
-		try
-		{
-			String ret = GetWallPADData(REALTIMEMETER__ELEC_ACC);
-			return Double.parseDouble(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			Log.e(TAG, "[Get_RealTimeMeter_ElecAcc] Exception - Default");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-
-	/**
-	 * 실시간검침기 전력 누적사용량을 저장한다.
-	 *
-	 * @param value - (double) 저장할 값
-	 *
-	 * @return (boolean) 저장성공여부 true:성공 , false:실패
-	 */
-	public boolean Set_RealTimeMeter_ElecAcc(double value)
-	{
-		try
-		{
-			return UpdateWallPADData(REALTIMEMETER__ELEC_ACC, String.format("%.2f", value));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			Log.e(TAG, "[Set_RealTimeMeter_ElecAcc] Exception - Default");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return false;
-	}
-
-	public int GetCurrentScreenIDValue()
-	{
-		try
-		{
-			String ret = GetWallPADData(CURRENT_SCREEN_ID_VALUE);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-
-
-
-	/**
-	 * @description
-	// GLE 모델 LED 버튼 밝기 값 저장
-	 *  0 ~2 사이값만 입력 하도록 한다.
-	 */
-	public void SetLEDButtonBrightnessLevel( int level )
-	{
-		try
-		{
-			if( level >=0 && level <= 2 )
-			{
-				UpdateWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL, String.valueOf(level) );
-			}
-			else
-			{
-				Log.d(TAG , "SetLEDButtonBrightnessLevel input fail ");
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-	/**
-	 * @description
-	 * GEL 모델 LED 버튼 밝기 값 리턴
-	 * 리턴값은 0~2 의값만 리턴된다.
-	 */
-	public int GetLEDButtonBrightnessLevel()
-	{
-		try
-		{
-			String ret = GetWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-	/**
-	 * @description
-	 * APU 감지시 정전 상태 저장.... 정전이면 true,  복전이면 false 입력하도록 한다.
-	 */
-	public void SetBlackOutEnergy( boolean Off )
-	{
-		try
-		{
-			UpdateWallPADData(BLACK_OUT_ENERGY, String.valueOf(Off) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-	/**
-	 * @description
-	 * 정전 상태 리턴... true 정전... false 이면 복전  값을 리턴한다.
-	 */
-	public boolean GetCurrentBlackOutEnergy()
-	{
-		try
-		{
-			String ret = GetWallPADData(BLACK_OUT_ENERGY);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-	/**
-	 * @description
-	// 마지막으로 실행된 메인 스크린 화면을 아이디를 저장하거나...
-	// 사용자가 고정시켜둔 메인스크린 화면을 저장하도록 한다.
-	 */
-	public void SetSelectedMainScreen( int id )
-	{
-		try
-		{
-			if( id == MAIN_DEFAULT_SCREEN || id == MAIN_BOOKMARK_SCREEN || id == MAIN_ENERGY_SCREEN )
-			{
-				UpdateWallPADData(MAIN_SELECTED_SCREEN	, String.valueOf(id) );
-			}
-			else
-			{
-				Log.d(TAG , "SetSelectedMainScreen input Fail ");
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-	/**
-	 * @description
-	 * 마지막으로 실행된 메인 스크린 화면을 아이디를 리턴 하거나
-	 * 사용자가 고정시켜둔 메인스크린 화면을 id를 리턴하도록 한다.
-	 */
-	public int GetSelectedMainScreen()
-	{
-		try
-		{
-			String ret = GetWallPADData(MAIN_SELECTED_SCREEN);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-	/**
-	 * @description
-	 * 무드등 램프 상태 ( 월패드 전원 재인가시 사용하기 위해 )
-	 * input Param
-	 * true 이면 On
-	 * false 이면 Off
-	 */
-	public void SetMoodLampState( boolean On )
-	{
-		try
-		{
-
-			UpdateWallPADData(MOOD_LAMP_STATE, String.valueOf(On) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-	/**
-	 * @description
-	 * 무드등 램프 상태 리턴  ( 월패드 전원 재인가시 사용하기 위해 )
-	 * return Param
-	 * true 이면 On
-	 * false 이면 Off
-	 */
-	public boolean GetMoodLampState()
-	{
-		try
-		{
-			String ret = GetWallPADData(MOOD_LAMP_STATE);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-
-
-	public void SetCarSoundOfEventAlarm( boolean OutSount )
-	{
-		try
-		{
-
-			UpdateWallPADData(SOUND_OUTPUT_CAR_ALARM, String.valueOf(OutSount) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetCarSoundOfEventAlarm()
-	{
-		try
-		{
-			String ret = GetWallPADData(SOUND_OUTPUT_CAR_ALARM);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return true;
-		}
-	}
-
-	public void SetCallSoundOfEventAlarm( boolean OutSound )
-	{
-		try
-		{
-
-			UpdateWallPADData(SOUND_OUTPUT_CALL_ALARM, String.valueOf(OutSound) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetCallSoundOfEventAlarm()
-	{
-		try
-		{
-			String ret = GetWallPADData(SOUND_OUTPUT_CALL_ALARM);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return true;
-		}
-	}
-
-	public void SetBandLocationEventAlarm( boolean OutSount )
-	{
-		try
-		{
-
-			UpdateWallPADData(SOUND_OUTPUT_BAND_LOCATION, String.valueOf(OutSount) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetBandLocationEventAlarm()
-	{
-		try
-		{
-			String ret = GetWallPADData(SOUND_OUTPUT_BAND_LOCATION);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return true;
-		}
-	}
-
-	public void SetNoisePopupUse( boolean OutSount )
-	{
-		try
-		{
-			UpdateWallPADData(INTERLAYER_NOISE_POPUP_USE, String.valueOf(OutSount) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetNoisePopupUse()
-	{
-		try
-		{
-			String ret = GetWallPADData(INTERLAYER_NOISE_POPUP_USE);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드1 사용설정 <br>
-	 * 기본모드1 (조명 에너지 절약)
-	 *
-	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
-	 */
-	public void Set_InRoomDetect_Scenario_Normal1( boolean mode )
-	{
-		try
-		{
-			UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1, String.valueOf(mode) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드1 사용여부 확인 <br>
-	 * 기본모드1 (조명 에너지 절약)
-	 *
-	 */
-	public boolean Get_InRoomDetect_Scenario_Normal1()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1);
-
-			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			else { return false; }
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드2 사용설정 <br>
-	 * 기본모드2 (야간 식탁등 켜짐)
-	 *
-	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
-	 */
-	public void Set_InRoomDetect_Scenario_Normal2( boolean mode )
-	{
-		try
-		{
-			UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2, String.valueOf(mode) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드2 사용여부 확인 <br>
-	 * 기본모드2 (야간 식탁등 켜짐)
-	 *
-	 */
-	public boolean Get_InRoomDetect_Scenario_Normal2()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2);
-
-			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			else { return false; }
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 사용자조명절전 사용설정 <br>
-	 *
-	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
-	 */
-	public void Set_InRoomDetect_Scenario_Userset( boolean mode )
-	{
-		try
-		{
-			UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET, String.valueOf(mode) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 사용자조명절전 사용여부 확인 <br>
-	 *
-	 */
-	public boolean Get_InRoomDetect_Scenario_Userset()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET);
-
-			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			else { return false; }
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
-	 *
-	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
-	 */
-	public void Set_InRoomDetect_Scenario_ElecRangeSafe( boolean mode )
-	{
-		try
-		{
-			UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE, String.valueOf(mode) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
-	 *
-	 */
-	public boolean Get_InRoomDetect_Scenario_ElecRangeSafe()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE);
-
-			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			else { return false; }
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-
-	/**
-	 * 스마트 재실센서 시나리오 공통 설정 <br>
-	 *
-	 * @param kindStr 		- (String) 설정할 시나리오 모드
-	 * @param startTimeStr 	- (String) 설정할 시작 시간
-	 * @param endTimeStr 	- (String) 설정할 종료 시간
-	 * @param dateStr 		- (String) 설정할 요일 모음
-	 * @param locStr 		- (String) 설정할 제어위치 모음
-	 * @param actTime1Str 	- (String) 설정할 시나리오 동작시간1
-	 * @param act1Str 		- (String) 설정할 동작1
-	 * @param actTime2Str 	- (String) 설정할 시나리오 동작시간2
-	 * @param act2Str 		- (String) 설정할 동작2
-	 *
-	 */
-	public void Set_InRoomDetect_Scenario_Modes( String kindStr, String startTimeStr, String endTimeStr, String dateStr, String locStr,
-												 String actTime1Str, String act1Str, String actTime2Str, String act2Str )
-	{
-		/*
-			KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/
-			LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF
-		*/
-		String saveStr = "";
-		String saveMode = "";
-		try
-		{
-			String kind = "";
-			String start = "";
-			String end = "";
-			String date = "";
-			String loc = "";
-			String acttime1 = "";
-			String act1 = "";
-			String acttime2 = "";
-			String act2 = "";
-
-			// 1. KIND - KIND-NORMAL1
-			if(kindStr.equals("NORMAL1") || kindStr.equals("NORMAL2") || kindStr.equals("USERSET") || kindStr.equals("ELECRANGE_SAFE"))
-			{
-				kind += "KIND-" + kindStr;
-
-				if(kindStr.equals("NORMAL1")) saveMode = INROOMDETECT_SCENARIO_NORMAL1_INFO;
-				else if(kindStr.equals("NORMAL2")) saveMode = INROOMDETECT_SCENARIO_NORMAL2_INFO;
-				else if(kindStr.equals("USERSET")) saveMode = INROOMDETECT_SCENARIO_USERSET_INFO;
-				else if(kindStr.equals("ELECRANGE_SAFE")) saveMode = INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO;
-			}
-			else
-			{
-				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Kind Error : " + kindStr);
-				return;
-			}
-
-			// 2. Start Time - START-AM:09:30
-			String[] startArr = startTimeStr.split(":");
-			if(startArr.length == 3)
-			{
-				if(startArr[0].equals("AM") || startArr[0].equals("PM"))
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr ampm : " + startTimeStr);
-					return;
-				}
-
-				if(Integer.parseInt(startArr[1]) >= 0 && Integer.parseInt(startArr[1]) <= 23)
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr hour : " + startTimeStr);
-					return;
-				}
-
-				if(Integer.parseInt(startArr[2]) >= 0 && Integer.parseInt(startArr[2]) <= 59)
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr min : " + startTimeStr);
-					return;
-				}
-
-				start += "START-" + startTimeStr;
-			}
-			else
-			{
-				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr Error : " + startTimeStr);
-				return;
-			}
-
-			// 3. End Time - END-PM:10:00
-			String[] endtimeArr = endTimeStr.split(":");
-			if(endtimeArr.length == 3)
-			{
-				if(endtimeArr[0].equals("AM") || endtimeArr[0].equals("PM"))
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr ampm : " + endTimeStr);
-					return;
-				}
-
-				if(Integer.parseInt(endtimeArr[1]) >= 0 && Integer.parseInt(endtimeArr[1]) <= 23)
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr hour : " + endTimeStr);
-					return;
-				}
-
-				if(Integer.parseInt(endtimeArr[2]) >= 0 && Integer.parseInt(endtimeArr[2]) <= 59)
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr min : " + endTimeStr);
-					return;
-				}
-
-				end += "END-" + endTimeStr;
-			}
-			else
-			{
-				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr Error : " + endTimeStr);
-				return;
-			}
-
-			// 4. Date - DATE-1:2:3:4:5:6:7
-			String[] dates = dateStr.split(":");
-			for(int i = 0; i < dates.length; i++)
-			{
-				if(Integer.parseInt(dates[i]) >= 1 && Integer.parseInt(dates[i]) <= 7)
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - dateStr Range Error : " + i + " / "  + dateStr);
-					return;
-				}
-			}
-			date += "DATE-" + dateStr;
-
-			// 5. Loc - LOC-LIV;KIT;TBL;MROOM;BED1;BED2
-			String[] locs = locStr.split(";");
-			for(int i = 0; i < locs.length; i++)
-			{
-				if(locs[i].equals("LIV") || locs[i].equals("KIT") || locs[i].equals("TBL") || locs[i].equals("MROOM") ||
-						locs[i].equals("MROOM") || locs[i].equals("BED1") || locs[i].equals("BED2")|| locs[i].equals("ELECRANGE") )
-				{ }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - locStr Range Error : " + i + " / " + locs[i] + " / " + locStr);
-					return;
-				}
-			}
-			loc += "LOC-" + locStr;
-
-			// 6. ActTime1 - TIME1-60
-			if(Integer.parseInt(actTime1Str) >= 0 && Integer.parseInt(actTime1Str) <= 360)
-			{ }
-			else
-			{
-				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime1Str Range Error : " + actTime1Str);
-				return;
-			}
-			acttime1 += "TIME1-" + actTime1Str;
-
-			// 7. Act1 - ACT1-DIM:30
-			String[] act1s = act1Str.split(";");
-			for(int j = 0; j < act1s.length; j++)
-			{
-				String[] firsts = act1s[j].split(":");
-				if(firsts.length == 2)
-				{
-					if(firsts[0].equals("DIM") )
-					{
-						if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
-						{ }
-						else
-						{
-							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + j + " / "  + act1s);
-							return;
-						}
-					}
-					else if(firsts[0].equals("STAT") )
-					{
-						if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
-						{ }
-						else
-						{
-							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act1s);
-							return;
-						}
-					}
-				}
-			}
-			act1 += "ACT1-" + act1Str;
-
-			// 8. ActTime2 - TIME2-60
-			if(Integer.parseInt(actTime2Str) >= 0 && Integer.parseInt(actTime2Str) <= 360)
-			{ }
-			else
-			{
-				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime2Str Range Error : " + actTime2Str);
-				return;
-			}
-			acttime2 += "TIME2-" + actTime2Str;
-
-			// 9. Act2 - ACT2-STAT:OFF
-			String[] act2s = act1Str.split(";");
-			for(int j = 0; j < act2s.length; j++)
-			{
-				String[] firsts = act2s[j].split(":");
-				if(firsts.length == 2)
-				{
-					if(firsts[0].equals("DIM") )
-					{
-						if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
-						{ }
-						else
-						{
-							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + act2s);
-							return;
-						}
-					}
-					else if(firsts[0].equals("STAT") )
-					{
-						if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
-						{ }
-						else
-						{
-							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act2s);
-							return;
-						}
-					}
-				}
-			}
-			act2 += "ACT2-" + act2Str;
-
-
-			saveStr += kind + "/" + start + "/" + end + "/" + date + "/" + loc + "/" + acttime1 + "/" + act1 + "/" + acttime2 + "/" + act2;
-			Log.d(TAG, "[Set_InRoomDetect_Scenario_Modes] - save : " + saveStr);
-
-			UpdateWallPADData(saveMode, saveStr);
-
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception ee)
-		{
-			Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Exception !!!");
-			LogUtil.errorLogInfo("", TAG, ee);//ee.printStackTrace();
-		}
-	}
-
-
-	/**
-	 * 스마트 재실센서 기본모드1 사용설정 <br>
-	 *
-	 * @param modeStr - (String) 설정할 값
-	 */
-	public void Set_InRoomDetect_Scenario_Mode_Normal1( String modeStr )
-	{
-		try
-		{
-			String[] infos = modeStr.split("/");
-
-			if(infos.length != 9) return;
-
-			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
-			boolean error = false;
-
-			for(int i = 0; i < infos.length; i++)
-			{
-				String[] data = infos[i].split("-");
-				if(data.length != 2)
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-				String type = data[0];
-				String info = data[1];
-
-				if(type.equals("KIND"))
-				{
-					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
-					{
-						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
-						return;
-					}
-				}
-				else if(type.equals("START")) { }
-				else if(type.equals("END")) { }
-				else if(type.equals("DATE")) { }
-				else if(type.equals("LOC")) { }
-				else if(type.equals("TIME1")) { }
-				else if(type.equals("TIME2")) { }
-				else if(type.equals("ACT1")) { }
-				else if(type.equals("ACT2")) { }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-			}
-
-			if(!error)
-			{
-				UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO, modeStr);
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드1 사용여부 확인 <br>
-	 *
-	 */
-	public String Get_InRoomDetect_Scenario_Mode_Normal1()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO);
-
-			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			//else { return false; }
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드2 사용설정 <br>
-	 *
-	 * @param modeStr - (String) 설정할 값
-	 */
-	public void Set_InRoomDetect_Scenario_Mode_Normal2( String modeStr )
-	{
-		try
-		{
-			String[] infos = modeStr.split("/");
-
-			if(infos.length != 9) return;
-
-			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
-			boolean error = false;
-
-			for(int i = 0; i < infos.length; i++)
-			{
-				String[] data = infos[i].split("-");
-				if(data.length != 2)
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-				String type = data[0];
-				String info = data[1];
-
-				if(type.equals("KIND"))
-				{
-					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
-					{
-						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
-						return;
-					}
-				}
-				else if(type.equals("START")) { }
-				else if(type.equals("END")) { }
-				else if(type.equals("DATE")) { }
-				else if(type.equals("LOC")) { }
-				else if(type.equals("TIME1")) { }
-				else if(type.equals("TIME2")) { }
-				else if(type.equals("ACT1")) { }
-				else if(type.equals("ACT2")) { }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-			}
-
-			if(!error)
-			{
-				UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO, modeStr);
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 기본모드2 사용여부 확인 <br>
-	 *
-	 */
-	public String Get_InRoomDetect_Scenario_Mode_Normal2()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO);
-
-			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			//else { return false; }
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 사용자설정모드 사용설정 <br>
-	 *
-	 * @param modeStr - (String) 설정할 값
-	 */
-	public void Set_InRoomDetect_Scenario_Mode_Userset( String modeStr )
-	{
-		try
-		{
-			String[] infos = modeStr.split("/");
-
-			if(infos.length != 9) return;
-
-			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
-			boolean error = false;
-
-			for(int i = 0; i < infos.length; i++)
-			{
-				String[] data = infos[i].split("-");
-				if(data.length != 2)
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-				String type = data[0];
-				String info = data[1];
-
-				if(type.equals("KIND"))
-				{
-					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
-					{
-						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
-						return;
-					}
-				}
-				else if(type.equals("START")) { }
-				else if(type.equals("END")) { }
-				else if(type.equals("DATE")) { }
-				else if(type.equals("LOC")) { }
-				else if(type.equals("TIME1")) { }
-				else if(type.equals("TIME2")) { }
-				else if(type.equals("ACT1")) { }
-				else if(type.equals("ACT2")) { }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-			}
-
-			if(!error)
-			{
-				UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO, modeStr);
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 사용자설정모드 사용여부 확인 <br>
-	 *
-	 */
-	public String Get_InRoomDetect_Scenario_Mode_Userset()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO);
-
-			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			//else { return false; }
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
-	 *
-	 * @param modeStr - (String) 설정할 값
-	 */
-	public void Set_InRoomDetect_Scenario_Mode_ElecRangeSafe( String modeStr )
-	{
-		try
-		{
-			String[] infos = modeStr.split("/");
-
-			if(infos.length != 9) return;
-
-			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
-			boolean error = false;
-
-			for(int i = 0; i < infos.length; i++)
-			{
-				String[] data = infos[i].split("-");
-				if(data.length != 2)
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-				String type = data[0];
-				String info = data[1];
-
-				if(type.equals("KIND"))
-				{
-					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
-					{
-						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
-						return;
-					}
-				}
-				else if(type.equals("START")) { }
-				else if(type.equals("END")) { }
-				else if(type.equals("DATE")) { }
-				else if(type.equals("LOC")) { }
-				else if(type.equals("TIME1")) { }
-				else if(type.equals("TIME2")) { }
-				else if(type.equals("ACT1")) { }
-				else if(type.equals("ACT2")) { }
-				else
-				{
-					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
-					error = true;
-					break;
-				}
-			}
-
-			if(!error)
-			{
-				UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO, modeStr);
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
-	 *
-	 */
-	public String Get_InRoomDetect_Scenario_Mode_ElecRangeSafe()
-	{
-		try
-		{
-			String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO);
-
-			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
-			//else { return false; }
-
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return "";
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return "";
-		}
-	}
-	/**
-	 * 스마트키 감지시 알람 여부 설정
-	 *
-	 * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
-	 */
-	public void SetSmartKeyDetectionAlarm(boolean bSet)
-	{
-		try
-		{
-			UpdateWallPADData(SMARTKEY_DETECTION_ALARM, String.valueOf(bSet));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			Log.e(TAG, "[SetSmartKeyDetectionAlarm] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트키 감지시 알람 여부 읽기
-	 *
-	 * @return (boolean) 설정값 (true:ON , false:OFF)
-	 */
-	public boolean GetSmartKeyDetectionAlarm()
-	{
-		try
-		{
-			String ret = GetWallPADData(SMARTKEY_DETECTION_ALARM);
-
-			if(ret.compareTo(String.valueOf(true)) == 0)
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			Log.e(TAG, "[GetSmartKeyDetectionAlarm] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 환기 예약 ON/OFF 여부 설정
-	 *
-	 * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
-	 */
-	public void SetVentiReserveOnOff(boolean bSet)
-	{
-		try
-		{
-			UpdateWallPADData(VEN_RESERVE_ONOFF, String.valueOf(bSet));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			Log.e(TAG, "[VEN_RESERVE_ONOFF] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 환기 예약 ON/OFF 여부 읽기
-	 *
-	 * @return (boolean) 설정값 (true:ON , false:OFF)
-	 */
-	public boolean GetVentiReserveOnOff()
-	{
-		try
-		{
-			String ret = GetWallPADData(VEN_RESERVE_ONOFF);
-			if(ret.compareTo(String.valueOf(true)) == 0) return true;
-			else                                         return false;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			Log.e(TAG, "[GetVentiReserveOnOff] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	public void SetArsControl( boolean OutSount )
-	{
-		try
-		{
-
-			UpdateWallPADData(ARS_CONTROL_DEVICE, String.valueOf(OutSount) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetArsControl()
-	{
-		try
-		{
-			String ret = GetWallPADData(ARS_CONTROL_DEVICE);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return true;
-		}
-	}
-
-	public void SetRemoteControl( boolean OutSount )
-	{
-		try
-		{
-
-			UpdateWallPADData(REMOTE_CONTROLS_DEVICE, String.valueOf(OutSount) );
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public boolean GetRemoteControl()
-	{
-		try
-		{
-			String ret = GetWallPADData(REMOTE_CONTROLS_DEVICE);
-
-			if( ret.compareTo(String.valueOf(true)) == 0 )
-			{
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return true;
-		}
-		catch (Exception e )
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return true;
-		}
-	}
-
-    /**
-     * 거실조명 모드제어 설정 (전체)
-     *
-     * @param value 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
-     *                             조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
-     *                             예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
-     */
-    public boolean setLivinglightModeCtrlEntireValue(String[] value) {
-        try {
-            if (value.length != 9) return false;
-
-            String strPresetID = LIVINGLIGHT_PRESET_00;
-            for (int i = 0; i < value.length; i++) {
-                switch (i) {
-                    case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
-                    case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
-                    case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
-                    case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
-                    case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
-                    case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
-                    case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
-                    case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
-                    case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
-                    default: strPresetID = LIVINGLIGHT_PRESET_00; break;
-                }
-                if (!UpdateWallPADData(strPresetID, value[i])) return false;
-            }
-            return true;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e ) {
-            Log.e(TAG, "[Exception] setLivinglightModeCtrlEntireValue(String[] value)");
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            return false;
-        }
-    }
-
-    /**
-     * 거실조명 모드제어 설정 (모드별)
-     *
-     * @param value 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
-     *                             조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
-     *                             예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
-     */
-    public boolean setLivinglightModeCtrlValues(int presetid, String value) {
-        try {
-            String strPresetID = LIVINGLIGHT_PRESET_00;
-            switch (presetid) {
-                case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
-                case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
-                case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
-                case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
-                case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
-                case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
-                case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
-                case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
-                case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
-                default: return false;
-            }
-
-            return UpdateWallPADData(strPresetID, value);
-
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e ) {
-            Log.e(TAG, "[Exception] setLivinglightModeCtrlValues(int presetid, String value)");
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            return false;
-        }
-    }
-
-    /**
-     * 거실조명 모드제어 설정 (조명별)
-     *
-     * @param presetid      설정값 ID (0 ~ 8)
-     *                  lightid         조명 ID (0 ~ 8)
-     *                  power         전원 (on/off/none(don't care))
-     *                  dim             밝기 (1 ~ 10, 미설정시 0)
-     *                  color            색온도 (1 ~ 10, 미설정시 0)
-     */
-    public boolean setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color) {
-        try {
-            if (presetid < 0 && 8 < presetid) {
-                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! presetid [" + presetid + "]");
-                return false;
-            }
-
-            if (lightid < 0 && 8 < lightid) {
-                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! lightid [" + lightid + "]");
-                return false;
-            }
-
-            if (!(power.equalsIgnoreCase("on") || power.equalsIgnoreCase("off") || power.equalsIgnoreCase("none"))) {
-                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! power [" + power + "]");
-                return false;
-            }
-
-            if (dim < 0 && 10 < dim) {
-                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! dim [" + dim + "]");
-                return false;
-            }
-
-            if (color < 0 && 10 < color) {
-                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! color [" + color + "]");
-                return false;
-            }
-
-            String strResult = getLivinglightModeCtrlValues(presetid);
-            String[] strParse = strResult.split("/");
-            strParse[lightid] = power + ":" + dim + ":" + color;
-
-            String strValues = null;
-
-            for (int i = 0; i < strParse.length; i++) {
-                if (i == 0) strValues = strParse[i];
-                else strValues += "/" + strParse[i];
-            }
-
-            boolean bRet = setLivinglightModeCtrlValues(presetid, strValues);
-            if(bRet)
-			{
-				// 거실 조명 모드 변경 알림
-				Intent notiIntent = new Intent();
-				notiIntent.setAction(define.NOTIFY_ACNAME);
-				notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_DB__LIVING_LIGHT_MODE);
-				CTX.sendBroadcast(notiIntent);
-			}
-			return bRet;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e ) {
-            Log.e(TAG, "[Exception] setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color)");
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            return false;
-        }
-    }
-
-    /**
-     * 거실조명 모드제어 설정값 읽기
-     *
-     * @return (String[]) 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
-     *                                조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
-     *                                예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
-     */
-    public String[] getLivinglightModeCtrlEntireValue() {
-        try  {
-            String strPresetID = LIVINGLIGHT_PRESET_00;
-            String[] astrResult = new String[9];
-            for (int i = 0; i < 9; i++) {
-                switch (i) {
-                    case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
-                    case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
-                    case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
-                    case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
-                    case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
-                    case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
-                    case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
-                    case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
-                    case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
-                    default: strPresetID = LIVINGLIGHT_PRESET_00; break;
-                }
-                astrResult[i] = GetWallPADData(strPresetID);
-            }
-            return astrResult;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e) {
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            Log.w(TAG, "[Exception] getLivinglightModeCtrlEntireValue()");
-            return null;
-        }
-    }
-
-    /**
-     * 거실조명 모드제어 설정값 읽기
-     *
-     * @return (String) 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
-     *                                조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
-     *                                예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
-     */
-    public String getLivinglightModeCtrlValues(int presetid) {
-        try  {
-            String strPresetID = LIVINGLIGHT_PRESET_00;
-            switch (presetid) {
-                case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
-                case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
-                case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
-                case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
-                case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
-                case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
-                case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
-                case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
-                case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
-                default: strPresetID = LIVINGLIGHT_PRESET_00; break;
-            }
-
-            String strResult = GetWallPADData(strPresetID);
-            return strResult;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e) {
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            Log.w(TAG, "[Exception] getLivinglightModeCtrlValues(int presetid)");
-            return null;
-        }
-    }
-
-    /**
-     * 거실조명 모드제어 설정값 읽기
-     *
-     *  @param presetid      설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
-     *                  lightid         조명 ID (0 ~ 8) : 0은 그룹제어시 사용
-     *
-     * @return (String) 설정값 ("전원:디밍:색온도")
-     *                                조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
-     *                                예) "off:10:1"
-     */
-    public String getLivinglightModeCtrlUnitValues(int presetid, int lightid) {
-        try  {
-            String strValues = getLivinglightModeCtrlValues(presetid);
-            String[] strParse = strValues.split("/");
-            String strResult = strParse[lightid];
-
-            return strResult;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e) {
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            Log.w(TAG, "[Exception] getLivinglightModeCtrlUnitValues(int presetid, int lightid)");
-            return null;
-        }
-    }
-
-    public static class LightConfig {
-        public String Power;
-        public byte Dim;
-        public byte Color;
-    }
-
-    /**
-     * 거실조명 모드제어 설정값 읽기
-     *
-     *  @param presetid      설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
-     *
-     * @return (LightConfig) 설정값 ("전원:디밍:색온도")
-     */
-    public LightConfig getLivinglightModeEntireCtrlUnitValues(int presetid) {
-        try  {
-            String strValues = getLivinglightModeCtrlValues(presetid);
-            String[] strParse_01 = strValues.split("/");
-            String[] strParse_02 = strParse_01[0].split(":");
-            LightConfig lightconfig = new LightConfig();
-            lightconfig.Power = strParse_02[0];
-            lightconfig.Dim = Byte.parseByte(strParse_02[1]);
-            lightconfig.Color = Byte.parseByte(strParse_02[2]);
-            Log.i(TAG, "[getLivinglightModeEntireCtrlUnitValues] presetid [" + presetid + "], lightconfig.Power [" + lightconfig.Power + "], lightconfig.Dim [" + lightconfig.Dim + "], lightconfig.Color [" + lightconfig.Color + "]");
-            return lightconfig;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e) {
-            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-            Log.w(TAG, "[Exception] getLivinglightModeEntireCtrlUnitValues(int presetid)");
-            return null;
-        }
-    }
-
-	////////////////////////////////////////////////////////////////////////////////////////////////
-
-	public static class PhoneAddr
-	{
-		public String Name;
-		public String IP;
-	}
-
-	List<PhoneAddr> GuardList = new ArrayList<PhoneAddr>();
-	List<PhoneAddr> LobbyList = new ArrayList<PhoneAddr>();
-
-	public void AddGuardAddress(String name, String IPaddress)
-	{
-		String indata = GUARD_ADDRESS+"||"+IPaddress;
-		insertWallPADDB(name, indata);
-	}
-
-	public List<PhoneAddr> GetGuardAddress()
-	{
-		GuardList.clear();
-
-		String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+GUARD_ADDRESS+"::%');";
-		Cursor cursor = wdb.rawQuery(query, null);
-		String GetData="";
-		String[] splitdata;
-		PhoneAddr phoneaddr = new PhoneAddr();
-		while (cursor.moveToNext())
-		{
-			GetData = cursor.getString(0);
-			splitdata = GetData.split("::");
-			phoneaddr.Name = splitdata[0];
-			phoneaddr.IP   = splitdata[1];
-
-			GuardList.add(phoneaddr);
-		}
-
-		cursor.close();
-
-		return GuardList;
-	}
-
-	public void DeleteGuardAddress(String name)
-	{
-		String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+GUARD_ADDRESS+"::%');";
-
-		try {
-			wdb.execSQL(sqlst);
-		} catch (SQLException e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public void AddLobbyAddress(String name, String IPaddress)
-	{
-		String indata = LOBBY_ADDRESS+"::"+IPaddress;
-		insertWallPADDB(name, indata);
-	}
-
-	public List<PhoneAddr> GetLobbyAddress()
-	{
-		LobbyList.clear();
-
-		String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+LOBBY_ADDRESS+"::%');";
-		Cursor cursor = wdb.rawQuery(query, null);
-		String GetData="";
-		String[] splitdata;
-		PhoneAddr phoneaddr = new PhoneAddr();
-		while (cursor.moveToNext())
-		{
-			GetData = cursor.getString(0);
-			splitdata = GetData.split("::");
-			phoneaddr.Name = splitdata[0];
-			phoneaddr.IP   = splitdata[1];
-
-			LobbyList.add(phoneaddr);
-		}
-
-		cursor.close();
-
-		return LobbyList;
-	}
-
-	public void DeleteLobbyAddress(String name)
-	{
-		String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+LOBBY_ADDRESS+"::%');";
-
-		try {
-			wdb.execSQL(sqlst);
-		} catch (SQLException e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public void setSystemTime(int year, int mon, int day, int hour, int min, int sec)
-	{
-		Calendar c = new GregorianCalendar();
-
-
-
-		c.set(Calendar.YEAR, year);
-		c.set(Calendar.MONTH, mon-1);
-		c.set(Calendar.DAY_OF_MONTH, day);
-		c.set(Calendar.HOUR_OF_DAY, hour);
-		c.set(Calendar.MINUTE, min);
-		c.set(Calendar.SECOND, sec);
-		long when = c.getTimeInMillis();
-		Calendar now = new GregorianCalendar();
-		long nowT = when - now.getTimeInMillis();
-		UpdateWallPADData(SET_SYSTEMTIME, String.valueOf(nowT));
-		Intent intent = new Intent();
-		intent.setAction("SYSTEMTIMESET");
-		intent.putExtra("DATE", String.format("%d&&%d&&%d", year, mon-1, day));
-		intent.putExtra("TIME", String.format("%d&&%d&&%d", hour, min, sec));
-		CTX.sendBroadcast(intent);
-	}
-	public Long GetSystemTime()
-	{
-		try {
-			String ret = GetWallPADData(SET_SYSTEMTIME);
-			return Long.parseLong(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return (long)0;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return (long)0;
-		}
-	}
-	public void SetDoorCallTimeout(int timeout)
-	{
-		UpdateWallPADData(DOORCALLTIMEOUT, String.valueOf(timeout));
-	}
-
-	public int GetDoorCallTimeout()
-	{
-		try {
-			String ret = GetWallPADData(DOORCALLTIMEOUT);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-
-	public void SetDoorConnectTimeout(int timeout)
-	{
-		UpdateWallPADData(DOORCONNECTTIMEOUT, String.valueOf(timeout));
-	}
-
-	public int GetDoorConnectTimeout()
-	{
-		try {
-			String ret = GetWallPADData(DOORCONNECTTIMEOUT);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-	public void SetMorningCallPeriod(int type)
-	{
-		UpdateWallPADData(MORNINGCALL_TYPE, MORNINGCALLTYPETEXT[type]);
-	}
-
-	public int GetMorningCallPeriod()
-	{
-		try {
-			String ret = GetWallPADData(MORNINGCALL_TYPE);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-	public void SetMorningCallBell(int type)
-	{
-		UpdateWallPADData(MORNINGCALL_BELLTYPE, MORNINGCALL_BELLTYPETEXT[type]);
-	}
-
-	public int GetMorningCallBell()
-	{
-		String ret = GetWallPADData(MORNINGCALL_BELLTYPE);
-		return Integer.parseInt(ret);
-	}
-
-	public void AddMorningCallReserve(int type)
-	{
-		try {
-			int  reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
-			reservedata|=type;
-			UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public void DeleteMorningCallReserve(int type)
-	{
-		try {
-			int  reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
-			reservedata^=type;
-			UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	public int[] GetMorningCallReserve()
-	{
-		try
-		{
-			String REserveData = GetWallPADData(MORNINGCALL_RESERVE);
-			if (REserveData == null ) return null;
-			int  reservedata = Integer.parseInt(REserveData);
-			List<Integer> resultList = new ArrayList<Integer>();
-			for(int i = 0; i< MCCommandList.length;i++)
-			{
-				if ((reservedata&MCCommandList[i]) > 0)
-					resultList.add(MCCommandList[i]);
-			}
-			int[] result = new int[resultList.size()];
-			int i = 0;
-			for (Integer element : resultList) {
-				result[i++] = element;
-			}
-			return result;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return null;
-		}
-	}
-
-	/**
-	 * @description
-	 * 전자액자 설정정보 저장
-	 */
-	public void SetAutoPictureData(int mAutoPictureSetIdx, int mStartTimeHourIdx, int mStartTimeMinIdx, int mEndTimeHourIdx
-			, int mEndTimeMinIdx, int mSlideIntervalIdx, int mAnimationIdx)
-	{
-		UpdateWallPADData(AUTOPICTURE_SET_INDEX, Integer.toString(mAutoPictureSetIdx));
-		UpdateWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX, Integer.toString(mStartTimeHourIdx));
-		UpdateWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX, Integer.toString(mStartTimeMinIdx)) ;
-		UpdateWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX, Integer.toString(mEndTimeHourIdx));
-		UpdateWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX, Integer.toString(mEndTimeMinIdx));
-		UpdateWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX, Integer.toString(mSlideIntervalIdx));
-		UpdateWallPADData(AUTOPICTURE_ANIMATION_INDEX, Integer.toString(mAnimationIdx));
-	}
-
-	/**
-	 * @description
-	 * 전자액자 설정정보 가져오기
-	 * @return int[] data[0]-> AUTOPICTURE_SET_INDEX<br>
-	 *              int[] data[1]-> AUTOPICTURE_START_TIME_HOUR_INDEX<br>
-	 *              int[] data[2]-> AUTOPICTURE_START_TIME_MIN_INDEX<br>
-	 *              int[] data[3]-> AUTOPICTURE_END_TIME_HOUR_INDEX<br>
-	 *              int[] data[4]-> AUTOPICTURE_END_TIME_MIN_INDEX<br>
-	 *              int[] data[5]-> AUTOPICTURE_SLIDE_INTERVAL_INDEX<br>
-	 *              int[] data[6]-> AUTOPICTURE_ANIMATION_INDEX<br>
-	 */
-	public int[] GetAutoPictureData()
-	{
-		int[] result = new int[7];
-		String ret = null;
-
-		for(int i = 0; i<result.length; i++)
-		{
-			try
-			{
-				if(i == 0)
-				{
-					ret = GetWallPADData(AUTOPICTURE_SET_INDEX);
-
-				}
-				else if(i == 1)
-				{
-					ret = GetWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX);
-
-				}
-				else if(i == 2)
-				{
-					ret = GetWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX);
-
-				}
-				else if(i == 3)
-				{
-					ret = GetWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX);
-
-				}
-				else if(i == 4)
-				{
-					ret = GetWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX);
-
-				}
-				else if(i == 5)
-				{
-					ret = GetWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX);
-
-				}
-				else if(i == 6)
-				{
-					ret = GetWallPADData(AUTOPICTURE_ANIMATION_INDEX);
-
-				}
-
-				result[i] = Integer.parseInt(ret);
-			}
-			catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-			}
-			catch (Exception e)
-			{
-				LogUtil.errorLogInfo("", TAG, e);
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * @description
-	 * 전자액자 APP 실행 여부를 DB정보와 비교하여 알려주는 함수
-	 * @return boolean형 true 인 경우에만 StartAutoPictureAPP() 호출<br>
-	 * @param
-	 *  NowCal Calendar형 현재 시간 입력
-	 */
-	public boolean DecideAutoPictureAppStartOrNot(Calendar NowCal)
-	{
-
-		int DBLoadResult[] = new int [7];
-		DBLoadResult = GetAutoPictureData();
-
-		//실행시간과 종료시간이 같으면 종료!
-		if((DBLoadResult[1] == DBLoadResult[3]) && (DBLoadResult[2] == DBLoadResult[4]))
-		{
-
-			return false;
-		}
-
-		Calendar TempCal = Calendar.getInstance();
-		TempCal.set(Calendar.HOUR_OF_DAY,   DBLoadResult[1]);
-		TempCal.set(Calendar.MINUTE,   (DBLoadResult[2]*10));
-
-		Calendar EndCal = Calendar.getInstance();
-		EndCal.set(Calendar.HOUR_OF_DAY,   DBLoadResult[3]);
-		EndCal.set(Calendar.MINUTE,   (DBLoadResult[4]*10));
-
-		int intNowTime = (NowCal.get(Calendar.HOUR_OF_DAY) * 60) + NowCal.get(Calendar.MINUTE);
-		int intEndTime = (EndCal.get(Calendar.HOUR_OF_DAY) * 60) + EndCal.get(Calendar.MINUTE);
-
-        /*
-        Log.w("Jar", "[DB] --------[intNowTime] " + intNowTime);
-        Log.w("Jar", "[DB] --------[intEndTime] " + intEndTime);
-
-        Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
-        Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
-        Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
-        Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
-        Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
-        Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
-
-
-        Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
-        Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
-        Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
-        Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
-        Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
-        Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
-
-        Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
-        Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
-        */
-
-		boolean result= false;
-		switch(DBLoadResult[0])
-		{
-			case 0: //사용안함
-				result = false;
-				break;
-
-	        /*
-	        SUNDAY 0
-	        MONDAY 1
-	        TUESDAY 2
-	        WEDNESDAY 3
-	        THURSDAY 4
-	        FRIDAY 5
-	        SATURDAY 6
-	        */
-
-			case 1: //월~금
-				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
-				{
-					result = true;
-				}
-				break;
-
-			case 2: //월~토
-				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
-				{
-					result = true;
-				}
-				break;
-
-			case 3: //토~일
-				if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
-				{
-					result = true;
-				}
-				break;
-
-			case 4: //매일
-				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
-				{
-					result = true;
-				}
-				break;
-
-			default:
-				break;
-		}
-		if(result == true)
-		{
-
-			//시간비교
-
-			if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
-			{
-				if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
-				{
-					if(intNowTime < intEndTime)
-					{
-						result = true;
-					}
-					else
-					{
-						result = false;
-					}
-				}
-
-				if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
-				{
-					if(NowCal.get(Calendar.MINUTE) >= TempCal.get(Calendar.MINUTE))
-					{
-						if(intNowTime < intEndTime)
-						{
-							result = true;
-						}
-						else
-						{
-							result = false;
-						}
-					}
-					else
-					{
-						result = false;
-					}
-				}
-			}
-			else
-			{
-				result = false;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * @description
-	 * 전자액자 APP 종료 여부를 DB정보와 비교하여 알려주는 함수<br>
-	 * 호출 하기 전에 최상위 Activity에 AutoPicture가 실행되고 있는지 먼저 확인 후, 호출해야 함.
-	 * @return boolean형 true 인 경우에만 EndAutoPictureAPP() 호출<br>
-	 * @param
-	 *  NowCal Calendar형 현재 시간 입력
-	 */
-	public boolean DecideAutoPictureAppEndOrNot(Calendar NowCal)
-	{
-
-		int DBLoadResult[] = new int [7];
-		DBLoadResult = GetAutoPictureData();
-
-		Calendar TempCal = Calendar.getInstance();
-		TempCal.set(Calendar.HOUR_OF_DAY,   DBLoadResult[3]);
-		TempCal.set(Calendar.MINUTE,   (DBLoadResult[4]*10));
-
-        /*
-        Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
-        Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
-        Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
-        Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
-        Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
-        Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
-
-        Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
-        Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
-        Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
-        Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
-        Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
-        Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
-
-        Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
-        Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
-        */
-
-		boolean result= false;
-		switch(DBLoadResult[0])
-		{
-			case 0: //사용안함
-				result = false;
-				break;
-
-            /*
-            SUNDAY 0
-            MONDAY 1
-            TUESDAY 2
-            WEDNESDAY 3
-            THURSDAY 4
-            FRIDAY 5
-            SATURDAY 6
-            */
-
-			case 1: //월~금
-				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
-				{
-					result = true;
-				}
-				break;
-
-			case 2: //월~토
-				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
-				{
-					result = true;
-				}
-				break;
-
-			case 3: //토~일
-				if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
-				{
-					result = true;
-				}
-				break;
-
-			case 4: //매일
-				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
-				{
-					result = true;
-				}
-				break;
-
-			default:
-				break;
-		}
-		if(result == true)
-		{
-
-			//시간비교
-
-			if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
-			{
-				if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
-				{
-					result = true;
-				}
-
-				if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
-				{
-					if(NowCal.get(Calendar.MINUTE) > TempCal.get(Calendar.MINUTE))
-					{
-						result = true;
-					}
-					else
-					{
-						result = false;
-					}
-				}
-			}
-			else
-			{
-				result = false;
-			}
-		}
-		return result;
-	}
-
-
-	/**
-	 * @description
-	 * 전자액자 APP 시작. (호출하면 즉시 시작됨).<br>
-	 * 사진 전환 간격, 애니메이션 효과 인덱스 입력은 함수 내에서 처리.
-	 */
-	public boolean StartAutoPictureAPP()
-	{
-		int DBLoadResult[] = new int [7];
-		int IntervalTimeSec = 5;
-		DBLoadResult = GetAutoPictureData();
-		switch (DBLoadResult[5]) // mSlideIntervalIdx
-		{
-			case 0: //5초
-				IntervalTimeSec = 5;
-				break;
-			case 1: //10초
-				IntervalTimeSec = 10;
-				break;
-			case 2: //30초
-				IntervalTimeSec = 30;
-				break;
-			case 3: //1분
-				IntervalTimeSec = 60;
-				break;
-			case 4: //30분
-				IntervalTimeSec = 60 * 30;
-				break;
-			case 5: //60분
-				IntervalTimeSec = 60 * 60;
-				break;
-			default:
-				IntervalTimeSec = 5;
-				break;
-		}
-		//전자액자App 설치유무 확인!
-		PackageManager pm = CTX.getPackageManager();
-		try {
-			pm.getApplicationInfo("kr.co.icontrols.autopicture", PackageManager.GET_META_DATA);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-
-			return false;
-		}
-
-		//사진 파일이 하나도 없으면 APP 실행시키지 않음!
-		File dirInternal = new File(define.ALBUM_PICTURE_LOCATION);
-		File dirUsb = new File("/storage/usb0");
-		try{
-			printfiles(dirInternal);
-			printfiles(dirUsb);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e)
-		{
-
-			return false;
-		}
-		//사진 파일이 하나도 없으면 APP 실행시키지 않음!
-		if(AutoPicturefilesList.size() == 0)
-		{
-
-			return false;
-		}
-
-		AutoPicturefilesList.clear();
-
-		//전자액자 App 시작!!
-		Intent intent = new Intent(Intent.ACTION_MAIN);
-		intent.setComponent(new ComponentName("kr.co.icontrols.autopicture", "kr.co.icontrols.autopicture.MainActivity"));
-		intent.putExtra("IMAGE_NEXTSHOW_TIME_UNIT_SEC", IntervalTimeSec);
-		intent.putExtra("IMAGE_NEXTSHOW_ANIMATION", DBLoadResult[6]+1);
-		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-		CTX.startActivity(intent);
-
-		return true;
-	}
-
-	/**
-	 * @description
-	 * USB에 있는 이미지 파일의 목록을 생성하는 함수<br>
-	 * 재귀함수로써 모든 폴더를 탐색한다.<br>
-	 * USB와 Storage/Bestin/DownloadPicture 내에 있는 파일의 확장자를 검사<br>
-	 * 파일 포맷 : jpg, JPG, jpeg, JPEG, png, PNG, bmp, BMP 지원
-	 */
-	public void printfiles(File file)
-	{
-		File[] list = file.listFiles();
-
-		//Log.d(TAG, "The full PATH to the sdcard location is:" +file.getPath());
-		if(list == null)
-		{
-
-			return;
-		}
-		for (int i = 0; i < list.length; i++)
-		{
-			File temp_file = new File(file.getAbsolutePath(),list[i].getName());
-			if (temp_file.isDirectory() && temp_file.listFiles() != null)
-			{
-				//Log.d(TAG, "PATH folder" +temp_file.getAbsolutePath());
-				//I am inside The Directory... Searching:) So i am calling printfiles(File file) function to print the files in the directory
-				printfiles(temp_file);
-			}
-			else
-			{
-				String filename = temp_file.getName();
-				boolean isAccept = false;
-
-				if(filename.toLowerCase().endsWith(".jpg") == true)
-				{
-					isAccept = true;
-				}
-				else if(filename.toLowerCase().endsWith(".jpeg") == true)
-				{
-					isAccept = true;
-				}
-				else if(filename.toLowerCase().endsWith(".png") == true)
-				{
-					isAccept = true;
-				}
-				else if(filename.toLowerCase().endsWith(".bmp") == true)
-				{
-					isAccept = true;
-				}
-				else
-				{
-					isAccept = false;
-				}
-
-				if(isAccept == true)
-				{
-					AutoPicturefilesList.add(temp_file.getAbsolutePath());
-
-				}
-			}
-		}
-	}
-
-
-	/**
-	 * @description
-	 * 전자액자 APP 강제 종료.
-	 */
-	public void EndAutoPictureAPP()
-	{
-
-
-		Intent intent = new Intent();
-		intent.setAction("kr.co.icontrols.autopicture.BR_APP_FINISH");
-		CTX.sendBroadcast(intent);
-	}
-
-	/**
-	 * @description
-	 * 원격검침 정보 저장
-	 * @param
-	 * isEMSEnable false면 EMS 사용안함, true면 EMS 사용함
-	 * @param
-	 * NumberOfKind 3이면 3종, 5이면 5종, 6이면 6종.(3 or 5 or 6만 입력 가능)
-	 */
-	public boolean SetRemoteMeteringData(boolean isEMSEnable, int NumberOfKind)
-	{
-		String str = String.valueOf(isEMSEnable);
-		boolean result = false;
-		if((str.equalsIgnoreCase("true") == true) || (str.equalsIgnoreCase("false") == true))
-		{
-			if((NumberOfKind == 3) || (NumberOfKind == 5) || (NumberOfKind == 6))
-			{
-				UpdateWallPADData(REMOTE_METERING_EMS_ENABLE, str);
-				UpdateWallPADData(REMOTE_METERING_NUMBER_OF_KIND, Integer.toString(NumberOfKind));
-				result = true;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * @description
-	 * 원격검침 EMS 사용여부 가져오기
-	 * @return boolean형 true면 EMS 사용함, false면 EMS 사용하지 않음
-	 */
-	public boolean GetRemoteMeteringIsEMSEnable()
-	{
-		String ret = null;
-		boolean ReturnValue = false;
-		ret = GetWallPADData(REMOTE_METERING_EMS_ENABLE);
-
-
-		if(ret.equals("true") == true)
-		{
-			ReturnValue = true;
-		}
-		else if(ret.equals("false") == true)
-		{
-			ReturnValue = false;
-		}
-		return ReturnValue;
-	}
-
-	/**
-	 * @description
-	 * 원격검침 몇종인지 정보 가져오는 함수.
-	 * @return 3 or 5 or 6(3종 or 5종 or 6종)
-	 */
-	public int GetRemoteMeteringNumberOfKind()
-	{
-		String ret = null;
-		ret = GetWallPADData(REMOTE_METERING_NUMBER_OF_KIND);
-
-
-		if((ret.equals("3") == true) || (ret.equals("5") == true) || (ret.equals("6") == true))
-		{
-			return Integer.parseInt(ret);
-		}
-		else
-		{
-
-			return 3;
-		}
-	}
-
-	/**
-	 * @description
-	 * 원격검침 목표량 에너지 별로 가져오는 함수
-	 * @return string형 사용자가 설정한 에너지 목표값. 만약 잘못된 input값일 경우 999999999 리턴
-	 * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
-	 */
-	public String GetRemoteMeteringTargetValue(int Index)
-	{
-		String ret = null;
-
-
-		if((Index < 0) || (Index > 5))
-		{
-			return "999999999";
-		}
-
-		switch(Index)
-		{
-			case 0:
-				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT);
-				break;
-			case 1:
-				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_WATER);
-				break;
-			case 2:
-				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_GAS);
-				break;
-			case 3:
-				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER);
-				break;
-			case 4:
-				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING);
-				break;
-			case 5:
-				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON);
-				break;
-			default:
-				ret = "0";
-				break;
-		}
-
-		//return Integer.parseInt(ret);
-		return ret;
-	}
-
-
-	/**
-	 * @description
-	 * 원격검침 목표량 에너지 별로 설정하는 함수     *
-	 * @return boolean true or false
-	 * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
-	 * @param Value 에너지 목표량 값
-	 */
-	public boolean SetRemoteMeteringTargetValue(int Index, String Value)
-	{
-		boolean ret = false;
-
-
-		if((Index < 0) || (Index > 5))
-		{
-			return false;
-		}
-
-		switch(Index)
-		{
-			case 0:
-				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT, Value);
-				break;
-			case 1:
-				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_WATER, Value);
-				break;
-			case 2:
-				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_GAS, Value);
-				break;
-			case 3:
-				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER, Value);
-				break;
-			case 4:
-				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING, Value);
-				break;
-			case 5:
-				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON, Value);
-				break;
-			default:
-				return ret;
-		}
-
-		return ret;
-	}
-
-
-
-	/**
-	 * @description
-	 * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능     *
-	 * @return boolean true(말일 사용) or false(검침일 사용)
-	 */
-	public boolean GetRemoteMetering_BaseDateType()
-	{
-		boolean ret = false;
-		String tempString = GetWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE);
-		if(tempString.equalsIgnoreCase("false") == true)
-		{
-			ret = false;
-		}
-		else if(tempString.equalsIgnoreCase("true") == true)
-		{
-			ret = true;
-		}
-		else
-		{
-			ret = false;
-		}
-		return ret;
-	}
-
-	/**
-	 * @description
-	 * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능     *
-	 * @return boolean true(정상 저장) or false(저장 실패)
-	 * @param input boolean true(말일 사용) or false(검침일 사용)
-	 */
-	public boolean SetRemoteMetering_BaseDateType(boolean input)
-	{
-		boolean ret = false;
-
-		if(input == true)
-		{
-			ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "true");
-		}
-		else
-		{
-			ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "false");
-		}
-		return ret;
-	}
-
-	/**
-	 * @description
-	 * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
-	 * @return boolean true(사용) or false(사용안함)
-	 */
-	public boolean GetRemoteMetering_Alarm()
-	{
-		boolean ret = false;
-		String tempString = GetWallPADData(REMOTE_METERING_ALARM_USE);
-		if(tempString.equalsIgnoreCase("false") == true)
-		{
-			ret = false;
-		}
-		else if(tempString.equalsIgnoreCase("true") == true)
-		{
-			ret = true;
-		}
-		else
-		{
-			ret = false;
-		}
-		return ret;
-	}
-
-	/**
-	 * @description
-	 * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
-	 * @return boolean true(정상 저장) or false(저장 실패)
-	 * @param input boolean true(사용) or false(사용안함)
-	 */
-	public boolean SetRemoteMetering_Alarm(boolean input)
-	{
-		boolean ret = false;
-
-		if(input == true)
-		{
-			ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "true");
-		}
-		else
-		{
-			ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "false");
-		}
-		return ret;
-	}
-
-	/**
-	 * @description
-	 * 에너지관리서버 연동 시 목표량대비 알림 시간 설정 가져오기
-	 * @return int Time (가져오기 실패 시 기본 값 삽입 후, 12시 리턴)
-	 */
-	public int GetRemoteMetering_AlarmTime()
-	{
-		int retTime = 12;
-		String tempString = GetWallPADData(REMOTE_METERING_ALARM_TIME);
-
-		if(tempString == null)
-		{
-			Log.d(TAG, "insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, default");
-			insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, WallpadStatusData.REMOTE_METERING_ALARM_TIME_DEFAULT);
-		}
-
-		try
-		{
-			retTime = Integer.parseInt(tempString);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 12;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 12;
-		}
-
-		return retTime;
-	}
-
-	/**
-	 * @description
-	 * 에너지관리서버 연동 시 목표량대비 알림 시간 설정
-	 * @return boolean true(정상 저장) or false(저장 실패)
-	 * @param inputTime integer
-	 */
-	public boolean SetRemoteMetering_AlarmTime(int inputTime)
-	{
-		boolean ret = false;
-		String tempString = "12";
-
-		try
-		{
-			tempString = String.valueOf(inputTime);
-			ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, tempString);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
-		}
-
-		return ret;
-	}
-
-	/**
-	 * @description
-	 * 통화 음량 및 카메라 밝기/대비 설정값 가져오기
-	 * @return int형 사용자가 설정한 통화 음량값 및 카메라 밝기/대비값. 만약 잘못된 input값일 경우 -999 리턴
-	 * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
-	 *  public static final int      INDEX_CALL_DOORCAM_SOUND      = 0;<br>
-	public static final int      INDEX_CALL_LOBBY_SOUND        = 1;<br>
-	public static final int      INDEX_CALL_GUARD_SOUND        = 2;<br>
-	public static final int      INDEX_CALL_NEIGHBOR_SOUND     = 3;<br>
-	public static final int      INDEX_CALL_PSTN_SOUND         = 4;<br>
-	public static final int      INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
-	public static final int      INDEX_CALL_DOORCAM_CONTRAST   = 6;<br>
-	 */
-	public int GetCallSound_DoorCamValue(int Index)
-	{
-		String ret = null;
-		int returnValue = -999;
-
-		if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
-		{
-			Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
-			return returnValue;
-		}
-
-		switch (Index)
-		{
-			case 0:
-				ret = GetWallPADData(CALL_DOORCAM_SOUND_VALUE);
-				break;
-			case 1:
-				ret = GetWallPADData(CALL_LOBBY_SOUND_VALUE);
-				break;
-			case 2:
-				ret = GetWallPADData(CALL_GUARD_SOUND_VALUE);
-				break;
-			case 3:
-				ret = GetWallPADData(CALL_NEIGHBOR_SOUND_VALUE);
-				break;
-			case 4:
-				ret = GetWallPADData(CALL_PSTN_SOUND_VALUE);
-				break;
-			case 5:
-				ret = GetWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE);
-				break;
-			case 6:
-				ret = GetWallPADData(CALL_DOORCAM_CONTRAST_VALUE);
-				break;
-			default:
-				Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
-				return returnValue;
-		}
-
-		try
-		{
-			returnValue = Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return returnValue;
-		}
-		catch (Exception e)
-		{
-			Log.w(TAG, "[DB] GetCallSound_DoorCamValue: ParseInt Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return returnValue;
-		}
-
-		return returnValue;
-	}
-	/**
-	 * @description
-	 * 통화 음량 및 카메라 밝기/대비 설정값 설정하기
-	 * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
-	 *  public static final int      INDEX_CALL_DOORCAM_SOUND      = 0;<br>
-	public static final int      INDEX_CALL_LOBBY_SOUND        = 1;<br>
-	public static final int      INDEX_CALL_GUARD_SOUND        = 2;<br>
-	public static final int      INDEX_CALL_NEIGHBOR_SOUND     = 3;<br>
-	public static final int      INDEX_CALL_PSTN_SOUND         = 4;<br>
-	public static final int      INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
-	public static final int      INDEX_CALL_DOORCAM_CONTRAST   = 6;<br>
-	 * @param InputValue 설정값 0~10 범위
-	 * @return true(설정 성공) or false(설정 실패)
-	 */
-	public boolean SetCallSound_DoorCamValue(int Index, int InputValue)
-	{
-		boolean ret = false;
-		String TempValue = null;
-
-		if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
-		{
-			Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
-			return ret;
-		}
-		if ((InputValue < 0) || (InputValue > 10))
-		{
-			Log.w(TAG, "[DB] SetCallSound_DoorCamValue: InputValue is Wrong: " + InputValue);
-			return ret;
-		}
-
-		try
-		{
-			TempValue = String.valueOf(InputValue);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return ret;
-		}
-		catch (Exception e)
-		{
-			Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Parse Int to String Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return ret;
-		}
-
-		switch(Index)
-		{
-			case 0:
-				ret = UpdateWallPADData(CALL_DOORCAM_SOUND_VALUE, TempValue);
-				break;
-			case 1:
-				ret = UpdateWallPADData(CALL_LOBBY_SOUND_VALUE, TempValue);
-				break;
-			case 2:
-				ret = UpdateWallPADData(CALL_GUARD_SOUND_VALUE, TempValue);
-				break;
-			case 3:
-				ret = UpdateWallPADData(CALL_NEIGHBOR_SOUND_VALUE, TempValue);
-				break;
-			case 4:
-				ret = UpdateWallPADData(CALL_PSTN_SOUND_VALUE, TempValue);
-				break;
-			case 5:
-				ret = UpdateWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE, TempValue);
-				break;
-			case 6:
-				ret = UpdateWallPADData(CALL_DOORCAM_CONTRAST_VALUE, TempValue);
-				break;
-			default:
-				Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
-				return ret;
-		}
-
-		return ret;
-	}
-
-	/****/
-	/**
-	 * @description
-	 * 엘리베이터 위젯 복구 기능 사용여부 가져옴 (1번 사용하였으면 무조건 true로 설정됨)
-	 * @return boolean true(이미 사용하였으몰 실행하면 안됨) or false(사용하지 않았으므로 복구기능 사용해도 됨)
-	 */
-	public boolean GetElevator_Widget_Restore()
-	{
-		boolean ret = true;
-		String tempString = GetWallPADData(ELEVATOR_WIDGET_RESTORE);
-		if(tempString.equalsIgnoreCase("false") == true)
-		{
-			ret = false;
-		}
-		else if(tempString.equalsIgnoreCase("true") == true)
-		{
-			ret = true;
-		}
-		else
-		{
-			ret = true;
-		}
-		return ret;
-	}
-
-	/****/
-	/**
-	 * @description
-	 * 엘리베이터 위젯 복구 기능 사용여부 설정함 (true로 설정 가능)
-	 * @input boolean true(1번 설정 사용함)
-	 * @return boolean 성공여부(true면 성공 false면 실패)
-	 */
-	public boolean SetElevator_Widget_Restore(boolean input)
-	{
-		boolean result = true;
-		if(input == true)
-		{
-			result = UpdateWallPADData(ELEVATOR_WIDGET_RESTORE, "true");
-		}
-		return result;
-	}
-
-
-	public void SetSubMenuType(int type)
-	{
-		if (RangeCheck(SUBMENUTYPETEXT, type)==false) return;
-		UpdateWallPADData(SUBMENU_TYPE, SUBMENUTYPETEXT[type]);
-	}
-
-	public int GetSubMenuType()
-	{
-		try {
-			String ret = GetWallPADData(SUBMENU_TYPE);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-
-	private boolean RangeCheck(String[] data, int idx)
-	{
-		if (idx < 0 || idx >= data.length)
-			return false;
-
-		return true;
-	}
-
-	public void SetMainBGSlidShowTime(int timeout)
-	{
-		UpdateWallPADData(MAINBGSLIDSHOWTIME, String.valueOf(timeout));
-	}
-
-	public int GetMainBGSlidShowTime()
-	{
-		try {
-			String ret = GetWallPADData(MAINBGSLIDSHOWTIME);
-			return Integer.parseInt(ret);
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return 0;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return 0;
-		}
-	}
-
-	public static class WeatherItem
-	{
-		public int    seqnum;
-		public String date;
-		public String state;
-		public String code;
-		public String low;
-		public String high;
-		public String am;
-		public String pm;
-	}
-
-	public class WeatherTable
-	{
-		List<WeatherItem> WeatherData = new ArrayList<WeatherItem>();
-		public WeatherTable()
-		{
-			if (!CheckTableExist(MainWeatherTBL))
-				CreateTable(CreateMainWeatherDB);
-		}
-		public void InitWeatherTable()
-		{
-			if (!CheckTableExist(MainWeatherTBL))
-				CreateTable(CreateMainWeatherDB);
-			else
-				DeleteTableInst(MainWeatherTBL);
-			WeatherData.clear();
-		}
-		public void AddWeatherData(String date, String state , String  code, String low, String high, String am, String pm)
-		{
-			ContentValues values = new ContentValues();
-
-			values.put("date", date);
-			values.put("state", state);
-			values.put("code", code);
-			values.put("low", low);
-			values.put("high", high);
-			values.put("am", am);
-			values.put("pm", pm);
-			wdb.insert(MainWeatherTBL, null, values);
-		}
-
-		public List<WeatherItem> GetWeatherList()
-		{
-			if (WeatherData == null || WeatherData.size() == 0)
-				return GetWeatherData();
-
-			return WeatherData;
-		}
-
-		public List<WeatherItem> GetWeatherData()
-		{
-			Cursor cursor = wdb.rawQuery("select date, state, code, low, high, am, pm from "+MainWeatherTBL+" order by seqnum asc;", null);
-
-			while (cursor.moveToNext())
-			{
-				WeatherItem item = new WeatherItem();
-				item.date = cursor.getString(0);
-				item.state = cursor.getString(1);
-				item.code = cursor.getString(2);
-				item.low = cursor.getString(3);
-				item.high = cursor.getString(4);
-				item.am = cursor.getString(5);
-				item.pm = cursor.getString(6);
-				if(WeatherData!=null)
-					WeatherData.add(item);
-			}
-			cursor.close();
-			return WeatherData;
-		}
-	}
-	WeatherTable WeatherCtr;
-	public WeatherTable GetWeatherTableController()
-	{
-		if (WeatherCtr == null)
-			WeatherCtr = new WeatherTable();
-		return WeatherCtr;
-	}
-
-	public static class WidgetItem
-	{
-		public int    seqnum;
-		public int    idx; // 0~ 14
-		public int 	  widgetID; // Main Source ID.java WidgetID
-	}
-
-	public class WidgetTable
-	{
-		List<WidgetItem> WidgetData = new ArrayList<WidgetItem>();
-		public WidgetTable()
-		{
-			if (!CheckTableExist(WidgetTBL))
-			{
-				CreateTable(CreateWidgetDB);
-			}
-		}
-		public boolean AddWidgetData(int idx, int widgetId )
-		{
-			try
-			{
-				ContentValues values = new ContentValues();
-				values.put("id", idx );
-				values.put("widgetid", widgetId);
-				wdb.insert(WidgetTBL, null, values);
-				return true;
-			} catch (SQLException e)
-			{
-				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-				return false;
-			}
-		}
-		public boolean DeleteWidgetData( int id )
-		{
-			String sqlst = "delete from " + WidgetTBL + " where id= " + String.valueOf(id) + ";";
-			try {
-				wdb.execSQL(sqlst);
-				return true;
-			} catch (SQLException e)
-			{
-				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-				return false;
-			}
-		}
-		public boolean DeleteWidgetDataID( int widgetid )
-		{
-			String sqlst = "delete from " + WidgetTBL + " where widgetid= " + String.valueOf(widgetid) + ";";
-			try {
-				wdb.execSQL(sqlst);
-				return true;
-			} catch (SQLException e)
-			{
-				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-				return false;
-			}
-		}
-		public List<WidgetItem> GetWidgetData()
-		{
-			try
-			{
-				Cursor cursor = wdb.rawQuery("select id, widgetid from "+WidgetTBL+" order by seqnum asc;", null);
-				WidgetData.clear();
-				while (cursor.moveToNext())
-				{
-					WidgetItem item = new WidgetItem();
-					item.idx = cursor.getInt(0);
-					item.widgetID = cursor.getInt(1);
-					WidgetData.add(item);
-				}
-				cursor.close();
-			}
-			catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-				return null;
-			}
-			catch (Exception e)
-			{
-				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-				return null;
-			}
-			return WidgetData;
-
-		}
-
-	}
-
-	WidgetTable WidgetCtr;
-	public WidgetTable GetWidgetTableController()
-	{
-		if (WidgetCtr == null)
-			WidgetCtr = new WidgetTable();
-		return WidgetCtr;
-	}
-
-	public int GetWallPadRebootingCount() {
-		String strRet = GetWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT);
-		if (strRet == null) {
-			Log.d(TAG, "[GetWallPadRebootingCount] strRet is null !!");
-			insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
-			return 0;
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetWallPadRebootingCount");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetWallPadRebootingCount(int count) {
-		boolean bRet = UpdateWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT, String.valueOf(count));
-		if (bRet == false) {
-			Log.d(TAG, "[SetWallPadRebootingCount] UpdateWallPADData false !!");
-			insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
-		}
-	}
-
-	/**
-	 * 스마트 분전반 비상 상태 설정하기
-	 * @param normal - true면 정상, false면 비정상
-	 * @return boolean - true면 정상, false면 오류
-	 * **/
-	public boolean SetSmartLightAlarm(boolean normal)
-	{
-		boolean bRet;
-		if(normal)
-		{
-			bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "normal");
-		}
-		else
-		{
-			bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "alarm");
-		}
-		return bRet;
-	}
-
-	/**
-	 * 스마트 분전반 비상 상태 가져오기
-	 * @return "normal"이면 정상, "alarm"이면 비상상태
-	 * **/
-	public String GetSmartLightAlarm()
-	{
-		try {
-			String ret = GetWallPADData(DEV_SMARTLIGHT_STATUS);
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return null;
-		}
-	}
-
-	/**
-	 * 스마트 분전반 비상 상태 설정하기
-	 * @param Device - Device정보
-	 * **/
-	public boolean SetSmartLightAlarmDevice(String Device)
-	{
-		return UpdateWallPADData(DEV_SMARTLIGHT_DEVICE, Device);
-	}
-
-	/**
-	 * 스마트 분전반 비상 디바이스 정보 가져오기
-	 * @return null/led_converter/em/led_light/power_controller/concent/dc_apu/energy_controller
-	 * **/
-	public String GetSmartLightAlarmDevice()
-	{
-		try {
-			String ret = GetWallPADData(DEV_SMARTLIGHT_DEVICE);
-			return ret;
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e)
-		{
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return null;
-		}
-	}
-
-	public boolean SetKNXAlarmStatus(boolean normal) {
-		boolean bRet;
-		if (normal) {
-			bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "normal");
-		} else {
-			bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "alarm");
-		}
-		return bRet;
-	}
-
-	public String GetKNXAlarmStatus(int devIndex) {
-		try {
-			String ret = GetWallPADData(DEV_KNXDEVICE_STATUS);
-			return ret;
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e) {
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return null;
-		}
-	}
-
-	public boolean SetKNXAlarmCause(String cause) {
-		return UpdateWallPADData(DEV_KNXDEVICE_CAUSE, cause);
-	}
-
-	public String GetKNXAlarmCause(int devIndex) {
-		try {
-			String ret = GetWallPADData(DEV_KNXDEVICE_CAUSE);
-			return ret;
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return null;
-		}
-		catch (Exception e) {
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return null;
-		}
-	}
-
-	/**
-	 * 메인월패드 난방 방 개수 가져오기
-	 * @return
-	 */
-	public int GetHeatingRoomNum() {
-		String strRet = GetWallPADData(DB_WALLPAD_HEATING_ROOM_NUM);
-		if (strRet == null) {
-			Log.d(TAG, "[GetHeatingRoomNum] strRet is null !!");
-			insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
-			return 0;
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetHeatingRoomNum()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	/**
-	 * 난방 방개수 설정하기
-	 * @param nValue
-	 */
-	public void setHeatingRoomNum(int nValue) {
-		boolean bRet = UpdateWallPADData(DB_WALLPAD_HEATING_ROOM_NUM, String.valueOf(nValue));
-		if (bRet == false) {
-			Log.d(TAG, "[setHeatingRoomNum] UpdateWallPADData false !!");
-			insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
-		}
-	}
-
-	/**
-	 * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
-	 *
-	 * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
-	 */
-	public boolean GetStrangerRecordingOnOff()
-	{
-		try
-		{
-			String strRet = GetWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF);
-			Log.d(TAG, "[GetStrangerRecordingOnOff] strRet [" + strRet + "]");
-			if (strRet == null) {
-				Log.d(TAG, "[GetStrangerRecordingOnOff] strRet is null !!");
-				insertWallPADDB(SMARTIOT_RECORDING_STRANGER_ONOFF, SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT);
-			}
-
-			try {
-				if (Boolean.parseBoolean(strRet)) {
-					return true;
-				} else {
-					return false;
-				}
-			} catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[Exception] GetStrangerRecordingOnOff()");
-				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			}
-			return true;
-
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			Log.e(TAG, "[GetStrangerRecordingOnOff] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 스마트현관카메라 거동수상자 사진촬영 설정
-	 *
-	 * @param bSet - (boolean) 설정할 값 (true: 촬영 ON , false: 촬영 OFF)
-	 */
-	public void SetStrangerTakePicOnOff(boolean bSet)
-	{
-		try
-		{
-			UpdateWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, String.valueOf(bSet));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			Log.e(TAG, "[StrangerTakePicOnOff] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
-	 *
-	 * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
-	 */
-	public boolean GetStrangerTakePicOnOff()
-	{
-		try
-		{
-			String strRet = GetWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF);
-			Log.d(TAG, "[GetStrangerTakePicOnOff] strRet [" + strRet + "]");
-			if (strRet == null) {
-				Log.d(TAG, "[GetStrangerTakePicOnOff] strRet is null !!");
-				insertWallPADDB(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT);
-			}
-
-			try {
-				if (Boolean.parseBoolean(strRet)) {
-					return true;
-				} else {
-					return false;
-				}
-			} catch (RuntimeException re) {
-				LogUtil.errorLogInfo("", TAG, re);
-			}
-			catch (Exception e) {
-				Log.e(TAG, "[Exception] GetStrangerTakePicOnOff()");
-				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			}
-			return true;
-
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e )
-		{
-			Log.e(TAG, "[GetStrangerTakePicOnOff] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-			return false;
-		}
-	}
-
-	/**
-	 * 스마트현관카메라 거동수상자 녹화 설정
-	 *
-	 * @param bSet - (boolean) 설정할 값 (true: 녹화 ON , false: 녹화 OFF)
-	 */
-	public void SetStrangerRecordingOnOff(boolean bSet)
-	{
-		try
-		{
-			UpdateWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF, String.valueOf(bSet));
-		}
-		catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e)
-		{
-			Log.e(TAG, "[SetStrangerRecordingOnOff] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * @description
-	 * 스마트현관카메라 거동수상자 녹화 영상 밝기 설정값 가져오기
-	 * @return int형 사용자가 설정한 영상 밝기값
-	 */
-	public int GetSmartDoorCamBrightness() {
-		String strRet = GetWallPADData(SMARTIOT_CAM_BRIGHTNESS);
-		if (strRet == null) {
-			Log.d(TAG, "[GetSmartDoorCamBrightness] strRet is null !!");
-			insertWallPADDB(SMARTIOT_CAM_BRIGHTNESS, SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT);
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetSmartDoorCamBrightness()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetSmartDoorCamBrightness(int brightness)
-	{
-		UpdateWallPADData(SMARTIOT_CAM_BRIGHTNESS, String.valueOf(brightness));
-	}
-
-	/**
-	 * @description
-	 * 스마트현관카메라 거동수상자 영상 녹화 시간 설정값 가져오기
-	 * @return int형 사용자가 설정한 영상 녹화 시간(초 단위)
-	 */
-	public int GetSmartDoorCamRecordTime() {
-		String strRet = GetWallPADData(SMARTIOT_RECORD_TIME);
-		if (strRet == null) {
-			Log.d(TAG, "[GetSmartDoorCamRecordTime] strRet is null !!");
-			insertWallPADDB(SMARTIOT_RECORD_TIME, SMARTIOT_RECORD_TIME_VALUE_DEFAULT);
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetSmartDoorCamRecordTime()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetSmartDoorCamRecordTime(int time)
-	{
-		UpdateWallPADData(SMARTIOT_RECORD_TIME, String.valueOf(time));
-	}
-
-	/**
-	 * @description
-	 * 스마트현관카메라 센서 민감도 설정값 가져오기
-	 * @return int형 사용자가 설정한 센서 민감도
-	 */
-	public int GetSmartDoorCamSensorSensitivity() {
-		String strRet = GetWallPADData(SMARTIOT_SENSOR_SENSITIVITY);
-		if (strRet == null) {
-			Log.d(TAG, "[GetSmartDoorCamSensorSensitivity] strRet is null !!");
-			insertWallPADDB(SMARTIOT_SENSOR_SENSITIVITY, SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT);
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetSmartDoorCamSensorSensitivity()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetSmartDoorSensorSensitivity(int sensitivity) {
-		UpdateWallPADData(SMARTIOT_SENSOR_SENSITIVITY, String.valueOf(sensitivity));
-	}
-
-	/**
-	 * @description
-	 * 스마트현관카메라 사진촬영 주기설정값 가져오기
-	 * @return int형 사용자가 설정한 사진촬영 주기
-	 */
-	public int GetSmartDoorCamSensorPeriod() {
-		String strRet = GetWallPADData(SMARTIOT_SENSOR_PERIOD);
-		if (strRet == null) {
-			Log.d(TAG, "[GetSmartDoorCamSensorPeriod] strRet is null !!");
-			insertWallPADDB(SMARTIOT_SENSOR_PERIOD, SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT);
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetSmartDoorCamSensorPeriod()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetSmartDoorSensorPeriod(int period) {
-		UpdateWallPADData(SMARTIOT_SENSOR_PERIOD, String.valueOf(period));
-	}
-
-	/**
-	 * @description
-	 * 스마트현관카메라 센서 감도 유지시간 설정값 가져오기
-	 * @return int형 사용자가 설정한 센서 감도 유지시간
-	 */
-	public int GetSmartDoorCamSensorDuration() {
-		String strRet = GetWallPADData(SMARTIOT_SENSOR_DURATION);
-		if (strRet == null) {
-			Log.d(TAG, "[GetSmartDoorCamSensorDuration] strRet is null !!");
-			insertWallPADDB(SMARTIOT_SENSOR_DURATION, SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT);
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetSmartDoorCamSensorDuration()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetSmartDoorSensorDuration(int duration) {
-		UpdateWallPADData(SMARTIOT_SENSOR_DURATION, String.valueOf(duration));
-	}
-
-	public String GetReliefCallDegree() {
-		String strRet = GetWallPADData(RELIEFCALL_DEGREE);
-		if (strRet == null) {
-			Log.d(TAG, "[GetReliefCallDegree] strRet is null !!");
-			this.insertWallPADDB(RELIEFCALL_DEGREE, RELIEFCALL_DEGREE_DEFAULT_VALUE);
-		}
-
-		String ret = "";
-		try {
-			ret = strRet;
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetReliefCallDegree()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetReliefCallDegree(String degree)
-	{
-		UpdateWallPADData(RELIEFCALL_DEGREE, degree);
-	}
-
-	public boolean GetRemoteCallRegistration() {
-		String strRet = GetWallPADData(REMOTECALL_REGISTRATION);
-		if (strRet == null) {
-			Log.d(TAG, "[GetRemoteCallRegistration] strRet is null !!");
-			this.insertWallPADDB(REMOTECALL_REGISTRATION, REMOTECALL_REGISTRATION_DEFAULT_VALUE);
-		}
-
-		boolean ret = false;
-		try {
-			ret = Boolean.valueOf(strRet).booleanValue();
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetRemoteCallRegistration()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetRemoteCallRegistration(boolean bRegister)
-	{
-		UpdateWallPADData(REMOTECALL_REGISTRATION, String.valueOf(bRegister));
-	}
-
-	public int GetRemoteCallUserCnt() {
-		String strRet = GetWallPADData(REMOTECALL_USERCNT);
-		if (strRet == null) {
-			Log.d(TAG, "[GetRemoteCallUserCnt] strRet is null !!");
-			this.insertWallPADDB(REMOTECALL_USERCNT, REMOTECALL_USERCNT_DEFAULT_VALUE);
-		}
-
-		int ret = 0;
-		try {
-			ret = Integer.parseInt(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetRemoteCallUserCnt()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return ret;
-	}
-
-	public void SetRemoteCallUserCnt(int cnt)
-	{
-		UpdateWallPADData(REMOTECALL_USERCNT, String.valueOf(cnt));
-	}
-
-	/**
-	 * 간편모드UX 설정 여부
-	 *
-	 * @return (boolean) 설정값 (true: 설정 ON , false: 설정 OFF)
-	 */
-	public boolean GetEasyModeUxUse()
-	{
-		try {
-			String strRet = GetWallPADData(EASYMODE_UX_USE);
-			Log.d(TAG, "[GetEasyModeUxUse] strRet [" + strRet + "]");
-			if (strRet == null) {
-				Log.d(TAG, "[GetEasyModeUxUse] strRet is null !!");
-				insertWallPADDB(EASYMODE_UX_USE, EASYMODE_UX_USE_DEFAULT);
-			}
-
-			if (Boolean.parseBoolean(strRet)) {
-				return true;
-			}
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[GetEasyModeUxUse] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return false;
-	}
-
-	/**
-	 * 간편모드UX 설정 (사용자용)
-	 *
-	 * @param bUse - (boolean) 설정할 값 (true: 설정 ON , false: 설정 OFF)
-	 */
-	public void SetEasyModeUxUse(boolean bUse) {
-		try {
-			UpdateWallPADData(EASYMODE_UX_USE, String.valueOf(bUse));
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[SetEasyModeUxUse] Exception Error");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-	}
-
-	/**
-	 * @description
-	 * 카메라 인코딩 에러 설정
-	 * @return 인코딩 에러일 경우 true
-	 */
-	public boolean GetCameraEncodingError() {
-		String strRet = GetWallPADData(CAMERA_ENCODING_ERROR);
-		if (strRet == null) {
-			Log.d(TAG, "[GetCameraEncodingError] strRet is null !!");
-			insertWallPADDB(CAMERA_ENCODING_ERROR, CAMERA_ENCODING_ERROR_DEFAULT);
-		}
-
-		boolean result = false;
-		try {
-			result = Boolean.valueOf(strRet);
-		} catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-			Log.e(TAG, "[Exception] GetCameraEncodingError()");
-			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
-		}
-		return result;
-	}
-
-	public void SetCameraEncodingError(boolean bError)
-	{
-		UpdateWallPADData(CAMERA_ENCODING_ERROR, String.valueOf(bError));
-	}
-}
+package com.artncore.WallPadDataMgr;
+
+import android.content.ComponentName;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.database.Cursor;
+import android.database.SQLException;
+import android.util.Log;
+
+import com.artncore.commons.APIErrorCode;
+import com.artncore.commons.define;
+import com.artncore.wallpadimap.WallPadiMAPNotifyAPI;
+import com.util.LogUtil;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.List;
+
+
+public class WallpadStatusData extends wallpaddbmgr {
+
+	public static final String   TAG             = "WallpadStatusData";
+
+	public static final String   ALARM_STATUS    = "ALARM_STATUS";
+	/** 평상시 */
+	public static final int      ALARM_NONE      = 0;
+	/** 알람발생 */
+	public static final int      ALARM_ARISE     = 1;
+	/** 알람정지 */
+	public static final int      ALARM_STOP      = 2;
+	/** 외출방범모드 */
+	public static final int      GUARD_OUT       = 3;
+	/** 재택방범 */
+	public static final int      GUARD_IN        = 4;
+	/** 외출방범모드 대기중 (설정진행중) */
+	public static final int      GUARD_OUT_WAIT  = 5;
+	/** 그냥 외출모드 - 대외향 스마트 스위치 연동 및 LH향  */
+	public static final int 	OUT_MODE		= 6;
+	/** 취침방범 모드 - LH향 */
+	public static final int 	GUARD_BED		= 7;
+	/** 그냥 취침모드 - LH향 */
+	public static final int 	BED_MODE		= 8;
+
+	public static final String[] ALARMTEXT  = {String.valueOf(ALARM_NONE),String.valueOf(ALARM_ARISE), String.valueOf(ALARM_STOP),String.valueOf(GUARD_OUT),String.valueOf(GUARD_IN),String.valueOf(GUARD_OUT_WAIT),String.valueOf(OUT_MODE),String.valueOf(GUARD_BED),String.valueOf(BED_MODE)};
+
+	public static final String   ALARM_TYPE      ="ALARM_TYPE";
+	public static final int      ALARM_EMM       = 1;
+	public static final int      ALARM_ALERT     = 2;
+	public static final int      ALARM_INVADE    = 3;
+	public static final int      ALARM_EVAC      = 4;
+	public static final int      ALARM_HEATING_LEAK = 5;
+	public static final String[] ALARMTYPETEXT  = {String.valueOf(ALARM_NONE), String.valueOf(ALARM_EMM),String.valueOf(ALARM_ALERT),String.valueOf(ALARM_INVADE),String.valueOf(ALARM_EVAC),String.valueOf(ALARM_HEATING_LEAK)};
+
+	public static final String   MORNINGCALL_STATUS    = "MCALL_STATUS";
+	public static final int      MORNINGCALL_OFF       = 0;
+	public static final int      MORNINGCALL_ON        = 1;
+	public static final String[] MORNINGCALLTEXT       = {String.valueOf(MORNINGCALL_OFF),String.valueOf(MORNINGCALL_ON)};
+
+	public static final String   MANAGER_PW          = "MANAGER_PW";
+	public static final String   MANAGER_PW_DEFAULT  = "55554444";
+
+	public static final String   USER_PW             = "USER_PW";
+	public static final String   USER_PW_DEFAULT     = "0000";
+
+	public static final String   WEB_CTR_PW             = "WEB_CTR_PW";
+	public static final String   WEB_CTR_PW_DEFAULT     = "000000";
+
+	public static final String   SUBMENU_TYPE      = "SUBMENU_TYPE";
+	public static final int      SUBMENU_TYPE1     = 0;
+	public static final int      SUBMENU_TYPE2     = 1;
+	public static final String[] SUBMENUTYPETEXT   = {String.valueOf(SUBMENU_TYPE1),String.valueOf(SUBMENU_TYPE2)};
+
+	public static final String PSTN_STATUS       = "PSTN_STATUS";
+	public static final int    PSTN_NOINIT       = 0;
+	public static final int    PSTN_INITSTART    = 1;
+	public static final int    PSTN_INITCMD      = 2;
+	public static final int    PSTN_INITDATA     = 3;
+	public static final int    PSTN_INITCCODE    = 4;
+	public static final int    PSTN_INITCIDSET   = 5;
+	public static final int    PSTN_VMODESET     = 6;
+	public static final int    PSTN_DTMFSET      = 7;
+	public static final int    PSTN_VRA          = 8;
+	public static final int    PSTN_VRN          = 9;
+	public static final int    PSTN_INITOK       = 10;
+	public static final String[] PSTN_STATUSTEXT = {String.valueOf(PSTN_NOINIT),String.valueOf(PSTN_INITSTART), String.valueOf(PSTN_INITCMD), String.valueOf(PSTN_INITDATA), String.valueOf(PSTN_INITCCODE),String.valueOf(PSTN_INITCIDSET),String.valueOf(PSTN_VMODESET),String.valueOf(PSTN_DTMFSET),String.valueOf(PSTN_VRA),String.valueOf(PSTN_VRN),String.valueOf(PSTN_INITOK)};
+
+	public static final String   DEV_STATUS         = "DEV_STATUS";
+	public static final int      DEV_NORMAL         = 0;
+	public static final int      DEV_BSPUPDATE      = 1;
+	public static final int      DEV_APPUPDATE      = 2;
+	public static final int      DEV_INIT           = 3;
+	public static final String[] DEV_STATUSTEXT = {String.valueOf(DEV_NORMAL),String.valueOf(DEV_BSPUPDATE),String.valueOf(DEV_APPUPDATE),String.valueOf(DEV_INIT)};
+
+	public static final String SERVER_IP                   = "SERVER_IP";
+	public static final String SERVER_IP_DEFAULT           = "10.0.1.1:10000";
+
+	public static final String GW_IP                       = "GWIP";
+	public static final String GW_IP_DEFAULT               = "10.0.1.1";
+
+	public static final String SUBNET                      = "SUBNET";
+	public static final String SUBNET_DEFAULT              = "255.255.0.0";
+
+	public static final String MANAGEPC_IP                 = "MANAGEPC_IP";
+	public static final String MANAGEPC_IP_DEFAULT         = "10.0.1.10:10000";
+
+	public static final String FTP_IP                      = "FTP_IP";
+	public static final String FTP_IP_DEFAULT              = "10.0.1.1";
+
+	public static final String APP_VER                     = "APP_VER";
+	public static final String APP_VER_DEFAULT             = "2014.00.00.00";
+
+	public static final String NOTICE_VER                  = "NOTICE_VER";
+	public static final String NOTICE_VER_DEFAULT          = "2014.00.00.00";
+
+	public static final String WEATHER_VER                 = "WEATHER_VER";
+	public static final String WEATHER_VER_DEFAULT         = "2014.00.00.00";
+
+	public static final String WEATHER_CODE				   = "WEATHER_CODE";
+	public static final String CODE_DEFAULT                = "1";
+
+	public static final String SETTING_VER                 = "SETTING_VER";
+	public static final String SETTING_VER_DEFAULT         = "2014.00.00.00";
+
+	public static final String SERVER_VERSION			   = "SERVER_VERSION";
+	public static final String SERVER_VERSION_DEFAULT	   = "1.0";
+
+	public static final String DEV_LIGHT_CNT               = "LIGHT_CNT";
+	public static final String LIGHTCNT_DEFAULT            = "6";
+
+	public static final String DEV_GAS_CNT                 = "GAS_CNT";
+	public static final String GASCNT_DEFAULT              = "0";
+
+	public static final String DOORCALLTIMEOUT             = "DOORCALLTIMEOUT";
+	public static final String DOORCALLTIMEOUT_DEFAULT     = "30";
+
+	public static final String DOORCONNECTTIMEOUT          = "DOORCONNECTTIMEOUT";
+	public static final String DOORCONNECTTIMEOUT_DEFAULT  = "60";
+
+	public static final String DEV_HEATING_CNT             = "HEATING_CNT";
+	public static final String HEATINGCNT_DEFAULT          = "0";
+
+	public static final String HEARTBEAT_PERIOD            = "HEARTBEAT_PERIOD";
+	public static final String HEARTBEATPERIOD_DEFAULT     = "30";
+
+	public static final String LAST_HEARTBEAT              = "LAST_HEARTBEAT";
+	public static final String LAST_HEARTBEAT_DEFAULT      = "2014.00.00.00.00.00";
+
+	public static final String SET_SYSTEMTIME              = "SET_SYSTEMTIME";
+	public static final String SET_SYSTEMTIME_DEFAULT      = "0";
+
+	public static final String NEWS_CNT 				   = "NEWS_CNT";
+	public static final String NEWS_CNT_DEFAULT 		   = "0";
+
+	public static final String   MAINBGTYPE      = "MAINBGTYPE";
+	public static final int      MAINBG_DEFAULT  = 0;
+	public static final int      MAINBG_USER     = 1;
+	public static final int      MAINBG_WEATHER  = 2;
+	public static final String[] MAINBGTYPE_TEXT = {String.valueOf(MAINBG_DEFAULT),String.valueOf(MAINBG_USER),String.valueOf(MAINBG_WEATHER)};
+
+	public static final String MAINBGSLIDSHOWTIME              = "MAINBGSLIDSHOWTIME";
+	public static final String MAINBGSLIDSHOWTIMEDEFAULT       = "60";
+
+	public static final String   GUARD_ADDRESS         = "GUARDADDR";
+	public static final String   LOBBY_ADDRESS         = "LOBBYADDR";
+
+	public static final String   MORNINGCALL_TYPE      = "MORNINGCALL_TYPE";
+	public static final int      MORNINGCALL_ONCE     = 0;   //한번만
+	public static final int      MORNINGCALL_WORKDAY  = 1;   //월~금
+	public static final int      MORNINGCALL_EWORKDAY = 2;   //월~토
+	public static final int      MORNINGCALL_EVERYDAY = 3;   //매일
+	public static final String[] MORNINGCALLTYPETEXT   = {String.valueOf(MORNINGCALL_ONCE),String.valueOf(MORNINGCALL_WORKDAY),String.valueOf(MORNINGCALL_EWORKDAY),String.valueOf(MORNINGCALL_EVERYDAY)};
+
+	public static final String   MORNINGCALL_BELLTYPE      = "MORNINGCALL_BELLTYPE";
+	public static final int      MORNINGCALL_BELL_NONE     = 0;
+	public static final int      MORNINGCALL_BELL1 = 1;
+	public static final int      MORNINGCALL_BELL2 = 2;
+	public static final int      MORNINGCALL_BELL3 = 3;
+	public static final String[] MORNINGCALL_BELLTYPETEXT   = {String.valueOf(MORNINGCALL_BELL_NONE),String.valueOf(MORNINGCALL_BELL1),String.valueOf(MORNINGCALL_BELL2),String.valueOf(MORNINGCALL_BELL3)};
+
+	public static final String   MORNINGCALL_RESERVE = "MORNINGCALL_RESERVE";
+	public static final int	     MCALLR_LIGHT_ON     = 1;
+	public static final int	     MCALLR_VENTIL_ON    = 2;
+	public static final int      MCALLR_CURTAIN_OPEN = 4;
+	public static final int[]    MCCommandList = {MCALLR_LIGHT_ON, MCALLR_VENTIL_ON, MCALLR_CURTAIN_OPEN};
+	public static final String   MORNINGCALL_RESERVE_DEFAULT = "0";
+
+	public static final String   ARSONOFF = "ARSONOFF";
+	public static final int      ARSON   = 1;
+	public static final int      ARSOFF  = 0;
+	public static final String[] ARSONOFFTEXT   = {String.valueOf(ARSOFF),String.valueOf(ARSON)};
+
+	public static final int      INDEX_CALL_DOORCAM_SOUND      = 0;
+	public static final int      INDEX_CALL_LOBBY_SOUND        = 1;
+	public static final int      INDEX_CALL_GUARD_SOUND        = 2;
+	public static final int      INDEX_CALL_NEIGHBOR_SOUND     = 3;
+	public static final int      INDEX_CALL_PSTN_SOUND         = 4;
+	public static final int      INDEX_CALL_DOORCAM_BRIGHTNESS = 5;
+	public static final int      INDEX_CALL_DOORCAM_CONTRAST   = 6;
+
+	public static final String DEV_SMARTLIGHT_STATUS                  = "SMARTLIGHTSTATUS";
+	public static final String SMARTLIGHT_STATUS_DEFAULT              = "normal";
+	public static final String DEV_SMARTLIGHT_DEVICE                  = "SMARTLIGHTDEVICE";
+	public static final String SMARTLIGHT_DEVICE_DEFAULT              = "null";
+
+	public static final String DEV_KNXDEVICE_STATUS					  = "KNXDEVICEALARMSTATUS";
+	public static final String KNXDEVICE_STATUS_DEFAULT				  = "normal";
+	public static final String DEV_KNXDEVICE_CAUSE					  = "KNXDEVICEALARMCAUSE";
+	public static final String KNXDEVICE_CAUSE_DEFAULT				  = "null";
+
+	public boolean GetARSOnoff()
+	{
+		try
+		{
+			int ret = Integer.parseInt(GetWallPADData(ARSONOFF));
+			return (ret==ARSON)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+	public void SetARSOnoff(boolean onoff)
+	{
+		UpdateWallPADData(ARSONOFF, ARSONOFFTEXT[onoff?ARSON:ARSOFF]);
+	}
+
+	public static final String   CARARRIVALSND = "CARARRIVALSND";
+	public static final int      CARARRIVALON   = 1;
+	public static final int      CARARRIVALOFF  = 0;
+	public static final String[] CARARRIVALSNDTEXT   = {String.valueOf(CARARRIVALOFF),String.valueOf(CARARRIVALON)};
+
+
+	// 대외향 485 스마트 스위치 연동 현장
+	public static final String   	GUARD_RELEASE_PW_INPUT = "GUARD_RELEASE_PW_INPUT";
+	// 외출 방범 설정
+	public static final String 		GUARD_SENSOR_CHECK = "GUARD_SENSOR_CHECK";
+	public static final String 		GUARD_BED_SENSOR_CHECK = "GUARD_BED_SENSOR_CHECK";
+	public static final int      ENALBLE   = 1;
+	public static final int      DISABEL   = 0;
+
+	// 대외향 485 스마트 스위치 연동 현장의 경우 비밀번호 입력없이 즉시 취소가 가능한 기능이 있음
+	// 방범 해제시 패스워드 사용여부 설정
+	public boolean GetUseGuardReleasePW()
+	{
+		try {
+
+			int ret = Integer.parseInt(GetWallPADData(GUARD_RELEASE_PW_INPUT));
+			return (ret==ENALBLE)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			// 기본값 사용
+			return true;
+		}
+	}
+
+	public void SetUseGuardReleasePw( boolean Use )
+	{
+		try
+		{
+			if( Use == true )UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(ENALBLE));
+			else UpdateWallPADData(GUARD_RELEASE_PW_INPUT, String.valueOf(DISABEL));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	// 대외향 485 스마트 스위치 연동 현장의 경우 방범외출과 외출모드를 분리 처리함
+	// LH향의 경우도 동일하게 방범외출과 외출모드를 분리 처리함
+	// 센서 사용여부를 체크해서 외출모드로 처리할지 외출방범모드로 처리할지 구분하도록 한다.
+	public boolean GetUseGuardSensorCheck()
+	{
+		try {
+
+			int ret = Integer.parseInt(GetWallPADData(GUARD_SENSOR_CHECK));
+			return (ret==ENALBLE)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			// 기본값 사용
+			return true;
+		}
+	}
+
+	public void SetUseGuardSensorCheck( boolean Use )
+	{
+		try
+		{
+			if( Use == true )UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(ENALBLE));
+			else UpdateWallPADData(GUARD_SENSOR_CHECK, String.valueOf(DISABEL));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public boolean GetCarArrivalSoundOnoff()
+	{
+		try {
+
+			int ret = Integer.parseInt(GetWallPADData(CARARRIVALSND));
+			return (ret==CARARRIVALON)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+	public void SetCarArrivalSoundOnoff(boolean onoff)
+	{
+		UpdateWallPADData(CARARRIVALSND, CARARRIVALSNDTEXT[onoff?CARARRIVALON:CARARRIVALOFF]);
+	}
+
+	public static final String   ICMDONOFF = "ICMDONOFF";
+	public static final int      ICMDON   = 1;
+	public static final int      ICMDOFF  = 0;
+	public static final String[] ICMDONOFFTEXT   = {String.valueOf(ICMDOFF),String.valueOf(ICMDON)};
+
+	public boolean GetiCMDOnoff()
+	{
+		try {
+			int ret = Integer.parseInt(GetWallPADData(ICMDONOFF));
+
+			return (ret==ICMDON)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+	public void SetiCMDOnoff(boolean onoff)
+	{
+		UpdateWallPADData(ICMDONOFF, ICMDONOFFTEXT[onoff?ICMDON:ICMDOFF]);
+	}
+
+	public static final String   UPGRADESTATE = "UPGRADESTATE";
+	public static final int      UPGRADEON   = 1;
+	public static final int      UPGRADEOFF  = 0;
+	public static final String[] UPGRADESTATETEXT   = {String.valueOf(UPGRADEOFF),String.valueOf(UPGRADEON)};
+	public static final String   UPGRADESTATEDEFAULT = String.valueOf(UPGRADEOFF);
+	public boolean GetUpgradeState()
+	{
+		try {
+			int ret = Integer.parseInt(GetWallPADData(UPGRADESTATE));
+
+			return (ret==UPGRADEON)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+	public void SetUpgradeState(boolean onoff)
+	{
+		UpdateWallPADData(UPGRADESTATE, UPGRADESTATETEXT[onoff?UPGRADEON:UPGRADEOFF]);
+	}
+
+	public static final String   GUIDESND       = "GUIDESND";
+	public static final int      GUIDESNDON     = 1;
+	public static final int      GUIDESNDOFF    = 0;
+	public static final String[] GUIDESNDTEXT   = {String.valueOf(GUIDESNDOFF),String.valueOf(GUIDESNDON)};
+
+	public boolean GetGUIDESNDOnoff()
+	{
+		try {
+			int ret = Integer.parseInt(GetWallPADData(GUIDESND));
+
+			return (ret==GUIDESNDON)?true:false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return false;
+		}
+	}
+
+	public void SetGUIDESNDOnoff(boolean onoff)
+	{
+		UpdateWallPADData(GUIDESND, GUIDESNDTEXT[onoff?ICMDON:ICMDOFF]);
+	}
+
+	public static final String   NOTICECNT = "NOTICECNT";
+	public static final String NOTICECNTDEFAULT   = String.valueOf(0);
+
+	public int GetNoticeCNT()
+	{
+		try {
+			int ret = Integer.parseInt(GetWallPADData(NOTICECNT));
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return -1;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return -1;
+		}
+	}
+
+	public void SetNoticeCNT(int cnt)
+	{
+		String data = String.valueOf(cnt);
+		UpdateWallPADData(NOTICECNT, data);
+	}
+
+	public static final String   MEMOCNT = "MEMOCNT";
+	public static final String   MEMOCNTDEFAULT   = String.valueOf(0);
+
+	public int GetMemoCNT()
+	{
+		try
+		{
+			int ret = Integer.parseInt(GetWallPADData(MEMOCNT));
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetMemoCNT(int cnt)
+	{
+		String data = String.valueOf(cnt);
+		UpdateWallPADData(MEMOCNT, data);
+	}
+
+	public static final String   VISITORVIDEOCNT = "VISITORVIDEOCNT";
+	public static final String   VISITORVIDEOCNT_DEFAULT   = String.valueOf(0);
+
+	public int GetVisitorVideoCNT()
+	{
+		try
+		{
+			int ret = Integer.parseInt(GetWallPADData(VISITORVIDEOCNT));
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetVisitorVideoCNT(int cnt)
+	{
+		String data = String.valueOf(cnt);
+		UpdateWallPADData(VISITORVIDEOCNT, data);
+	}
+
+	public static final String   ENERGYDATA = "ENERGYDATA";
+	public static final String 	 ENERGYDATADEFAULT   = "NONE";
+
+	public String GetEnergyData()
+	{
+		return GetWallPADData(ENERGYDATA);
+	}
+
+	public void SetEnergyData(String Edata)
+	{
+		UpdateWallPADData(ENERGYDATA, Edata);
+	}
+	public static final String   LASTCHECKENERGY = "LASTCHECKENERGY";
+	public static final String 	 LASTCHECKENERGYDEFAULT   = "00000000";
+
+	public String GetEnergyCheckDate()
+	{
+		return GetWallPADData(LASTCHECKENERGY);
+	}
+
+	public void SetEnergyCheckDate(String Edata)
+	{
+		UpdateWallPADData(LASTCHECKENERGY, Edata);
+	}
+
+	public static final String   ENERGYMONDATA = "ENERGYMONDATA";
+	public static final String 	 ENERGYMONDATADEFAULT   = "NONE";
+
+	public String GetEnergyMonData()
+	{
+		return GetWallPADData(ENERGYMONDATA);
+	}
+
+	public void SetEnergyMonData(String Edata)
+	{
+		UpdateWallPADData(ENERGYMONDATA, Edata);
+	}
+	public static final String   LASTCHECKMONENERGY = "LASTCHECKMONENERGY";
+	public static final String 	 LASTCHECKMONENERGYDEFAULT   = "00000000";
+
+	public String GetEnergyCheckMonth()
+	{
+		return GetWallPADData(LASTCHECKMONENERGY);
+	}
+
+	public void SetEnergyCheckMonth(String Edata)
+	{
+		UpdateWallPADData(LASTCHECKMONENERGY, Edata);
+	}
+
+	public static final String   ELEVATORSTATUS = "ELEVATORSTATUS";
+	public static final String 	 ELEVATORSTATUSDEFAULT   = "0";
+
+	public int GetElevatorStatus()
+	{
+		try {
+			return Integer.parseInt(GetWallPADData(ELEVATORSTATUS));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetElevatorStatus(int Edata)
+	{
+		UpdateWallPADData(ELEVATORSTATUS, String.valueOf(Edata));
+	}
+
+	public static final String   ELEVATORCALLUP = "ELEVATORCALLUP";
+	public static final String 	 ELEVATORCALLUPDEFAULT   = "0";
+
+	public void SetElevatorCallUpTime()
+	{
+		UpdateWallPADData(ELEVATORCALLUP, String.valueOf(System.currentTimeMillis()));
+	}
+
+	public void FreeElevatorCallUpTime()
+	{
+		UpdateWallPADData(ELEVATORCALLUP, ELEVATORCALLUPDEFAULT);
+	}
+
+	public long GetElevatorCallUpTime()
+	{
+		try {
+			return Long.parseLong(GetWallPADData(ELEVATORCALLUP));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+	public static final String   ELEVATORCALLDN = "ELEVATORCALLDN";
+	public static final String 	 ELEVATORCALLDNDEFAULT   = "0";
+
+	public void SetElevatorCallDnTime()
+	{
+		UpdateWallPADData(ELEVATORCALLDN, String.valueOf(System.currentTimeMillis()));
+	}
+
+	public void FreeElevatorCallDnTime()
+	{
+		UpdateWallPADData(ELEVATORCALLDN, ELEVATORCALLDNDEFAULT);
+	}
+
+	public long GetElevatorCallDnTime()
+	{
+		try {
+			return Long.parseLong(GetWallPADData(ELEVATORCALLDN));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public static final String   POSTCNT = "POSTCNT";
+	public static final String 	 POSTCNTDEFAULT   = "0";
+
+	public void SetPostCNT(int cnt)
+	{
+		UpdateWallPADData(POSTCNT, String.valueOf(cnt));
+	}
+
+	public int GetPostCNT()
+	{
+		try {
+			return Integer.parseInt(GetWallPADData(POSTCNT));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public static final String   PARCELCNT = "PARCELCNT";
+	public static final String 	 PARCELCNTDEFAULT   = "0";
+
+	public void SetParcelCNT(int cnt)
+	{
+		UpdateWallPADData(PARCELCNT, String.valueOf(cnt));
+	}
+
+	public int GetParcelCNT()
+	{
+		try {
+			return Integer.parseInt(GetWallPADData(PARCELCNT));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception  e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+	public static final String   RESETSCHEDULE = "RESETSCHEDULE";
+	public static final int      RESET_WEEK  = 1000;
+	public static final int      RESET_MONTH = 1001;
+	public static final int      RESET_FREE  = 1002;
+	public static final String   RESETSCHEDULEDEFAULT = "NONE;0;0";
+
+	public String[] GetResetSchedule()
+	{
+		return GetWallPADData(RESETSCHEDULE).split(define.DEVCTR_CMD_SPLITER);
+	}
+
+	public boolean SetResetSchedule(int type, int date, int time)
+	{
+		if (type == RESET_WEEK && (date < 0 || date >6))
+			return false;
+		if (type == RESET_MONTH && (date <1 || 28 < date))
+			return false;
+		if ((type != RESET_FREE) && time < 0 || time >23) return false;
+		String SetVal;
+		if (type == RESET_FREE) SetVal = RESETSCHEDULEDEFAULT;
+		else SetVal = type+define.DEVCTR_CMD_SPLITER+date+define.DEVCTR_CMD_SPLITER+time;
+		UpdateWallPADData(RESETSCHEDULE,SetVal);
+		return true;
+	}
+
+	public static final String   SETSYSTEMUPDATE = "SETSYSTEMUPDATE";
+	public static final String   SETSYSTEMUPDATEDEFAULT = "NONE;0;0";
+
+	public void SetSystemUpdate(String BSPfule, String APPFile)
+	{
+		String datafile;
+		if (BSPfule== null && APPFile == null)
+		{
+			datafile = SETSYSTEMUPDATEDEFAULT;
+		}
+		else {
+			datafile = "SET;";
+			datafile+=(BSPfule==null)?"no":BSPfule;
+			datafile+=";";
+			datafile+=(APPFile==null)?"no":APPFile;
+		}
+		UpdateWallPADData(SETSYSTEMUPDATE,datafile);
+	}
+
+	public String[] GetSystemUpdateStatus()
+	{
+		return GetWallPADData(SETSYSTEMUPDATE).split(define.DEVCTR_CMD_SPLITER);
+	}
+
+	public static final String   LASTTIMESYNC = "LASTTIMESYNC";
+	public static final String   LASTTIMESYNCDEFAULT = "0";
+
+	public void SetLastTimeSyncDate(int date)
+	{
+		UpdateWallPADData(LASTTIMESYNC,String.valueOf(date));
+	}
+
+	public int GetLastTimeSyncDate()
+	{
+		try {
+			return Integer.parseInt(GetWallPADData(LASTTIMESYNC));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public static final String   EMMLIGHTSTATUS = "EMMLIGHTSTATUS";
+	public static final int      EMMLIGHTON  = 1;
+	public static final int      EMMLIGHTOFF = 0;
+	public static final String   EMMLIGHTSTATUSDEFAULT = String.valueOf(EMMLIGHTOFF);
+
+
+	public void SetEmmLightStatus(boolean status)
+	{
+		UpdateWallPADData(EMMLIGHTSTATUS,String.valueOf(status?EMMLIGHTON:EMMLIGHTOFF));
+	}
+
+	public int GetEmmLightStatus()
+	{
+		try {
+			return Integer.parseInt(GetWallPADData(EMMLIGHTSTATUS));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////
+	//////////////////////////////////////   icontrols /////////////////////////////////////////////////////
+	public static final String OUTMODE_WAITTIME             		= "OUTMODE_WAITTIME";
+	public static final String OUTMODE_WAITTIME_DEFAULT       = "30";
+
+	public static final String COMEBACK_WAITTIME             		= "COMEBACK_WAITTIME";
+	public static final String COMEBACK_WAITTIME_DEFAULT       = "30";
+
+	public static final String OUTMODE_LINK_DEVICE			= "OUTMODE_LINKDEVICE";
+	public static final String INMODE_LINK_DEVICE				= "INMODE_LINKDEVICE";
+
+	public static final String IN_BED_LINK_DEVICE			= "IN_BED_LINK_DEVICE";
+	public static final String OUT_BED_LINK_DEVICE				= "OUT_BED_LINK_DEVICE";
+
+	public static final String CALL_APK_STATUS				= "CALL_APK_STATUS";
+	public static final String GLOBALSCREEN_APK_RUN				= "GLOBALSCREEN_APK_RUN";
+	public static final String REMOTECALL_USER_POPUP_RUN		= "REMOTECALL_USER_POPUP_RUN";
+	public static final String CALL_STATUS					= "CALL_STATUS";
+
+	public static final String SOUND_OUTPUT_EVENT_ALARM  = "EVENT_ALARM_SOUND";
+	public static final String SOUND_OUTPUT_CAR_ALARM 	= "CAR_ALARM_SOUND";
+	public static final String SOUND_OUTPUT_CALL_ALARM = "CALL_ALARM_SOUND";
+	public static final String SOUND_OUTPUT_BAND_LOCATION 	= "BAND_LOCATION_ALARM_SOUND";
+
+	/** 스마트키 감지시 알람 (사운드 및 토스트메시지) */
+	public static final String SMARTKEY_DETECTION_ALARM  = "SMARTKEY_DETECTION_ALARM";
+
+	/** 환기 예약 ON/OFF */
+	public static final String VEN_RESERVE_ONOFF  = "VEN_RESERVE_ONOFF";
+
+	public static final String LED_BUTTON_BRIGHTNESS_LEVEL	= "LED_BUTTON_BRIGHTNESS_LEVEL"; //GLE 모델 LED 버튼 밝기 조절
+	public static final String LED_BUTTON_BRIGHTNESS_LEVEL_DEFAULT	= "2";
+
+	public static final String MODE_LAMP_BR_LEVEL			= "MODE_LAMP_BR_LEVEL";
+	public static final String MODE_LAMP_BR_LEVEL_DEFAULT	= "4";
+
+	public static final String WALLPAD_MASTER_VOLUME		= "WALLPAD_MASTER_VOLUME";
+	public static final String WALLPAD_MASTER_VOLUME_DEFAULT	="8";
+
+
+	public static final String BLACK_OUT_ENERGY					= "BLACK_OUT_ENERGY";				// 정전 APU 감지시
+
+	public static final String MAIN_SELECTED_SCREEN				= "MAIN_SELECTED_SCREEN";		// 메인 스크린 3가지 ( 즐겨찾기 , 메인, 에너지관리 )
+	public static final int MAIN_DEFAULT_SCREEN					= 0;
+	public static final int MAIN_BOOKMARK_SCREEN				= 1;
+	public static final int MAIN_ENERGY_SCREEN					= 2;
+
+	public static final String MOOD_LAMP_STATE					= "MOOD_LAMP_STATE";
+
+
+	public static final String ARS_CONTROL_DEVICE				= "ARS_CONTROL_DEVICE";
+	public static final String REMOTE_CONTROLS_DEVICE		= "REMOTE_CONTROLS_DEVICE";
+
+	//전자액자 시작
+	List<String> AutoPicturefilesList = new ArrayList<String>();
+
+	public static final String AUTOPICTURE_SET_INDEX = "AUTOPICTURE_SET_INDEX";
+	public static final String AUTOPICTURE_SET_INDEX_DEFAULT = "0";
+
+	public static final String AUTOPICTURE_START_TIME_HOUR_INDEX = "AUTOPICTURE_START_TIME_HOUR_INDEX";
+	public static final String AUTOPICTURE_START_TIME_HOUR_INDEX_DEFAULT = "18";
+
+	public static final String AUTOPICTURE_START_TIME_MIN_INDEX = "AUTOPICTURE_START_TIME_MIN_INDEX";
+	public static final String AUTOPICTURE_START_TIME_MIN_INDEX_DEFAULT = "0";
+
+	public static final String AUTOPICTURE_END_TIME_HOUR_INDEX = "AUTOPICTURE_END_TIME_HOUR_INDEX";
+	public static final String AUTOPICTURE_END_TIME_HOUR_INDEX_DEFAULT = "22";
+
+	public static final String AUTOPICTURE_END_TIME_MIN_INDEX = "AUTOPICTURE_END_TIME_MIN_INDEX";
+	public static final String AUTOPICTURE_END_TIME_MIN_INDEX_DEFAULT = "0";
+
+	public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX = "AUTOPICTURE_SLIDE_INTERVAL_INDEX";
+	public static final String AUTOPICTURE_SLIDE_INTERVAL_INDEX_DEFAULT = "0";
+
+	public static final String AUTOPICTURE_ANIMATION_INDEX = "AUTOPICTURE_ANIMATION_INDEX";
+	public static final String AUTOPICTURE_ANIMATION_INDEX_DEFAULT = "0";
+
+	//전자액자 끝
+
+	/** 안심통화 **/
+	public static final String RELIEFCALL_DEGREE = "RELIEFCALL_DEGREE";
+	public static final String RELIEFCALL_DEGREE_DEFAULT_VALUE = "1:4:7:10";
+
+	/** 방문객원격통화 **/
+	public static final String REMOTECALL_REGISTRATION = "REMOTECALL_REGISTRATION";
+	public static final String REMOTECALL_REGISTRATION_DEFAULT_VALUE = "false";
+	public static final String REMOTECALL_USERCNT = "REMOTECALL_USERCNT";
+	public static final String REMOTECALL_USERCNT_DEFAULT_VALUE = "0";
+
+	/** 스마트현관카메라 거동수상자 녹화 설정 관련 **/
+	public static final String SMARTIOT_RECORDING_STRANGER_ONOFF  = "SMARTIOT_RECORDING_STRANGER_ONOFF";
+	public static final String SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT = "false";
+	public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF  = "SMARTIOT_TAKINGPIC_STRANGER_ONOFF";
+	public static final String SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT = "true";
+	public static final String SMARTIOT_CAM_BRIGHTNESS = "SMARTIOT_CAM_BRIGHTNESS";
+	public static final String SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT = "5";
+	public static final String SMARTIOT_RECORD_TIME = "SMARTIOT_RECORD_TIME";
+	public static final String SMARTIOT_RECORD_TIME_VALUE_DEFAULT = "30";
+	public static final String SMARTIOT_SENSOR_SENSITIVITY = "SMARTIOT_SENSOR_SENSITIVITY";
+	public static final String SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT = "5";
+	public static final String SMARTIOT_SENSOR_DURATION = "SMARTIOT_SENSOR_DURATION";
+	public static final String SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT = "30";
+	public static final String SMARTIOT_SENSOR_PERIOD = "SMARTIOT_SENSOR_PERIOD";
+	public static final String SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT = "15";
+
+	// 간편모드UX 관련
+	public static final String EASYMODE_UX_USE = "EASYMODE_UX_USE";
+	public static final String EASYMODE_UX_USE_DEFAULT = "false";
+	public static final String EASYMODE_UX_SUPPORT = "EASYMODE_UX_SUPPORT";
+	public static final String EASYMODE_UX_USE_SUPPORT_DEFAULT = "false";
+
+	//원격검침 정보 시작
+	public static final String REMOTE_METERING_EMS_ENABLE = "REMOTE_METERING_EMS_ENABLE_DEFAULT";
+	public static final String REMOTE_METERING_EMS_ENABLE_DEFAULT = "true"; //false면 EMS 사용안함, true이면 EMS 사용함
+
+	public static final String REMOTE_METERING_NUMBER_OF_KIND = "REMOTE_METERING_NUMBER_OF_KIND_DEFAULT";
+	public static final String REMOTE_METERING_NUMBER_OF_KIND_DEFAULT = "5";
+
+	//원격검침 - 목표량 저장 시작
+	public static final String REMOTE_METERING_TARGET_VALUE_ELECT = "REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT";
+	public static final String REMOTE_METERING_TARGET_VALUE_ELECT_DEFAULT = "300";
+
+	public static final String REMOTE_METERING_TARGET_VALUE_WATER = "REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT";
+	public static final String REMOTE_METERING_TARGET_VALUE_WATER_DEFAULT = "25";
+
+	public static final String REMOTE_METERING_TARGET_VALUE_GAS = "REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT";
+	public static final String REMOTE_METERING_TARGET_VALUE_GAS_DEFAULT = "7";
+
+	public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER = "REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT";
+	public static final String REMOTE_METERING_TARGET_VALUE_HOTWATER_DEFAULT = "4";
+
+	public static final String REMOTE_METERING_TARGET_VALUE_HEATING = "REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT";
+	public static final String REMOTE_METERING_TARGET_VALUE_HEATING_DEFAULT = "1.5";
+
+	public static final String REMOTE_METERING_TARGET_VALUE_CARBON = "REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT";
+	public static final String REMOTE_METERING_TARGET_VALUE_CARBON_DEFAULT = "0";
+	//원격검침 - 목표량 저장 끝
+
+	//원격검침 정보 끝
+
+	//에너지관리서버의 검침일 설정 - 검침일 or 말일 두가지 중 하나 선택 가능
+	public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE = "REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT";
+	public static final String REMOTE_METERING_BASE_DATE_LASTDAY_USE_DEFAULT = "false"; //false면 검침일 사용, true이면 말일 사용함
+	//에너지관리서버 연동 시 목표량 대비 사용량 알림 여부
+	public static final String REMOTE_METERING_ALARM_USE = "REMOTE_METERING_ALARM_USE_DEFAULT";
+	public static final String REMOTE_METERING_ALARM_USE_DEFAULT = "false";
+	//에너지관리서버 연동 - 사용량 알림 시간 설정
+	public static final String REMOTE_METERING_ALARM_TIME = "REMOTE_METERING_ALARM_TIME";
+	public static final String REMOTE_METERING_ALARM_TIME_DEFAULT = "12";
+
+	/** 통화 음량 및 현관카메라 밝기/대비 **/
+	//현관 통화 음량
+	public static final String CALL_DOORCAM_SOUND_VALUE = "CALL_DOORCAM_SOUND_VALUE";
+	public static final String CALL_DOORCAM_SOUND_VALUE_DEFAULT = "5";
+
+	//로비 통화 음량
+	public static final String CALL_LOBBY_SOUND_VALUE = "CALL_LOBBY_SOUND_VALUE";
+	public static final String CALL_LOBBY_SOUND_VALUE_DEFAULT = "5";
+
+	//경비 통화 음량
+	public static final String CALL_GUARD_SOUND_VALUE = "CALL_GUARD_SOUND_VALUE";
+	public static final String CALL_GUARD_SOUND_VALUE_DEFAULT = "5";
+
+	//이웃 통화 음량
+	public static final String CALL_NEIGHBOR_SOUND_VALUE = "CALL_NEIGHBOR_SOUND_VALUE";
+	public static final String CALL_NEIGHBOR_SOUND_VALUE_DEFAULT = "5";
+
+	//국선 통화 음량
+	public static final String CALL_PSTN_SOUND_VALUE = "CALL_PSTN_SOUND_VALUE";
+	public static final String CALL_PSTN_SOUND_VALUE_DEFAULT = "5";
+
+	//현관 카메라 밝기(Brightness)
+	public static final String CALL_DOORCAM_BRIGHTNESS_VALUE = "CALL_DOORCAM_BRIGHTNESS_VALUE";
+	public static final String CALL_DOORCAM_BRIGHTNESS_VALUE_DEFAULT = "5";
+
+	//현관 카메라 대비(Contrast)
+	public static final String CALL_DOORCAM_CONTRAST_VALUE = "CALL_DOORCAM_CONTRAST_VALUE";
+	public static final String CALL_DOORCAM_CONTRAST_VALUE_DEFAULT = "5";
+
+	//엘리베이터 위젯 복구용
+	public static final String ELEVATOR_WIDGET_RESTORE = "ELEVATOR_WIDGET_RESTORE";
+	public static final String ELEVATOR_WIDGET_RESTORE_VALUE_DEFAULT = "false";
+
+	//환기 욕실배기 기능 연동기능
+	public static final String VENTI_BATHROOM = "VENTI_BATHROOM";
+	public static final String VENTI_BATHROOM_VALUE_DEFAULT = "true";
+
+	//거실 조명 그룹설정
+	public static final String LIVING_LIGHT_GROUP = "LIVING_LIGHT_GROUP";
+	public static final String LIVING_LIGHT_GROUP_VALUE_DEFAULT = "1:1:1";
+
+	//현산향 게이트웨이 command
+	public static final String DB_WALLPAD_IGW_COMMAND_COUNT = "DB_WALLPAD_REBOOTING_COUNT";
+
+	//메인월패드 난방 방 개수
+	public static final String DB_WALLPAD_HEATING_ROOM_NUM = "DB_WALLPAD_HEATING_ROOM_NUM";
+
+	//근접 센서 민감도
+	public static final String CLOSE_SENSOR_VALUE = "CLOSE_SENSOR_VALUE";
+	public static final String CLOSE_SENSOR_VALUE_DEFAULT = "5";
+
+	//현재 화면 번호
+	public static final String CURRENT_SCREEN_ID_VALUE = "CURRENT_SCREEN_ID_VALUE";
+	public static final String CURRENT_SCREEN_ID_VALUE_DEFAULT = "0";
+
+	// 스마트분전반 현재/월누적 선택값 저장
+	public static final String NOW_MONTH_SELECT = "NOW_MONTH_SELECT";
+	public static final String NOW_MONTH_SELECT_DEFAULT = "NOW";
+
+	// 실시간검침기 전력 - 누적전력사용량 저장
+	public static final String REALTIMEMETER__ELEC_ACC = "REALTIMEMETER__ELEC_ACC";
+
+	// 메인화면 GUI 선택
+	public static final String MAIN_GUI_SELECT = "MAIN_GUI_SELECT";
+	public static final String MAIN_GUI_SELECT_DEFAULT = "BASIC";
+
+	// 거실조명 모드제어 설정값 (Preset)
+    // "조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    // 그룹제어시에는 조명1의 값만 사용한다. (조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10, 미설정시 0)
+	public static final String LIVINGLIGHT_PRESET_00 = "LIVINGLIGHT_PRESET_00";
+	public static final String LIVINGLIGHT_PRESET_00_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+	public static final String LIVINGLIGHT_PRESET_01 = "LIVINGLIGHT_PRESET_01";
+	public static final String LIVINGLIGHT_PRESET_01_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_02 = "LIVINGLIGHT_PRESET_02";
+    public static final String LIVINGLIGHT_PRESET_02_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_03 = "LIVINGLIGHT_PRESET_03";
+    public static final String LIVINGLIGHT_PRESET_03_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_04 = "LIVINGLIGHT_PRESET_04";
+    public static final String LIVINGLIGHT_PRESET_04_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_05 = "LIVINGLIGHT_PRESET_05";
+    public static final String LIVINGLIGHT_PRESET_05_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_06 = "LIVINGLIGHT_PRESET_06";
+    public static final String LIVINGLIGHT_PRESET_06_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_07 = "LIVINGLIGHT_PRESET_07";
+    public static final String LIVINGLIGHT_PRESET_07_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+    public static final String LIVINGLIGHT_PRESET_08 = "LIVINGLIGHT_PRESET_08";
+    public static final String LIVINGLIGHT_PRESET_08_VALUE_DEFAULT = "none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0/none:0:0";   // "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도"
+
+	// 층간소음 팝업 발생
+	public static final String INTERLAYER_NOISE_POPUP_USE = "INTERLAYER_NOISE_POPUP_USE";
+	public static final String INTERLAYER_NOISE_POPUP_USE_DEFAULT = "false";
+
+	// 층간소음 장비 상태
+	public static final String INTERLAYER_NOISE_SENSOR_STATUS = "INTERLAYER_NOISE_SENSOR_STATUS";
+	public static final String INTERLAYER_NOISE_SENSOR_STATUS_DEFAULT = "NORMAL";
+
+	// 멀티스위치 콘센트 사용여부
+	public static final String MULTISWITCH_CONCENT_USE = "MULTISWITCH_CONCENT_USE";
+	public static final String MULTISWITCH_CONCENT_USE_DEFAULT = "false";
+
+	// 웰컴조명 - 거실등,복도등,주방등 선택유무
+	public static final String WELCOMELIGHT_SELECT_ITEMS = "WELCOMELIGHT_SELECT_ITEMS";
+	public static final String WELCOMELIGHT_SELECT_ITEMS_DEFAULT = "0/0/0";
+
+	// 재실센서 시나리오-기본모드1 사용여부
+	public static final String INROOMDETECT_SCENARIO_NORMAL1 = "INROOMDETECT_SCENARIO_NORMAL1";
+	public static final String INROOMDETECT_SCENARIO_NORMAL1_DEFAULT = "false";
+
+	// 재실센서 시나리오-기본모드2 사용여부
+	public static final String INROOMDETECT_SCENARIO_NORMAL2 = "INROOMDETECT_SCENARIO_NORMAL2";
+	public static final String INROOMDETECT_SCENARIO_NORMAL2_DEFAULT = "false";
+
+	// 재실센서 시나리오-사용자설정 사용여부
+	public static final String INROOMDETECT_SCENARIO_USERSET = "INROOMDETECT_SCENARIO_USERSET";
+	public static final String INROOMDETECT_SCENARIO_USERSET_DEFAULT = "false";
+
+	// 재실센서 시나리오-전기레인지 안전모드 사용여부
+	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE";
+	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_DEFAULT = "false";
+
+	// 재실센서 시나리오-기본모드1 설정
+	public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO = "INROOMDETECT_SCENARIO_NORMAL1_INFO";
+	public static final String INROOMDETECT_SCENARIO_NORMAL1_INFO_DEFAULT = "KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
+																			"LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
+
+	// 재실센서 시나리오-기본모드2 설정
+	public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO = "INROOMDETECT_SCENARIO_NORMAL2_INFO";
+	public static final String INROOMDETECT_SCENARIO_NORMAL2_INFO_DEFAULT = "KIND-NORMAL2/START-PM:09:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
+																			"LOC-TBL/TIME1-0/ACT1-STAT:ON;DIM:10/TIME2-10/ACT2-STAT:OFF";
+
+	// 재실센서 시나리오-사용자모드 설정
+	public static final String INROOMDETECT_SCENARIO_USERSET_INFO = "INROOMDETECT_SCENARIO_USERSET_INFO";
+	public static final String INROOMDETECT_SCENARIO_USERSET_INFO_DEFAULT = "KIND-USERSET/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/" +
+																			"LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF";
+
+	// 재실센서 시나리오-전기레인지 안전모드 설정
+	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO = "INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO";
+	public static final String INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO_DEFAULT = "KIND-ELECRANGE_SAFE/START-PM:06:30/END-AM:06:30/DATE-1:2:3:4:5:6:7/" +
+																			"LOC-ELECRANGE/TIME1-20/ACT1-POPUP/TIME2-20/ACT2-ALARM";
+
+	public static final String CAMERA_ENCODING_ERROR  = "CAMERA_ENCODING_ERROR";
+	public static final String CAMERA_ENCODING_ERROR_DEFAULT = "false";
+
+	// 통화기능 설정
+	public static final String CALLFUNCTION_FRONT_USE = "CALLFUNCTION_FRONT_USE";
+	public static final String CALLFUNCTION_FRONT_USE_DEFAULT = "true";
+	public static final String CALLFUNCTION_LOBBY_USE = "CALLFUNCTION_LOBBY_USE";
+	public static final String CALLFUNCTION_LOBBY_USE_DEFAULT = "true";
+	public static final String CALLFUNCTION_GUARD_USE = "CALLFUNCTION_GUARD_USE";
+	public static final String CALLFUNCTION_GUARD_USE_DEFAULT = "true";
+	public static final String CALLFUNCTION_RESIDENCE_USE = "CALLFUNCTION_RESIDENCE_USE";
+	public static final String CALLFUNCTION_RESIDENCE_USE_DEFAULT = "true";
+	public static final String CALLFUNCTION_PSTN_USE = "CALLFUNCTION_PSTN_USE";
+	public static final String CALLFUNCTION_PSTN_USE_DEFAULT = "true";
+	public static final String CALLFUNCTION_CALLHISTORY_USE = "CALLFUNCTION_CALLHISTORY_USE";
+	public static final String CALLFUNCTION_CALLHISTORY_USE_DEFAULT = "true";
+	public static final String CALLFUNCTION_VISITORPIC_USE = "CALLFUNCTION_VISITORPIC_USE";
+	public static final String CALLFUNCTION_VISITORPIC_USE_DEFAULT = "true";
+
+	//////////////////////////////////////icontrols End/////////////////////////////////////////////////////
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////
+	public static final String   DEVICE_ROOM               = "DEVICE_ROOM";
+	public static final String   DEVICE_ROOM_LIGHT         = "DEVICE_ROOM_LIGHT";
+	public static final String   DEVICE_ROOM_DEFAULT       = "1:3:4:5:6:7"; //GetEachRoomNameInfo == false 일 시
+	public static final String   DEVICE_ROOM_DEFAULT_LIGHT = "1:15:3:4:5:6"; //GetEachRoomNameInfo == true 일 시 조명&콘센트 방 명칭
+
+
+	public static final String[] RoomTitle = {"거실","안방","방1","방2","방3","방4","방5","방6","방7","방8","작은방","작은방1","작은방2","서재","주방","큰방","공부방","알파룸",
+			"할아버지","할머니","아버지","어머니","아들","큰아들","작은아들","딸","큰딸","작은딸","막내","침실1","침실2","침실3","침실4","침실5","침실6"};
+
+	/**
+	 *
+	 * @return
+	 */
+	public String [] GetDevRoomName()
+	{
+		try
+		{
+			String ret = GetWallPADData(DEVICE_ROOM);
+			String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
+
+			for (int i = 0; i<getidx.length; i++)
+				getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
+
+			return getidx;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return null;
+		}
+	}
+
+	/**
+	 * 난방 조명 방명칭 설정 값을 가져온다
+	 * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
+	 * @return String [] 해당 방 명칭 String 배열
+	 */
+	public String [] GetDevRoomName(String DeviceType)
+	{
+		try
+		{
+			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
+			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
+			wallpadDeviceSet.closeDB();
+
+			String[] getidx = null;
+			String ret;
+
+			ret = GetWallPADData(DEVICE_ROOM);
+			getidx = ret.split(define.DEVCTR_DATA_SPLITER);
+
+			for (int i = 0; i<getidx.length; i++)
+				getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
+
+			if(UseEachRoomName == false)
+			{
+				return getidx;
+			}
+			else
+			{
+				if(DeviceType.equalsIgnoreCase("light") == true)
+				{
+					ret = GetWallPADData(DEVICE_ROOM_LIGHT);
+					getidx = ret.split(define.DEVCTR_DATA_SPLITER);
+
+					for (int i = 0; i<getidx.length; i++)
+						getidx[i] = RoomTitle[Integer.parseInt(getidx[i])-1];
+				}
+				else if(DeviceType.equalsIgnoreCase("heating") == true)
+				{
+					return getidx;
+				}
+			}
+			return getidx;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return null;
+		}
+	}
+
+	public int[] GetDevRoomIdx()
+	{
+		try
+		{
+			String ret = GetWallPADData(DEVICE_ROOM);
+			String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
+			int[] retdata = new int[getidx.length];
+			for (int i = 0; i<getidx.length; i++)
+				retdata[i] = Integer.parseInt(getidx[i]);
+			return retdata;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return null;
+		}
+	}
+
+	/**
+	 * 난방 조명 방명칭 설정 index값을 가져온다
+	 * @param DeviceType = "light"이면 조명 설정정보 가져오고, "heating"이면 난방 설정정보 가져옴
+	 * @return int [] 해당 방 명칭 int 배열
+	 */
+	public int[] GetDevRoomIdx(String DeviceType)
+	{
+		try
+		{
+			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
+			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
+			wallpadDeviceSet.closeDB();
+
+			String ret = GetWallPADData(DEVICE_ROOM);
+			String[] getidx = ret.split(define.DEVCTR_DATA_SPLITER);
+			int[] retdata = new int[getidx.length];
+			for (int i = 0; i<getidx.length; i++)
+				retdata[i] = Integer.parseInt(getidx[i]);
+
+			if(UseEachRoomName == false)
+			{
+				return retdata;
+			}
+			else
+			{
+				if(DeviceType.equalsIgnoreCase("light") == true)
+				{
+					ret = GetWallPADData(DEVICE_ROOM_LIGHT);
+					getidx = ret.split(define.DEVCTR_DATA_SPLITER);
+					retdata = new int[getidx.length];
+					for (int i = 0; i<getidx.length; i++)
+						retdata[i] = Integer.parseInt(getidx[i]);
+				}
+				else if(DeviceType.equalsIgnoreCase("heating") == true)
+				{
+					return retdata;
+				}
+			}
+			return retdata;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return null;
+		}
+	}
+
+	public int SetDevRoomIdx(int[] set)
+	{
+		try{
+			String indata=String.valueOf(set[0]);
+			for(int i =1; i<set.length;i++)
+				indata+=(":"+set[i]);
+			return (UpdateWallPADData(DEVICE_ROOM, indata))?0:-1;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return APIErrorCode.EXCEPTION;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return APIErrorCode.EXCEPTION;
+		}
+	}
+
+	/**
+	 * 난방 조명 방명칭 설정한다
+	 * @param DeviceType = "light"이면 조명 설정하고, "heating"이면 난방 설정함
+	 * @return int 0보다 작으면 실패
+	 */
+	public int SetDevRoomIdx(int[] set, String DeviceType)
+	{
+		try
+		{
+			WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
+			boolean UseEachRoomName = wallpadDeviceSet.GetEachRoomNameInfo();
+			wallpadDeviceSet.closeDB();
+
+			String indata = String.valueOf(set[0]);
+			for (int i = 1; i < set.length; i++)
+				indata += (":" + set[i]);
+
+			if(UseEachRoomName == false)
+			{
+				return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
+			}
+			else
+			{
+				if(DeviceType.equalsIgnoreCase("light") == true)
+				{
+					return (UpdateWallPADData(DEVICE_ROOM_LIGHT, indata)) ? 0 : -1;
+				}
+				else if(DeviceType.equalsIgnoreCase("heating") == true)
+				{
+					return (UpdateWallPADData(DEVICE_ROOM, indata)) ? 0 : -1;
+				}
+			}
+			return -1;
+
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return APIErrorCode.EXCEPTION;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return APIErrorCode.EXCEPTION;
+		}
+	}
+
+	public WallpadStatusData(Context ctx) {
+		super(ctx);
+	}
+
+
+	public void SetAlarmStatus(int status)
+	{
+		int alarmfree;
+		if (status > ALARMTEXT.length-1 || status < 0 ) return;
+		alarmfree = GetAlarmStatus();
+		UpdateWallPADData(ALARM_STATUS, ALARMTEXT[status]);
+
+		if(alarmfree != status)
+		{
+			// 상태가 변경되었다면 상태 변경 BR을 송신한다.
+			Intent notiIntent = new Intent();
+			notiIntent.setAction(define.NOTIFY_ACNAME);
+			notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARM_CHANGE);
+			CTX.sendBroadcast(notiIntent);
+		}
+
+		if (status == ALARM_NONE ||status == GUARD_IN || status == GUARD_OUT)
+		{
+			String modeStr = null;
+			if (status == ALARM_NONE)
+			{
+				modeStr = "normal";
+				if (alarmfree==ALARM_STOP || alarmfree == ALARM_ARISE)
+				{
+					Intent notiIntent = new Intent();
+					notiIntent.setAction(define.NOTIFY_ACNAME);
+					notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARMFREED);
+					CTX.sendBroadcast(notiIntent);
+				}
+			}
+			else if (status == GUARD_IN)
+				modeStr = "occupied";
+			else
+			{
+				modeStr = "unoccupied";
+				Intent notiIntent = new Intent();
+				notiIntent.setAction(define.NOTIFY_ACNAME);
+				notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_OUTGOINGSETTED);
+				CTX.sendBroadcast(notiIntent);
+			}
+
+			if( alarmfree == GUARD_OUT_WAIT && status == ALARM_NONE )
+			{
+				// 단지서버로 메세지를 보내지 않도록 한다.
+			}
+			else
+			{
+				WallPadiMAPNotifyAPI notif = new WallPadiMAPNotifyAPI(CTX);
+				notif.ModeChanged(modeStr);
+			}
+		}
+	}
+
+	public int GetAlarmStatus()
+	{
+		try
+		{
+			String ret = GetWallPADData(ALARM_STATUS);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetAlarmType(int type)
+	{
+		try {
+			if (type > ALARMTYPETEXT.length-1 || type < 0 ) return;
+			UpdateWallPADData(ALARM_TYPE, ALARMTYPETEXT[type]);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public int GetAlarmType()
+	{
+		try {
+			String ret = GetWallPADData(ALARM_TYPE);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetMorningCall(int set, int hour, int min)
+	{
+		if (set > MORNINGCALLTEXT.length-1 || set < 0 ) return;
+		String mcallStr = MORNINGCALLTEXT[set]+":"+hour+":"+min;
+		UpdateWallPADData(MORNINGCALL_STATUS, mcallStr);
+	}
+
+	public int GetMorningCallStatus()
+	{
+		try {
+			String ret = GetWallPADData(MORNINGCALL_STATUS);
+			String retarr[] = ret.split(":");
+			MorningHour = Integer.parseInt(retarr[1]);
+			MorningMin = Integer.parseInt(retarr[2]);
+			return Integer.parseInt(retarr[0]);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return -1;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return -1;
+		}
+	}
+	public int MorningHour = 0;
+	public int MorningMin  = 0;
+
+	public void SetManagerPW(String pw)
+	{
+		UpdateWallPADData(MANAGER_PW, pw);
+	}
+
+	public String GetManagerPW()
+	{
+		String ret = GetWallPADData(MANAGER_PW);
+		return ret;
+	}
+
+
+	public void SetUserPW(String pw)
+	{
+		UpdateWallPADData(USER_PW, pw);
+	}
+
+	public String GetUserPW()
+	{
+		String ret = GetWallPADData(USER_PW);
+		return ret;
+	}
+
+	public void SetWebCtrPW(String pw)
+	{
+		UpdateWallPADData(WEB_CTR_PW, pw);
+	}
+
+	public String GetWebCtrPW()
+	{
+		String ret = GetWallPADData(WEB_CTR_PW);
+		return ret;
+	}
+
+
+	public void SetPSTNStatus(int status)
+	{
+		if (status > PSTN_STATUSTEXT.length-1 || status < 0 ) return;
+		UpdateWallPADData(PSTN_STATUS, PSTN_STATUSTEXT[status]);
+	}
+
+	public int GetPSTNStatus()
+	{
+		try {
+			String ret = GetWallPADData(PSTN_STATUS);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetDevStatus(int status, String data)
+	{
+		String ipdata = DEV_STATUSTEXT[status]+":"+data;
+		UpdateWallPADData(DEV_STATUS, ipdata);
+	}
+
+	public String GetDevStatus()
+	{
+		String ret = GetWallPADData(DEV_STATUS);
+		return ret;
+	}
+
+	public void SetServerIP(String svrIP, int port)
+	{
+		String ipdata = String.format("%s:%d", svrIP, port);
+		UpdateWallPADData(SERVER_IP, ipdata);
+	}
+
+	public String GetServerIP()
+	{
+		String ret = GetWallPADData(SERVER_IP);
+		String[] retdata = ret.split(":");
+		return retdata[0];
+	}
+
+	public int GetServerPort()
+	{
+		try {
+			String ret = GetWallPADData(SERVER_IP);
+			String[] retdata = ret.split(":");
+			return Integer.parseInt(retdata[1]);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+
+	}
+	public void SetManagePC(String svrIP, int port)
+	{
+		String ipdata = String.format("%s:%d", svrIP, port);
+		UpdateWallPADData(MANAGEPC_IP, ipdata);
+	}
+
+	public String GetManagePCIP()
+	{
+		String ret;
+		//단지서버 1.0/2.0 구분하여 처리 (2.0일시는 단지서버로 보내도록 수정)
+		WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(CTX);
+		boolean bNewDanjiServer = wallpadDeviceSet.GetNewDanjiServer();
+		wallpadDeviceSet.closeDB();
+
+		if(bNewDanjiServer == false)
+		{
+			ret = GetWallPADData(MANAGEPC_IP);
+		}
+		else
+		{
+			ret = GetWallPADData(SERVER_IP);
+		}
+
+		String[] retdata = ret.split(":");
+		return retdata[0];
+
+	}
+
+	public int GetManagePCPort()
+	{
+		try {
+			String ret = GetWallPADData(MANAGEPC_IP);
+			String[] retdata = ret.split(":");
+			return Integer.parseInt(retdata[1]);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetFTPIP(String svrIP)
+	{
+		UpdateWallPADData(FTP_IP, svrIP);
+	}
+
+	public String GetFTPIP()
+	{
+		String ret = GetWallPADData(FTP_IP);
+		return ret;
+	}
+
+	public void SetGatewayIP(String IPaddr)
+	{
+		UpdateWallPADData(GW_IP, IPaddr);
+	}
+
+	public String GetGatewayIP()
+	{
+		String ret = GetWallPADData(GW_IP);
+
+		return ret;
+	}
+
+	public void SetSubnetmask(String IPaddr)
+	{
+		UpdateWallPADData(SUBNET, IPaddr);
+	}
+
+	public String GetSubnetmask()
+	{
+		String ret = GetWallPADData(SUBNET);
+
+		return ret;
+	}
+
+	public void SetAppVer(String Ver)
+	{
+		UpdateWallPADData(APP_VER, Ver);
+	}
+
+	public String GetAPPVer()
+	{
+		String ret = GetWallPADData(APP_VER);
+		return ret;
+	}
+
+	public void SetNoticeVer(String Ver)
+	{
+		UpdateWallPADData(NOTICE_VER, Ver);
+	}
+
+	public String GetNoticeVer()
+	{
+		String ret = GetWallPADData(NOTICE_VER);
+		if(ret.length() < NOTICE_VER_DEFAULT.length())
+		{
+			return NOTICE_VER_DEFAULT;
+		}
+		return ret;
+	}
+
+	public void SetWeatherVer(String Ver)
+	{
+		UpdateWallPADData(WEATHER_VER, Ver);
+	}
+
+	public String GetWeatherVer()
+	{
+		String ret = GetWallPADData(WEATHER_VER);
+		return ret;
+	}
+
+	public String[] GetCurWeatherData()
+	{
+		String[] ret = GetWallPADData(WEATHER_VER).split(define.DEVCTR_DATA_SPLITER);
+		return ret;
+	}
+
+	public void SetCurWeatherCode(String code)
+	{
+		try {
+			UpdateWallPADData(WEATHER_CODE, code);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG , "[Exception] SetCurWeatherCode input fail ");
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public String GetCurWeatherCode()
+	{
+		try {
+			String ret = GetWallPADData(WEATHER_CODE);
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return CODE_DEFAULT;
+		}
+		catch (Exception e)
+		{
+			Log.e(TAG , "[Exception] GetCurWeatherCode fail ");
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return CODE_DEFAULT;
+		}
+	}
+	public void SetSettingVer(String Ver)
+	{
+		UpdateWallPADData(SETTING_VER, Ver);
+	}
+
+	public String GetSettingVer()
+	{
+		String ret = GetWallPADData(SETTING_VER);
+		return ret;
+	}
+
+	public void SetServerVer(String Ver)
+	{
+		UpdateWallPADData(SERVER_VERSION, Ver);
+	}
+
+	public String GetServerVer()
+	{
+		String ret = GetWallPADData(SERVER_VERSION);
+		return ret;
+	}
+
+	public void SetLightCNT(int CNT)
+	{
+		UpdateWallPADData(DEV_LIGHT_CNT, String.valueOf(CNT));
+	}
+
+	public int GetLightCNT()
+	{
+		try {
+			String ret = GetWallPADData(DEV_LIGHT_CNT);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetGasCNT(int CNT)
+	{
+		UpdateWallPADData(DEV_GAS_CNT, String.valueOf(CNT));
+	}
+
+	public int GetGasCNT()
+	{
+		try {
+			String ret = GetWallPADData(DEV_GAS_CNT);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetHeatingCNT(int CNT)
+	{
+		UpdateWallPADData(DEV_HEATING_CNT, String.valueOf(CNT));
+	}
+
+	public int GetHeatingCNT()
+	{
+		try {
+			String ret = GetWallPADData(DEV_HEATING_CNT);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetHeartbeatPeriod(int period)
+	{
+		UpdateWallPADData(HEARTBEAT_PERIOD, String.valueOf(period));
+	}
+
+	public int GetHeartbeatPeriod()
+	{
+		try {
+			String ret = GetWallPADData(HEARTBEAT_PERIOD);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetLastHeartbeat(String timedata)
+	{
+		UpdateWallPADData(LAST_HEARTBEAT, timedata);
+	}
+
+	public String GetLastHeartbeat()
+	{
+		String ret = GetWallPADData(LAST_HEARTBEAT);
+		return ret;
+	}
+
+	public static final String LAST_STATUSBEAT              = "LAST_STATUSBEAT";
+	public static final String LAST_STATUSBEAT_DEFAULT      = "0000.00.00.00.00.00";
+
+	public void SetLastStatusbeat(String timedata)
+	{
+		UpdateWallPADData(LAST_STATUSBEAT, timedata);
+	}
+
+	public String GetLastStatusbeat()
+	{
+		String ret = GetWallPADData(LAST_STATUSBEAT);
+		return ret;
+	}
+
+	public void SetNewsCnt(String cnt)
+	{
+		UpdateWallPADData(NEWS_CNT, cnt);
+	}
+
+	public String GetNewsCnt()
+	{
+		String ret = GetWallPADData(NEWS_CNT);
+		return ret;
+	}
+
+	public void SetMainBG(int bgtype, String locate)
+	{
+		String setdata = MAINBGTYPE_TEXT[bgtype]+":"+locate;
+		UpdateWallPADData(MAINBGTYPE, setdata );
+	}
+
+	public int GetMainBGType()
+	{
+		try {
+			String ret = GetWallPADData(MAINBGTYPE);
+			String[] bgtype = ret.split(":");
+			return Integer.parseInt(bgtype[0]);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+	public String GetMainBGLocate()
+	{
+		String ret = GetWallPADData(MAINBGTYPE);
+		String[] bgtype = ret.split(":");
+		return bgtype[1];
+	}
+
+	/////////////////////////////////////////////////////////////////////////////////////////////////
+	/////////////////////////////////////////// icontrols //////////////////////////////////////////
+	public void SetOutModeWaitTime( int nSecond )
+	{
+		try
+		{
+
+			UpdateWallPADData(OUTMODE_WAITTIME, String.valueOf(nSecond));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public int GetOutModeWaitTime()
+	{
+		try
+		{
+			String ret = GetWallPADData(OUTMODE_WAITTIME);
+
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetComeBackWaitTime(int nSecond)
+	{
+		try
+		{
+
+			UpdateWallPADData(COMEBACK_WAITTIME, String.valueOf(nSecond));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public int GetComeBackWaitTime()
+	{
+		try
+		{
+			String ret = GetWallPADData(COMEBACK_WAITTIME);
+
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return 0;
+		}
+	}
+
+	public void SetOutModeLinkDevice( String DeviceList )
+	{
+		try
+		{
+
+			UpdateWallPADData(OUTMODE_LINK_DEVICE, DeviceList );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public String GetOutModeLinkDevice()
+	{
+		try
+		{
+			String ret = GetWallPADData(OUTMODE_LINK_DEVICE);
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+			return "";
+		}
+	}
+
+	public void SetComeBackLinkDevice( String DeviceList )
+	{
+		try
+		{
+
+			UpdateWallPADData(INMODE_LINK_DEVICE, DeviceList );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
+		}
+	}
+
+	public String GetComeBackLinkDevice()
+	{
+		try
+		{
+			String ret = GetWallPADData(INMODE_LINK_DEVICE);
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+
+	public void SetInBedLinkDevice( String DeviceList )
+	{
+		try
+		{
+
+			UpdateWallPADData(IN_BED_LINK_DEVICE, DeviceList );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public String GetInBedLinkDevice()
+	{
+		try
+		{
+			String ret = GetWallPADData(IN_BED_LINK_DEVICE);
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+
+	public void SetOutBedLinkDevice( String DeviceList )
+	{
+		try
+		{
+
+			UpdateWallPADData(OUT_BED_LINK_DEVICE, DeviceList );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public String GetOutBedLinkDevice()
+	{
+		try
+		{
+			String ret = GetWallPADData(OUT_BED_LINK_DEVICE);
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+
+	public void SetCallAPKStatus( boolean Running )
+	{
+		try
+		{
+			if( Running == true )
+				UpdateWallPADData(CALL_APK_STATUS, "1" );
+			else
+				UpdateWallPADData(CALL_APK_STATUS, "0" );
+
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetCallAPKStatusRunning()
+	{
+		try
+		{
+			String ret = GetWallPADData(CALL_APK_STATUS);
+			if( ret.equals("1"))
+				return true;
+			else
+				return false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public void SetCallStatus(boolean bTalking)
+	{
+		try
+		{
+			if (bTalking)
+				UpdateWallPADData(CALL_STATUS, "1" );
+			else
+				UpdateWallPADData(CALL_STATUS, "0" );
+
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetCallStatus()
+	{
+		try
+		{
+			String ret = GetWallPADData(CALL_STATUS);
+			if (ret.equals("1"))
+				return true;
+			else
+				return false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public boolean setRemoteCallUserPopupRun(boolean bRun) {
+		try {
+			if (bRun) {
+				return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "1" );
+			}
+			else {
+				return UpdateWallPADData(REMOTECALL_USER_POPUP_RUN, "0" );
+			}
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] setRemoteCallUserPopupRun(boolean bRun)");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public boolean getRemoteCallUserPopupRun() {
+		try {
+			String strResult = GetWallPADData(REMOTECALL_USER_POPUP_RUN);
+			if (strResult.equals("1")) return true;
+			else return false;
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public boolean setGlobalScreenAPKRun(boolean bRun) {
+		try {
+			if (bRun) {
+			    return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "1" );
+            }
+			else {
+			    return UpdateWallPADData(GLOBALSCREEN_APK_RUN, "0" );
+            }
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] setGlobalScreenAPKStatusRun(boolean bRun)");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public boolean getGlobalScreenAPKRun() {
+		try {
+			String strResult = GetWallPADData(GLOBALSCREEN_APK_RUN);
+			if (strResult.equals("1")) return true;
+			else return false;
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public void SetModeLampBrLevel( int nLevel )
+	{
+		try
+		{
+			if( nLevel >= 0 && nLevel <=4 )
+			{
+				UpdateWallPADData(MODE_LAMP_BR_LEVEL, String.valueOf(nLevel) );
+			}
+			else
+			{
+				Log.d(TAG , "SetModeLampBrLevel input fail ");
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public int GetModeLampBrLevel()
+	{
+		try
+		{
+			String ret = GetWallPADData(MODE_LAMP_BR_LEVEL);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+
+	}
+
+	public void SetWallPadMasterVolume( int nLevel )
+	{
+		try
+		{
+			UpdateWallPADData(WALLPAD_MASTER_VOLUME, String.valueOf(nLevel) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public int GetWallPadMasterVolume( )
+	{
+		try
+		{
+			String ret = GetWallPADData(WALLPAD_MASTER_VOLUME);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+
+	}
+
+	public void SetSoundOutputOfEventAlarm( boolean OutSount )
+	{
+		try
+		{
+
+			UpdateWallPADData(SOUND_OUTPUT_EVENT_ALARM, String.valueOf(OutSount) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetSoundOutputOfEventAlarm()
+	{
+		try
+		{
+			String ret = GetWallPADData(SOUND_OUTPUT_EVENT_ALARM);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return true;
+		}
+	}
+
+	public void Set_MultiSwitch_Concent_Use( boolean value)
+	{
+		try
+		{
+			UpdateWallPADData(MULTISWITCH_CONCENT_USE, String.valueOf(value) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean Get_MultiSwitch_Concent_Use()
+	{
+		try
+		{
+			String ret = GetWallPADData(MULTISWITCH_CONCENT_USE);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 웰컴조명 선택된 조명 설정한다.<br>
+	 * 거실등/복도등/주방등 순으로 설정
+	 * @param value
+	 */
+	public void Set_WelcomeLight_Selected( String value)
+	{
+		try
+		{
+			String[] split = value.split("/");
+			if(split.length != 3)
+			{
+				Log.e(TAG, "[Set_WelcomeLight_Selected] - LEN ERROR !!!");
+				return;
+			}
+
+			for(int i = 0; i < split.length; i++)
+			{
+				int ival = Integer.parseInt(split[i]);
+				if(ival < 0 || ival > 1)
+				{
+					Log.e(TAG, "[Set_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
+					return;
+				}
+			}
+
+			UpdateWallPADData(WELCOMELIGHT_SELECT_ITEMS, value );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 웰컴조명 선택된 조명을 가져온다.<br>
+	 * 거실등/복도등/주방등 순으로 저장되어 있음<br>
+	 * 저장된 값의 형식이 틀린 경우 모두 사용안함 반환 : 0/0/0
+	 */
+	public String Get_WelcomeLight_Selected()
+	{
+		try
+		{
+			String ret = GetWallPADData(WELCOMELIGHT_SELECT_ITEMS);
+			String[] split = ret.split("/");
+			if(split.length != 3)
+			{
+				Log.e(TAG, "[Get_WelcomeLight_Selected] - LEN ERROR !!!");
+				return "0/0/0";
+			}
+
+			for(int i = 0; i < split.length; i++)
+			{
+				int ival = Integer.parseInt(split[i]);
+				if(ival < 0 || ival > 1)
+				{
+					Log.e(TAG, "[Get_WelcomeLight_Selected] - WRONG DATA SAVED !!!");
+					return "0/0/0";
+				}
+			}
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "0/0/0";
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "0/0/0";
+		}
+	}
+
+	public void SetCloseSensorValue( int value)
+	{
+		try
+		{
+			UpdateWallPADData(CLOSE_SENSOR_VALUE, String.valueOf(value) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public int GetCloseSensorValue()
+	{
+		try
+		{
+			String ret = GetWallPADData(CLOSE_SENSOR_VALUE);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 15; // DB 값 접근 에러 발생시, 민감도 최대로 설정
+		}
+	}
+
+	public void Set_InterlayerSensor_Status( String value)
+	{
+		try
+		{
+			UpdateWallPADData(INTERLAYER_NOISE_SENSOR_STATUS, value );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public String Get_InterlayerSensor_Status()
+	{
+		try
+		{
+			String ret = GetWallPADData(INTERLAYER_NOISE_SENSOR_STATUS);
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "EXCEPTION";
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "EXCEPTION";
+		}
+	}
+
+	public void SetCurrentScreenIDValue( int value)
+	{
+		try
+		{
+			UpdateWallPADData(CURRENT_SCREEN_ID_VALUE, String.valueOf(value) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public String GetNowMonthSelect()
+	{
+		try
+		{
+			String ret = GetWallPADData(NOW_MONTH_SELECT);
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "NOW";
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			Log.w(TAG, "[GetNowMonthSelect] Exception - Default");
+			return "NOW";
+		}
+	}
+
+	public void SetNowMonthSelect( String value)
+	{
+		try
+		{
+			UpdateWallPADData(NOW_MONTH_SELECT, value );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 저장된 실시간검침기 전력 누적사용량을 가져온다.
+	 *
+	 * @return - (double) 전력 누적사용량
+	 */
+	public double Get_RealTimeMeter_ElecAcc()
+	{
+		try
+		{
+			String ret = GetWallPADData(REALTIMEMETER__ELEC_ACC);
+			return Double.parseDouble(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			Log.e(TAG, "[Get_RealTimeMeter_ElecAcc] Exception - Default");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+
+	/**
+	 * 실시간검침기 전력 누적사용량을 저장한다.
+	 *
+	 * @param value - (double) 저장할 값
+	 *
+	 * @return (boolean) 저장성공여부 true:성공 , false:실패
+	 */
+	public boolean Set_RealTimeMeter_ElecAcc(double value)
+	{
+		try
+		{
+			return UpdateWallPADData(REALTIMEMETER__ELEC_ACC, String.format("%.2f", value));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			Log.e(TAG, "[Set_RealTimeMeter_ElecAcc] Exception - Default");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return false;
+	}
+
+	public int GetCurrentScreenIDValue()
+	{
+		try
+		{
+			String ret = GetWallPADData(CURRENT_SCREEN_ID_VALUE);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+
+
+
+	/**
+	 * @description
+	// GLE 모델 LED 버튼 밝기 값 저장
+	 *  0 ~2 사이값만 입력 하도록 한다.
+	 */
+	public void SetLEDButtonBrightnessLevel( int level )
+	{
+		try
+		{
+			if( level >=0 && level <= 2 )
+			{
+				UpdateWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL, String.valueOf(level) );
+			}
+			else
+			{
+				Log.d(TAG , "SetLEDButtonBrightnessLevel input fail ");
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+	/**
+	 * @description
+	 * GEL 모델 LED 버튼 밝기 값 리턴
+	 * 리턴값은 0~2 의값만 리턴된다.
+	 */
+	public int GetLEDButtonBrightnessLevel()
+	{
+		try
+		{
+			String ret = GetWallPADData(LED_BUTTON_BRIGHTNESS_LEVEL);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+	/**
+	 * @description
+	 * APU 감지시 정전 상태 저장.... 정전이면 true,  복전이면 false 입력하도록 한다.
+	 */
+	public void SetBlackOutEnergy( boolean Off )
+	{
+		try
+		{
+			UpdateWallPADData(BLACK_OUT_ENERGY, String.valueOf(Off) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+	/**
+	 * @description
+	 * 정전 상태 리턴... true 정전... false 이면 복전  값을 리턴한다.
+	 */
+	public boolean GetCurrentBlackOutEnergy()
+	{
+		try
+		{
+			String ret = GetWallPADData(BLACK_OUT_ENERGY);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+	/**
+	 * @description
+	// 마지막으로 실행된 메인 스크린 화면을 아이디를 저장하거나...
+	// 사용자가 고정시켜둔 메인스크린 화면을 저장하도록 한다.
+	 */
+	public void SetSelectedMainScreen( int id )
+	{
+		try
+		{
+			if( id == MAIN_DEFAULT_SCREEN || id == MAIN_BOOKMARK_SCREEN || id == MAIN_ENERGY_SCREEN )
+			{
+				UpdateWallPADData(MAIN_SELECTED_SCREEN	, String.valueOf(id) );
+			}
+			else
+			{
+				Log.d(TAG , "SetSelectedMainScreen input Fail ");
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+	/**
+	 * @description
+	 * 마지막으로 실행된 메인 스크린 화면을 아이디를 리턴 하거나
+	 * 사용자가 고정시켜둔 메인스크린 화면을 id를 리턴하도록 한다.
+	 */
+	public int GetSelectedMainScreen()
+	{
+		try
+		{
+			String ret = GetWallPADData(MAIN_SELECTED_SCREEN);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+	/**
+	 * @description
+	 * 무드등 램프 상태 ( 월패드 전원 재인가시 사용하기 위해 )
+	 * input Param
+	 * true 이면 On
+	 * false 이면 Off
+	 */
+	public void SetMoodLampState( boolean On )
+	{
+		try
+		{
+
+			UpdateWallPADData(MOOD_LAMP_STATE, String.valueOf(On) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+	/**
+	 * @description
+	 * 무드등 램프 상태 리턴  ( 월패드 전원 재인가시 사용하기 위해 )
+	 * return Param
+	 * true 이면 On
+	 * false 이면 Off
+	 */
+	public boolean GetMoodLampState()
+	{
+		try
+		{
+			String ret = GetWallPADData(MOOD_LAMP_STATE);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+
+
+	public void SetCarSoundOfEventAlarm( boolean OutSount )
+	{
+		try
+		{
+
+			UpdateWallPADData(SOUND_OUTPUT_CAR_ALARM, String.valueOf(OutSount) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetCarSoundOfEventAlarm()
+	{
+		try
+		{
+			String ret = GetWallPADData(SOUND_OUTPUT_CAR_ALARM);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return true;
+		}
+	}
+
+	public void SetCallSoundOfEventAlarm( boolean OutSound )
+	{
+		try
+		{
+
+			UpdateWallPADData(SOUND_OUTPUT_CALL_ALARM, String.valueOf(OutSound) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetCallSoundOfEventAlarm()
+	{
+		try
+		{
+			String ret = GetWallPADData(SOUND_OUTPUT_CALL_ALARM);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return true;
+		}
+	}
+
+	public void SetBandLocationEventAlarm( boolean OutSount )
+	{
+		try
+		{
+
+			UpdateWallPADData(SOUND_OUTPUT_BAND_LOCATION, String.valueOf(OutSount) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetBandLocationEventAlarm()
+	{
+		try
+		{
+			String ret = GetWallPADData(SOUND_OUTPUT_BAND_LOCATION);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return true;
+		}
+	}
+
+	public void SetNoisePopupUse( boolean OutSount )
+	{
+		try
+		{
+			UpdateWallPADData(INTERLAYER_NOISE_POPUP_USE, String.valueOf(OutSount) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetNoisePopupUse()
+	{
+		try
+		{
+			String ret = GetWallPADData(INTERLAYER_NOISE_POPUP_USE);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드1 사용설정 <br>
+	 * 기본모드1 (조명 에너지 절약)
+	 *
+	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
+	 */
+	public void Set_InRoomDetect_Scenario_Normal1( boolean mode )
+	{
+		try
+		{
+			UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1, String.valueOf(mode) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드1 사용여부 확인 <br>
+	 * 기본모드1 (조명 에너지 절약)
+	 *
+	 */
+	public boolean Get_InRoomDetect_Scenario_Normal1()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1);
+
+			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			else { return false; }
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드2 사용설정 <br>
+	 * 기본모드2 (야간 식탁등 켜짐)
+	 *
+	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
+	 */
+	public void Set_InRoomDetect_Scenario_Normal2( boolean mode )
+	{
+		try
+		{
+			UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2, String.valueOf(mode) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드2 사용여부 확인 <br>
+	 * 기본모드2 (야간 식탁등 켜짐)
+	 *
+	 */
+	public boolean Get_InRoomDetect_Scenario_Normal2()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2);
+
+			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			else { return false; }
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 사용자조명절전 사용설정 <br>
+	 *
+	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
+	 */
+	public void Set_InRoomDetect_Scenario_Userset( boolean mode )
+	{
+		try
+		{
+			UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET, String.valueOf(mode) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 사용자조명절전 사용여부 확인 <br>
+	 *
+	 */
+	public boolean Get_InRoomDetect_Scenario_Userset()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET);
+
+			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			else { return false; }
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
+	 *
+	 * @param mode - (boolean) 설정할 값 (true:ON , false:OFF)
+	 */
+	public void Set_InRoomDetect_Scenario_ElecRangeSafe( boolean mode )
+	{
+		try
+		{
+			UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE, String.valueOf(mode) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
+	 *
+	 */
+	public boolean Get_InRoomDetect_Scenario_ElecRangeSafe()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE);
+
+			if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			else { return false; }
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+
+	/**
+	 * 스마트 재실센서 시나리오 공통 설정 <br>
+	 *
+	 * @param kindStr 		- (String) 설정할 시나리오 모드
+	 * @param startTimeStr 	- (String) 설정할 시작 시간
+	 * @param endTimeStr 	- (String) 설정할 종료 시간
+	 * @param dateStr 		- (String) 설정할 요일 모음
+	 * @param locStr 		- (String) 설정할 제어위치 모음
+	 * @param actTime1Str 	- (String) 설정할 시나리오 동작시간1
+	 * @param act1Str 		- (String) 설정할 동작1
+	 * @param actTime2Str 	- (String) 설정할 시나리오 동작시간2
+	 * @param act2Str 		- (String) 설정할 동작2
+	 *
+	 */
+	public void Set_InRoomDetect_Scenario_Modes( String kindStr, String startTimeStr, String endTimeStr, String dateStr, String locStr,
+												 String actTime1Str, String act1Str, String actTime2Str, String act2Str )
+	{
+		/*
+			KIND-NORMAL1/START-AM:09:30/END-PM:10:00/DATE-1:2:3:4:5:6:7/
+			LOC-LIV;KIT;TBL;MROOM;BED1;BED2/TIME1-60/ACT1-DIM:30/TIME2-20/ACT2-STAT:OFF
+		*/
+		String saveStr = "";
+		String saveMode = "";
+		try
+		{
+			String kind = "";
+			String start = "";
+			String end = "";
+			String date = "";
+			String loc = "";
+			String acttime1 = "";
+			String act1 = "";
+			String acttime2 = "";
+			String act2 = "";
+
+			// 1. KIND - KIND-NORMAL1
+			if(kindStr.equals("NORMAL1") || kindStr.equals("NORMAL2") || kindStr.equals("USERSET") || kindStr.equals("ELECRANGE_SAFE"))
+			{
+				kind += "KIND-" + kindStr;
+
+				if(kindStr.equals("NORMAL1")) saveMode = INROOMDETECT_SCENARIO_NORMAL1_INFO;
+				else if(kindStr.equals("NORMAL2")) saveMode = INROOMDETECT_SCENARIO_NORMAL2_INFO;
+				else if(kindStr.equals("USERSET")) saveMode = INROOMDETECT_SCENARIO_USERSET_INFO;
+				else if(kindStr.equals("ELECRANGE_SAFE")) saveMode = INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO;
+			}
+			else
+			{
+				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Kind Error : " + kindStr);
+				return;
+			}
+
+			// 2. Start Time - START-AM:09:30
+			String[] startArr = startTimeStr.split(":");
+			if(startArr.length == 3)
+			{
+				if(startArr[0].equals("AM") || startArr[0].equals("PM"))
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr ampm : " + startTimeStr);
+					return;
+				}
+
+				if(Integer.parseInt(startArr[1]) >= 0 && Integer.parseInt(startArr[1]) <= 23)
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr hour : " + startTimeStr);
+					return;
+				}
+
+				if(Integer.parseInt(startArr[2]) >= 0 && Integer.parseInt(startArr[2]) <= 59)
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr min : " + startTimeStr);
+					return;
+				}
+
+				start += "START-" + startTimeStr;
+			}
+			else
+			{
+				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - startTimeStr Error : " + startTimeStr);
+				return;
+			}
+
+			// 3. End Time - END-PM:10:00
+			String[] endtimeArr = endTimeStr.split(":");
+			if(endtimeArr.length == 3)
+			{
+				if(endtimeArr[0].equals("AM") || endtimeArr[0].equals("PM"))
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr ampm : " + endTimeStr);
+					return;
+				}
+
+				if(Integer.parseInt(endtimeArr[1]) >= 0 && Integer.parseInt(endtimeArr[1]) <= 23)
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr hour : " + endTimeStr);
+					return;
+				}
+
+				if(Integer.parseInt(endtimeArr[2]) >= 0 && Integer.parseInt(endtimeArr[2]) <= 59)
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr min : " + endTimeStr);
+					return;
+				}
+
+				end += "END-" + endTimeStr;
+			}
+			else
+			{
+				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - endTimeStr Error : " + endTimeStr);
+				return;
+			}
+
+			// 4. Date - DATE-1:2:3:4:5:6:7
+			String[] dates = dateStr.split(":");
+			for(int i = 0; i < dates.length; i++)
+			{
+				if(Integer.parseInt(dates[i]) >= 1 && Integer.parseInt(dates[i]) <= 7)
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - dateStr Range Error : " + i + " / "  + dateStr);
+					return;
+				}
+			}
+			date += "DATE-" + dateStr;
+
+			// 5. Loc - LOC-LIV;KIT;TBL;MROOM;BED1;BED2
+			String[] locs = locStr.split(";");
+			for(int i = 0; i < locs.length; i++)
+			{
+				if(locs[i].equals("LIV") || locs[i].equals("KIT") || locs[i].equals("TBL") || locs[i].equals("MROOM") ||
+						locs[i].equals("MROOM") || locs[i].equals("BED1") || locs[i].equals("BED2")|| locs[i].equals("ELECRANGE") )
+				{ }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - locStr Range Error : " + i + " / " + locs[i] + " / " + locStr);
+					return;
+				}
+			}
+			loc += "LOC-" + locStr;
+
+			// 6. ActTime1 - TIME1-60
+			if(Integer.parseInt(actTime1Str) >= 0 && Integer.parseInt(actTime1Str) <= 360)
+			{ }
+			else
+			{
+				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime1Str Range Error : " + actTime1Str);
+				return;
+			}
+			acttime1 += "TIME1-" + actTime1Str;
+
+			// 7. Act1 - ACT1-DIM:30
+			String[] act1s = act1Str.split(";");
+			for(int j = 0; j < act1s.length; j++)
+			{
+				String[] firsts = act1s[j].split(":");
+				if(firsts.length == 2)
+				{
+					if(firsts[0].equals("DIM") )
+					{
+						if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
+						{ }
+						else
+						{
+							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + j + " / "  + act1s);
+							return;
+						}
+					}
+					else if(firsts[0].equals("STAT") )
+					{
+						if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
+						{ }
+						else
+						{
+							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act1s);
+							return;
+						}
+					}
+				}
+			}
+			act1 += "ACT1-" + act1Str;
+
+			// 8. ActTime2 - TIME2-60
+			if(Integer.parseInt(actTime2Str) >= 0 && Integer.parseInt(actTime2Str) <= 360)
+			{ }
+			else
+			{
+				Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - actTime2Str Range Error : " + actTime2Str);
+				return;
+			}
+			acttime2 += "TIME2-" + actTime2Str;
+
+			// 9. Act2 - ACT2-STAT:OFF
+			String[] act2s = act1Str.split(";");
+			for(int j = 0; j < act2s.length; j++)
+			{
+				String[] firsts = act2s[j].split(":");
+				if(firsts.length == 2)
+				{
+					if(firsts[0].equals("DIM") )
+					{
+						if(Integer.parseInt(firsts[1]) >= 10 && Integer.parseInt(firsts[1]) <= 100)
+						{ }
+						else
+						{
+							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s DIM Error : " + act2s);
+							return;
+						}
+					}
+					else if(firsts[0].equals("STAT") )
+					{
+						if(firsts[1].equals("ON") || firsts[1].equals("OFF"))
+						{ }
+						else
+						{
+							Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - act1s STAT Error : " + act2s);
+							return;
+						}
+					}
+				}
+			}
+			act2 += "ACT2-" + act2Str;
+
+
+			saveStr += kind + "/" + start + "/" + end + "/" + date + "/" + loc + "/" + acttime1 + "/" + act1 + "/" + acttime2 + "/" + act2;
+			Log.d(TAG, "[Set_InRoomDetect_Scenario_Modes] - save : " + saveStr);
+
+			UpdateWallPADData(saveMode, saveStr);
+
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception ee)
+		{
+			Log.w(TAG, "[Set_InRoomDetect_Scenario_Modes] - Exception !!!");
+			LogUtil.errorLogInfo("", TAG, ee);//ee.printStackTrace();
+		}
+	}
+
+
+	/**
+	 * 스마트 재실센서 기본모드1 사용설정 <br>
+	 *
+	 * @param modeStr - (String) 설정할 값
+	 */
+	public void Set_InRoomDetect_Scenario_Mode_Normal1( String modeStr )
+	{
+		try
+		{
+			String[] infos = modeStr.split("/");
+
+			if(infos.length != 9) return;
+
+			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
+			boolean error = false;
+
+			for(int i = 0; i < infos.length; i++)
+			{
+				String[] data = infos[i].split("-");
+				if(data.length != 2)
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+				String type = data[0];
+				String info = data[1];
+
+				if(type.equals("KIND"))
+				{
+					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
+					{
+						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
+						return;
+					}
+				}
+				else if(type.equals("START")) { }
+				else if(type.equals("END")) { }
+				else if(type.equals("DATE")) { }
+				else if(type.equals("LOC")) { }
+				else if(type.equals("TIME1")) { }
+				else if(type.equals("TIME2")) { }
+				else if(type.equals("ACT1")) { }
+				else if(type.equals("ACT2")) { }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+			}
+
+			if(!error)
+			{
+				UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO, modeStr);
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드1 사용여부 확인 <br>
+	 *
+	 */
+	public String Get_InRoomDetect_Scenario_Mode_Normal1()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL1_INFO);
+
+			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			//else { return false; }
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드2 사용설정 <br>
+	 *
+	 * @param modeStr - (String) 설정할 값
+	 */
+	public void Set_InRoomDetect_Scenario_Mode_Normal2( String modeStr )
+	{
+		try
+		{
+			String[] infos = modeStr.split("/");
+
+			if(infos.length != 9) return;
+
+			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
+			boolean error = false;
+
+			for(int i = 0; i < infos.length; i++)
+			{
+				String[] data = infos[i].split("-");
+				if(data.length != 2)
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+				String type = data[0];
+				String info = data[1];
+
+				if(type.equals("KIND"))
+				{
+					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
+					{
+						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
+						return;
+					}
+				}
+				else if(type.equals("START")) { }
+				else if(type.equals("END")) { }
+				else if(type.equals("DATE")) { }
+				else if(type.equals("LOC")) { }
+				else if(type.equals("TIME1")) { }
+				else if(type.equals("TIME2")) { }
+				else if(type.equals("ACT1")) { }
+				else if(type.equals("ACT2")) { }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+			}
+
+			if(!error)
+			{
+				UpdateWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO, modeStr);
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 기본모드2 사용여부 확인 <br>
+	 *
+	 */
+	public String Get_InRoomDetect_Scenario_Mode_Normal2()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_NORMAL2_INFO);
+
+			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			//else { return false; }
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 사용자설정모드 사용설정 <br>
+	 *
+	 * @param modeStr - (String) 설정할 값
+	 */
+	public void Set_InRoomDetect_Scenario_Mode_Userset( String modeStr )
+	{
+		try
+		{
+			String[] infos = modeStr.split("/");
+
+			if(infos.length != 9) return;
+
+			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
+			boolean error = false;
+
+			for(int i = 0; i < infos.length; i++)
+			{
+				String[] data = infos[i].split("-");
+				if(data.length != 2)
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+				String type = data[0];
+				String info = data[1];
+
+				if(type.equals("KIND"))
+				{
+					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
+					{
+						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
+						return;
+					}
+				}
+				else if(type.equals("START")) { }
+				else if(type.equals("END")) { }
+				else if(type.equals("DATE")) { }
+				else if(type.equals("LOC")) { }
+				else if(type.equals("TIME1")) { }
+				else if(type.equals("TIME2")) { }
+				else if(type.equals("ACT1")) { }
+				else if(type.equals("ACT2")) { }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+			}
+
+			if(!error)
+			{
+				UpdateWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO, modeStr);
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 사용자설정모드 사용여부 확인 <br>
+	 *
+	 */
+	public String Get_InRoomDetect_Scenario_Mode_Userset()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_USERSET_INFO);
+
+			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			//else { return false; }
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 전기레인지 안전모드 사용설정 <br>
+	 *
+	 * @param modeStr - (String) 설정할 값
+	 */
+	public void Set_InRoomDetect_Scenario_Mode_ElecRangeSafe( String modeStr )
+	{
+		try
+		{
+			String[] infos = modeStr.split("/");
+
+			if(infos.length != 9) return;
+
+			//String kind, startRunTime, endRunTime, date, loc, nonDetectTime1, act1, nonDetectTime2, act2;
+			boolean error = false;
+
+			for(int i = 0; i < infos.length; i++)
+			{
+				String[] data = infos[i].split("-");
+				if(data.length != 2)
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] each data LEN ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+				String type = data[0];
+				String info = data[1];
+
+				if(type.equals("KIND"))
+				{
+					if( !info.equals("NORMAL1") && !info.equals("NORMAL2") && !info.equals("USERSET") && !info.equals("ELECRANGE_SAFE") )
+					{
+						Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] - KIND Err : " + info);
+						return;
+					}
+				}
+				else if(type.equals("START")) { }
+				else if(type.equals("END")) { }
+				else if(type.equals("DATE")) { }
+				else if(type.equals("LOC")) { }
+				else if(type.equals("TIME1")) { }
+				else if(type.equals("TIME2")) { }
+				else if(type.equals("ACT1")) { }
+				else if(type.equals("ACT2")) { }
+				else
+				{
+					Log.w(TAG, "[Set_InRoomDetect_Scenario_Mode_Normal1] type ERROR !!! : " + infos[i]);
+					error = true;
+					break;
+				}
+			}
+
+			if(!error)
+			{
+				UpdateWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO, modeStr);
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트 재실센서 전기레인지 안전모드 사용여부 확인 <br>
+	 *
+	 */
+	public String Get_InRoomDetect_Scenario_Mode_ElecRangeSafe()
+	{
+		try
+		{
+			String ret = GetWallPADData(INROOMDETECT_SCENARIO_ELECRANGE_SAFE_INFO);
+
+			//if (ret.compareTo(String.valueOf(true)) == 0) { return true; }
+			//else { return false; }
+
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return "";
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return "";
+		}
+	}
+	/**
+	 * 스마트키 감지시 알람 여부 설정
+	 *
+	 * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
+	 */
+	public void SetSmartKeyDetectionAlarm(boolean bSet)
+	{
+		try
+		{
+			UpdateWallPADData(SMARTKEY_DETECTION_ALARM, String.valueOf(bSet));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			Log.e(TAG, "[SetSmartKeyDetectionAlarm] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트키 감지시 알람 여부 읽기
+	 *
+	 * @return (boolean) 설정값 (true:ON , false:OFF)
+	 */
+	public boolean GetSmartKeyDetectionAlarm()
+	{
+		try
+		{
+			String ret = GetWallPADData(SMARTKEY_DETECTION_ALARM);
+
+			if(ret.compareTo(String.valueOf(true)) == 0)
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			Log.e(TAG, "[GetSmartKeyDetectionAlarm] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 환기 예약 ON/OFF 여부 설정
+	 *
+	 * @param bSet - (boolean) 설정할 값 (true:ON , false:OFF)
+	 */
+	public void SetVentiReserveOnOff(boolean bSet)
+	{
+		try
+		{
+			UpdateWallPADData(VEN_RESERVE_ONOFF, String.valueOf(bSet));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			Log.e(TAG, "[VEN_RESERVE_ONOFF] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 환기 예약 ON/OFF 여부 읽기
+	 *
+	 * @return (boolean) 설정값 (true:ON , false:OFF)
+	 */
+	public boolean GetVentiReserveOnOff()
+	{
+		try
+		{
+			String ret = GetWallPADData(VEN_RESERVE_ONOFF);
+			if(ret.compareTo(String.valueOf(true)) == 0) return true;
+			else                                         return false;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			Log.e(TAG, "[GetVentiReserveOnOff] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	public void SetArsControl( boolean OutSount )
+	{
+		try
+		{
+
+			UpdateWallPADData(ARS_CONTROL_DEVICE, String.valueOf(OutSount) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetArsControl()
+	{
+		try
+		{
+			String ret = GetWallPADData(ARS_CONTROL_DEVICE);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return true;
+		}
+	}
+
+	public void SetRemoteControl( boolean OutSount )
+	{
+		try
+		{
+
+			UpdateWallPADData(REMOTE_CONTROLS_DEVICE, String.valueOf(OutSount) );
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public boolean GetRemoteControl()
+	{
+		try
+		{
+			String ret = GetWallPADData(REMOTE_CONTROLS_DEVICE);
+
+			if( ret.compareTo(String.valueOf(true)) == 0 )
+			{
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return true;
+		}
+		catch (Exception e )
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return true;
+		}
+	}
+
+    /**
+     * 거실조명 모드제어 설정 (전체)
+     *
+     * @param value 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
+     *                             조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
+     *                             예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
+     */
+    public boolean setLivinglightModeCtrlEntireValue(String[] value) {
+        try {
+            if (value.length != 9) return false;
+
+            String strPresetID = LIVINGLIGHT_PRESET_00;
+            for (int i = 0; i < value.length; i++) {
+                switch (i) {
+                    case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
+                    case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
+                    case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
+                    case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
+                    case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
+                    case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
+                    case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
+                    case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
+                    case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
+                    default: strPresetID = LIVINGLIGHT_PRESET_00; break;
+                }
+                if (!UpdateWallPADData(strPresetID, value[i])) return false;
+            }
+            return true;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e ) {
+            Log.e(TAG, "[Exception] setLivinglightModeCtrlEntireValue(String[] value)");
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            return false;
+        }
+    }
+
+    /**
+     * 거실조명 모드제어 설정 (모드별)
+     *
+     * @param value 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
+     *                             조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
+     *                             예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
+     */
+    public boolean setLivinglightModeCtrlValues(int presetid, String value) {
+        try {
+            String strPresetID = LIVINGLIGHT_PRESET_00;
+            switch (presetid) {
+                case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
+                case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
+                case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
+                case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
+                case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
+                case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
+                case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
+                case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
+                case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
+                default: return false;
+            }
+
+            return UpdateWallPADData(strPresetID, value);
+
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e ) {
+            Log.e(TAG, "[Exception] setLivinglightModeCtrlValues(int presetid, String value)");
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            return false;
+        }
+    }
+
+    /**
+     * 거실조명 모드제어 설정 (조명별)
+     *
+     * @param presetid      설정값 ID (0 ~ 8)
+     *                  lightid         조명 ID (0 ~ 8)
+     *                  power         전원 (on/off/none(don't care))
+     *                  dim             밝기 (1 ~ 10, 미설정시 0)
+     *                  color            색온도 (1 ~ 10, 미설정시 0)
+     */
+    public boolean setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color) {
+        try {
+            if (presetid < 0 && 8 < presetid) {
+                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! presetid [" + presetid + "]");
+                return false;
+            }
+
+            if (lightid < 0 && 8 < lightid) {
+                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! lightid [" + lightid + "]");
+                return false;
+            }
+
+            if (!(power.equalsIgnoreCase("on") || power.equalsIgnoreCase("off") || power.equalsIgnoreCase("none"))) {
+                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! power [" + power + "]");
+                return false;
+            }
+
+            if (dim < 0 && 10 < dim) {
+                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! dim [" + dim + "]");
+                return false;
+            }
+
+            if (color < 0 && 10 < color) {
+                Log.w(TAG, "[setLivinglightModeCtrlUnitValues] out of range!! color [" + color + "]");
+                return false;
+            }
+
+            String strResult = getLivinglightModeCtrlValues(presetid);
+            String[] strParse = strResult.split("/");
+            strParse[lightid] = power + ":" + dim + ":" + color;
+
+            String strValues = null;
+
+            for (int i = 0; i < strParse.length; i++) {
+                if (i == 0) strValues = strParse[i];
+                else strValues += "/" + strParse[i];
+            }
+
+            boolean bRet = setLivinglightModeCtrlValues(presetid, strValues);
+            if(bRet)
+			{
+				// 거실 조명 모드 변경 알림
+				Intent notiIntent = new Intent();
+				notiIntent.setAction(define.NOTIFY_ACNAME);
+				notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_DB__LIVING_LIGHT_MODE);
+				CTX.sendBroadcast(notiIntent);
+			}
+			return bRet;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e ) {
+            Log.e(TAG, "[Exception] setLivinglightModeCtrlUnitValues(int presetid, int lightid, String power, int dim, int color)");
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            return false;
+        }
+    }
+
+    /**
+     * 거실조명 모드제어 설정값 읽기
+     *
+     * @return (String[]) 설정값 (9개 설정값의 배열, "그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
+     *                                조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
+     *                                예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
+     */
+    public String[] getLivinglightModeCtrlEntireValue() {
+        try  {
+            String strPresetID = LIVINGLIGHT_PRESET_00;
+            String[] astrResult = new String[9];
+            for (int i = 0; i < 9; i++) {
+                switch (i) {
+                    case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
+                    case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
+                    case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
+                    case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
+                    case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
+                    case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
+                    case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
+                    case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
+                    case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
+                    default: strPresetID = LIVINGLIGHT_PRESET_00; break;
+                }
+                astrResult[i] = GetWallPADData(strPresetID);
+            }
+            return astrResult;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e) {
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            Log.w(TAG, "[Exception] getLivinglightModeCtrlEntireValue()");
+            return null;
+        }
+    }
+
+    /**
+     * 거실조명 모드제어 설정값 읽기
+     *
+     * @return (String) 설정값 ("그룹전원:그룹디밍:그룹색온도/조명1전원:디밍:색온도/조명2전원:디밍:색온도 ~ 조명8전원:디밍:색온도")
+     *                                조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
+     *                                예) "off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1/off:10:1" : 그룹제어와 1~8번조명이 모두 꺼짐이며, 디밍은 10, 색온도는 1로 설정
+     */
+    public String getLivinglightModeCtrlValues(int presetid) {
+        try  {
+            String strPresetID = LIVINGLIGHT_PRESET_00;
+            switch (presetid) {
+                case 0: strPresetID = LIVINGLIGHT_PRESET_00; break;
+                case 1: strPresetID = LIVINGLIGHT_PRESET_01; break;
+                case 2: strPresetID = LIVINGLIGHT_PRESET_02; break;
+                case 3: strPresetID = LIVINGLIGHT_PRESET_03; break;
+                case 4: strPresetID = LIVINGLIGHT_PRESET_04; break;
+                case 5: strPresetID = LIVINGLIGHT_PRESET_05; break;
+                case 6: strPresetID = LIVINGLIGHT_PRESET_06; break;
+                case 7: strPresetID = LIVINGLIGHT_PRESET_07; break;
+                case 8: strPresetID = LIVINGLIGHT_PRESET_08; break;
+                default: strPresetID = LIVINGLIGHT_PRESET_00; break;
+            }
+
+            String strResult = GetWallPADData(strPresetID);
+            return strResult;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e) {
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            Log.w(TAG, "[Exception] getLivinglightModeCtrlValues(int presetid)");
+            return null;
+        }
+    }
+
+    /**
+     * 거실조명 모드제어 설정값 읽기
+     *
+     *  @param presetid      설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
+     *                  lightid         조명 ID (0 ~ 8) : 0은 그룹제어시 사용
+     *
+     * @return (String) 설정값 ("전원:디밍:색온도")
+     *                                조명전원 : on/off/none(don't care), 디밍/색온도 : 1 ~ 10 (미설정시 0)
+     *                                예) "off:10:1"
+     */
+    public String getLivinglightModeCtrlUnitValues(int presetid, int lightid) {
+        try  {
+            String strValues = getLivinglightModeCtrlValues(presetid);
+            String[] strParse = strValues.split("/");
+            String strResult = strParse[lightid];
+
+            return strResult;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e) {
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            Log.w(TAG, "[Exception] getLivinglightModeCtrlUnitValues(int presetid, int lightid)");
+            return null;
+        }
+    }
+
+    public static class LightConfig {
+        public String Power;
+        public byte Dim;
+        public byte Color;
+    }
+
+    /**
+     * 거실조명 모드제어 설정값 읽기
+     *
+     *  @param presetid      설정값 ID (0 ~ 8) : 0은 그룹제어시 사용
+     *
+     * @return (LightConfig) 설정값 ("전원:디밍:색온도")
+     */
+    public LightConfig getLivinglightModeEntireCtrlUnitValues(int presetid) {
+        try  {
+            String strValues = getLivinglightModeCtrlValues(presetid);
+            String[] strParse_01 = strValues.split("/");
+            String[] strParse_02 = strParse_01[0].split(":");
+            LightConfig lightconfig = new LightConfig();
+            lightconfig.Power = strParse_02[0];
+            lightconfig.Dim = Byte.parseByte(strParse_02[1]);
+            lightconfig.Color = Byte.parseByte(strParse_02[2]);
+            Log.i(TAG, "[getLivinglightModeEntireCtrlUnitValues] presetid [" + presetid + "], lightconfig.Power [" + lightconfig.Power + "], lightconfig.Dim [" + lightconfig.Dim + "], lightconfig.Color [" + lightconfig.Color + "]");
+            return lightconfig;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e) {
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+            Log.w(TAG, "[Exception] getLivinglightModeEntireCtrlUnitValues(int presetid)");
+            return null;
+        }
+    }
+
+	////////////////////////////////////////////////////////////////////////////////////////////////
+
+	public static class PhoneAddr
+	{
+		public String Name;
+		public String IP;
+	}
+
+	List<PhoneAddr> GuardList = new ArrayList<PhoneAddr>();
+	List<PhoneAddr> LobbyList = new ArrayList<PhoneAddr>();
+
+	public void AddGuardAddress(String name, String IPaddress)
+	{
+		String indata = GUARD_ADDRESS+"||"+IPaddress;
+		insertWallPADDB(name, indata);
+	}
+
+	public List<PhoneAddr> GetGuardAddress()
+	{
+		GuardList.clear();
+
+		String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+GUARD_ADDRESS+"::%');";
+		Cursor cursor = wdb.rawQuery(query, null);
+		String GetData="";
+		String[] splitdata;
+		PhoneAddr phoneaddr = new PhoneAddr();
+		while (cursor.moveToNext())
+		{
+			GetData = cursor.getString(0);
+			splitdata = GetData.split("::");
+			phoneaddr.Name = splitdata[0];
+			phoneaddr.IP   = splitdata[1];
+
+			GuardList.add(phoneaddr);
+		}
+
+		cursor.close();
+
+		return GuardList;
+	}
+
+	public void DeleteGuardAddress(String name)
+	{
+		String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+GUARD_ADDRESS+"::%');";
+
+		try {
+			wdb.execSQL(sqlst);
+		} catch (SQLException e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public void AddLobbyAddress(String name, String IPaddress)
+	{
+		String indata = LOBBY_ADDRESS+"::"+IPaddress;
+		insertWallPADDB(name, indata);
+	}
+
+	public List<PhoneAddr> GetLobbyAddress()
+	{
+		LobbyList.clear();
+
+		String query = "select id, data from "+DeviceDataTBL+" where data LIKE('"+LOBBY_ADDRESS+"::%');";
+		Cursor cursor = wdb.rawQuery(query, null);
+		String GetData="";
+		String[] splitdata;
+		PhoneAddr phoneaddr = new PhoneAddr();
+		while (cursor.moveToNext())
+		{
+			GetData = cursor.getString(0);
+			splitdata = GetData.split("::");
+			phoneaddr.Name = splitdata[0];
+			phoneaddr.IP   = splitdata[1];
+
+			LobbyList.add(phoneaddr);
+		}
+
+		cursor.close();
+
+		return LobbyList;
+	}
+
+	public void DeleteLobbyAddress(String name)
+	{
+		String sqlst = "delete from " + DeviceDataTBL + "where id='"+name+"' AND data LIKE('"+LOBBY_ADDRESS+"::%');";
+
+		try {
+			wdb.execSQL(sqlst);
+		} catch (SQLException e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public void setSystemTime(int year, int mon, int day, int hour, int min, int sec)
+	{
+		Calendar c = new GregorianCalendar();
+
+
+
+		c.set(Calendar.YEAR, year);
+		c.set(Calendar.MONTH, mon-1);
+		c.set(Calendar.DAY_OF_MONTH, day);
+		c.set(Calendar.HOUR_OF_DAY, hour);
+		c.set(Calendar.MINUTE, min);
+		c.set(Calendar.SECOND, sec);
+		long when = c.getTimeInMillis();
+		Calendar now = new GregorianCalendar();
+		long nowT = when - now.getTimeInMillis();
+		UpdateWallPADData(SET_SYSTEMTIME, String.valueOf(nowT));
+		Intent intent = new Intent();
+		intent.setAction("SYSTEMTIMESET");
+		intent.putExtra("DATE", String.format("%d&&%d&&%d", year, mon-1, day));
+		intent.putExtra("TIME", String.format("%d&&%d&&%d", hour, min, sec));
+		CTX.sendBroadcast(intent);
+	}
+	public Long GetSystemTime()
+	{
+		try {
+			String ret = GetWallPADData(SET_SYSTEMTIME);
+			return Long.parseLong(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return (long)0;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return (long)0;
+		}
+	}
+	public void SetDoorCallTimeout(int timeout)
+	{
+		UpdateWallPADData(DOORCALLTIMEOUT, String.valueOf(timeout));
+	}
+
+	public int GetDoorCallTimeout()
+	{
+		try {
+			String ret = GetWallPADData(DOORCALLTIMEOUT);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+
+	public void SetDoorConnectTimeout(int timeout)
+	{
+		UpdateWallPADData(DOORCONNECTTIMEOUT, String.valueOf(timeout));
+	}
+
+	public int GetDoorConnectTimeout()
+	{
+		try {
+			String ret = GetWallPADData(DOORCONNECTTIMEOUT);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+	public void SetMorningCallPeriod(int type)
+	{
+		UpdateWallPADData(MORNINGCALL_TYPE, MORNINGCALLTYPETEXT[type]);
+	}
+
+	public int GetMorningCallPeriod()
+	{
+		try {
+			String ret = GetWallPADData(MORNINGCALL_TYPE);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+	public void SetMorningCallBell(int type)
+	{
+		UpdateWallPADData(MORNINGCALL_BELLTYPE, MORNINGCALL_BELLTYPETEXT[type]);
+	}
+
+	public int GetMorningCallBell()
+	{
+		String ret = GetWallPADData(MORNINGCALL_BELLTYPE);
+		return Integer.parseInt(ret);
+	}
+
+	public void AddMorningCallReserve(int type)
+	{
+		try {
+			int  reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
+			reservedata|=type;
+			UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public void DeleteMorningCallReserve(int type)
+	{
+		try {
+			int  reservedata = Integer.parseInt(GetWallPADData(MORNINGCALL_RESERVE));
+			reservedata^=type;
+			UpdateWallPADData(MORNINGCALL_RESERVE, String.valueOf(reservedata));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	public int[] GetMorningCallReserve()
+	{
+		try
+		{
+			String REserveData = GetWallPADData(MORNINGCALL_RESERVE);
+			if (REserveData == null ) return null;
+			int  reservedata = Integer.parseInt(REserveData);
+			List<Integer> resultList = new ArrayList<Integer>();
+			for(int i = 0; i< MCCommandList.length;i++)
+			{
+				if ((reservedata&MCCommandList[i]) > 0)
+					resultList.add(MCCommandList[i]);
+			}
+			int[] result = new int[resultList.size()];
+			int i = 0;
+			for (Integer element : resultList) {
+				result[i++] = element;
+			}
+			return result;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * @description
+	 * 전자액자 설정정보 저장
+	 */
+	public void SetAutoPictureData(int mAutoPictureSetIdx, int mStartTimeHourIdx, int mStartTimeMinIdx, int mEndTimeHourIdx
+			, int mEndTimeMinIdx, int mSlideIntervalIdx, int mAnimationIdx)
+	{
+		UpdateWallPADData(AUTOPICTURE_SET_INDEX, Integer.toString(mAutoPictureSetIdx));
+		UpdateWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX, Integer.toString(mStartTimeHourIdx));
+		UpdateWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX, Integer.toString(mStartTimeMinIdx)) ;
+		UpdateWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX, Integer.toString(mEndTimeHourIdx));
+		UpdateWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX, Integer.toString(mEndTimeMinIdx));
+		UpdateWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX, Integer.toString(mSlideIntervalIdx));
+		UpdateWallPADData(AUTOPICTURE_ANIMATION_INDEX, Integer.toString(mAnimationIdx));
+	}
+
+	/**
+	 * @description
+	 * 전자액자 설정정보 가져오기
+	 * @return int[] data[0]-> AUTOPICTURE_SET_INDEX<br>
+	 *              int[] data[1]-> AUTOPICTURE_START_TIME_HOUR_INDEX<br>
+	 *              int[] data[2]-> AUTOPICTURE_START_TIME_MIN_INDEX<br>
+	 *              int[] data[3]-> AUTOPICTURE_END_TIME_HOUR_INDEX<br>
+	 *              int[] data[4]-> AUTOPICTURE_END_TIME_MIN_INDEX<br>
+	 *              int[] data[5]-> AUTOPICTURE_SLIDE_INTERVAL_INDEX<br>
+	 *              int[] data[6]-> AUTOPICTURE_ANIMATION_INDEX<br>
+	 */
+	public int[] GetAutoPictureData()
+	{
+		int[] result = new int[7];
+		String ret = null;
+
+		for(int i = 0; i<result.length; i++)
+		{
+			try
+			{
+				if(i == 0)
+				{
+					ret = GetWallPADData(AUTOPICTURE_SET_INDEX);
+
+				}
+				else if(i == 1)
+				{
+					ret = GetWallPADData(AUTOPICTURE_START_TIME_HOUR_INDEX);
+
+				}
+				else if(i == 2)
+				{
+					ret = GetWallPADData(AUTOPICTURE_START_TIME_MIN_INDEX);
+
+				}
+				else if(i == 3)
+				{
+					ret = GetWallPADData(AUTOPICTURE_END_TIME_HOUR_INDEX);
+
+				}
+				else if(i == 4)
+				{
+					ret = GetWallPADData(AUTOPICTURE_END_TIME_MIN_INDEX);
+
+				}
+				else if(i == 5)
+				{
+					ret = GetWallPADData(AUTOPICTURE_SLIDE_INTERVAL_INDEX);
+
+				}
+				else if(i == 6)
+				{
+					ret = GetWallPADData(AUTOPICTURE_ANIMATION_INDEX);
+
+				}
+
+				result[i] = Integer.parseInt(ret);
+			}
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e)
+			{
+				LogUtil.errorLogInfo("", TAG, e);
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * @description
+	 * 전자액자 APP 실행 여부를 DB정보와 비교하여 알려주는 함수
+	 * @return boolean형 true 인 경우에만 StartAutoPictureAPP() 호출<br>
+	 * @param
+	 *  NowCal Calendar형 현재 시간 입력
+	 */
+	public boolean DecideAutoPictureAppStartOrNot(Calendar NowCal)
+	{
+
+		int DBLoadResult[] = new int [7];
+		DBLoadResult = GetAutoPictureData();
+
+		//실행시간과 종료시간이 같으면 종료!
+		if((DBLoadResult[1] == DBLoadResult[3]) && (DBLoadResult[2] == DBLoadResult[4]))
+		{
+
+			return false;
+		}
+
+		Calendar TempCal = Calendar.getInstance();
+		TempCal.set(Calendar.HOUR_OF_DAY,   DBLoadResult[1]);
+		TempCal.set(Calendar.MINUTE,   (DBLoadResult[2]*10));
+
+		Calendar EndCal = Calendar.getInstance();
+		EndCal.set(Calendar.HOUR_OF_DAY,   DBLoadResult[3]);
+		EndCal.set(Calendar.MINUTE,   (DBLoadResult[4]*10));
+
+		int intNowTime = (NowCal.get(Calendar.HOUR_OF_DAY) * 60) + NowCal.get(Calendar.MINUTE);
+		int intEndTime = (EndCal.get(Calendar.HOUR_OF_DAY) * 60) + EndCal.get(Calendar.MINUTE);
+
+        /*
+        Log.w("Jar", "[DB] --------[intNowTime] " + intNowTime);
+        Log.w("Jar", "[DB] --------[intEndTime] " + intEndTime);
+
+        Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
+        Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
+        Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
+        Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
+        Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
+        Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
+
+
+        Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
+        Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
+        Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
+        Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
+        Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
+        Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
+
+        Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
+        Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
+        */
+
+		boolean result= false;
+		switch(DBLoadResult[0])
+		{
+			case 0: //사용안함
+				result = false;
+				break;
+
+	        /*
+	        SUNDAY 0
+	        MONDAY 1
+	        TUESDAY 2
+	        WEDNESDAY 3
+	        THURSDAY 4
+	        FRIDAY 5
+	        SATURDAY 6
+	        */
+
+			case 1: //월~금
+				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
+				{
+					result = true;
+				}
+				break;
+
+			case 2: //월~토
+				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
+				{
+					result = true;
+				}
+				break;
+
+			case 3: //토~일
+				if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
+				{
+					result = true;
+				}
+				break;
+
+			case 4: //매일
+				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
+				{
+					result = true;
+				}
+				break;
+
+			default:
+				break;
+		}
+		if(result == true)
+		{
+
+			//시간비교
+
+			if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
+			{
+				if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
+				{
+					if(intNowTime < intEndTime)
+					{
+						result = true;
+					}
+					else
+					{
+						result = false;
+					}
+				}
+
+				if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
+				{
+					if(NowCal.get(Calendar.MINUTE) >= TempCal.get(Calendar.MINUTE))
+					{
+						if(intNowTime < intEndTime)
+						{
+							result = true;
+						}
+						else
+						{
+							result = false;
+						}
+					}
+					else
+					{
+						result = false;
+					}
+				}
+			}
+			else
+			{
+				result = false;
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * @description
+	 * 전자액자 APP 종료 여부를 DB정보와 비교하여 알려주는 함수<br>
+	 * 호출 하기 전에 최상위 Activity에 AutoPicture가 실행되고 있는지 먼저 확인 후, 호출해야 함.
+	 * @return boolean형 true 인 경우에만 EndAutoPictureAPP() 호출<br>
+	 * @param
+	 *  NowCal Calendar형 현재 시간 입력
+	 */
+	public boolean DecideAutoPictureAppEndOrNot(Calendar NowCal)
+	{
+
+		int DBLoadResult[] = new int [7];
+		DBLoadResult = GetAutoPictureData();
+
+		Calendar TempCal = Calendar.getInstance();
+		TempCal.set(Calendar.HOUR_OF_DAY,   DBLoadResult[3]);
+		TempCal.set(Calendar.MINUTE,   (DBLoadResult[4]*10));
+
+        /*
+        Log.w("Jar", "[DB] --------[Input START Time] YEAR " + NowCal.get(Calendar.YEAR));
+        Log.w("Jar", "[DB] --------[Input START Time] MONTH " + (NowCal.get(Calendar.MONTH)+1));
+        Log.w("Jar", "[DB] --------[Input START Time] DAY " + NowCal.get(Calendar.DAY_OF_MONTH));
+        Log.w("Jar", "[DB] --------[Input START Time] DAY_OF_WEEK " + NowCal.get(Calendar.DAY_OF_WEEK));
+        Log.w("Jar", "[DB] --------[Input START Time] HOUR_OF_DAY " + NowCal.get(Calendar.HOUR_OF_DAY));
+        Log.w("Jar", "[DB] --------[Input START Time] MINUTE " + NowCal.get(Calendar.MINUTE));
+
+        Log.w("Jar", "[DB] --------[Set Time] YEAR " + TempCal.get(Calendar.YEAR));
+        Log.w("Jar", "[DB] --------[Set Time] MONTH " + (TempCal.get(Calendar.MONTH)+1));
+        Log.w("Jar", "[DB] --------[Set Time] DAY " + TempCal.get(Calendar.DAY_OF_MONTH));
+        Log.w("Jar", "[DB] --------[Set Time] DAY_OF_WEEK " + TempCal.get(Calendar.DAY_OF_WEEK));
+        Log.w("Jar", "[DB] --------[Set Time] HOUR_OF_DAY " + TempCal.get(Calendar.HOUR_OF_DAY));
+        Log.w("Jar", "[DB] --------[Set Time] MINUTE " + TempCal.get(Calendar.MINUTE));
+
+        Log.w("Jar", "[DB] --------[DBLoadResult[0]] :" +DBLoadResult[0]);
+        Log.w("Jar", "[DB] --------[NowCal.DAY_OF_WEEK] :" +NowCal.get(Calendar.DAY_OF_WEEK));
+        */
+
+		boolean result= false;
+		switch(DBLoadResult[0])
+		{
+			case 0: //사용안함
+				result = false;
+				break;
+
+            /*
+            SUNDAY 0
+            MONDAY 1
+            TUESDAY 2
+            WEDNESDAY 3
+            THURSDAY 4
+            FRIDAY 5
+            SATURDAY 6
+            */
+
+			case 1: //월~금
+				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 6))
+				{
+					result = true;
+				}
+				break;
+
+			case 2: //월~토
+				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 2) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
+				{
+					result = true;
+				}
+				break;
+
+			case 3: //토~일
+				if((NowCal.get(Calendar.DAY_OF_WEEK) == 7) || (NowCal.get(Calendar.DAY_OF_WEEK) == 1))
+				{
+					result = true;
+				}
+				break;
+
+			case 4: //매일
+				if((NowCal.get(Calendar.DAY_OF_WEEK) >= 1) && (NowCal.get(Calendar.DAY_OF_WEEK) <= 7))
+				{
+					result = true;
+				}
+				break;
+
+			default:
+				break;
+		}
+		if(result == true)
+		{
+
+			//시간비교
+
+			if(NowCal.get(Calendar.HOUR_OF_DAY) >= TempCal.get(Calendar.HOUR_OF_DAY))
+			{
+				if(NowCal.get(Calendar.HOUR_OF_DAY) > TempCal.get(Calendar.HOUR_OF_DAY))
+				{
+					result = true;
+				}
+
+				if(NowCal.get(Calendar.HOUR_OF_DAY) == TempCal.get(Calendar.HOUR_OF_DAY))
+				{
+					if(NowCal.get(Calendar.MINUTE) > TempCal.get(Calendar.MINUTE))
+					{
+						result = true;
+					}
+					else
+					{
+						result = false;
+					}
+				}
+			}
+			else
+			{
+				result = false;
+			}
+		}
+		return result;
+	}
+
+
+	/**
+	 * @description
+	 * 전자액자 APP 시작. (호출하면 즉시 시작됨).<br>
+	 * 사진 전환 간격, 애니메이션 효과 인덱스 입력은 함수 내에서 처리.
+	 */
+	public boolean StartAutoPictureAPP()
+	{
+		int DBLoadResult[] = new int [7];
+		int IntervalTimeSec = 5;
+		DBLoadResult = GetAutoPictureData();
+		switch (DBLoadResult[5]) // mSlideIntervalIdx
+		{
+			case 0: //5초
+				IntervalTimeSec = 5;
+				break;
+			case 1: //10초
+				IntervalTimeSec = 10;
+				break;
+			case 2: //30초
+				IntervalTimeSec = 30;
+				break;
+			case 3: //1분
+				IntervalTimeSec = 60;
+				break;
+			case 4: //30분
+				IntervalTimeSec = 60 * 30;
+				break;
+			case 5: //60분
+				IntervalTimeSec = 60 * 60;
+				break;
+			default:
+				IntervalTimeSec = 5;
+				break;
+		}
+		//전자액자App 설치유무 확인!
+		PackageManager pm = CTX.getPackageManager();
+		try {
+			pm.getApplicationInfo("kr.co.icontrols.autopicture", PackageManager.GET_META_DATA);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+
+			return false;
+		}
+
+		//사진 파일이 하나도 없으면 APP 실행시키지 않음!
+		File dirInternal = new File(define.ALBUM_PICTURE_LOCATION);
+		File dirUsb = new File("/storage/usb0");
+		try{
+			printfiles(dirInternal);
+			printfiles(dirUsb);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
+		{
+
+			return false;
+		}
+		//사진 파일이 하나도 없으면 APP 실행시키지 않음!
+		if(AutoPicturefilesList.size() == 0)
+		{
+
+			return false;
+		}
+
+		AutoPicturefilesList.clear();
+
+		//전자액자 App 시작!!
+		Intent intent = new Intent(Intent.ACTION_MAIN);
+		intent.setComponent(new ComponentName("kr.co.icontrols.autopicture", "kr.co.icontrols.autopicture.MainActivity"));
+		intent.putExtra("IMAGE_NEXTSHOW_TIME_UNIT_SEC", IntervalTimeSec);
+		intent.putExtra("IMAGE_NEXTSHOW_ANIMATION", DBLoadResult[6]+1);
+		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+		CTX.startActivity(intent);
+
+		return true;
+	}
+
+	/**
+	 * @description
+	 * USB에 있는 이미지 파일의 목록을 생성하는 함수<br>
+	 * 재귀함수로써 모든 폴더를 탐색한다.<br>
+	 * USB와 Storage/Bestin/DownloadPicture 내에 있는 파일의 확장자를 검사<br>
+	 * 파일 포맷 : jpg, JPG, jpeg, JPEG, png, PNG, bmp, BMP 지원
+	 */
+	public void printfiles(File file)
+	{
+		File[] list = file.listFiles();
+
+		//Log.d(TAG, "The full PATH to the sdcard location is:" +file.getPath());
+		if(list == null)
+		{
+
+			return;
+		}
+		for (int i = 0; i < list.length; i++)
+		{
+			File temp_file = new File(file.getAbsolutePath(),list[i].getName());
+			if (temp_file.isDirectory() && temp_file.listFiles() != null)
+			{
+				//Log.d(TAG, "PATH folder" +temp_file.getAbsolutePath());
+				//I am inside The Directory... Searching:) So i am calling printfiles(File file) function to print the files in the directory
+				printfiles(temp_file);
+			}
+			else
+			{
+				String filename = temp_file.getName();
+				boolean isAccept = false;
+
+				if(filename.toLowerCase().endsWith(".jpg") == true)
+				{
+					isAccept = true;
+				}
+				else if(filename.toLowerCase().endsWith(".jpeg") == true)
+				{
+					isAccept = true;
+				}
+				else if(filename.toLowerCase().endsWith(".png") == true)
+				{
+					isAccept = true;
+				}
+				else if(filename.toLowerCase().endsWith(".bmp") == true)
+				{
+					isAccept = true;
+				}
+				else
+				{
+					isAccept = false;
+				}
+
+				if(isAccept == true)
+				{
+					AutoPicturefilesList.add(temp_file.getAbsolutePath());
+
+				}
+			}
+		}
+	}
+
+
+	/**
+	 * @description
+	 * 전자액자 APP 강제 종료.
+	 */
+	public void EndAutoPictureAPP()
+	{
+
+
+		Intent intent = new Intent();
+		intent.setAction("kr.co.icontrols.autopicture.BR_APP_FINISH");
+		CTX.sendBroadcast(intent);
+	}
+
+	/**
+	 * @description
+	 * 원격검침 정보 저장
+	 * @param
+	 * isEMSEnable false면 EMS 사용안함, true면 EMS 사용함
+	 * @param
+	 * NumberOfKind 3이면 3종, 5이면 5종, 6이면 6종.(3 or 5 or 6만 입력 가능)
+	 */
+	public boolean SetRemoteMeteringData(boolean isEMSEnable, int NumberOfKind)
+	{
+		String str = String.valueOf(isEMSEnable);
+		boolean result = false;
+		if((str.equalsIgnoreCase("true") == true) || (str.equalsIgnoreCase("false") == true))
+		{
+			if((NumberOfKind == 3) || (NumberOfKind == 5) || (NumberOfKind == 6))
+			{
+				UpdateWallPADData(REMOTE_METERING_EMS_ENABLE, str);
+				UpdateWallPADData(REMOTE_METERING_NUMBER_OF_KIND, Integer.toString(NumberOfKind));
+				result = true;
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * @description
+	 * 원격검침 EMS 사용여부 가져오기
+	 * @return boolean형 true면 EMS 사용함, false면 EMS 사용하지 않음
+	 */
+	public boolean GetRemoteMeteringIsEMSEnable()
+	{
+		String ret = null;
+		boolean ReturnValue = false;
+		ret = GetWallPADData(REMOTE_METERING_EMS_ENABLE);
+
+
+		if(ret.equals("true") == true)
+		{
+			ReturnValue = true;
+		}
+		else if(ret.equals("false") == true)
+		{
+			ReturnValue = false;
+		}
+		return ReturnValue;
+	}
+
+	/**
+	 * @description
+	 * 원격검침 몇종인지 정보 가져오는 함수.
+	 * @return 3 or 5 or 6(3종 or 5종 or 6종)
+	 */
+	public int GetRemoteMeteringNumberOfKind()
+	{
+		String ret = null;
+		ret = GetWallPADData(REMOTE_METERING_NUMBER_OF_KIND);
+
+
+		if((ret.equals("3") == true) || (ret.equals("5") == true) || (ret.equals("6") == true))
+		{
+			return Integer.parseInt(ret);
+		}
+		else
+		{
+
+			return 3;
+		}
+	}
+
+	/**
+	 * @description
+	 * 원격검침 목표량 에너지 별로 가져오는 함수
+	 * @return string형 사용자가 설정한 에너지 목표값. 만약 잘못된 input값일 경우 999999999 리턴
+	 * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
+	 */
+	public String GetRemoteMeteringTargetValue(int Index)
+	{
+		String ret = null;
+
+
+		if((Index < 0) || (Index > 5))
+		{
+			return "999999999";
+		}
+
+		switch(Index)
+		{
+			case 0:
+				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT);
+				break;
+			case 1:
+				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_WATER);
+				break;
+			case 2:
+				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_GAS);
+				break;
+			case 3:
+				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER);
+				break;
+			case 4:
+				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING);
+				break;
+			case 5:
+				ret = GetWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON);
+				break;
+			default:
+				ret = "0";
+				break;
+		}
+
+		//return Integer.parseInt(ret);
+		return ret;
+	}
+
+
+	/**
+	 * @description
+	 * 원격검침 목표량 에너지 별로 설정하는 함수     *
+	 * @return boolean true or false
+	 * @param Index 0~5범위(0:전기, 1:수도, 2:가스, 3:온수, 4:난방, 5:탄소)
+	 * @param Value 에너지 목표량 값
+	 */
+	public boolean SetRemoteMeteringTargetValue(int Index, String Value)
+	{
+		boolean ret = false;
+
+
+		if((Index < 0) || (Index > 5))
+		{
+			return false;
+		}
+
+		switch(Index)
+		{
+			case 0:
+				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_ELECT, Value);
+				break;
+			case 1:
+				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_WATER, Value);
+				break;
+			case 2:
+				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_GAS, Value);
+				break;
+			case 3:
+				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HOTWATER, Value);
+				break;
+			case 4:
+				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_HEATING, Value);
+				break;
+			case 5:
+				ret = UpdateWallPADData(REMOTE_METERING_TARGET_VALUE_CARBON, Value);
+				break;
+			default:
+				return ret;
+		}
+
+		return ret;
+	}
+
+
+
+	/**
+	 * @description
+	 * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능     *
+	 * @return boolean true(말일 사용) or false(검침일 사용)
+	 */
+	public boolean GetRemoteMetering_BaseDateType()
+	{
+		boolean ret = false;
+		String tempString = GetWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE);
+		if(tempString.equalsIgnoreCase("false") == true)
+		{
+			ret = false;
+		}
+		else if(tempString.equalsIgnoreCase("true") == true)
+		{
+			ret = true;
+		}
+		else
+		{
+			ret = false;
+		}
+		return ret;
+	}
+
+	/**
+	 * @description
+	 * 에너지관리서버의 검침일 설정 - 검침일 또는 말일 두가지 중에 하나 선택 가능     *
+	 * @return boolean true(정상 저장) or false(저장 실패)
+	 * @param input boolean true(말일 사용) or false(검침일 사용)
+	 */
+	public boolean SetRemoteMetering_BaseDateType(boolean input)
+	{
+		boolean ret = false;
+
+		if(input == true)
+		{
+			ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "true");
+		}
+		else
+		{
+			ret = UpdateWallPADData(REMOTE_METERING_BASE_DATE_LASTDAY_USE, "false");
+		}
+		return ret;
+	}
+
+	/**
+	 * @description
+	 * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
+	 * @return boolean true(사용) or false(사용안함)
+	 */
+	public boolean GetRemoteMetering_Alarm()
+	{
+		boolean ret = false;
+		String tempString = GetWallPADData(REMOTE_METERING_ALARM_USE);
+		if(tempString.equalsIgnoreCase("false") == true)
+		{
+			ret = false;
+		}
+		else if(tempString.equalsIgnoreCase("true") == true)
+		{
+			ret = true;
+		}
+		else
+		{
+			ret = false;
+		}
+		return ret;
+	}
+
+	/**
+	 * @description
+	 * 에너지관리서버 연동 시 목표량대비 알림 사용 여부
+	 * @return boolean true(정상 저장) or false(저장 실패)
+	 * @param input boolean true(사용) or false(사용안함)
+	 */
+	public boolean SetRemoteMetering_Alarm(boolean input)
+	{
+		boolean ret = false;
+
+		if(input == true)
+		{
+			ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "true");
+		}
+		else
+		{
+			ret = UpdateWallPADData(REMOTE_METERING_ALARM_USE, "false");
+		}
+		return ret;
+	}
+
+	/**
+	 * @description
+	 * 에너지관리서버 연동 시 목표량대비 알림 시간 설정 가져오기
+	 * @return int Time (가져오기 실패 시 기본 값 삽입 후, 12시 리턴)
+	 */
+	public int GetRemoteMetering_AlarmTime()
+	{
+		int retTime = 12;
+		String tempString = GetWallPADData(REMOTE_METERING_ALARM_TIME);
+
+		if(tempString == null)
+		{
+			Log.d(TAG, "insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, default");
+			insertWallPADDB(WallpadStatusData.REMOTE_METERING_ALARM_TIME, WallpadStatusData.REMOTE_METERING_ALARM_TIME_DEFAULT);
+		}
+
+		try
+		{
+			retTime = Integer.parseInt(tempString);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 12;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 12;
+		}
+
+		return retTime;
+	}
+
+	/**
+	 * @description
+	 * 에너지관리서버 연동 시 목표량대비 알림 시간 설정
+	 * @return boolean true(정상 저장) or false(저장 실패)
+	 * @param inputTime integer
+	 */
+	public boolean SetRemoteMetering_AlarmTime(int inputTime)
+	{
+		boolean ret = false;
+		String tempString = "12";
+
+		try
+		{
+			tempString = String.valueOf(inputTime);
+			ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, tempString);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			ret = UpdateWallPADData(REMOTE_METERING_ALARM_TIME, REMOTE_METERING_ALARM_TIME_DEFAULT);
+		}
+
+		return ret;
+	}
+
+	/**
+	 * @description
+	 * 통화 음량 및 카메라 밝기/대비 설정값 가져오기
+	 * @return int형 사용자가 설정한 통화 음량값 및 카메라 밝기/대비값. 만약 잘못된 input값일 경우 -999 리턴
+	 * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
+	 *  public static final int      INDEX_CALL_DOORCAM_SOUND      = 0;<br>
+	public static final int      INDEX_CALL_LOBBY_SOUND        = 1;<br>
+	public static final int      INDEX_CALL_GUARD_SOUND        = 2;<br>
+	public static final int      INDEX_CALL_NEIGHBOR_SOUND     = 3;<br>
+	public static final int      INDEX_CALL_PSTN_SOUND         = 4;<br>
+	public static final int      INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
+	public static final int      INDEX_CALL_DOORCAM_CONTRAST   = 6;<br>
+	 */
+	public int GetCallSound_DoorCamValue(int Index)
+	{
+		String ret = null;
+		int returnValue = -999;
+
+		if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
+		{
+			Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
+			return returnValue;
+		}
+
+		switch (Index)
+		{
+			case 0:
+				ret = GetWallPADData(CALL_DOORCAM_SOUND_VALUE);
+				break;
+			case 1:
+				ret = GetWallPADData(CALL_LOBBY_SOUND_VALUE);
+				break;
+			case 2:
+				ret = GetWallPADData(CALL_GUARD_SOUND_VALUE);
+				break;
+			case 3:
+				ret = GetWallPADData(CALL_NEIGHBOR_SOUND_VALUE);
+				break;
+			case 4:
+				ret = GetWallPADData(CALL_PSTN_SOUND_VALUE);
+				break;
+			case 5:
+				ret = GetWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE);
+				break;
+			case 6:
+				ret = GetWallPADData(CALL_DOORCAM_CONTRAST_VALUE);
+				break;
+			default:
+				Log.w(TAG, "[DB] GetCallSound_DoorCamValue: Input Value is Wrong: " + Index);
+				return returnValue;
+		}
+
+		try
+		{
+			returnValue = Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return returnValue;
+		}
+		catch (Exception e)
+		{
+			Log.w(TAG, "[DB] GetCallSound_DoorCamValue: ParseInt Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return returnValue;
+		}
+
+		return returnValue;
+	}
+	/**
+	 * @description
+	 * 통화 음량 및 카메라 밝기/대비 설정값 설정하기
+	 * @param Index 0~6범위(0:현관, 1:로비, 2:경비, 3:이웃, 4:국선, 5:현관카메라 밝기, 6:현관카메라 대비)<br>
+	 *  public static final int      INDEX_CALL_DOORCAM_SOUND      = 0;<br>
+	public static final int      INDEX_CALL_LOBBY_SOUND        = 1;<br>
+	public static final int      INDEX_CALL_GUARD_SOUND        = 2;<br>
+	public static final int      INDEX_CALL_NEIGHBOR_SOUND     = 3;<br>
+	public static final int      INDEX_CALL_PSTN_SOUND         = 4;<br>
+	public static final int      INDEX_CALL_DOORCAM_BRIGHTNESS = 5;<br>
+	public static final int      INDEX_CALL_DOORCAM_CONTRAST   = 6;<br>
+	 * @param InputValue 설정값 0~10 범위
+	 * @return true(설정 성공) or false(설정 실패)
+	 */
+	public boolean SetCallSound_DoorCamValue(int Index, int InputValue)
+	{
+		boolean ret = false;
+		String TempValue = null;
+
+		if ((Index < INDEX_CALL_DOORCAM_SOUND) || (Index > INDEX_CALL_DOORCAM_CONTRAST))
+		{
+			Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
+			return ret;
+		}
+		if ((InputValue < 0) || (InputValue > 10))
+		{
+			Log.w(TAG, "[DB] SetCallSound_DoorCamValue: InputValue is Wrong: " + InputValue);
+			return ret;
+		}
+
+		try
+		{
+			TempValue = String.valueOf(InputValue);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return ret;
+		}
+		catch (Exception e)
+		{
+			Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Parse Int to String Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return ret;
+		}
+
+		switch(Index)
+		{
+			case 0:
+				ret = UpdateWallPADData(CALL_DOORCAM_SOUND_VALUE, TempValue);
+				break;
+			case 1:
+				ret = UpdateWallPADData(CALL_LOBBY_SOUND_VALUE, TempValue);
+				break;
+			case 2:
+				ret = UpdateWallPADData(CALL_GUARD_SOUND_VALUE, TempValue);
+				break;
+			case 3:
+				ret = UpdateWallPADData(CALL_NEIGHBOR_SOUND_VALUE, TempValue);
+				break;
+			case 4:
+				ret = UpdateWallPADData(CALL_PSTN_SOUND_VALUE, TempValue);
+				break;
+			case 5:
+				ret = UpdateWallPADData(CALL_DOORCAM_BRIGHTNESS_VALUE, TempValue);
+				break;
+			case 6:
+				ret = UpdateWallPADData(CALL_DOORCAM_CONTRAST_VALUE, TempValue);
+				break;
+			default:
+				Log.w(TAG, "[DB] SetCallSound_DoorCamValue: Input Index is Wrong: " + Index);
+				return ret;
+		}
+
+		return ret;
+	}
+
+	/****/
+	/**
+	 * @description
+	 * 엘리베이터 위젯 복구 기능 사용여부 가져옴 (1번 사용하였으면 무조건 true로 설정됨)
+	 * @return boolean true(이미 사용하였으몰 실행하면 안됨) or false(사용하지 않았으므로 복구기능 사용해도 됨)
+	 */
+	public boolean GetElevator_Widget_Restore()
+	{
+		boolean ret = true;
+		String tempString = GetWallPADData(ELEVATOR_WIDGET_RESTORE);
+		if(tempString.equalsIgnoreCase("false") == true)
+		{
+			ret = false;
+		}
+		else if(tempString.equalsIgnoreCase("true") == true)
+		{
+			ret = true;
+		}
+		else
+		{
+			ret = true;
+		}
+		return ret;
+	}
+
+	/****/
+	/**
+	 * @description
+	 * 엘리베이터 위젯 복구 기능 사용여부 설정함 (true로 설정 가능)
+	 * @input boolean true(1번 설정 사용함)
+	 * @return boolean 성공여부(true면 성공 false면 실패)
+	 */
+	public boolean SetElevator_Widget_Restore(boolean input)
+	{
+		boolean result = true;
+		if(input == true)
+		{
+			result = UpdateWallPADData(ELEVATOR_WIDGET_RESTORE, "true");
+		}
+		return result;
+	}
+
+
+	public void SetSubMenuType(int type)
+	{
+		if (RangeCheck(SUBMENUTYPETEXT, type)==false) return;
+		UpdateWallPADData(SUBMENU_TYPE, SUBMENUTYPETEXT[type]);
+	}
+
+	public int GetSubMenuType()
+	{
+		try {
+			String ret = GetWallPADData(SUBMENU_TYPE);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+
+	private boolean RangeCheck(String[] data, int idx)
+	{
+		if (idx < 0 || idx >= data.length)
+			return false;
+
+		return true;
+	}
+
+	public void SetMainBGSlidShowTime(int timeout)
+	{
+		UpdateWallPADData(MAINBGSLIDSHOWTIME, String.valueOf(timeout));
+	}
+
+	public int GetMainBGSlidShowTime()
+	{
+		try {
+			String ret = GetWallPADData(MAINBGSLIDSHOWTIME);
+			return Integer.parseInt(ret);
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return 0;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return 0;
+		}
+	}
+
+	public static class WeatherItem
+	{
+		public int    seqnum;
+		public String date;
+		public String state;
+		public String code;
+		public String low;
+		public String high;
+		public String am;
+		public String pm;
+	}
+
+	public class WeatherTable
+	{
+		List<WeatherItem> WeatherData = new ArrayList<WeatherItem>();
+		public WeatherTable()
+		{
+			if (!CheckTableExist(MainWeatherTBL))
+				CreateTable(CreateMainWeatherDB);
+		}
+		public void InitWeatherTable()
+		{
+			if (!CheckTableExist(MainWeatherTBL))
+				CreateTable(CreateMainWeatherDB);
+			else
+				DeleteTableInst(MainWeatherTBL);
+			WeatherData.clear();
+		}
+		public void AddWeatherData(String date, String state , String  code, String low, String high, String am, String pm)
+		{
+			ContentValues values = new ContentValues();
+
+			values.put("date", date);
+			values.put("state", state);
+			values.put("code", code);
+			values.put("low", low);
+			values.put("high", high);
+			values.put("am", am);
+			values.put("pm", pm);
+			wdb.insert(MainWeatherTBL, null, values);
+		}
+
+		public List<WeatherItem> GetWeatherList()
+		{
+			if (WeatherData == null || WeatherData.size() == 0)
+				return GetWeatherData();
+
+			return WeatherData;
+		}
+
+		public List<WeatherItem> GetWeatherData()
+		{
+			Cursor cursor = wdb.rawQuery("select date, state, code, low, high, am, pm from "+MainWeatherTBL+" order by seqnum asc;", null);
+
+			while (cursor.moveToNext())
+			{
+				WeatherItem item = new WeatherItem();
+				item.date = cursor.getString(0);
+				item.state = cursor.getString(1);
+				item.code = cursor.getString(2);
+				item.low = cursor.getString(3);
+				item.high = cursor.getString(4);
+				item.am = cursor.getString(5);
+				item.pm = cursor.getString(6);
+				if(WeatherData!=null)
+					WeatherData.add(item);
+			}
+			cursor.close();
+			return WeatherData;
+		}
+	}
+	WeatherTable WeatherCtr;
+	public WeatherTable GetWeatherTableController()
+	{
+		if (WeatherCtr == null)
+			WeatherCtr = new WeatherTable();
+		return WeatherCtr;
+	}
+
+	public static class WidgetItem
+	{
+		public int    seqnum;
+		public int    idx; // 0~ 14
+		public int 	  widgetID; // Main Source ID.java WidgetID
+	}
+
+	public class WidgetTable
+	{
+		List<WidgetItem> WidgetData = new ArrayList<WidgetItem>();
+		public WidgetTable()
+		{
+			if (!CheckTableExist(WidgetTBL))
+			{
+				CreateTable(CreateWidgetDB);
+			}
+		}
+		public boolean AddWidgetData(int idx, int widgetId )
+		{
+			try
+			{
+				ContentValues values = new ContentValues();
+				values.put("id", idx );
+				values.put("widgetid", widgetId);
+				wdb.insert(WidgetTBL, null, values);
+				return true;
+			} catch (SQLException e)
+			{
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+				return false;
+			}
+		}
+		public boolean DeleteWidgetData( int id )
+		{
+			String sqlst = "delete from " + WidgetTBL + " where id= " + String.valueOf(id) + ";";
+			try {
+				wdb.execSQL(sqlst);
+				return true;
+			} catch (SQLException e)
+			{
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+				return false;
+			}
+		}
+		public boolean DeleteWidgetDataID( int widgetid )
+		{
+			String sqlst = "delete from " + WidgetTBL + " where widgetid= " + String.valueOf(widgetid) + ";";
+			try {
+				wdb.execSQL(sqlst);
+				return true;
+			} catch (SQLException e)
+			{
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+				return false;
+			}
+		}
+		public List<WidgetItem> GetWidgetData()
+		{
+			try
+			{
+				Cursor cursor = wdb.rawQuery("select id, widgetid from "+WidgetTBL+" order by seqnum asc;", null);
+				WidgetData.clear();
+				while (cursor.moveToNext())
+				{
+					WidgetItem item = new WidgetItem();
+					item.idx = cursor.getInt(0);
+					item.widgetID = cursor.getInt(1);
+					WidgetData.add(item);
+				}
+				cursor.close();
+			}
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return null;
+			}
+			catch (Exception e)
+			{
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+				return null;
+			}
+			return WidgetData;
+
+		}
+
+	}
+
+	WidgetTable WidgetCtr;
+	public WidgetTable GetWidgetTableController()
+	{
+		if (WidgetCtr == null)
+			WidgetCtr = new WidgetTable();
+		return WidgetCtr;
+	}
+
+	public int GetWallPadRebootingCount() {
+		String strRet = GetWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT);
+		if (strRet == null) {
+			Log.d(TAG, "[GetWallPadRebootingCount] strRet is null !!");
+			insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
+			return 0;
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetWallPadRebootingCount");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetWallPadRebootingCount(int count) {
+		boolean bRet = UpdateWallPADData(DB_WALLPAD_IGW_COMMAND_COUNT, String.valueOf(count));
+		if (bRet == false) {
+			Log.d(TAG, "[SetWallPadRebootingCount] UpdateWallPADData false !!");
+			insertWallPADDB(DB_WALLPAD_IGW_COMMAND_COUNT, "0");
+		}
+	}
+
+	/**
+	 * 스마트 분전반 비상 상태 설정하기
+	 * @param normal - true면 정상, false면 비정상
+	 * @return boolean - true면 정상, false면 오류
+	 * **/
+	public boolean SetSmartLightAlarm(boolean normal)
+	{
+		boolean bRet;
+		if(normal)
+		{
+			bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "normal");
+		}
+		else
+		{
+			bRet = UpdateWallPADData(DEV_SMARTLIGHT_STATUS, "alarm");
+		}
+		return bRet;
+	}
+
+	/**
+	 * 스마트 분전반 비상 상태 가져오기
+	 * @return "normal"이면 정상, "alarm"이면 비상상태
+	 * **/
+	public String GetSmartLightAlarm()
+	{
+		try {
+			String ret = GetWallPADData(DEV_SMARTLIGHT_STATUS);
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * 스마트 분전반 비상 상태 설정하기
+	 * @param Device - Device정보
+	 * **/
+	public boolean SetSmartLightAlarmDevice(String Device)
+	{
+		return UpdateWallPADData(DEV_SMARTLIGHT_DEVICE, Device);
+	}
+
+	/**
+	 * 스마트 분전반 비상 디바이스 정보 가져오기
+	 * @return null/led_converter/em/led_light/power_controller/concent/dc_apu/energy_controller
+	 * **/
+	public String GetSmartLightAlarmDevice()
+	{
+		try {
+			String ret = GetWallPADData(DEV_SMARTLIGHT_DEVICE);
+			return ret;
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e)
+		{
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return null;
+		}
+	}
+
+	public boolean SetKNXAlarmStatus(boolean normal) {
+		boolean bRet;
+		if (normal) {
+			bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "normal");
+		} else {
+			bRet = UpdateWallPADData(DEV_KNXDEVICE_STATUS, "alarm");
+		}
+		return bRet;
+	}
+
+	public String GetKNXAlarmStatus(int devIndex) {
+		try {
+			String ret = GetWallPADData(DEV_KNXDEVICE_STATUS);
+			return ret;
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e) {
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return null;
+		}
+	}
+
+	public boolean SetKNXAlarmCause(String cause) {
+		return UpdateWallPADData(DEV_KNXDEVICE_CAUSE, cause);
+	}
+
+	public String GetKNXAlarmCause(int devIndex) {
+		try {
+			String ret = GetWallPADData(DEV_KNXDEVICE_CAUSE);
+			return ret;
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return null;
+		}
+		catch (Exception e) {
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * 메인월패드 난방 방 개수 가져오기
+	 * @return
+	 */
+	public int GetHeatingRoomNum() {
+		String strRet = GetWallPADData(DB_WALLPAD_HEATING_ROOM_NUM);
+		if (strRet == null) {
+			Log.d(TAG, "[GetHeatingRoomNum] strRet is null !!");
+			insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
+			return 0;
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetHeatingRoomNum()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	/**
+	 * 난방 방개수 설정하기
+	 * @param nValue
+	 */
+	public void setHeatingRoomNum(int nValue) {
+		boolean bRet = UpdateWallPADData(DB_WALLPAD_HEATING_ROOM_NUM, String.valueOf(nValue));
+		if (bRet == false) {
+			Log.d(TAG, "[setHeatingRoomNum] UpdateWallPADData false !!");
+			insertWallPADDB(DB_WALLPAD_HEATING_ROOM_NUM, "0");
+		}
+	}
+
+	/**
+	 * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
+	 *
+	 * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
+	 */
+	public boolean GetStrangerRecordingOnOff()
+	{
+		try
+		{
+			String strRet = GetWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF);
+			Log.d(TAG, "[GetStrangerRecordingOnOff] strRet [" + strRet + "]");
+			if (strRet == null) {
+				Log.d(TAG, "[GetStrangerRecordingOnOff] strRet is null !!");
+				insertWallPADDB(SMARTIOT_RECORDING_STRANGER_ONOFF, SMARTIOT_RECORDING_STRANGER_ONOFF_USE_DEFAULT);
+			}
+
+			try {
+				if (Boolean.parseBoolean(strRet)) {
+					return true;
+				} else {
+					return false;
+				}
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Exception] GetStrangerRecordingOnOff()");
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			}
+			return true;
+
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			Log.e(TAG, "[GetStrangerRecordingOnOff] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 스마트현관카메라 거동수상자 사진촬영 설정
+	 *
+	 * @param bSet - (boolean) 설정할 값 (true: 촬영 ON , false: 촬영 OFF)
+	 */
+	public void SetStrangerTakePicOnOff(boolean bSet)
+	{
+		try
+		{
+			UpdateWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, String.valueOf(bSet));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			Log.e(TAG, "[StrangerTakePicOnOff] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 스마트현관카메라 거동수상자 녹화 설정 여부 읽기
+	 *
+	 * @return (boolean) 설정값 (true: 녹화 ON , false:녹화 OFF)
+	 */
+	public boolean GetStrangerTakePicOnOff()
+	{
+		try
+		{
+			String strRet = GetWallPADData(SMARTIOT_TAKINGPIC_STRANGER_ONOFF);
+			Log.d(TAG, "[GetStrangerTakePicOnOff] strRet [" + strRet + "]");
+			if (strRet == null) {
+				Log.d(TAG, "[GetStrangerTakePicOnOff] strRet is null !!");
+				insertWallPADDB(SMARTIOT_TAKINGPIC_STRANGER_ONOFF, SMARTIOT_TAKINGPIC_STRANGER_ONOFF_USE_DEFAULT);
+			}
+
+			try {
+				if (Boolean.parseBoolean(strRet)) {
+					return true;
+				} else {
+					return false;
+				}
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Exception] GetStrangerTakePicOnOff()");
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			}
+			return true;
+
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e )
+		{
+			Log.e(TAG, "[GetStrangerTakePicOnOff] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 스마트현관카메라 거동수상자 녹화 설정
+	 *
+	 * @param bSet - (boolean) 설정할 값 (true: 녹화 ON , false: 녹화 OFF)
+	 */
+	public void SetStrangerRecordingOnOff(boolean bSet)
+	{
+		try
+		{
+			UpdateWallPADData(SMARTIOT_RECORDING_STRANGER_ONOFF, String.valueOf(bSet));
+		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
+		{
+			Log.e(TAG, "[SetStrangerRecordingOnOff] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * @description
+	 * 스마트현관카메라 거동수상자 녹화 영상 밝기 설정값 가져오기
+	 * @return int형 사용자가 설정한 영상 밝기값
+	 */
+	public int GetSmartDoorCamBrightness() {
+		String strRet = GetWallPADData(SMARTIOT_CAM_BRIGHTNESS);
+		if (strRet == null) {
+			Log.d(TAG, "[GetSmartDoorCamBrightness] strRet is null !!");
+			insertWallPADDB(SMARTIOT_CAM_BRIGHTNESS, SMARTIOT_CAM_BRIGHTNESS_VALUE_DEFAULT);
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetSmartDoorCamBrightness()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetSmartDoorCamBrightness(int brightness)
+	{
+		UpdateWallPADData(SMARTIOT_CAM_BRIGHTNESS, String.valueOf(brightness));
+	}
+
+	/**
+	 * @description
+	 * 스마트현관카메라 거동수상자 영상 녹화 시간 설정값 가져오기
+	 * @return int형 사용자가 설정한 영상 녹화 시간(초 단위)
+	 */
+	public int GetSmartDoorCamRecordTime() {
+		String strRet = GetWallPADData(SMARTIOT_RECORD_TIME);
+		if (strRet == null) {
+			Log.d(TAG, "[GetSmartDoorCamRecordTime] strRet is null !!");
+			insertWallPADDB(SMARTIOT_RECORD_TIME, SMARTIOT_RECORD_TIME_VALUE_DEFAULT);
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetSmartDoorCamRecordTime()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetSmartDoorCamRecordTime(int time)
+	{
+		UpdateWallPADData(SMARTIOT_RECORD_TIME, String.valueOf(time));
+	}
+
+	/**
+	 * @description
+	 * 스마트현관카메라 센서 민감도 설정값 가져오기
+	 * @return int형 사용자가 설정한 센서 민감도
+	 */
+	public int GetSmartDoorCamSensorSensitivity() {
+		String strRet = GetWallPADData(SMARTIOT_SENSOR_SENSITIVITY);
+		if (strRet == null) {
+			Log.d(TAG, "[GetSmartDoorCamSensorSensitivity] strRet is null !!");
+			insertWallPADDB(SMARTIOT_SENSOR_SENSITIVITY, SMARTIOT_SENSOR_SENSITIVITY_VALUE_DEFAULT);
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetSmartDoorCamSensorSensitivity()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetSmartDoorSensorSensitivity(int sensitivity) {
+		UpdateWallPADData(SMARTIOT_SENSOR_SENSITIVITY, String.valueOf(sensitivity));
+	}
+
+	/**
+	 * @description
+	 * 스마트현관카메라 사진촬영 주기설정값 가져오기
+	 * @return int형 사용자가 설정한 사진촬영 주기
+	 */
+	public int GetSmartDoorCamSensorPeriod() {
+		String strRet = GetWallPADData(SMARTIOT_SENSOR_PERIOD);
+		if (strRet == null) {
+			Log.d(TAG, "[GetSmartDoorCamSensorPeriod] strRet is null !!");
+			insertWallPADDB(SMARTIOT_SENSOR_PERIOD, SMARTIOT_SENSOR_PERIOD_VALUE_DEFAULT);
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetSmartDoorCamSensorPeriod()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetSmartDoorSensorPeriod(int period) {
+		UpdateWallPADData(SMARTIOT_SENSOR_PERIOD, String.valueOf(period));
+	}
+
+	/**
+	 * @description
+	 * 스마트현관카메라 센서 감도 유지시간 설정값 가져오기
+	 * @return int형 사용자가 설정한 센서 감도 유지시간
+	 */
+	public int GetSmartDoorCamSensorDuration() {
+		String strRet = GetWallPADData(SMARTIOT_SENSOR_DURATION);
+		if (strRet == null) {
+			Log.d(TAG, "[GetSmartDoorCamSensorDuration] strRet is null !!");
+			insertWallPADDB(SMARTIOT_SENSOR_DURATION, SMARTIOT_SENSOR_DURATION_VALUE_DEFAULT);
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetSmartDoorCamSensorDuration()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetSmartDoorSensorDuration(int duration) {
+		UpdateWallPADData(SMARTIOT_SENSOR_DURATION, String.valueOf(duration));
+	}
+
+	public String GetReliefCallDegree() {
+		String strRet = GetWallPADData(RELIEFCALL_DEGREE);
+		if (strRet == null) {
+			Log.d(TAG, "[GetReliefCallDegree] strRet is null !!");
+			this.insertWallPADDB(RELIEFCALL_DEGREE, RELIEFCALL_DEGREE_DEFAULT_VALUE);
+		}
+
+		String ret = "";
+		try {
+			ret = strRet;
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetReliefCallDegree()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetReliefCallDegree(String degree)
+	{
+		UpdateWallPADData(RELIEFCALL_DEGREE, degree);
+	}
+
+	public boolean GetRemoteCallRegistration() {
+		String strRet = GetWallPADData(REMOTECALL_REGISTRATION);
+		if (strRet == null) {
+			Log.d(TAG, "[GetRemoteCallRegistration] strRet is null !!");
+			this.insertWallPADDB(REMOTECALL_REGISTRATION, REMOTECALL_REGISTRATION_DEFAULT_VALUE);
+		}
+
+		boolean ret = false;
+		try {
+			ret = Boolean.valueOf(strRet).booleanValue();
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetRemoteCallRegistration()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetRemoteCallRegistration(boolean bRegister)
+	{
+		UpdateWallPADData(REMOTECALL_REGISTRATION, String.valueOf(bRegister));
+	}
+
+	public int GetRemoteCallUserCnt() {
+		String strRet = GetWallPADData(REMOTECALL_USERCNT);
+		if (strRet == null) {
+			Log.d(TAG, "[GetRemoteCallUserCnt] strRet is null !!");
+			this.insertWallPADDB(REMOTECALL_USERCNT, REMOTECALL_USERCNT_DEFAULT_VALUE);
+		}
+
+		int ret = 0;
+		try {
+			ret = Integer.parseInt(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetRemoteCallUserCnt()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return ret;
+	}
+
+	public void SetRemoteCallUserCnt(int cnt)
+	{
+		UpdateWallPADData(REMOTECALL_USERCNT, String.valueOf(cnt));
+	}
+
+	/**
+	 * 간편모드UX 설정 여부
+	 *
+	 * @return (boolean) 설정값 (true: 설정 ON , false: 설정 OFF)
+	 */
+	public boolean GetEasyModeUxUse()
+	{
+		try {
+			String strRet = GetWallPADData(EASYMODE_UX_USE);
+			Log.d(TAG, "[GetEasyModeUxUse] strRet [" + strRet + "]");
+			if (strRet == null) {
+				Log.d(TAG, "[GetEasyModeUxUse] strRet is null !!");
+				insertWallPADDB(EASYMODE_UX_USE, EASYMODE_UX_USE_DEFAULT);
+			}
+
+			if (Boolean.parseBoolean(strRet)) {
+				return true;
+			}
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[GetEasyModeUxUse] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return false;
+	}
+
+	/**
+	 * 간편모드UX 설정 (사용자용)
+	 *
+	 * @param bUse - (boolean) 설정할 값 (true: 설정 ON , false: 설정 OFF)
+	 */
+	public void SetEasyModeUxUse(boolean bUse) {
+		try {
+			UpdateWallPADData(EASYMODE_UX_USE, String.valueOf(bUse));
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[SetEasyModeUxUse] Exception Error");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+	}
+
+	/**
+	 * @description
+	 * 카메라 인코딩 에러 설정
+	 * @return 인코딩 에러일 경우 true
+	 */
+	public boolean GetCameraEncodingError() {
+		String strRet = GetWallPADData(CAMERA_ENCODING_ERROR);
+		if (strRet == null) {
+			Log.d(TAG, "[GetCameraEncodingError] strRet is null !!");
+			insertWallPADDB(CAMERA_ENCODING_ERROR, CAMERA_ENCODING_ERROR_DEFAULT);
+		}
+
+		boolean result = false;
+		try {
+			result = Boolean.valueOf(strRet);
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+			Log.e(TAG, "[Exception] GetCameraEncodingError()");
+			LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		}
+		return result;
+	}
+
+	public void SetCameraEncodingError(boolean bError)
+	{
+		UpdateWallPADData(CAMERA_ENCODING_ERROR, String.valueOf(bError));
+	}
+
+	public boolean GetMetroUXEditDefaultSet() {
+		try {
+			String strUse = this.GetWallPADData("METRO_UX_EDIT_DEFAULT_SET");
+			Log.d("WallpadStatusData", "[GetMetroUXEditDefaultSet] strUse [" + strUse + "]");
+			if (strUse == null) {
+				return true;
+			} else {
+				int ret = Integer.parseInt(strUse);
+				return ret == 1;
+			}
+		} catch (RuntimeException var3) {
+			LogUtil.errorLogInfo("", "WallpadStatusData", var3);
+			return true;
+		} catch (Exception var4) {
+			LogUtil.errorLogInfo("", "WallpadStatusData", var4);
+			return true;
+		}
+	}
+
+	public void SetMetroUXEditDefaultSet(boolean Use) {
+		try {
+			Log.d("WallpadStatusData", "[SetMetroUXEditDefaultSet] Use [" + Use + "]");
+			if (Use) {
+				this.UpdateWallPADData("METRO_UX_EDIT_DEFAULT_SET", String.valueOf(1));
+			} else {
+				this.UpdateWallPADData("METRO_UX_EDIT_DEFAULT_SET", String.valueOf(0));
+			}
+		} catch (RuntimeException var3) {
+			LogUtil.errorLogInfo("", "WallpadStatusData", var3);
+		} catch (Exception var4) {
+			LogUtil.errorLogInfo("", "WallpadStatusData", var4);
+		}
+
+	}
+}

+ 7 - 0
WallPadAPI/src/main/java/com/artncore/wallpadapi/CurtainAPI.java

@@ -140,6 +140,13 @@ public class CurtainAPI extends WallPadDevAPI {
             else {
                 Device.info.bInstall = false;
             }
+            if(data.Device == null) {
+                data.Device = new DataClasses.CurtainCtrl[1];
+                for(int i = 0 ; i< data.Device.length; i++)
+                {
+                    data.Device[i] = new DataClasses.CurtainCtrl();
+                }
+            }
             data.Device[hRequestIndex] = Device;
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);

+ 42 - 24
WallPadDevService/src/main/java/com/artncore/wallpaddevservice/driver/CurtainV1_Controller.java

@@ -36,7 +36,7 @@ public class CurtainV1_Controller extends DeviceManager {
     private byte DEVICE_ADDRESS  = (byte) 0x80;
 
     /** 최대 기기 개수 1~F */
-    private final byte MAX_DEVICE_CNT = 15; //1~F
+    private final byte MAX_DEVICE_CNT = 1; //1~F
 
     /** 초기 기기 검색 횟수  */
     private final int MAX_SEARCH_COUNT   = 3;
@@ -122,8 +122,8 @@ public class CurtainV1_Controller extends DeviceManager {
             DEVICE_ADDRESS = (byte)0x80;
 
         /* 로그 초기상태 */
-//        log_sw = true;
-//        SerialLog = true;
+        log_sw = true;
+        SerialLog = true;
 
         /* 드라이버 내부 변수 초기화 */
         mDriver = new Driver();
@@ -193,10 +193,10 @@ public class CurtainV1_Controller extends DeviceManager {
                     mDriver.Device[DeviceIdx].curtain = curtain;
                     mDriver.Device[DeviceIdx].info = new DataClasses.CurtainCtrl.Info();
                     mDriver.Device[DeviceIdx].info.bInstall = true;
-                    Log.i(TAG, "SearchDevice     DeviceNum = " + (byte)(DeviceIdx+1) + "      OK!!!");
+                    Log.i(TAG, "SearchDevice  Address = " + DEVICE_ADDRESS + ", DeviceNum = " + (byte)(DeviceIdx+1) + "      OK!!!");
                 }
                 else {
-                    Log.i(TAG, "SearchDevice     DeviceNum = " + (byte)(DeviceIdx+1) + "      Fail...");
+                    Log.i(TAG, "SearchDevice  Address = " + DEVICE_ADDRESS + ", DeviceNum = " + (byte)(DeviceIdx+1) + "      Fail!!!");
                 }
             }
             // 2. 가장 높은 ID 저장
@@ -302,7 +302,8 @@ public class CurtainV1_Controller extends DeviceManager {
         }
     }
 
-    ///////////////////////////////////////////////////////////////////////////////////////////////
+    ////////////////////////////////////////////
+    // /////////////////////////////////////////////////
     // Ctrl
     ///////////////////////////////////////////////////////////////////////////////////////////////
     /**
@@ -564,10 +565,10 @@ public class CurtainV1_Controller extends DeviceManager {
     private DataClasses.CurtainCtrl.Curtain sendGetUnitCurtainStatus(byte GroupID, byte curtainID) {
         try {
 
-            if ((GroupID != 80) && (GroupID!=0x90)) {
-                Log.w(TAG, "[sendGetUnitCircuitStatus] param [GroupID] Out of Range!!! " + GroupID);
-                return null;
-            }
+//            if ((GroupID != 0x80) && (GroupID!=0x90)) {
+//                Log.w(TAG, "[sendGetUnitCircuitStatus] param [GroupID] Out of Range!!! " + GroupID);
+//                return null;
+//            }
 
             // 1. In 파라미터 확인
             if ((curtainID < 0) || (curtainID >= MAX_DEVICE_CNT)) {
@@ -576,10 +577,15 @@ public class CurtainV1_Controller extends DeviceManager {
             }
 
             // 2. 패킷 데이터 만들기
-            byte[] ReqData = { (byte) 0x0 };
+            //byte[] ReqData = { (byte) 0x0 };
+
+            byte [] ReqData = new byte [] { 0x00, 0x00, 0x00, 0x00, 0x00 };
 
             // 3. 데이터 전송 및 응답
-            byte[] Reply = SendNRead_Variable((byte) (GroupID + curtainID + 1), CMDList.Req.GetUnitCurtainStatus, ReqData);
+            byte [] Reply = SendNRead_Fixed( (byte)(GroupID + curtainID + 1), CMDList.Req.GetUnitCurtainStatus, ReqData);
+
+            // 3. 데이터 전송 및 응답
+            //byte[] Reply = SendNRead_Variable((byte) (GroupID + curtainID + 1), CMDList.Req.GetUnitCurtainStatus, ReqData);
 
             // 4. 수신데이터 파싱
             DataClasses.CurtainCtrl.Curtain curtain = parsingReply_UnitCurtainCommon(GroupID, curtainID, Reply);
@@ -616,16 +622,21 @@ public class CurtainV1_Controller extends DeviceManager {
                 return null;
             }
 
-            if (!CooktopCtrl.DEVICE_STATUS.checkRange(status)) {
-                Log.w(TAG, "[sendSetUnitCircuitStatus] param [status] Out of Range!!! " + status);
-                return null;
-            }
+//            if (!CooktopCtrl.DEVICE_STATUS.checkRange(status)) {
+//                Log.w(TAG, "[sendSetUnitCircuitStatus] param [status] Out of Range!!! " + status);
+//                return null;
+//            }
 
             // 2. 패킷 데이터 만들기
-            byte[] ReqData = { (byte) 0x00, (byte) status, (byte) 0x00, (byte) 0x00, (byte) 0x00 };
+            byte[] ReqData = { (byte) status, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 };
+
+            //byte [] ReqData = new byte [] { 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+            // 3. 데이터 전송 및 응답
+            byte [] Reply = SendNRead_Fixed( (byte)(DEVICE_ADDRESS + deviceIdx + 1), CMDList.Req.SetUnitCurtainStatus, ReqData);
 
             // 3. 데이터 전송 및 응답
-            byte[] Reply = SendNRead_Variable((byte) (DEVICE_ADDRESS + deviceIdx + 1), CMDList.Req.SetUnitCurtainStatus, ReqData);
+            //byte[] Reply = SendNRead_Variable((byte) (DEVICE_ADDRESS + deviceIdx + 1), CMDList.Req.SetUnitCurtainStatus, ReqData);
 
             // 4. 수신데이터 파싱
             DataClasses.CurtainCtrl.Curtain curtain = parsingReply_UnitCurtainCommon(DEVICE_ADDRESS, deviceIdx, Reply);
@@ -676,21 +687,21 @@ public class CurtainV1_Controller extends DeviceManager {
             //     1.2. Details Data Check
             //          - D1 : 상태 수신 정보
             data = Reply[index++];
-            if (0x80 != data) {
-                Log.w(TAG, "[parsingReply_UnitCurtainCommon] D1 (ReplayStatusError) : Replay is Error [" + ToByteString(data) + "]");
-                return null;
-            }
+//            if (0x80 != data) {
+//                Log.w(TAG, "[parsingReply_UnitCurtainCommon] D1 (ReplayStatusError) : Replay is Error [" + ToByteString(data) + "]");
+//                return null;
+//            }
 
             //          - D2 : 커튼 상태
             data = Reply[index++];
-            if (0x0<data || data > 0x03) {
+            if (0x0>data || data > 0x03) {
                 Log.w(TAG, "[parsingReply_UnitCurtainCommon] D2 (Curtain Status) : Out Of Range " + ToByteString(data));
                 return null;
             }
 
             //          - D3 : 그룹제어(설치된 커튼의 개수)
             data = Reply[index++];
-            if (0x0<data || data > 0x0A) {
+            if (0x0>data || data > 0x0A) {
                 Log.w(TAG, "[parsingReply_UnitCurtainCommon] D3 (Curtain Group Control Count) : Out Of Range " + ToByteString(data));
                 return null;
             }
@@ -795,6 +806,13 @@ public class CurtainV1_Controller extends DeviceManager {
             break;
         }
 
+//        if(OldCurtain== null){bChanged = true;}
+//        if (OldCurtain.getCurtainID() != curtain.getCurtainID()) { bChanged = true;  }
+//        if (OldCurtain.getCurtainStatus() != curtain.getCurtainStatus()) { bChanged = true;  }
+//        if (OldCurtain.getErrorStatus() != curtain.getErrorStatus()) { bChanged = true;  }
+//
+//        bChanged = true;
+
         if (bChanged || bNotify) {
             mDriver.Device[deviceIdx].curtain = curtain;
             StatusChanged(deviceIdx);

+ 5 - 5
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_curtain/CurTainV1MainScreen.java

@@ -31,7 +31,7 @@ public class CurTainV1MainScreen extends WpadScreen {
 
     private final String TAG = "CurTainV1MainScreen";
 
-    private boolean isNoUseData = true;
+    private boolean isNoUseData = false;
     private final boolean DEBUG_LOG_ON = true;
     private void DebugLogOutput(String s) { if(DEBUG_LOG_ON) Log.d(TAG, s); }
 
@@ -339,11 +339,11 @@ public class CurTainV1MainScreen extends WpadScreen {
         int OnCount = 0;
         boolean isLivingRoomData = true;
         //그룹아이디 정보를 가지고 확인하기
-        if(mData.Device[0].curtain.getCurtainGroupID() == 0x80)
+        if(Math.abs(mData.Device[0].curtain.getCurtainGroupID()) == 0x80)
         {
             isLivingRoomData = true;
         }
-        else if(mData.Device[0].curtain.getCurtainGroupID() == 0x90)
+        else if(Math.abs(mData.Device[0].curtain.getCurtainGroupID()) == 0x90)
         {
             isLivingRoomData = false;
         }
@@ -353,11 +353,11 @@ public class CurTainV1MainScreen extends WpadScreen {
     private void drawCurrentPage(CurtainAPI.Data data) {
         try {
             boolean isLivingRoomData = true;
-            if(0x80 == data.Device[0].curtain.getCurtainGroupID())
+            if(0x80 == Math.abs(data.Device[0].curtain.getCurtainGroupID()))
             {
                 isLivingRoomData = true;
             }
-            else if(0x90 == data.Device[0].curtain.getCurtainGroupID())
+            else if(0x90 == Math.abs(data.Device[0].curtain.getCurtainGroupID()))
             {
                 isLivingRoomData = false;
             }

BIN
WallPadMain/libs/WallPadAPI.jar


+ 3 - 3
WallPadMain/src/main/AndroidManifest.xml

@@ -1,10 +1,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadmain"
     android:versionCode="17"
-    android:versionName="2021.04.09.01">
+    android:versionName="2021.04.19.01">
 
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
-	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 	<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
 	<uses-permission android:name="android.permission.WAKE_LOCK"/>
 	<uses-permission android:name="android.permission.INTERNET"/>
@@ -18,7 +19,6 @@
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
     <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
      
     <application

+ 11 - 3
WallPadMain/src/main/java/com/artncore/devicectr/WallPadInterface.java

@@ -1,5 +1,6 @@
 package com.artncore.devicectr;
 
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadsupport.Version;
 import android.util.Log;
 
@@ -21,7 +22,7 @@ public class WallPadInterface {
 	public static final int EVT_END_RING = 231;  //GLE 모델 추가
 
 	public static final int BTN_PSTN_RING_IHN1010 = 264;     //국선 Incomingcall 상태 전달 (IHN-1010)
-	public static final int BTN_EMR_IHN1010 = 265; 	// 전면 비상버튼(IHN-1010)
+	public static final int BTN_EMR_IHN1010 = 265; 	// 전면 비상버튼(IHN-1010)f
 	public static final int BTN_CALL_IHN1010 = 266; 	// LED 통화 버튼 입력 상태 전달(IHN-1010)
 	public static final int BTN_DOOR_IHN1010 = 268;     //현관폰 벨 버튼 입력 상태 전달 (IHN-1010)
 	public static final int EVT_EMR_IHN1010 = 269;      // 비상 센서 입력 상태 전달
@@ -165,9 +166,12 @@ public class WallPadInterface {
 				}
 			}
 		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch( Exception e )
 		{
-
+			LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -221,9 +225,13 @@ public class WallPadInterface {
 				}
 			}
 		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch( Exception e )
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 
 		return ret;

+ 15 - 3
WallPadMain/src/main/java/com/artncore/deviceinterface/WallPadInterface.java

@@ -1,8 +1,11 @@
 package com.artncore.deviceinterface;
 
+import com.util.LogUtil;
 import kr.co.icontrols.a20ioctl.A20IOInterface;
 import kr.co.icontrols.v40ioctl.V40IOInterface;
 import kr.co.icontrols.wallpadsupport.Version;
+
+import android.nfc.Tag;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -31,7 +34,7 @@ public class WallPadInterface {
 	public static final int BTN_EMR_IHN1010 = 265; 	// 전면 비상버튼(IHN-1010)
 	public static final int BTN_CALL_IHN1010 = 266; 	// LED 통화 버튼 입력 상태 전달(IHN-1010)
 	public static final int BTN_DOOR_IHN1010 = 268;     //현관폰 벨 버튼 입력 상태 전달 (IHN-1010)
-	public static final int EVT_SENSOR_EMRGENCY_IHN1010 = 269;      // 비상 센서 입력 상태 전달
+	public static final int EVT_SENSOR_EMRGENCY_IHN1010_BTN_EMR_IHN101GL = 269;      // 비상 센서 입력 상태 전달 (대외향 모델), 전면 비상버튼(IHN-1010GL)
 	public static final int EVT_SENSOR_MAGNETIC0_IHN1010 = 270;     // 센서 마그네틱 0 입력 상태 전달
 	public static final int EVT_SENSOR_REFUGELADDER_IHN1010 = 276;     // 센서 피난사다리 입력 상태 전달
 	public static final int EVT_SENSOR_MOTIONIN_IHN1010 = 277;    // 센서 동체감지기-내부 입력 상태 전달
@@ -187,9 +190,13 @@ public class WallPadInterface {
 				}
 			}
 		}
+		catch (RuntimeException r)
+		{
+			LogUtil.errorLogInfo("", TAG, r);
+		}
 		catch( Exception e )
 		{
-
+			LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -243,9 +250,14 @@ public class WallPadInterface {
 				}
 			}
 		}
+		catch (RuntimeException re)
+		{
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch( Exception e )
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 
 		return ret;

+ 32 - 8
WallPadMain/src/main/java/kr/co/icontrols/gledeviceinterface/jni.java

@@ -34,7 +34,10 @@ public class jni {
 			nRet = requestLiveSignal();
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -57,7 +60,10 @@ public class jni {
 			nRet = requestRequestSignal();
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -90,7 +96,10 @@ public class jni {
 			}
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -109,7 +118,10 @@ public class jni {
 			nRet = requestResetLightSwitch();
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -129,7 +141,10 @@ public class jni {
 			nRet = requestResetRF();
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -153,7 +168,10 @@ public class jni {
 				nRet = requestMuteOnOff(0);
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -176,7 +194,10 @@ public class jni {
 				nRet = requestDTMFReadDisable();
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}
@@ -196,7 +217,10 @@ public class jni {
 			nRet = requestDTMFWrite(num);
 			nRet = close();
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+			Log.e(TAG, "exception : " + re);
+        }
+		catch (Exception e )
 		{
 			Log.e(TAG, "exception : " + e );
 		}

+ 180 - 49
WallPadMain/src/main/java/kr/co/icontrols/hdcftp/HDCFTPManager.java

@@ -11,10 +11,13 @@
 
 package kr.co.icontrols.hdcftp;
 
+import com.util.LogUtil;
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
+
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPSClient;
 
@@ -64,13 +67,24 @@ public class HDCFTPManager {
      */
     public boolean connectFTP(String TargetIP) {
         try {
-            if (bFTPSUsage) mFTPSClient.connect(TargetIP);
+            if (bFTPSUsage)
+            {
+                //모빌토크 FTPS 검증 시험 테스트결과 완료
+                mFTPSClient.connect(TargetIP);
+                mFTPSClient.execPBSZ (0);
+                mFTPSClient.execPROT("P");
+            }
             else mFTPClient.connect(TargetIP);
             LOG_INFO("[connectFTP] Connected to [" + TargetIP + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] connectFTP(TargetIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -84,9 +98,14 @@ public class HDCFTPManager {
         try {
             if (bFTPSUsage) return mFTPSClient.isConnected();
             return mFTPClient.isConnected();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isFTPConnected()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -102,17 +121,24 @@ public class HDCFTPManager {
         try {
             boolean bResult = false;
             if (bFTPSUsage) {
-                bResult = mFTPSClient.login(ID, PW);
+                for(int i =0; i< 1; i++)
+                    bResult = mFTPSClient.login(ID, PW);
                 LOG_INFO("[loginFTP] logged FTPS Server in : [" +bResult + "]");
             }
             else {
-                bResult = mFTPClient.login(ID, PW);
+                for(int i =0; i< 1; i++)
+                    bResult = mFTPClient.login(ID, PW);
                 LOG_INFO("[loginFTP] logged FTP Server in : [" +bResult + "]");
             }
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] loginFTP(ID, PW)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -126,7 +152,7 @@ public class HDCFTPManager {
         try {
             boolean bResult = false;
             if (bFTPSUsage) {
-                if (mFTPSClient.isConnected()) {
+                if (mFTPSClient!=null && mFTPSClient.isConnected()) {
                     bResult = mFTPSClient.logout();
                 }
                 else {
@@ -134,7 +160,7 @@ public class HDCFTPManager {
                 }
             }
             else {
-                if (mFTPClient.isConnected()) {
+                if (mFTPSClient!=null && mFTPClient.isConnected()) {
                     bResult = mFTPClient.logout();
                 }
                 else {
@@ -142,9 +168,14 @@ public class HDCFTPManager {
                 }
             }
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] logoutFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -165,9 +196,14 @@ public class HDCFTPManager {
                 LOG_INFO("[disconnectFTP] Disconnected FTP");
             }
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] disconnectFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -186,7 +222,7 @@ public class HDCFTPManager {
             File mFile = new File(localFilePath);
             if (mFile.exists()) {
                 LOG_INFO("[downloadFile] [" + localFilePath + "] is exist!!");
-                if (mFile.delete()) {
+                if (FileDelete(mFile)) {
                     LOG_INFO("[downloadFile] [" + localFilePath + "] is deleted!!");
                 }
                 else {
@@ -205,9 +241,14 @@ public class HDCFTPManager {
             LOG_INFO("[downloadFile] bResult [" +bResult + "]");
 
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] downloadFile(remoteFilepath, localFilePath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             deleteFile(localFilePath);
             return false;
         }
@@ -221,6 +262,7 @@ public class HDCFTPManager {
      * @return (boolean) Download result (true : success, false : failure)
      */
     public boolean uploadFile(String remoteFilepath, String localFilePath) {
+        FileInputStream FileInStm = null;
         try {
             boolean bResult = false;
             File mFile = new File(localFilePath);
@@ -228,17 +270,31 @@ public class HDCFTPManager {
                 LOG_INFO("[uploadFile] No FILE!! [" +localFilePath + "]");
                 return false;
             }
-            FileInputStream FileInStm = new FileInputStream(mFile);
+            FileInStm = new FileInputStream(mFile);
             if (bFTPSUsage) bResult = mFTPSClient.storeFile(remoteFilepath, FileInStm);
             else bResult = mFTPClient.storeFile(remoteFilepath, FileInStm);
             LOG_INFO("[uploadFile] bResult [" +bResult + "]");
-
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] uploadFile(remoteFilepath, localFilePath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
+        finally {
+            if(FileInStm!=null) {
+                try {
+                    FileInStm.close();
+                } catch (IOException e) {
+                    LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+                }
+                FileInStm = null;
+            }
+        }
     }
 
     /**
@@ -254,9 +310,14 @@ public class HDCFTPManager {
             bResult = mFile.exists();
             LOG_INFO("[isFileexist] bResult [" +bResult + "]");
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isFileexist(Filepath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -272,16 +333,21 @@ public class HDCFTPManager {
             boolean bResult = false;
             File mFile = new File(Filepath);
             if (mFile.exists()) {
-                bResult =  mFile.delete();
+                bResult =  FileDelete(mFile);// mFile.delete();
             }
             else {
                 LOG_INFO("[deleteFile] There is no file = " +Filepath);
             }
             LOG_INFO("[deleteFile] bResult [" +bResult + "]");
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] deleteFile(Filepath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -292,9 +358,14 @@ public class HDCFTPManager {
             else mFTPClient.setReceieveDataSocketBufferSize(BufferSize);
             LOG_INFO("[setReceieveDataSocketBufferSize] BufferSize [" + BufferSize + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setReceieveDataSocketBufferSize(BufferSize)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -305,9 +376,14 @@ public class HDCFTPManager {
             else mFTPClient.setReceiveBufferSize(BufferSize);
             LOG_INFO("[setReceiveBufferSize] BufferSize [" + BufferSize + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setReceiveBufferSize(BufferSize)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -336,9 +412,14 @@ public class HDCFTPManager {
                     return false;
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setCtrlEncoding(Encode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -350,9 +431,14 @@ public class HDCFTPManager {
             else bResult = mFTPClient.setFileType(FileType);
             LOG_INFO("[setFileType] bResult [" +bResult + "]");
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setFileType(FileType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -363,9 +449,14 @@ public class HDCFTPManager {
             else mFTPClient.enterLocalPassiveMode();
             LOG_INFO("[setPassiveMode] Set LocalPassiveMode!!");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPassiveMode()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -376,9 +467,13 @@ public class HDCFTPManager {
             else mFTPClient.enterLocalActiveMode();
             LOG_INFO("[setPassiveMode] Set LocalActiveMode!!");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setActiveMode()");
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
             return false;
         }
     }
@@ -390,9 +485,14 @@ public class HDCFTPManager {
             else bResult = mFTPClient.setFileTransferMode(Mode);
             LOG_INFO("[setFileTransferMode] bResult [" +bResult + "]");
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setFileTransferMode(Mode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -403,9 +503,14 @@ public class HDCFTPManager {
             else mFTPClient.setDefaultTimeout(mSec);
             LOG_INFO("[setDefaultTimeout] Set Timeout [" + mSec + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setDefaultTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -416,9 +521,14 @@ public class HDCFTPManager {
             else mFTPClient.setConnectTimeout(mSec);
             LOG_INFO("[setConnectTimeout] Set Timeout [" + mSec + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setConnectTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -429,9 +539,14 @@ public class HDCFTPManager {
             else mFTPClient.setSoTimeout(mSec);
             LOG_INFO("[setSoTimeout] Set Timeout [" + mSec + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setSoTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -442,12 +557,28 @@ public class HDCFTPManager {
             else mFTPClient.setDataTimeout(mSec);
             LOG_INFO("[setDataTimeout] Set Timeout [" + mSec + "]");
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setDataTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
 
+    private synchronized boolean FileDelete(File file)
+    {
+        boolean result = false;
+        if(file!=null && file.exists())
+        {
+            result = file.delete();
+        }
+        return result;
+    }
+
+
 
 }

+ 41 - 13
WallPadMain/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface.java

@@ -1,6 +1,7 @@
 package kr.co.icontrols.v40ioctl;
 
 import android.util.Log;
+import com.util.LogUtil;
 
 public class V40IOInterface {
 
@@ -62,9 +63,13 @@ public class V40IOInterface {
             Log.i(TAG, "[setMACAddress] strMAC [" + strMAC+ "]");
             SetMacAddr(strMAC);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -72,9 +77,13 @@ public class V40IOInterface {
         try {
             Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
             IpAddr(strIP);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -82,9 +91,13 @@ public class V40IOInterface {
         try {
             Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
             NetMask(strNetmask);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -92,9 +105,13 @@ public class V40IOInterface {
         try {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             GatewayIp(strGateway);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -108,7 +125,10 @@ public class V40IOInterface {
             GatewayIp(strGateway);
 			Reboot(5);
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
             e.printStackTrace();
@@ -130,9 +150,13 @@ public class V40IOInterface {
             Log.i(TAG, "[setNetworkInterface] strIP [" + strIP+ "], strNetmask [" + strNetmask+ "], strGateway [" + strGateway+ "], strMAC [" + strMAC+ "]");
 
             NetAll(strIP, strNetmask, strGateway, strMAC);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -156,9 +180,13 @@ public class V40IOInterface {
             GatewayIp(strGateway);
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 41 - 13
WallPadMain/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface2.java

@@ -1,6 +1,7 @@
 package kr.co.icontrols.v40ioctl;
 
 import android.util.Log;
+import com.util.LogUtil;
 
 public class V40IOInterface2 {
 
@@ -68,9 +69,13 @@ public class V40IOInterface2 {
             Log.i(TAG, "[setMACAddress] strMAC [" + strMAC+ "]");
             SetMacAddr(strMAC);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -78,9 +83,13 @@ public class V40IOInterface2 {
         try {
             Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
             IpAddr(strIP);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -88,9 +97,13 @@ public class V40IOInterface2 {
         try {
             Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
             NetMask(strNetmask);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -98,9 +111,13 @@ public class V40IOInterface2 {
         try {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             GatewayIp(strGateway);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -114,7 +131,10 @@ public class V40IOInterface2 {
             GatewayIp(strGateway);
 			Reboot(5);
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
             e.printStackTrace();
@@ -136,9 +156,13 @@ public class V40IOInterface2 {
             Log.i(TAG, "[setNetworkInterface] strIP [" + strIP+ "], strNetmask [" + strNetmask+ "], strGateway [" + strGateway+ "], strMAC [" + strMAC+ "]");
 
             NetAll(strIP, strNetmask, strGateway, strMAC);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -162,9 +186,13 @@ public class V40IOInterface2 {
             GatewayIp(strGateway);
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

File diff suppressed because it is too large
+ 395 - 119
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/IOInterface.java


File diff suppressed because it is too large
+ 411 - 153
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/MainActivity.java


+ 12 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/ManualActivity.java

@@ -24,6 +24,7 @@ import android.widget.RelativeLayout;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 /**
  * @description
@@ -99,7 +100,10 @@ private final String TAG = "ManualActivity";
     	
     	try {
             wdb = new WallpadStatusData(this);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Error] - WallpadStatusData Create : " + e);
         }
     	
@@ -290,9 +294,14 @@ private final String TAG = "ManualActivity";
 			default:
 				break;
 			}
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            mCurrentScreenId = -1;
+            return false;
+        }
+		catch (Exception e) {
         	Log.e(TAG, "[Error] - setChangeScreen->Screen Create : " + e.toString());
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             mCurrentScreenId = -1;
             return false;
         }

+ 39 - 15
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/PopupActivity.java

@@ -13,6 +13,7 @@ import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.define;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import android.annotation.SuppressLint;
 import android.content.Context;
@@ -189,7 +190,10 @@ public class PopupActivity extends WpadActivity {
         }
         
         try { wdb = new WallpadStatusData(this); }
-        catch (Exception e) { Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e); }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e); }
         
         // 4. Layout registration
         DebugLogOutput("[Create] - Step4 : Layout registration");
@@ -263,8 +267,11 @@ public class PopupActivity extends WpadActivity {
 			setInfoActivityRun(false);
 			mCreateComplete = false;
 			if( wdb != null )wdb.closeDB();
-		} catch (Exception e) {
-			e.printStackTrace();
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			LogUtil.errorLogInfo("", TAG, e);
 		}
 		Log.d(TAG, "*************************************************************");
 		Log.d(TAG, "****************** [END   - PopupActivity] ******************");
@@ -292,7 +299,7 @@ public class PopupActivity extends WpadActivity {
         Log.d(TAG, "[onPause] mCurrentScreenId [" + mCurrentScreenId + "]");
         if (mCurrentScreenId == ID.POPUPS.POPUP_BANDLOCATIONALARM) ctrlLCDOff();
         else if (mCurrentScreenId == ID.POPUPS.POPUP_NOTICESTRANGER) {
-            // 타아웃 종료시(화면터치로 인한 종료가 아닐 경우) 거동수상자 녹화 시작
+            // 타아웃 종료시(화면터치로 인한 종료가 아닐 경우) 거동수상자 녹화 시작
             boolean bResult = NoticeDetectStranger.bTouch;
             Log.d(TAG, "[onPause] bResult [" + bResult + "]");
             if (!bResult) {
@@ -380,7 +387,7 @@ public class PopupActivity extends WpadActivity {
      * @param OnlyRemove - 현재 Screen 을 삭제만 할 경우 (onDestroy 에서 사용)
      * @return (boolean) true : 성공,  false : 실패
      */
-    private boolean setChangeScreen(int nScreenId, boolean OnlyRemove) {
+    public boolean setChangeScreen(int nScreenId, boolean OnlyRemove) {
         Log.d(TAG, "[setChangeScreen] CurrentScreenId [" + mCurrentScreenId + "], NextLayoutId [" + nScreenId + "], OnlyRemove [" + OnlyRemove + "]");
         
         if (getCreateComplete() == false) {
@@ -759,10 +766,15 @@ public class PopupActivity extends WpadActivity {
                     return false;
 
             }
-        } catch(Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            mCurrentScreenId = -1;
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - setChangeScreen->Screen Create : " + e);
             mCurrentScreenId = -1;
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
         
@@ -828,9 +840,12 @@ public class PopupActivity extends WpadActivity {
     public static void resetCurrentInfoScreenID() {
         try {
             mCurrentInfoScreenId = -1;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] resetCurrentInfoScreenID()");
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }  	
     }
 
@@ -864,9 +879,12 @@ public class PopupActivity extends WpadActivity {
         try {
             Log.d(TAG, "[ctrlLCDOff]");
             getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlLCDOff()");
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -883,9 +901,12 @@ public class PopupActivity extends WpadActivity {
                     return nFrontCam[1];
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getSmartDoorCamType()");
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return -1;
     }
@@ -900,9 +921,12 @@ public class PopupActivity extends WpadActivity {
             data.closeDB();
             Log.d(TAG, "[GetEasyModeUXUse] bSupport [" + bSupport + "], bUse [" + bUse + "]");
             return bSupport & bUse;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GetEasyModeUXUse()");
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }

+ 83 - 28
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/Common.java

@@ -1,5 +1,6 @@
 package kr.co.icontrols.wallpadmain.declare;
 
+import com.util.LogUtil;
 import java.util.List;
 
 import kr.co.icontrols.wallpadmain.util.MainDatabaseManager;
@@ -380,6 +381,8 @@ public final class Common {
      */
     public static final int WALLPAD_CAM_AHD_FRONT = 0;
     public static final int WALLPAD_CAM_NORMAL_FRONT = 1;
+    public static final int WALLPAD_CAM_AHD_FRONT_FLIP = 2;
+
     public static final String DOOR_CAMERA_TYPE_DEFAULT = "기본";
     public static final String DOOR_CAMERA_TYPE_RF_DOOR_CAMERA = "RF현관카메라";
     public static final String DOOR_CAMERA_TYPE_SMART_KEY = "스마트키";
@@ -628,10 +631,14 @@ public final class Common {
 
             if(mode == 1) return true;
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
             Log.e("Common", "[ExceptionError] - new GetDeviceSampleMode : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         return false;
@@ -654,10 +661,14 @@ public final class Common {
             wssd.closeDB();
             if(mode == 0) return true;
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
             Log.e("Common", "[ExceptionError] - new GetModelHouseSleepModeRelease : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         return false;
@@ -676,10 +687,14 @@ public final class Common {
             wssd.closeDB();
             if(mode == 0) return true;
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
             Log.e("Common", "[ExceptionError] - new GetSensorSampleMode : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         return false;
@@ -701,10 +716,14 @@ public final class Common {
 
             if(mode == 1) return true;
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
             Log.e("Common", "[ExceptionError] - new GetElevatorSampleMode : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         return false;
@@ -726,9 +745,12 @@ public final class Common {
                 }
             }
         }
-        catch( Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch( Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -755,10 +777,13 @@ public final class Common {
                 return null;
             }
         }
-        catch( Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch( Exception e)
         {
             Log.e("Exception", e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return ret;
     }
@@ -867,9 +892,14 @@ public final class Common {
                 Log.d("Common", "$$$$$$$$$$ MetringDB count : " +  Integer.parseInt(MetringDB[1].split("[(]")[1].split("[:]")[0].trim()));
                 return Integer.parseInt(MetringDB[1].split("[(]")[1].split("[:]")[0].trim());
             }
-            catch(Exception e)
+            catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return DEFAULT_METERING_COUNT;
+            }
+            catch (Exception e)
             {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return DEFAULT_METERING_COUNT;
             }
         }
@@ -942,9 +972,14 @@ public final class Common {
 
             return returnData;
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return returnData;
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return returnData;
         }
     }
@@ -1007,9 +1042,14 @@ public final class Common {
                 Log.d(TAG, "[ZeroPadding_Head] strOriginalString(" + strOriginalString.length() +") is longer than nOutLength(" + nOutLength + ")");
             }
             return strResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return strResult;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ZeroPadding_Head(int nOutLength, String strOriginalString)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return strResult;
         }
     }
@@ -1031,9 +1071,14 @@ public final class Common {
                 Log.d(TAG, "[ZeroPadding_Tail] strOriginalString(" + strOriginalString.length() +") is longer than nOutLength(" + nOutLength + ")");
             }
             return strResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return strResult;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ZeroPadding_Tail(int nOutLength, String strOriginalString)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return strResult;
         }
     }
@@ -1072,9 +1117,12 @@ public final class Common {
             iMobileServieIntent.setAction(Common.MOBILE_SERVICE_ENERGY_UPDATE);
             context.sendBroadcast(iMobileServieIntent);
         }
-        catch( Exception e )
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch( Exception e )
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1309,8 +1357,12 @@ public final class Common {
             iMobileServieIntent.putExtra("KIND", InOut);
             iMobileServieIntent.putExtra("CarNum", CarNum);
             context.sendBroadcast(iMobileServieIntent);
-        } catch (Exception e) {
-            e.printStackTrace();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1321,8 +1373,12 @@ public final class Common {
             iMobileServieIntent.putExtra("KIND", kind);
             iMobileServieIntent.putExtra("MSG", msg);
             context.sendBroadcast(iMobileServieIntent);
-        } catch (Exception e) {
-            e.printStackTrace();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1370,8 +1426,7 @@ public final class Common {
     public enum GUI_TYPE {
         STANDARD,
         METRO,
-        HYOSUNG_CTRL_ON,
-        HYOSUNG_CTRL_OFF,
+        HYOSUNG,
         HIMCHAN,
     }
 

+ 12 - 5
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/DataClasses.java

@@ -124,9 +124,11 @@ public class DataClasses {
 
         public IconInfo getIconInfoByID(int nID) {
             for (int i = 0; i < getCnt(); i++) {
-//                Log.w(TAG, "[IconInfoTable.getIconInfoByID] nID [" + nID+ "] : getIconInfoByIndex(" + i + ").getIconID() [" + getIconInfoByIndex(i).getIconID()+ "]");
-                if (nID == getIconInfoByIndex(i).getIconID()) {
-//                    Log.e(TAG, "[IconInfoTable.getIconInfoByID] IconInfoTables.get(" + i + ") [" + IconInfoTables.get(i)+ "]");
+//                Log.e(TAG, "[IconInfoTable.getIconInfoByID] nID = [" + nID + "]");
+                IconInfo item = getIconInfoByIndex(i);
+                if (item!=null && nID == item.getIconID()) {
+                    Log.e(TAG, "[IconInfoTable.getIconInfoByID] IconInfoTables.get(" + i + ").IconID = [" + IconInfoTables.get(i).IconID + "]");
+                    Log.e(TAG, "[IconInfoTable.getIconInfoByID] IconInfoTables.get(" + i + ").IconName = [" + IconInfoTables.get(i).IconName + "]");
                     return IconInfoTables.get(i);
                 }
             }
@@ -136,8 +138,13 @@ public class DataClasses {
         public void printValue() {
             Log.e(TAG, "[IconInfoTable.printValue] IconInfoTables.size() [" + IconInfoTables.size()+ "]");
             for (int i = 0; i < IconInfoTables.size(); i++) {
-                Log.d(TAG, "[IconInfoTable] i = " + i + ", IconID [" + getIconInfoByIndex(i).getIconID() + "], IconName [" + getIconInfoByIndex(i).getIconName() + "], LinkedScreenID [" + getIconInfoByIndex(i).getLinkedScreenID() + "], " +
-                        "NormalImage [" + getIconInfoByIndex(i).getNormalImage() + "], PressedImage [" + getIconInfoByIndex(i).getPressedImage() + "], SelectedImage [" + getIconInfoByIndex(i).getSelectedImage() + "], DisabledImage [" + getIconInfoByIndex(i).getDisabledImage() + "]");
+                IconInfo item = getIconInfoByIndex(i);
+                if(item!=null)
+                {
+                    Log.d(TAG, "[IconInfoTable] i = " + i + ", IconID [" + item.getIconID() + "], IconName [" + item.getIconName() + "], LinkedScreenID [" + item.getLinkedScreenID() + "], " +
+                            "NormalImage [" + item.getNormalImage() + "], PressedImage [" + item.getPressedImage() + "], SelectedImage [" + item.getSelectedImage() + "], DisabledImage [" + item.getDisabledImage() + "]");
+                }
+
             }
         }
 

+ 67 - 68
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/ID.java

@@ -11,6 +11,7 @@ package kr.co.icontrols.wallpadmain.declare;
 
 
 import android.util.Log;
+import com.util.LogUtil;
 
 public final class ID {
 
@@ -169,9 +170,8 @@ public final class ID {
         public final static int SCREEN_METROUI_SUB_01 = 22000;   // 서브화면 (메트로 UI, 보급형 월패드)
         public final static int SCREEN_METROUI_SUB_02 = 23000;   // 서브화면 (메트로 UI, 보급형 월패드)
         public final static int SCREEN_METROUI_GROUP = 24000;   // 서브화면 (메트로 UI, 보급형 월패드, 서브메뉴 그룹화)
-        public final static int SCREEN_HYOSUNGUI_MAIN_HN = 25000;   // 메인화면 (효성중공업, 제어있음)
-        public final static int SCREEN_HYOSUNGUI_MAIN_HA = 26000;   // 메인화면 (효성중공업, 제어없음)
-        public final static int SCREEN_EASYUI_MAIN = 27000;   // 메인화면 (간편모드)
+        public final static int SCREEN_HYOSUNGUI_MAIN_HN = 25000;   // 메인화면 (효성중공업)
+        public final static int SCREEN_EASYUI_MAIN = 26000;   // 메인화면 (간편모드)
 
 
         /* ==========================================================================
@@ -408,15 +408,21 @@ public final class ID {
                     public final static int BACK_EVENT = BASE + 101;
                     public final static int WEATHER = BASE + 102;
                     public final static int NEW_NOTIFICATION = BASE + 103;
+                    public final static int SHORTCUT_ICON_01 = BASE + 104;
+                    public final static int SHORTCUT_ICON_02 = BASE + 105;
+                    public final static int SHORTCUT_ICON_03 = BASE + 106;
                 }
 
                 public final class BTNS {
                     public final static int CLOCK = BASE + 200;
                     public final static int CALENDAR = BASE + 201;
                     public final static int WEATHER = BASE + 202;
-                    public final static int TALK_GUARD = BASE + 203;
-                    public final static int SECURITY_MAIN = BASE + 204;
-                    public final static int ELEVATOR = BASE + 205;
+                    public final static int SHORTCUT_BUTTON_01 = 203;
+                    public final static int SHORTCUT_BUTTON_02 = 204;
+                    public final static int SHORTCUT_BUTTON_03 = 205;
+//                    public final static int TALK_GUARD = BASE + 203;
+//                    public final static int SECURITY_MAIN = BASE + 204;
+//                    public final static int ELEVATOR = BASE + 205;
                     public final static int ICONS_SMALL = BASE + 206;
                     public final static int ICONS_BIG = BASE + 207;
                     public final static int MANUAL = BASE + 208;
@@ -438,6 +444,10 @@ public final class ID {
                     public final static int RAINFALL_PROBABILITY_AM = BASE + 307;
                     public final static int RAINFALL_PROBABILITY_PM = BASE + 308;
                     public final static int WEATHER_CURRENT = BASE + 309;
+
+                    public final static int SHORTCUT_TEXT_01 = 310;
+                    public final static int SHORTCUT_TEXT_02 = 311;
+                    public final static int SHORTCUT_TEXT_03 = 312;
                 }
 
                 public final class OBJECTS {
@@ -547,23 +557,36 @@ public final class ID {
                 }
 
                 public final class BTNS {
-                    public final static int FUNCTION_1_1 = BASE + 200;
-                    public final static int FUNCTION_1_2 = BASE + 201;
-                    public final static int FUNCTION_1_3 = BASE + 202;
-                    public final static int FUNCTION_1_4 = BASE + 203;
-                    public final static int FUNCTION_2_1 = BASE + 204;
-                    public final static int FUNCTION_2_2 = BASE + 205;
-                    public final static int FUNCTION_2_3 = BASE + 206;
-                    public final static int FUNCTION_2_4 = BASE + 207;
-                    public final static int FUNCTION_3_1 = BASE + 208;
-                    public final static int FUNCTION_3_2 = BASE + 209;
-                    public final static int FUNCTION_3_3 = BASE + 210;
-                    public final static int NOTIFICATION_01 = BASE + 211;
-                    public final static int NOTIFICATION_02 = BASE + 212;
-                    public final static int NOTIFICATION_03 = BASE + 213;
-                    public final static int NOTIFICATION_04 = BASE + 214;
-                    public final static int NOTIFICATION_05 = BASE + 215;
-                    public final static int MANUAL = BASE + 216;
+                    public final static int NOTIFICATION_01 = BASE + 200; // 알림
+                    public final static int NOTIFICATION_02 = BASE + 201;
+                    public final static int NOTIFICATION_03 = BASE + 202;
+                    public final static int NOTIFICATION_04 = BASE + 203;
+                    public final static int NOTIFICATION_05 = BASE + 204;
+
+                    public final static int CLOCK = BASE + 205;
+                    public final static int WEATHER = BASE + 206;
+
+                    public final static int SHORTCUT_ICON_1_1 = BASE + 210; // 아이콘
+                    public final static int SHORTCUT_ICON_1_2 = BASE + 211;
+                    public final static int SHORTCUT_ICON_1_3 = BASE + 212;
+                    public final static int SHORTCUT_ICON_2_1 = BASE + 213;
+                    public final static int SHORTCUT_ICON_2_2 = BASE + 214;
+                    public final static int SHORTCUT_ICON_2_3 = BASE + 215;
+                    public final static int SHORTCUT_ICON_3_1 = BASE + 216;
+                    public final static int SHORTCUT_ICON_3_2 = BASE + 217;
+                    public final static int SHORTCUT_ICON_3_3 = BASE + 218;
+
+                    public final static int SHORTCUT_BUTTON_1_1 = BASE + 220; // 아이콘 배경
+                    public final static int SHORTCUT_BUTTON_1_2 = BASE + 221;
+                    public final static int SHORTCUT_BUTTON_1_3 = BASE + 222;
+                    public final static int SHORTCUT_BUTTON_2_1 = BASE + 223;
+                    public final static int SHORTCUT_BUTTON_2_2 = BASE + 224;
+                    public final static int SHORTCUT_BUTTON_2_3 = BASE + 225;
+                    public final static int SHORTCUT_BUTTON_3_1 = BASE + 226;
+                    public final static int SHORTCUT_BUTTON_3_2 = BASE + 227;
+                    public final static int SHORTCUT_BUTTON_3_3 = BASE + 228;
+
+                    public final static int MANUAL = BASE + 230;
                 }
 
                 public final class TEXTS {
@@ -571,46 +594,16 @@ public final class ID {
                     public final static int CLOCK = BASE + 301;
                     public final static int TEMPERATURE_CURRENT = BASE + 302;
                     public final static int TEMPERATURE_LOWEST_HIGHEST = BASE + 303;
-                }
-
-                public final class OBJECTS {
-                    public final static int ANALOGCLOCK = BASE + 400;
-                }
-            }
-        }
-
-        public class MAIN_HYOSUNGUI_HA {
-            protected final static int BASE = ACTIVITIES.MainActivity + SCREENS.SCREEN_HYOSUNGUI_MAIN_HA;
 
-            public final class ELEMENTS {
-                public final class IMAGES {
-                    public final static int BACKGROUND = BASE + 100;
-                    public final static int BACK_LINE_1 = BASE + 101;
-                    public final static int WEATHER = BASE + 102;
-                }
-
-                public final class BTNS {
-                    public final static int FUNCTION_1_1 = BASE + 200;
-                    public final static int FUNCTION_1_2 = BASE + 201;
-                    public final static int FUNCTION_1_3 = BASE + 202;
-                    public final static int FUNCTION_2_1 = BASE + 203;
-                    public final static int FUNCTION_2_2 = BASE + 204;
-                    public final static int FUNCTION_2_3 = BASE + 205;
-                    public final static int FUNCTION_3_1 = BASE + 206;
-                    public final static int FUNCTION_3_2 = BASE + 207;
-                    public final static int NOTIFICATION_01 = BASE + 208;
-                    public final static int NOTIFICATION_02 = BASE + 209;
-                    public final static int NOTIFICATION_03 = BASE + 210;
-                    public final static int NOTIFICATION_04 = BASE + 211;
-                    public final static int NOTIFICATION_05 = BASE + 212;
-                    public final static int MANUAL = BASE + 213;
-                }
-
-                public final class TEXTS {
-                    public final static int CALENDAR_DAYOFWEEK = BASE + 300;
-                    public final static int CLOCK = BASE + 301;
-                    public final static int TEMPERATURE_CURRENT = BASE + 302;
-                    public final static int TEMPERATURE_LOWEST_HIGHEST = BASE + 303;
+                    public final static int SHORTCUT_1_1 = BASE + 310;
+                    public final static int SHORTCUT_1_2 = BASE + 311;
+                    public final static int SHORTCUT_1_3 = BASE + 312;
+                    public final static int SHORTCUT_2_1 = BASE + 313;
+                    public final static int SHORTCUT_2_2 = BASE + 314;
+                    public final static int SHORTCUT_2_3 = BASE + 315;
+                    public final static int SHORTCUT_3_1 = BASE + 316;
+                    public final static int SHORTCUT_3_2 = BASE + 317;
+                    public final static int SHORTCUT_3_3 = BASE + 318;
                 }
 
                 public final class OBJECTS {
@@ -1672,22 +1665,23 @@ public final class ID {
             public final static int HDC_EachLamp         = BASE + 12;        // 현산각실조명( 에너지미터 )
             public final static int OutSide_livingLamp   = BASE + 13;        // 대외향 거실조명 ( 거실조명만 )
             public final static int OutSide_EachLamp     = BASE + 14;        // 대외향 각실조명 ( 멀티스위치 )
+            public final static int LivingLightConfig    = BASE + 15;        // 거실조명 그룹설정
+            public final static int HDCLivingNEach_Lamp     = BASE + 16;        // 현산 AC배전 조명 (제일전기 일체형조명제어기 + 멀티스위치 조명)
             public final static int Heating_V1           = BASE + 21;        // 난방 V1
             public final static int Heating_V2           = BASE + 22;        // 난방 V2
             public final static int Gas               	 = BASE + 31;        // 가스
             public final static int DoorLock485          = BASE + 41;        // 도어락 485
             public final static int DoorLockWL           = BASE + 42;        // 도어락 무선
             public final static int Concent			     = BASE + 51;        // 대기콘센트
+            public final static int HDCLivingNEach_Concent			     = BASE + 52;        // 현산 AC배전 콘센트 (거실 대기콘센트 + 멀티스위치 콘센트)
             public final static int ChangAir_Normal	     = BASE + 61;        // 환기 일반
             public final static int ChangAir_LH		     = BASE + 62;        // 환기 LH
             public final static int ChangAir_Hood	     = BASE + 63;        // 환기 후드
-            public final static int SystemAircon	         = BASE + 71;        // 시스템 에어컨
-            public final static int Curtain			         = BASE + 81;        // 커튼
+            public final static int SystemAircon	     = BASE + 71;        // 시스템 에어컨
+            public final static int Curtain			     = BASE + 81;        // 커튼
             public final static int AirQualty = BASE + 91;				 // 공기질 센서
             public final static int ElecCooktop = BASE + 101;				 // 전기레인지
             public final static int CooktopOutlet = BASE + 111;				 // 쿡탑콘센트
-            public final static int HDCLivingNEach_Lamp     = BASE + 16;     // 혼합형조명 ( 멀티스위치 )
-
         }
 
         public static final class SubMenuEnergy {
@@ -1941,9 +1935,14 @@ public final class ID {
                     default: return "none";
                 }
 
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "error";
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] getName(int nID)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "error";
             }
         }

+ 43 - 14
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/Notice_visitor_upload_complete.java

@@ -7,6 +7,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 public class Notice_visitor_upload_complete extends WallPadiMAPClient {
@@ -45,9 +46,13 @@ public class Notice_visitor_upload_complete extends WallPadiMAPClient {
             //XML Header 생성
             XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"+
                     "<imap ver = \"1.0\" address = \"" + DeviceIP + "\" sender = \"" + DeviceDong + "동 " + DeviceHo + "호" + "\">\r\n";
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] Notice_visitor_upload_complete(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -59,9 +64,14 @@ public class Notice_visitor_upload_complete extends WallPadiMAPClient {
                     "   </service>\r\n" +
                     "</imap>";
             return strResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] makeXMLMsg(String strStatus, String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -70,18 +80,26 @@ public class Notice_visitor_upload_complete extends WallPadiMAPClient {
         try {
             svrIP = strIPAddress;
             svrPort = nPort;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setServerInfo(String strIPAddress, int nPort)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void setResultCtrl(RetProci retProci) {
         try {
             Proc = retProci;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setResultCtrl(RetProci retProci)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -92,7 +110,9 @@ public class Notice_visitor_upload_complete extends WallPadiMAPClient {
                 String result = GetAttributeVal(0, "result");
                 if (result != null) {
                     if (result.equalsIgnoreCase("ok")) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("visitor_upload_complete")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                        String name = GetAttributeVal(0, "name");
+                        String type = GetAttributeVal(0, "type");
+                        if ((name!=null && name.equalsIgnoreCase("visitor_upload_complete")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                             Proc.ProcSuccess();
                             return;
                         }
@@ -101,11 +121,15 @@ public class Notice_visitor_upload_complete extends WallPadiMAPClient {
                 Proc.ProcError();
             }
             else {
-                Proc.ProcError();
+                if(Proc!=null) Proc.ProcError();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ProcComplite()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -122,9 +146,14 @@ public class Notice_visitor_upload_complete extends WallPadiMAPClient {
 
             SendXMLDoc(makeXMLMsg(strStatus, strDong, strHo, strType, strTime, strFileName, strMessage), false);
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_access_info(String strStatus, String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }

+ 43 - 14
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/Request_visitor_access_info.java

@@ -8,6 +8,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 public class Request_visitor_access_info extends WallPadiMAPClient {
@@ -46,9 +47,13 @@ public class Request_visitor_access_info extends WallPadiMAPClient {
             //XML Header 생성
             XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"+
                     "<imap ver = \"1.0\" address = \"" + DeviceIP + "\" sender = \"" + DeviceDong + "동 " + DeviceHo + "호" + "\">\r\n";
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] Request_visitor_access_info(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -60,9 +65,14 @@ public class Request_visitor_access_info extends WallPadiMAPClient {
                     "   </service>\r\n" +
                     "</imap>";
             return strResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] makeXMLMsg(String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -71,18 +81,26 @@ public class Request_visitor_access_info extends WallPadiMAPClient {
         try {
             svrIP = strIPAddress;
             svrPort = nPort;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setServerInfo(String strIPAddress, int nPort)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void setResultCtrl(RetProci retProci) {
         try {
             Proc = retProci;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setResultCtrl(RetProci retProci)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -93,7 +111,9 @@ public class Request_visitor_access_info extends WallPadiMAPClient {
                 String result = GetAttributeVal(0, "result");
                 if (result != null) {
                     if (result.equalsIgnoreCase("ok")) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("visitor_access_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                        String name = GetAttributeVal(0, "name");
+                        String type = GetAttributeVal(0, "type");
+                        if ((name!=null && name.equalsIgnoreCase("visitor_access_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                             Proc.ProcSuccess();
                             return;
                         }
@@ -102,11 +122,15 @@ public class Request_visitor_access_info extends WallPadiMAPClient {
                 Proc.ProcError();
             }
             else {
-                Proc.ProcError();
+                if(Proc!=null) Proc.ProcError();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ProcComplite()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -119,9 +143,14 @@ public class Request_visitor_access_info extends WallPadiMAPClient {
             SetServerIPConfig(svrIP, svrPort);
             SendXMLDoc(makeXMLMsg(strDong, strHo, strType, strTime, strFileName, strMessage), true);
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_access_info(String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }

+ 8 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPAlarmOperation.java

@@ -86,7 +86,10 @@ public class iMAPAlarmOperation extends WallPadiMAPClient{
             {
                 EMER_DETAIL_INFO [] test = EMER_DETAIL_INFO.values();
                 return test[idx];
-            }catch( Exception e )
+            } catch (RuntimeException re) {
+                Log.d("yskim", "[GetDetailInfo] --------- re: " + re.toString() );
+            }
+            catch (Exception e )
             {
                 Log.d("yskim", "[GetDetailInfo] --------- e: " + e.toString() );
             }
@@ -160,9 +163,11 @@ public class iMAPAlarmOperation extends WallPadiMAPClient{
             String result = GetAttributeVal(0, "result");
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name")
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name
                             .equalsIgnoreCase("alarm_operation"))
-                            && (GetAttributeVal(0, "type")
+                            && (type!=null && type
                             .equalsIgnoreCase("reply"))) {
                         Proc.ProcSuccess();
                     }

+ 13 - 6
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPCarParking.java

@@ -157,14 +157,21 @@ public class iMAPCarParking extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_parkinfo"))
-                            && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null&& name.equalsIgnoreCase("get_parkinfo"))
+                            && (type!=null && type.equalsIgnoreCase("reply"))) {
                         if (SetItem("destination") == 1) {
-                            if ((GetAttributeVal(0, "device").equalsIgnoreCase("wallpad")) && (GetAttributeVal(0, "id").equalsIgnoreCase(myIP))) {
+                            String device = GetAttributeVal(0, "device");
+                            String id = GetAttributeVal(0, "id");
+                            if ((device!=null && device.equalsIgnoreCase("wallpad")) && (id!=null && id.equalsIgnoreCase(myIP))) {
                                 if (SetItem("info_type") == 1) {
-                                    if (GetItemVal(0).equalsIgnoreCase("home")) {
+                                    String home = GetItemVal(0);
+                                    if (home!=null && home.equalsIgnoreCase("home")) {
                                         if (SetItem("home_info") == 1) {
-                                            if ((GetAttributeVal(0, "dong").equalsIgnoreCase(myDong)) && (GetAttributeVal(0, "ho").equalsIgnoreCase(myHo))) {
+                                            String dong= GetAttributeVal(0, "dong");
+                                            String ho = GetAttributeVal(0, "ho");
+                                            if ((dong!=null && dong.equalsIgnoreCase(myDong)) && (ho!=null&& ho.equalsIgnoreCase(myHo))) {
                                                 Proc.ProcSuccess();
                                                 return;
                                             }
@@ -177,7 +184,7 @@ public class iMAPCarParking extends WallPadiMAPClient {
                 }
             }
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
     }
     @Override
     protected void ProcError() {

+ 10 - 5
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPCarParking_UPIS.java

@@ -25,9 +25,10 @@ public class iMAPCarParking_UPIS extends WallPadiMAPClient{
 
     int SvrPort = 10000;
 
-    public iMAPCarParking_UPIS(Context ctx)
+    public iMAPCarParking_UPIS(Context ctx, boolean bEnable)
     {
-        super.setContext(ctx);
+        if(bEnable)
+            super.setContext(ctx);
         DBMGR = new WallpadStatusData(ctx);
         AddressSet addc =  DBMGR.getAddressMGR(); //DB에서 동호 정보 받아옴
         DBMGR.closeDB();
@@ -80,11 +81,15 @@ public class iMAPCarParking_UPIS extends WallPadiMAPClient{
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_parkinfo_cham_upis")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null&& name.equalsIgnoreCase("get_parkinfo_cham_upis")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         if (SetItem("home_info") == 1)
                         {
-                            if ((GetAttributeVal(0, "dong").equalsIgnoreCase(myDong)) && (GetAttributeVal(0, "ho").equalsIgnoreCase(myHo)))
+                            String dong = GetAttributeVal(0, "dong");
+                            String ho = GetAttributeVal(0, "ho");
+                            if ((dong!=null && dong.equalsIgnoreCase(myDong)) && (ho!=null && ho.equalsIgnoreCase(myHo)))
                             {
                                 Proc.ProcSuccess();
                                 return;
@@ -94,7 +99,7 @@ public class iMAPCarParking_UPIS extends WallPadiMAPClient{
                 }
             }
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
 
     }
     @Override

+ 17 - 7
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPElecCarChargingInfo.java

@@ -2,6 +2,7 @@ package kr.co.icontrols.wallpadmain.imap;
 
 import android.content.Context;
 import android.util.Log;
+import com.util.LogUtil;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
@@ -85,13 +86,18 @@ public class iMAPElecCarChargingInfo extends WallPadiMAPClient{
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("elec_car_charging_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("elec_car_charging_info")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         SetItem("destination");
 
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("homedev") == true) &&
-                                (GetAttributeVal(0, "id_high").equalsIgnoreCase(myDong) == true) &&
-                                (GetAttributeVal(0, "id_low").equalsIgnoreCase(myHo) == true))
+                        String homedev = GetAttributeVal(0, "name");
+                        String id_high = GetAttributeVal(0, "id_high");
+                        String id_low = GetAttributeVal(0, "id_low");
+                        if ((homedev!=null && homedev.equalsIgnoreCase("homedev") == true) &&
+                                (id_high!=null && id_high.equalsIgnoreCase(myDong) == true) &&
+                                (id_low!=null && id_low.equalsIgnoreCase(myHo) == true))
                         {
                             Proc.ProcSuccess();
                             return;
@@ -103,7 +109,7 @@ public class iMAPElecCarChargingInfo extends WallPadiMAPClient{
         }
         else
         {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
     protected void ProcError()
@@ -156,9 +162,13 @@ public class iMAPElecCarChargingInfo extends WallPadiMAPClient{
 
             }
         }
-        catch( Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
     }
 }

+ 16 - 7
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEmptyMessage.java

@@ -2,6 +2,7 @@ package kr.co.icontrols.wallpadmain.imap;
 
 import android.content.Context;
 import android.util.Log;
+import com.util.LogUtil;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
@@ -46,19 +47,27 @@ public class iMAPEmptyMessage extends WallPadiMAPClient{
         //L2스위치 주소 구하기
         try
         {
-            String[] SplitedString = myIP.split("\\.");
-            if(SplitedString != null)
+            if(myIP!=null)
             {
-                if(SplitedString.length == 4)
+                String[] SplitedString = myIP.split("\\.");
+                if(SplitedString != null)
                 {
-                    ServerIP = SplitedString[0] + "." + SplitedString[1] + ".0.254";
-                    Log.d("iMAPEmptyMessage", "L2 Switch IP address : " + ServerIP);
+                    if(SplitedString.length == 4)
+                    {
+                        ServerIP = SplitedString[0] + "." + SplitedString[1] + ".0.254";
+                        Log.d("iMAPEmptyMessage", "L2 Switch IP address : " + ServerIP);
+                    }
                 }
             }
+
+        }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         }
-        catch (Exception e)
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
 
         //타임아웃 설정

+ 48 - 19
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEnergyServer_EnergyMeter.java

@@ -3,6 +3,7 @@ package kr.co.icontrols.wallpadmain.imap;
 import kr.co.icontrols.wallpadmain.util.StringUtil;
 import android.content.Context;
 import android.util.Log;
+import com.util.LogUtil;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
@@ -76,21 +77,31 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
         try
         {
             energyMeterAPI = mWallPadAPI.Get_EnergyMeterController();
-            int retInt = energyMeterAPI.Refresh((byte) 0xFF, false);
-            if (retInt >= 0)
+            if(energyMeterAPI!=null)
             {
-                return true;
-            }
-            else
-            {
-                return false;
+                int retInt = energyMeterAPI.Refresh((byte) 0xFF, false);
+                if (retInt >= 0)
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
             }
+            return false;
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
+
     }
 
 
@@ -234,7 +245,9 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("energy_meter_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("energy_meter_info")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         Log.d(TAG, "Reply is Ok");
                         Proc.ProcSuccess();
@@ -248,7 +261,7 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
         else
         {
             Log.d(TAG, "Reply is Fail");
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
 
@@ -275,9 +288,13 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
                 Log.d(TAG, "GetDeviceData is false");
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -299,9 +316,13 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
                 Log.d(TAG, "GetDeviceData is false");
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -344,9 +365,13 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
 
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -392,10 +417,14 @@ public class iMAPEnergyServer_EnergyMeter extends WallPadiMAPClient
 
             return RoomNameList;
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
             Log.e(TAG, "[DB_GetRoomName] [ExceptionError] : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         return null;

+ 42 - 17
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEnergyServer_EnergyModule.java

@@ -3,6 +3,7 @@ package kr.co.icontrols.wallpadmain.imap;
 import kr.co.icontrols.wallpadmain.util.StringUtil;
 import android.content.Context;
 import android.util.Log;
+import com.util.LogUtil;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
@@ -72,19 +73,29 @@ public class iMAPEnergyServer_EnergyModule extends WallPadiMAPClient
         try
         {
             EnergymoduleAPI = mWallPadAPI.Get_EnergyModuleController();
-            int retInt = EnergymoduleAPI.Refresh((byte) 0xFF, false);
-            if (retInt >= 0)
+            if(EnergymoduleAPI!=null)
             {
-                return true;
-            }
-            else
-            {
-                return false;
+                int retInt = EnergymoduleAPI.Refresh((byte) 0xFF, false);
+                if (retInt >= 0)
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
             }
+            else return false;
+
+        }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         }
-        catch (Exception e)
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -212,7 +223,9 @@ public class iMAPEnergyServer_EnergyModule extends WallPadiMAPClient
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("energy_module_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("energy_module_info")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         Log.d(TAG, "Reply is Ok");
                         Proc.ProcSuccess();
@@ -226,7 +239,7 @@ public class iMAPEnergyServer_EnergyModule extends WallPadiMAPClient
         else
         {
             Log.d(TAG, "Reply is Fail");
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
 
@@ -253,9 +266,13 @@ public class iMAPEnergyServer_EnergyModule extends WallPadiMAPClient
                 Log.d(TAG, "GetDeviceData is false");
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -277,9 +294,13 @@ public class iMAPEnergyServer_EnergyModule extends WallPadiMAPClient
                 Log.d(TAG, "GetDeviceData is false");
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -322,9 +343,13 @@ public class iMAPEnergyServer_EnergyModule extends WallPadiMAPClient
 
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 42 - 17
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPEnergyServer_Realmeter.java

@@ -13,6 +13,7 @@ import com.artncore.wallpadapi.WallPadAPI;
 //import com.artncore.wallpadapi.APIErrorCode;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
 {
@@ -68,19 +69,29 @@ public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
         try
         {
             realTimeMeterAPI = mWallPadAPI.Get_RealTimeMeterController();
-            int retInt = realTimeMeterAPI.Refresh(false);
-            if (retInt >= 0)
+            if(realTimeMeterAPI!=null)
             {
-                return true;
-            }
-            else
-            {
-                return false;
+                int retInt = realTimeMeterAPI.Refresh(false);
+                if (retInt >= 0)
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
             }
+            return false;
+
+        }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         }
-        catch (Exception e)
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -203,7 +214,9 @@ public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("energy_remote_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("energy_remote_info")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         Log.d(TAG, "Reply is Ok");
                         Proc.ProcSuccess();
@@ -217,7 +230,7 @@ public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
         else
         {
             Log.d(TAG, "Reply is Fail");
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
 
@@ -244,9 +257,13 @@ public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
                 Log.d(TAG, "GetDeviceData is false");
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
     public void DoWork(String DayofLastSecond)
@@ -267,9 +284,13 @@ public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
                 Log.d(TAG, "GetDeviceData is false");
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -312,9 +333,13 @@ public class iMAPEnergyServer_Realmeter extends WallPadiMAPClient
 
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 4 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPKNXDeviceEvent.java

@@ -77,14 +77,16 @@ public class iMAPKNXDeviceEvent extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             if (result != null) {
                 if ((result.equalsIgnoreCase("ok")) || (result.equalsIgnoreCase("none"))) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("notify_knx_device_event")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null&& name.equalsIgnoreCase("notify_knx_device_event")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         Proc.ProcSuccess();
                         return;
                     }
                 }
             }
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
 
     }
 

+ 11 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPKNXDeviceInfo.java

@@ -6,6 +6,7 @@ import android.util.Log;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -61,7 +62,7 @@ public class iMAPKNXDeviceInfo {
             XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
                     "<imap ver = \"1.0\" address = \"" + addr.IPAddress + "\" sender = \"" + AddressStr + "\">\r\n";
 
-            if((sDong.equalsIgnoreCase(addr.Dong)) && (sHo.equalsIgnoreCase(addr.Ho))) {
+            if(sHo!=null && sDong!=null &&  (sDong.equalsIgnoreCase(addr.Dong)) && (sHo.equalsIgnoreCase(addr.Ho))) {
                 retXML = XMLHeader + "   <service type = \"reply\" name= \"get_knx_device_info\" result = \"ok\">\r\n";
                 retXML += "      <request_info name=\"" + "homedev" + "\" id_high=\"" + addr.Dong + "\" id_low=\"" + addr.Ho + "\" type=\"" + sType + "\"/>\r\n";
 
@@ -87,9 +88,16 @@ public class iMAPKNXDeviceInfo {
                 retXML += "   </service>\r\n</imap>";
                 return retXML;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            retXML= XMLHeader + "   <service type = \"reply\" name= \"get_knx_device_info\" result = \"fail\">\r\n";
+            retXML += "   </service>\r\n</imap>";
+            return retXML;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] KNXDeviceDetailInfo(Element ele)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             retXML= XMLHeader + "   <service type = \"reply\" name= \"get_knx_device_info\" result = \"fail\">\r\n";
             retXML += "   </service>\r\n</imap>";
             return retXML;

+ 1 - 1
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPLobbyOnePass.java

@@ -75,7 +75,7 @@ public class iMAPLobbyOnePass extends WallPadiMAPClient {
             String strResult = GetAttributeVal(0, "result");
             Log.i(TAG, "[iMAPLobbyOnePass.ProcComplite] strResult = " + strResult);
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
     }
 
     @Override

+ 12 - 7
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPRemotemeter.java

@@ -228,19 +228,24 @@ public class iMAPRemotemeter extends WallPadiMAPClient{
             String result = GetAttributeVal(0, "result");
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_ems_metering"))
-                            && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+
+                    if ((name!=null&& name.equalsIgnoreCase("get_ems_metering"))
+                            && (type!=null && type.equalsIgnoreCase("reply"))) {
                         if (SetItem("guidemap") == 1) {
-                            if (isDistinguishYear_String.equalsIgnoreCase("year")) {
-                                if (GetAttributeVal(0, "distinguish").equalsIgnoreCase(
+                            if (isDistinguishYear_String!=null && isDistinguishYear_String.equalsIgnoreCase("year")) {
+                                String year = GetAttributeVal(0, "distinguish");
+                                if (year!=null&& year.equalsIgnoreCase(
                                         "year")) {
                                     if (SetItem("valuelist") > 0) {
                                         Proc.ProcSuccess();
                                         return;
                                     }
                                 }
-                            } else if (isDistinguishYear_String.equalsIgnoreCase("month")) {
-                                if (GetAttributeVal(0, "distinguish").equalsIgnoreCase(
+                            } else if (isDistinguishYear_String!=null&& isDistinguishYear_String.equalsIgnoreCase("month")) {
+                                String month = GetAttributeVal(0, "distinguish");
+                                if (month!=null && month.equalsIgnoreCase(
                                         "month")) {
                                     if (SetItem("valuelist") > 0) {
                                         Proc.ProcSuccess();
@@ -253,7 +258,7 @@ public class iMAPRemotemeter extends WallPadiMAPClient{
                 }
             }
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
 
     }
     @Override

+ 4 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPSmartLightEvent.java

@@ -84,7 +84,9 @@ public class iMAPSmartLightEvent extends WallPadiMAPClient
             {
                 if ((result.equalsIgnoreCase("ok")) || (result.equalsIgnoreCase("none")))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("smart_light_event")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("smart_light_event")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         Proc.ProcSuccess();
                         return;
@@ -92,7 +94,7 @@ public class iMAPSmartLightEvent extends WallPadiMAPClient
                 }
             }
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
 
     }
 

+ 11 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAPSmartLightInfo.java

@@ -11,6 +11,7 @@ import com.artncore.commons.define;
 import com.artncore.wallpadapi.SdbAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadDevAPI;
+import com.util.LogUtil;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -70,7 +71,7 @@ public class iMAPSmartLightInfo
             XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"+
                     "<imap ver = \"1.0\" address = \""+addr.IPAddress+"\" sender = \""+AddressStr+"\">\r\n";
 
-            if((sDong.equalsIgnoreCase(addr.Dong) == true) &&
+            if(sDong!=null && sHo!=null && (sDong.equalsIgnoreCase(addr.Dong) == true) &&
                     (sHo.equalsIgnoreCase(addr.Ho) == true))
             {
                 retXML= XMLHeader + "   <service type = \"reply\" name= \"smart_light_info\" result = \"ok\">\r\n";
@@ -546,9 +547,16 @@ public class iMAPSmartLightInfo
                 return retXML;
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            retXML= XMLHeader + "   <service type = \"reply\" name= \"smart_light_info\" result = \"fail\">\r\n";
+            retXML += "   </service>\r\n</imap>";
+            return retXML;
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             retXML= XMLHeader + "   <service type = \"reply\" name= \"smart_light_info\" result = \"fail\">\r\n";
             retXML += "   </service>\r\n</imap>";
             return retXML;

+ 4 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAP_Chat_Sequence.java

@@ -80,7 +80,9 @@ public class iMAP_Chat_Sequence extends WallPadiMAPClient{
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("chat_sequence")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("chat_sequence")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         /*버전 변경으로 인한 수정*/
                         /*
@@ -116,7 +118,7 @@ public class iMAP_Chat_Sequence extends WallPadiMAPClient{
         }
         else
         {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
     protected void ProcError()

+ 21 - 11
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAP_Evacuation_ladder_open.java

@@ -2,6 +2,7 @@ package kr.co.icontrols.wallpadmain.imap;
 
 import android.content.Context;
 import android.util.Log;
+import com.util.LogUtil;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
@@ -68,21 +69,28 @@ public class iMAP_Evacuation_ladder_open extends WallPadiMAPClient{
         //윗집 주소 구하기
         try
         {
-            String[] SplitedString = myIP.split("\\.");
-            if(SplitedString != null)
+            if(myIP!=null)
             {
-                if(SplitedString.length == 4)
+                String[] SplitedString = myIP.split("\\.");
+                if(SplitedString != null)
                 {
-                    int temp = Integer.parseInt(SplitedString[2]);
-                    temp = temp + 1;
-                    ServerIP = SplitedString[0] + "." + SplitedString[1] + "." + temp + "." + SplitedString[3];
-                    Log.d(TAG, "Upstair IP address : " + ServerIP);
+                    if(SplitedString.length == 4)
+                    {
+                        int temp = Integer.parseInt(SplitedString[2]);
+                        temp = temp + 1;
+                        ServerIP = SplitedString[0] + "." + SplitedString[1] + "." + temp + "." + SplitedString[3];
+                        Log.d(TAG, "Upstair IP address : " + ServerIP);
+                    }
                 }
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         //타임아웃 설정
@@ -126,7 +134,9 @@ public class iMAP_Evacuation_ladder_open extends WallPadiMAPClient{
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("evacuation_ladder_open")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("evacuation_ladder_open")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         Proc.ProcSuccess();
                         return;
@@ -137,7 +147,7 @@ public class iMAP_Evacuation_ladder_open extends WallPadiMAPClient{
         }
         else
         {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
     protected void ProcError()

+ 22 - 11
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMAP_hn_config_read.java

@@ -7,6 +7,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 
@@ -129,21 +130,29 @@ public class iMAP_hn_config_read extends WallPadiMAPClient{
         //Gateway 주소 구하기
         try
         {
-            String[] SplitedString = myIP.split("\\.");
-            if(SplitedString != null)
+            if(myIP!=null)
             {
-                if(SplitedString.length == 4)
+                String[] SplitedString = myIP.split("\\.");
+                if(SplitedString != null)
                 {
-                    int temp = Integer.parseInt(SplitedString[3]);
-                    temp = temp + 100;
-                    ServerIP = SplitedString[0] + "." + SplitedString[1] + "." + SplitedString[2] + "." + temp;
-                    Log.d("iMAP_hn_config_read", "Gateway IP address : " + ServerIP);
+                    if(SplitedString.length == 4)
+                    {
+                        int temp = Integer.parseInt(SplitedString[3]);
+                        temp = temp + 100;
+                        ServerIP = SplitedString[0] + "." + SplitedString[1] + "." + SplitedString[2] + "." + temp;
+                        Log.d("iMAP_hn_config_read", "Gateway IP address : " + ServerIP);
+                    }
                 }
             }
+
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
 
         //타임아웃 설정
@@ -185,7 +194,9 @@ public class iMAP_hn_config_read extends WallPadiMAPClient{
             {
                 if (result.equalsIgnoreCase("ok"))
                 {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("igate_hn_config_read")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply")))
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("igate_hn_config_read")) && (type!=null && type.equalsIgnoreCase("reply")))
                     {
                         Proc.ProcSuccess();
                         return;
@@ -196,7 +207,7 @@ public class iMAP_hn_config_read extends WallPadiMAPClient{
         }
         else
         {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
     }
     protected void ProcError()

+ 27 - 10
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_HYOSUNGUI_MAIN_HN.java

@@ -18,7 +18,7 @@ import kr.co.icontrols.wallpadsupport.WpadImageView;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
-
+import com.util.LogUtil;
 /**
  * @description 메인화면 매뉴얼
  */
@@ -38,7 +38,7 @@ public class MANUAL_HYOSUNGUI_MAIN_HN extends WpadScreen {
     WpadTextView TXT_GUIDE_FUNCTION;
 
     String strGuideCalendar = "시간과 달력을 나타냅니다.\n터치시 달력/시간의\n재설정이 가능합니다.";
-    String strGuideWeather = "날씨를 나타냅니다.\n터치시 상세정보\n확인이 가능합니다.";
+    String strGuideWeather = "현재 날씨를 나타냅니다.\n터치시 상세정보\n확인이 가능합니다.";
     String strGuideFunction = "해당 기능화면으로 이동합니다.";
 
     int nGuideInfoFontSize = 20;
@@ -73,9 +73,13 @@ public class MANUAL_HYOSUNGUI_MAIN_HN extends WpadScreen {
             ViewRegistration(layout, TXT_GUIDE_FUNCTION, getPosition(ID.MANUAL.MANUALMAINHYOSUNGUI01.ELEMENTS.TEXTS.GUIDE_INFO_FUNCTION).X, getPosition(ID.MANUAL.MANUALMAINHYOSUNGUI01.ELEMENTS.TEXTS.GUIDE_INFO_FUNCTION).Y);
             TXT_GUIDE_FUNCTION.setText(strGuideFunction);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] MANUAL_HYOSUNGUI_MAIN_HN(Context context, RelativeLayout layout, WallPadAPI wpapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -98,9 +102,13 @@ public class MANUAL_HYOSUNGUI_MAIN_HN extends WpadScreen {
                 Log.w(TAG, "[onTouchEvent] Undefined thouch button!! nEvent [" + nEvent + "], nID [" + nID + "]");
                 super.finish();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 
         }
     }
@@ -110,9 +118,13 @@ public class MANUAL_HYOSUNGUI_MAIN_HN extends WpadScreen {
         super.onBrReceive(intent);
         try {
             Log.d(TAG, "[onBrReceive] intent : " + intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -154,9 +166,14 @@ public class MANUAL_HYOSUNGUI_MAIN_HN extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 40 - 14
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_MAIN.java

@@ -18,6 +18,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 
 /**
@@ -51,7 +52,7 @@ public class MANUAL_MAIN extends WpadScreen {
     WpadTextView TXT_GUIDE_02_SUBTITLE_SHORTCUTEDIT_02;
     WpadTextView TXT_GUIDE_02_INFO_SHORTCUTEDIT;
 
-    String strGuide01Weather = "날씨를 표시하며, 터치시\n상세화면으로 이동합니다.";
+    String strGuide01Weather = "현재 날씨를 표시하며, 터치시\n상세화면으로 이동합니다.";
     String strGuide01Clock = "달력/시간을 나타내며, 터치시 시간설정화면으로 이동합니다.";
     String strGuide01Shortcut = "즐겨찾기 아이콘이며,\n편집이 가능합니다.";
 
@@ -170,9 +171,13 @@ public class MANUAL_MAIN extends WpadScreen {
 
             displayGuidePage(nCurrentPage);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] MANUAL_MAIN(Context context, RelativeLayout layout, WallPadAPI wpapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -209,9 +214,13 @@ public class MANUAL_MAIN extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 
         }
     }
@@ -271,9 +280,13 @@ public class MANUAL_MAIN extends WpadScreen {
                 TXT_GUIDE_02_INFO_SHORTCUTEDIT.setVisibility(View.INVISIBLE);
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayGuidePage(int nPageNo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -291,9 +304,13 @@ public class MANUAL_MAIN extends WpadScreen {
 
             TXT_PAGE.setText(nCurrentPage + " / " + nTotalPage);
             displayGuidePage(nCurrentPage);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] changePage(boolean bUp)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -302,9 +319,13 @@ public class MANUAL_MAIN extends WpadScreen {
         super.onBrReceive(intent);
         try {
             Log.d(TAG, "[onBrReceive] intent : " + intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -356,7 +377,7 @@ public class MANUAL_MAIN extends WpadScreen {
                     return position;
 
                 case ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_01_INFO_WEATHER:
-                    position.setPosition(30, 160, 230, 85);
+                    position.setPosition(30, 160, 245, 85);
                     return position;
 
                 case ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_01_INFO_CLOCK:
@@ -398,9 +419,14 @@ public class MANUAL_MAIN extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 26 - 8
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_METROUI_MAIN.java

@@ -18,6 +18,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 
 /**
@@ -104,9 +105,13 @@ public class MANUAL_METROUI_MAIN extends WpadScreen {
             ViewRegistration(layout, TXT_GUIDE_ICONS, getPosition(ID.MANUAL.MANUALMAINMETROUI01.ELEMENTS.TEXTS.GUIDE_INFO_ICONS).X, getPosition(ID.MANUAL.MANUALMAINMETROUI01.ELEMENTS.TEXTS.GUIDE_INFO_ICONS).Y);
             TXT_GUIDE_ICONS.setText(strGuideIcons);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] MANUAL_METROUI_MAIN(Context context, RelativeLayout layout, WallPadAPI wpapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -129,9 +134,13 @@ public class MANUAL_METROUI_MAIN extends WpadScreen {
                 Log.w(TAG, "[onTouchEvent] Undefined thouch button!! nEvent [" + nEvent + "], nID [" + nID + "]");
                 super.finish();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 
         }
     }
@@ -141,9 +150,13 @@ public class MANUAL_METROUI_MAIN extends WpadScreen {
         super.onBrReceive(intent);
         try {
             Log.d(TAG, "[onBrReceive] intent : " + intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -223,9 +236,14 @@ public class MANUAL_METROUI_MAIN extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 26 - 8
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_METROUI_SUB_GROUP.java

@@ -16,6 +16,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 
 /**
@@ -51,9 +52,13 @@ public class MANUAL_METROUI_SUB_GROUP extends WpadScreen {
             ViewRegistration(layout, TXT_GUIDE_FUNCTION, getPosition(ID.MANUAL.MANUALMAINMETROUI02.ELEMENTS.TEXTS.GUIDE_FUNCTIONS).X, getPosition(ID.MANUAL.MANUALMAINMETROUI02.ELEMENTS.TEXTS.GUIDE_FUNCTIONS).Y);
             TXT_GUIDE_FUNCTION.setText(strGuideFunction);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] MANUAL_METROUI_SUB_GROUP(Context context, RelativeLayout layout, WallPadAPI wpapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -76,9 +81,13 @@ public class MANUAL_METROUI_SUB_GROUP extends WpadScreen {
                 Log.w(TAG, "[onTouchEvent] Undefined thouch button!! nEvent [" + nEvent + "], nID [" + nID + "]");
                 super.finish();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 
         }
     }
@@ -88,9 +97,13 @@ public class MANUAL_METROUI_SUB_GROUP extends WpadScreen {
         super.onBrReceive(intent);
         try {
             Log.d(TAG, "[onBrReceive] intent : " + intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -116,9 +129,14 @@ public class MANUAL_METROUI_SUB_GROUP extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 19 - 6
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/PopupInfoIGALOnOff.java

@@ -14,6 +14,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 
 public class PopupInfoIGALOnOff extends WpadScreen {
@@ -38,9 +39,13 @@ public class PopupInfoIGALOnOff extends WpadScreen {
 			
 			MAIN_IMAGE = new WpadImageView(context, TOUCH_KIND.BUTTON_M, LayoutDevice.Get(ID_OLD.infoScreen.INFOPOPUPALLOFF.ELEMENTS.IMAGES.BACKGROUND).W, LayoutDevice.Get(ID_OLD.infoScreen.INFOPOPUPALLOFF.ELEMENTS.IMAGES.BACKGROUND).H, drawID[drawIdx], 0, ID_OLD.infoScreen.INFOPOPUPALLOFF.ELEMENTS.IMAGES.BACKGROUND);
 	        ViewRegistration(layout, MAIN_IMAGE, LayoutDevice.Get(ID_OLD.infoScreen.INFOPOPUPALLOFF.ELEMENTS.IMAGES.BACKGROUND).X, LayoutDevice.Get(ID_OLD.infoScreen.INFOPOPUPALLOFF.ELEMENTS.IMAGES.BACKGROUND).Y);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Excpetion] PopupInfoIGALOnOff");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -61,9 +66,13 @@ public class PopupInfoIGALOnOff extends WpadScreen {
             		super.finish();
             	}
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
         	Log.e(TAG, "[Excpeiton] onTouchEvent");
-        	e.printStackTrace();
+        	//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         	
         }
 	}
@@ -73,9 +82,13 @@ public class PopupInfoIGALOnOff extends WpadScreen {
         super.onBrReceive(intent);
         try {
             Log.d(TAG, "[onBrReceive] intent : " + intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 174 - 63
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/menu/CallSubMenuScreen.java

@@ -2,6 +2,7 @@ package kr.co.icontrols.wallpadmain.menu;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
+import com.util.LogUtil;
 import com.artncore.wallpadapi.MultiSwitchAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 
@@ -96,12 +97,11 @@ public class CallSubMenuScreen {
 						}
 					}
 					else if (Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I) {
-						//LampID = ID.LINKEDSCREEN.SubMenuCtrl.OutSide_EachLamp;
 						LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp;
 					}
 					else {
 						if (GetZeroEnergyHouseInfo() == true) {
-							LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDC_EachLamp;
+							LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp;
 						}
 						else {
 							if (retArray[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
@@ -140,7 +140,10 @@ public class CallSubMenuScreen {
 							Common.DebugLog("m_WpApi.GetHeatingKind() Error --- ret : " + HeatingKind);
 						}
 					}
-				} catch (Exception e) {
+				} catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
+				catch (Exception e) {
 					Log.e(TAG, e.toString());
 				}
 			}
@@ -172,13 +175,22 @@ public class CallSubMenuScreen {
 			}
 
 			//콘센트
-			if (LampID == ID.LINKEDSCREEN.SubMenuCtrl.OutSide_EachLamp) {
+			if (m_WpApi != null) {
 				try {
-					MultiSwitchAPI MSAPI = m_WpApi.Get_MultiSwitchController();
-					MSAPI.Refresh((byte)0xFF, false);
-					if (MSAPI.isExist_ConcentDevice()) {
-						ConcentID = ID.LINKEDSCREEN.SubMenuCtrl.Concent;
+					if (LampID == ID.LINKEDSCREEN.SubMenuCtrl.OutSide_EachLamp) {
+						MultiSwitchAPI MSAPI = m_WpApi.Get_MultiSwitchController();
+						if (MSAPI!=null) {
+							MSAPI.Refresh((byte)0xFF, false);
+							if (MSAPI.isExist_ConcentDevice()) {
+								ConcentID = ID.LINKEDSCREEN.SubMenuCtrl.Concent;
+							}
+						}
+					}
+					else if (LampID == ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp) {
+						ConcentID = ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Concent;
 					}
+				} catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
 				} catch (Exception e) {
 					Log.e(TAG, e.toString());
 				}
@@ -248,9 +260,15 @@ public class CallSubMenuScreen {
 			setStartMenuHomeCtrl();
 			m_MakeListHomeCtrl = true;
 
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			if(devDB != null) devDB.closeDB();
+			return false;
+        }
+		catch (Exception e) {
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			if(devDB != null) devDB.closeDB();
 			return false;
 		}
@@ -282,22 +300,29 @@ public class CallSubMenuScreen {
 
 				try{
 					MultiSwitchAPI MSAPI = m_WpApi.Get_MultiSwitchController();
-					MSAPI.Refresh((byte)0xFF, false);
-					Log.d(TAG, "CheckMultiSwitchConcent === > MSAPI.data.Device[0].device.ConcentCount :" + MSAPI.data.Device[0].device.ConcentCount);
-					if (MSAPI.data.DeviceCnt > 0 && MSAPI.data.Device[0].device.ConcentCount > 0)
-					{
-						// 콘센트가 없다가 있어지는 경우
-						if( existConcent == false )
-							retChange = true;
-					}
-					else
+					if(MSAPI!=null)
 					{
-						// 콘센트가 있다가 없어지는 경우
-						if( existConcent == true )
-							retChange = false;
+						MSAPI.Refresh((byte)0xFF, false);
+						Log.d(TAG, "CheckMultiSwitchConcent === > MSAPI.data.Device[0].device.hOutletCnt :" + MSAPI.data.Device[0].device.hOutletCnt);
+						if (MSAPI.data.DeviceCnt > 0 && MSAPI.data.Device[0].device.hOutletCnt > 0)
+						{
+							// 콘센트가 없다가 있어지는 경우
+							if( existConcent == false )
+								retChange = true;
+						}
+						else
+						{
+							// 콘센트가 있다가 없어지는 경우
+							if( existConcent == true )
+								retChange = false;
+						}
 					}
+
 				}
-				catch(Exception e)
+				catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
+				catch (Exception e)
 				{
 					Log.e(TAG, e.toString());
 				}
@@ -325,7 +350,7 @@ public class CallSubMenuScreen {
 			WallpadDeviceSet devset = new WallpadDeviceSet(mContext);
 			int[] setdata = devset.Get_RFDoorCAM_Info();
 			devset.closeDB();
-			if ((setdata[0] == 1) && (setdata[1] == WallpadDeviceSet.DOORTYPE_SMARTKEY)) bUseSmartKey = true;
+			if (((setdata[0] == 1) && (setdata[1] == WallpadDeviceSet.DOORTYPE_SMARTKEY)) || ((setdata[0] == 1) && (setdata[1] == WallpadDeviceSet.DOORTYPE_SMARTKEY_EXTERNAL))) bUseSmartKey = true;
 
 			if( Version.getModelType() == Version.MODEL_TYPE.IHN_1020SA_A)
 			{
@@ -363,10 +388,15 @@ public class CallSubMenuScreen {
 
 			m_MakeListSecurity = true;
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 		return true;
@@ -422,9 +452,13 @@ public class CallSubMenuScreen {
 						RemoteMeterCostTableID = ID.LINKEDSCREEN.SubMenuEnergy.CostTable;
 					}
 				}
+				catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
 				catch (Exception e)
 				{
-					e.printStackTrace();
+					//e.printStackTrace();
+            		LogUtil.errorLogInfo("", TAG, e);
 				}
 			}
 
@@ -472,10 +506,16 @@ public class CallSubMenuScreen {
 			setStartMenuEnergy();
 			m_MakeListEnergy = true;
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			if(devDB != null) devDB.closeDB();
+			return false;
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			if(devDB != null) devDB.closeDB();
 			return false;
 		}
@@ -505,9 +545,13 @@ public class CallSubMenuScreen {
 				return true;
 			}
 		}
-		catch(Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 
 		WallpadDeviceSet devDB = null;
@@ -771,10 +815,16 @@ public class CallSubMenuScreen {
 			setStartMenuAddService();
 			m_MakeListAddService = true;
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			if(devDB != null) devDB.closeDB();
+			return false;
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			if(devDB != null) devDB.closeDB();
 			return false;
 		}
@@ -816,9 +866,14 @@ public class CallSubMenuScreen {
 		try {
 			if (DeviceSampleMode == false && Common.getDeviceServeiceLoadComplite() == false) return false;
 			else return true;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] getDeviceInitDone()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
@@ -845,7 +900,7 @@ public class CallSubMenuScreen {
 
 			if (nScreenID >= ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp && nScreenID <= ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp) {
                 Log.d(TAG, "[callStartHomeCtrlAPK] ===== 1 =====");
-                for (int i = 0; i < m_HomeCtrlMenuList.length; i++) Log.d(TAG, "[callStartHomeCtrlAPK] m_HomeCtrlMenuList[" + i + "] = " +m_HomeCtrlMenuList[i]);
+                for (int i = 0; i < m_HomeCtrlMenuList.length; i++) Log.d(TAG, "[callStartHomeCtrlAPK] m_HomeCtrlMenuList[" + i + "] = " + m_HomeCtrlMenuList[i]);
 				int findIdx = findSubMenuListIdx(ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp, ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp);
                 Log.d(TAG, "[callStartHomeCtrlAPK] findIdx [" + findIdx + "]");
                 Log.d(TAG, "[callStartHomeCtrlAPK] ===== 2 =====");
@@ -878,9 +933,14 @@ public class CallSubMenuScreen {
 			}
 			startSubScreenActivity(m_HomeCtrlMenuList,  startScreen, -1, -1, Common.HOMECTRL_APK);
 			return true;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] callStartHomeCtrlAPK(int nScreenID)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
@@ -912,10 +972,15 @@ public class CallSubMenuScreen {
 
 			return true;
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
@@ -928,9 +993,13 @@ public class CallSubMenuScreen {
 		try {
 			Log.e(TAG, "[callStartCallAPK] StartScreen [" + StartScreen + "]");
 			((MainActivity) mContext).runWallPadCallAPKByUX(StartScreen);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] callStartCallAPK(int StartScreen)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -938,9 +1007,13 @@ public class CallSubMenuScreen {
 		try {
 			Log.e(TAG, "[callStartCallAPK] StartScreen [" + StartScreen + "], EmerState [" + EmerState + "]");
 			((MainActivity) mContext).runWallPadCallAPKByUX(StartScreen, EmerState);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] callStartCallAPK(int StartScreen)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -957,9 +1030,13 @@ public class CallSubMenuScreen {
 				makeSecurityMenuList();
 				startSubScreenActivity(m_SecurityMenuList ,  nScreenID, -1, -1, Common.SECURITY_APK);
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] callStartSecurityAPK()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -989,10 +1066,15 @@ public class CallSubMenuScreen {
 
 			return true;
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
@@ -1014,10 +1096,15 @@ public class CallSubMenuScreen {
 			return true;
 
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
@@ -1041,10 +1128,14 @@ public class CallSubMenuScreen {
 				startSubScreenActivity(m_AddServiceMenuList ,  m_AddServiceStartMenuID, -1, -1, Common.ADDSERVICE_APK);
 			}
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -1054,9 +1145,13 @@ public class CallSubMenuScreen {
 				makeAddServiceMenuList();
 			}
 			startSubScreenActivity(m_AddServiceMenuList ,  nScreenID, -1, -1, Common.ADDSERVICE_APK);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -1067,9 +1162,13 @@ public class CallSubMenuScreen {
 				makeAddServiceMenuList();
 			}
 			startSubScreenActivity(m_AddServiceMenuList ,  nScreenID, -1, nDetailInfo, Common.ADDSERVICE_APK);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -1103,7 +1202,7 @@ public class CallSubMenuScreen {
 
 			if( (retArray != null) && (retArray[1] != WallpadDeviceSet.DOORTYPE_BASIC ) )
 			{
-				if( retArray[1] == WallpadDeviceSet.DOORTYPE_SMARTKEY )
+				if( retArray[1] == WallpadDeviceSet.DOORTYPE_SMARTKEY || retArray[1] == WallpadDeviceSet.DOORTYPE_SMARTKEY_EXTERNAL )
 					m_ConfigMenuList[6] = ID.LINKEDSCREEN.SubMenuConfig.SmartKey;
 				else if( retArray[1] == WallpadDeviceSet.DOORTYPE_UKS )
 				{
@@ -1180,10 +1279,14 @@ public class CallSubMenuScreen {
 
 			startSubScreenActivity(m_ConfigMenuList ,  m_ConfigStartMenuID, -1, -1, Common.CONFIG_APK);
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -1195,10 +1298,14 @@ public class CallSubMenuScreen {
 
 			startSubScreenActivity(m_ConfigMenuList ,  nScreenID, -1, -1, Common.CONFIG_APK);
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -1231,10 +1338,14 @@ public class CallSubMenuScreen {
 			mContext.startActivity(intent);
 
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 

+ 86 - 29
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AddShortcut.java

@@ -19,6 +19,7 @@ import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import com.util.LogUtil;
 
 public class AddShortcut extends WpadScreen {
 
@@ -40,38 +41,67 @@ public class AddShortcut extends WpadScreen {
 			Log.d(TAG, "[AddShortcut] ========== START ==========");
 			mContext = context;
 			initInfo();
+			if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+				IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01_1280, 0, ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+				ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
 
-			IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
-			ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+				IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_img_add_shortcut, 0, ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON);
+				ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).Y);
 
-			IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_img_add_shortcut, 0, ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON);
-			ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+				BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal_1280, R.drawable.popup_btn_confirm_pressed_1280, ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM);
+				ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
 
-			BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM);
-			ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+				BTN_CANCEL = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).H, R.drawable.popup_btn_cancel_normal_1280, R.drawable.popup_btn_cancel_pressed_1280, ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL);
+				ViewRegistration(layout, BTN_CANCEL, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).Y);
 
-			BTN_CANCEL = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).H, R.drawable.popup_btn_cancel_normal, R.drawable.popup_btn_cancel_pressed, ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL);
-			ViewRegistration(layout, BTN_CANCEL, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).Y);
+				TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+				ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+				TXT_INSTRUCTION.setText(strInstruction);
+			}
+			else {
+				IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+				ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+
+				IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_img_add_shortcut, 0, ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON);
+				ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+
+				BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM);
+				ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+
+				BTN_CANCEL = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).H, R.drawable.popup_btn_cancel_normal, R.drawable.popup_btn_cancel_pressed, ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL);
+				ViewRegistration(layout, BTN_CANCEL, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL).Y);
 
-			TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
-			ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
-			TXT_INSTRUCTION.setText(strInstruction);
+				TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+				ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+				TXT_INSTRUCTION.setText(strInstruction);
+			}
 
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] AddShortcut(Context context, RelativeLayout layout)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
 	private void initInfo() {
 		try {
+			if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nInstructionSize = 46;
+			else nInstructionSize = 35;
+
 			Intent intent = super.getScreenIntent();
 			int nShortcurID = intent.getIntExtra(Common.WIDGET_SELECTED_ID , -1);
 			nAddShortcutID = nShortcurID;
 			Log.d(TAG, "[initInfo] Common.WIDGET_SELECTED_ID : " + nAddShortcutID);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] initInfo()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -84,9 +114,13 @@ public class AddShortcut extends WpadScreen {
 		try {
 			super.onClose();
 			Log.d(TAG, "[onClose] ========== START ==========");
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] onClose()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -109,9 +143,13 @@ public class AddShortcut extends WpadScreen {
 					((PopupActivity)mContext).finish();
 				}
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] onClose()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -127,15 +165,24 @@ public class AddShortcut extends WpadScreen {
 
 	private void setPopupResult() {
 		try {
+			int nScreenID = ID.SCREENS.SCREEN_MAIN;
+			if (Common.eGUIType == Common.GUI_TYPE.STANDARD) nScreenID = ID.SCREENS.SCREEN_MAIN;
+			else if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) nScreenID = ID.SCREENS.SCREEN_HYOSUNGUI_MAIN_HN;
+			else if (Common.eGUIType == Common.GUI_TYPE.METRO) nScreenID = ID.SCREENS.SCREEN_METROUI_MAIN;
+
 			Intent intent = new Intent();
 			intent.putExtra(Common.BR_SENDER_SCREEN, ID.POPUPS.POPUP_ADDSHORTCUT);
-			intent.putExtra(Common.BR_RECEIVE_SCREEN, ID.SCREENS.SCREEN_MAIN);
+			intent.putExtra(Common.BR_RECEIVE_SCREEN, nScreenID);
 			intent.putExtra(Common.BR_WIDGET_INSERT, true );
 			intent.putExtra(Common.BR_INSERT_WIDGET_ID , nAddShortcutID);
 			super.setPopupResult(intent);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] setPopupResult()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -147,31 +194,41 @@ public class AddShortcut extends WpadScreen {
 		try {
 			switch (nID) {
 				case ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND:
-					position.setPopupPosition(117, 	83, 	790, 	434);
+					if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(145, 	112, 	990, 	576);
+					else position.setPopupPosition(117, 	83, 	790, 	434);
 					return position;
 
 				case ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.ICON:
-					position.setPopupPosition(422, 	210, 	180, 	180);
+					if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(550, 	329, 	180, 	180);
+					else position.setPopupPosition(422, 	210, 	180, 	180);
 					return position;
 
 				case ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CONFIRM:
-					position.setPopupPosition(212, 	435, 	290, 	64);
+					if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(275, 	585, 	360, 	80);
+					else position.setPopupPosition(212, 	435, 	290, 	64);
 					return position;
 
 				case ID.POPUPS.ADDSHORTCUT.ELEMENTS.BTNS.CANCEL:
-					position.setPopupPosition(522, 	435, 	290, 	64);
+					if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(645, 	585, 	360, 	80);
+					else position.setPopupPosition(522, 	435, 	290, 	64);
 					return position;
 
 				case ID.POPUPS.ADDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION:
-					position.setPopupPosition(119, 	85, 	786, 	110);
+					if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(148, 	115, 	984, 	174);
+					else position.setPopupPosition(119, 	85, 	786, 	110);
 					return position;
 
 				default:
 					return position;
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return position;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] getPosition(int nID)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return position;
 		}
 	}

+ 29 - 9
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AdminPWInput.java

@@ -10,7 +10,7 @@
 package kr.co.icontrols.wallpadmain.popup;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
-
+import com.util.LogUtil;
 import android.annotation.SuppressLint;
 import android.content.ComponentName;
 import android.content.Context;
@@ -190,9 +190,13 @@ public class AdminPWInput extends WpadScreen {
                 }
             }
             Sound().Play(SND.effect.EFFECT1);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] AdminPWInput(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 	
@@ -208,7 +212,10 @@ public class AdminPWInput extends WpadScreen {
                     else mPwIcon[i].BtnView.setVisibility(View.INVISIBLE);
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] drawInputPW(int nCnt)");
         }
 	}
@@ -240,7 +247,11 @@ public class AdminPWInput extends WpadScreen {
 				wdb.SetAlarmStatus (WallpadStatusData.ALARM_NONE);
 				wdb.closeDB();
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            if (wdb != null) wdb.closeDB();
+        }
+		catch (Exception e) {
 			Log.d(TAG, "[Exception] ComeBackHomeDB()");
 			if (wdb != null) wdb.closeDB();
 		}
@@ -272,8 +283,12 @@ public class AdminPWInput extends WpadScreen {
 	                    intent.setComponent(mComponentName);
 	                    this.getContext().startActivity(intent);
 	            	}
-            	} catch (Exception e) {
-            		e.printStackTrace();
+            	} catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) {
+            		//e.printStackTrace();            
+                    LogUtil.errorLogInfo("", TAG, e);
             	}
             }
             else if (nTargetID == ID.POPUPS.ADMINPWINPUT.ELEMENTS.BTNS.CONFIRM) {
@@ -433,9 +448,14 @@ public class AdminPWInput extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 33 - 23
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AlarmUseEnergy_ServerConnect.java

@@ -18,7 +18,7 @@ import java.util.Queue;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.wallpadapi.WallPadAPI;
-
+import com.util.LogUtil;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Canvas;
@@ -284,26 +284,26 @@ public class AlarmUseEnergy_ServerConnect extends WpadScreen {
     private void ShowEnergyValueInfo() {
         if (mNumberOfEnergy == 3) {
             // 전기 수도 가스
-            Energy_Goal[0].setText(elect_target); 
-            Energy_Goal[2].setText(gas_target);
-            Energy_Goal[4].setText(water_target);
-            
-            Energy_HomeUse[0].setText(elect_used); 
-            Energy_HomeUse[2].setText(gas_used);
-            Energy_HomeUse[4].setText(water_used);
+            if(Energy_Goal[0]!=null) Energy_Goal[0].setText(elect_target);
+            if(Energy_Goal[2]!=null) Energy_Goal[2].setText(gas_target);
+            if(Energy_Goal[4]!=null) Energy_Goal[4].setText(water_target);
+
+            if(Energy_HomeUse[0]!=null) Energy_HomeUse[0].setText(elect_used);
+            if(Energy_HomeUse[2]!=null) Energy_HomeUse[2].setText(gas_used);
+            if(Energy_HomeUse[4]!=null) Energy_HomeUse[4].setText(water_used);
         }
         else {
-            Energy_Goal[0].setText(elect_target);
-            Energy_Goal[1].setText(heating_target); 
-            Energy_Goal[2].setText(hotwater_target);
-            Energy_Goal[3].setText(gas_target);
-            Energy_Goal[4].setText(water_target);
-            
-            Energy_HomeUse[0].setText(elect_used);
-            Energy_HomeUse[1].setText(heating_used); 
-            Energy_HomeUse[2].setText(hotwater_used);
-            Energy_HomeUse[3].setText(gas_used);
-            Energy_HomeUse[4].setText(water_used);
+            if(Energy_Goal[0]!=null) Energy_Goal[0].setText(elect_target);
+            if(Energy_Goal[1]!=null) Energy_Goal[1].setText(heating_target);
+            if(Energy_Goal[2]!=null) Energy_Goal[2].setText(hotwater_target);
+            if(Energy_Goal[3]!=null) Energy_Goal[3].setText(gas_target);
+            if(Energy_Goal[4]!=null) Energy_Goal[4].setText(water_target);
+
+            if(Energy_HomeUse[0]!=null) Energy_HomeUse[0].setText(elect_used);
+            if(Energy_HomeUse[1]!=null) Energy_HomeUse[1].setText(heating_used);
+            if(Energy_HomeUse[2]!=null) Energy_HomeUse[2].setText(hotwater_used);
+            if(Energy_HomeUse[3]!=null) Energy_HomeUse[3].setText(gas_used);
+            if(Energy_HomeUse[4]!=null) Energy_HomeUse[4].setText(water_used);
         }    
     }
 
@@ -460,8 +460,13 @@ public class AlarmUseEnergy_ServerConnect extends WpadScreen {
                 return 276; 
             }
             return x;    
-        } catch(Exception e) {
-            //e.printStackTrace();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 0;
+        }
+		catch (Exception e) {
+            ////e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 0;
         }
     }
@@ -690,8 +695,13 @@ public class AlarmUseEnergy_ServerConnect extends WpadScreen {
                 else {
                     mNumberOfEnergy = 5;
                 }
-            } catch(Exception e) {
-                e.printStackTrace();
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                mNumberOfEnergy = 5;
+            }
+            catch (Exception e) {
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 mNumberOfEnergy = 5;
             }
         }

+ 32 - 10
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/BandLocationAlarmReceived.java

@@ -11,6 +11,7 @@ import android.widget.RelativeLayout;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.API_Menu;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -84,9 +85,13 @@ public class BandLocationAlarmReceived extends WpadScreen {
             }
 
             if (nCardNum > 0) playNotifySound();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] BandLocationAlarmReceived(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -124,9 +129,13 @@ public class BandLocationAlarmReceived extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -165,9 +174,14 @@ public class BandLocationAlarmReceived extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -179,9 +193,13 @@ public class BandLocationAlarmReceived extends WpadScreen {
             SetData.closeDB();
             Log.d(TAG, "[playNotifySound] bPlay [" + bPlay + "]");
             if (bPlay) Sound().Play(WpadSound.SND.effect.EFFECT1);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playNotifySound()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -197,9 +215,13 @@ public class BandLocationAlarmReceived extends WpadScreen {
             mIntent.putExtra(strMenuType, nMenuType);
             mIntent.putExtra(Common.BR_MAIN_NOTI.CARD_NUM, nCardNum);
             mContext.sendBroadcast(mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestAPKRun(int nMenuType)");
-            e.printStackTrace() ;
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 8 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ChargingElectricVehicle.java

@@ -13,6 +13,7 @@ import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -213,9 +214,14 @@ public class ChargingElectricVehicle extends WpadScreen {
 				default:
 					return position;
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return position;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] getPosition(int nID)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return position;
 		}
 	}

+ 14 - 4
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/CollectiveLightCTRL.java

@@ -12,6 +12,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.MainActivity;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -192,9 +193,13 @@ public class CollectiveLightCTRL extends WpadScreen {
                 BTN_COLLECTIVEOFF_ON.setButtonFrontImage();
                 BTN_COLLECTIVEOFF_OFF.setButtonRearImage();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] syncBTNAllLightOff(boolean bLightOffRunning)");
-	        e.printStackTrace();
+	        //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -233,9 +238,14 @@ public class CollectiveLightCTRL extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 115 - 36
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ConfigurePreset.java

@@ -24,6 +24,7 @@ import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
 
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.MainActivity;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -121,9 +122,13 @@ public class ConfigurePreset extends WpadScreen {
 
             syncPresetValue(nLivinglightPresetID);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ConfigurePreset(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -133,9 +138,13 @@ public class ConfigurePreset extends WpadScreen {
             int nPresetID = intent.getIntExtra(Common.LIVINGLIGHT_PRESET_ID , -1);
             nLivinglightPresetID = nPresetID;
             Log.d(TAG, "[initInfo] Common.LIVINGLIGHT_PRESET_ID : " + nLivinglightPresetID);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -149,9 +158,13 @@ public class ConfigurePreset extends WpadScreen {
             savePresetValue(nLivinglightPresetID, DimSeekBarValue, ColorSeekBarValue);
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -183,9 +196,13 @@ public class ConfigurePreset extends WpadScreen {
                     ((PopupActivity)mContext).finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -283,9 +300,13 @@ public class ConfigurePreset extends WpadScreen {
             intent.putExtra(Common.BR_RECEIVE_SCREEN, ID.SCREENS.SCREEN_MAIN);
             intent.putExtra(Common.BR_LIVINGLIGHT_PRESET_INFO, strValue);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -335,9 +356,14 @@ public class ConfigurePreset extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -438,9 +464,13 @@ public class ConfigurePreset extends WpadScreen {
                      * 디밍, 색온도 제어 끝
                      * **/
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] mOnSeekBarChangeListener.onStopTrackingTouch");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -492,9 +522,13 @@ public class ConfigurePreset extends WpadScreen {
                      * 디밍, 색온도 제어 끝
                      * **/
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] mOnSeekBarChangeListener.onStopTrackingTouch");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -533,9 +567,14 @@ public class ConfigurePreset extends WpadScreen {
                 Log.e(TAG, "[updateDeviceStatus] Refresh(" + real + ")  ret (" + ret + ")   ErrorCode = " + mSdb_LivingRoomLightAPI.ErrorCode.ErrStr());
                 return -2;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[updateDeviceStatus] - [Exception Error] lightApi.Refresh(" + real + ")");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
         }
 
@@ -647,10 +686,15 @@ public class ConfigurePreset extends WpadScreen {
         Log.i(TAG, "[loadDeviceAPI] - Step1 : Light API Load...");
         try {
             mSdb_LivingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[loadDeviceAPI] - [Exception Error] mWallPadAPI.Get_EnergyMeterV2Controller");
             Log.e(TAG, "[loadDeviceAPI] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
         }
 
@@ -728,9 +772,14 @@ public class ConfigurePreset extends WpadScreen {
 
             return true;
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registorBRName_LivingEM(boolean bRegi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -756,10 +805,15 @@ public class ConfigurePreset extends WpadScreen {
                 Log.i(TAG, "[registerBR] - regChangedBR START");
                 mSdb_LivingRoomLightAPI.regChangedBR(BR_NAME);
                 Log.i(TAG, "[registerBR] - regChangedBR END");
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -101;
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[registerBR] - [Exception Error] mLivingRoomEnergyMeterV2API.regChangedBR");
                 Log.e(TAG, "[registerBR] - " + e.toString());
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return -101;
             }
             super.addBrActionFilter(BR_NAME);
@@ -770,10 +824,15 @@ public class ConfigurePreset extends WpadScreen {
                 Log.i(TAG, "[registerBR] - unregChangedBR START");
                 mSdb_LivingRoomLightAPI.unregChangedBR(BR_NAME);
                 Log.i(TAG, "[registerBR] - unregChangedBR END");
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+                return -102;
+        }
+		catch (Exception e) {
                 Log.e(TAG, "[registerBR] - [Exception Error] lightApi.unregChangedBR");
                 Log.e(TAG, "[registerBR] - " + e.toString());
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return -102;
             }
             super.removeBrActionFilter(BR_NAME);
@@ -823,16 +882,24 @@ public class ConfigurePreset extends WpadScreen {
             SetDimSeekBarProgress(DimSeekBarValue);
             SetColorSeekBarProgress(ColorSeekBarValue);
 //            int nResult = mSdb_LivingRoomLightAPI.SetLight(define.DEVICE_ALL_OR_NOTHING, true, (byte) (DimSeekBarValue / 10), (byte) (ColorSeekBarValue / 10));
-            int nResult = mSdb_LivingRoomLightAPI.SetLight((byte) 0, true, (byte) (DimSeekBarValue / 10), (byte) (ColorSeekBarValue / 10));
-            Log.d(TAG,"[syncPresetValue] nResult [" + nResult + "]");
+            if(mSdb_LivingRoomLightAPI!=null)
+            {
+                int nResult = mSdb_LivingRoomLightAPI.SetLight((byte) 0, true, (byte) (DimSeekBarValue / 10), (byte) (ColorSeekBarValue / 10));
+                Log.d(TAG,"[syncPresetValue] nResult [" + nResult + "]");
 //            int nResultOnOff = mSdb_LivingRoomLightAPI.SetLightOnOff(define.DEVICE_ALL_OR_NOTHING, true);
 //            int nResultDim = mSdb_LivingRoomLightAPI.SetLightDimming(define.DEVICE_ALL_OR_NOTHING, (byte) DimSeekBarValue);
 //            int nResultColor = mSdb_LivingRoomLightAPI.SetLightColor(define.DEVICE_ALL_OR_NOTHING, (byte) ColorSeekBarValue);
 //            Log.d(TAG,"[syncPresetValue] nResultOnOff [" + nResultOnOff + "], nResultDim [" + nResultDim + "], nResultColor [" + nResultColor + "]");
+            }
+
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] syncPresetValue(int nPresetID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -841,9 +908,13 @@ public class ConfigurePreset extends WpadScreen {
             Log.i(TAG, "[savePresetValue] nPresetID [" + nPresetID + "], nDim [" + nDim + "], nColor [" + nColor + "]");
             strPresetInfo = Integer.toString(nPresetID) + "/on:" + Integer.toString(nDim / 10) + ":" + Integer.toString(nColor / 10);
             setPopupResult(strPresetInfo);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] savePresetValue(int nPresetID, int nDim, int nColor)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -875,9 +946,13 @@ public class ConfigurePreset extends WpadScreen {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -889,9 +964,13 @@ public class ConfigurePreset extends WpadScreen {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 87 - 29
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DeleteShortcut.java

@@ -10,6 +10,7 @@ import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -39,37 +40,67 @@ public class DeleteShortcut extends WpadScreen {
             mContext = context;
 			initInfo();
 
-			IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
-			ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.ADDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01_1280, 0, ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+                ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
 
-            IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_img_delete_shortcut, 0, ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON);
-			ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+                IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_img_delete_shortcut, 0, ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON);
+                ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).Y);
 
-			BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM);
-			ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+                BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal_1280, R.drawable.popup_btn_confirm_pressed_1280, ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM);
+                ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
 
-			BTN_CANCEL = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).H, R.drawable.popup_btn_cancel_normal, R.drawable.popup_btn_cancel_pressed, ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL);
-			ViewRegistration(layout, BTN_CANCEL, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).Y);
+                BTN_CANCEL = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).H, R.drawable.popup_btn_cancel_normal_1280, R.drawable.popup_btn_cancel_pressed_1280, ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL);
+                ViewRegistration(layout, BTN_CANCEL, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).Y);
 
-			TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
-			ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
-			TXT_INSTRUCTION.setText(strInstruction);
+                TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+                ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+                TXT_INSTRUCTION.setText(strInstruction);
+            }
+            else {
+                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+                ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+
+                IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_img_delete_shortcut, 0, ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON);
+                ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+
+                BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM);
+                ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+
+                BTN_CANCEL = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).H, R.drawable.popup_btn_cancel_normal, R.drawable.popup_btn_cancel_pressed, ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL);
+                ViewRegistration(layout, BTN_CANCEL, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL).Y);
 
-		} catch (Exception e) {
+                TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+                ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+                TXT_INSTRUCTION.setText(strInstruction);
+            }
+
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] DeleteShortcut(Context context, RelativeLayout layout)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
 	private void initInfo() {
 		try {
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nInstructionSize = 46;
+            else nInstructionSize = 35;
+
 			Intent intent = super.getScreenIntent();
 			int nShortcurID = intent.getIntExtra(Common.WIDGET_SELECTED_ID , -1);
             nDeleteShortcutID = nShortcurID;
 			Log.d(TAG, "[initInfo] Common.WIDGET_SELECTED_ID : " + nDeleteShortcutID);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] initInfo()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -82,9 +113,13 @@ public class DeleteShortcut extends WpadScreen {
 		try {
 			super.onClose();
 			Log.d(TAG, "[onClose] ========== START ==========");
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] onClose()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -107,9 +142,13 @@ public class DeleteShortcut extends WpadScreen {
                     ((PopupActivity)mContext).finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
     
@@ -125,15 +164,24 @@ public class DeleteShortcut extends WpadScreen {
 
 	private void setPopupResult() {
 	    try {
+            int nScreenID = ID.SCREENS.SCREEN_MAIN;
+            if (Common.eGUIType == Common.GUI_TYPE.STANDARD) nScreenID = ID.SCREENS.SCREEN_MAIN;
+            else if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) nScreenID = ID.SCREENS.SCREEN_HYOSUNGUI_MAIN_HN;
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) nScreenID = ID.SCREENS.SCREEN_METROUI_MAIN;
+
             Intent intent = new Intent();
             intent.putExtra(Common.BR_SENDER_SCREEN, ID.POPUPS.POPUP_DELETESHORTCUT);
-            intent.putExtra(Common.BR_RECEIVE_SCREEN, ID.SCREENS.SCREEN_MAIN);
+            intent.putExtra(Common.BR_RECEIVE_SCREEN, nScreenID);
             intent.putExtra(Common.BR_WIDGET_DELETE, true );
             intent.putExtra(Common.BR_DELETE_WIDGET_ID , nDeleteShortcutID);
             super.setPopupResult(intent);
-         } catch (Exception e) {
+         } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] setPopupResult()");
-	        e.printStackTrace();
+	        //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -145,31 +193,41 @@ public class DeleteShortcut extends WpadScreen {
         try {
             switch (nID) {
                 case ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.BACKGROUND:
-                    position.setPopupPosition(117, 	83, 	790, 	434);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(145, 	112, 	990, 	576);
+                    else position.setPopupPosition(117, 	83, 	790, 	434);
                     return position;
 
                 case ID.POPUPS.DELETESHORTCUT.ELEMENTS.IMAGES.ICON:
-                    position.setPopupPosition(422, 	210, 	180, 	180);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(550, 	329, 	180, 	180);
+                    else position.setPopupPosition(422, 	210, 	180, 	180);
                     return position;
 
                 case ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CONFIRM:
-                    position.setPopupPosition(212, 	435, 	290, 	64);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(275, 	585, 	360, 	80);
+                    else position.setPopupPosition(212, 	435, 	290, 	64);
                     return position;
 
                 case ID.POPUPS.DELETESHORTCUT.ELEMENTS.BTNS.CANCEL:
-                    position.setPopupPosition(522, 	435, 	290, 	64);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(645, 	585, 	360, 	80);
+                    else position.setPopupPosition(522, 	435, 	290, 	64);
                     return position;
 
                 case ID.POPUPS.DELETESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION:
-                    position.setPopupPosition(119, 	85, 	786, 	110);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(148, 	115, 	984, 	174);
+                    else position.setPopupPosition(119, 	85, 	786, 	110);
                     return position;
 
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 32 - 10
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DeviceLoading.java

@@ -10,6 +10,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
 import kr.co.icontrols.wallpadmain.declare.ID;
@@ -74,9 +75,13 @@ public class DeviceLoading extends WpadScreen {
             }
 
             playNotifySound();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] DeviceLoading(Context context, RelativeLayout layout)");
-	        e.printStackTrace();
+	        //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -85,9 +90,13 @@ public class DeviceLoading extends WpadScreen {
 	    try {
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -105,9 +114,13 @@ public class DeviceLoading extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -151,9 +164,14 @@ public class DeviceLoading extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -166,9 +184,13 @@ public class DeviceLoading extends WpadScreen {
             SetData.closeDB();
             Log.d(TAG, "[playNotifySound] bPlay = " + bPlay);
             if (bPlay) Sound().PlayMent(SND.effect.WARNING005);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playNotifySound()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 67 - 16
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DiagnosticMode.java

@@ -8,7 +8,7 @@ import com.artncore.deviceinterface.WallPadInterface;
 import com.artncore.wallpadapi.IntLightAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadDevAPI;
-
+import com.util.LogUtil;
 import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.BroadcastReceiver;
@@ -104,7 +104,10 @@ public class DiagnosticMode extends WpadScreen
         		Log.d(TAG, "[m_IntLightCtrl] ---------null ");
         	}
         }
-        catch(Exception e) { Log.e( "iMapServer" ,"[ExceptionError] - onCreate->mGleInterface Create : " + e); }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) { Log.e( "iMapServer" ,"[ExceptionError] - onCreate->mGleInterface Create : " + e); }
     }
 	
     /**
@@ -342,9 +345,13 @@ public class DiagnosticMode extends WpadScreen
 			
 			//m_IntLightCtrl.TRInfo.GetTransactionList(devID)
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e )
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -484,9 +491,13 @@ public class DiagnosticMode extends WpadScreen
 	        		drawTextResult("");
 	        	}
         	}
-        	catch( Exception e)
+        	catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e)
         	{
-        		e.printStackTrace();
+        		//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
         	}
         	
         }
@@ -522,9 +533,13 @@ public class DiagnosticMode extends WpadScreen
 	    		drawTextResult(m_DTMFReceiveNumber);
 	    	}
     	}
-    	catch( Exception e)
+    	catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
     	{
-    		e.printStackTrace();
+    		//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
     	}
 		super.KeyDown(keyCode, event);
 	}
@@ -602,25 +617,49 @@ public class DiagnosticMode extends WpadScreen
     	{
     		mGleInterface.setDTMFRead(true);
     		
-    		try {Thread.sleep(1000);}catch (Exception e){e.printStackTrace();}
+    		try {Thread.sleep(1000);}
+    		catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+    			LogUtil.errorLogInfo("", TAG, e);
+    		}
     		
     		if( m_ThreadExit == true )return;
     		
     		for( int i = 0 ; i < 10 ; i++ )
     		{
 	    		mGleInterface.setDTMFWrite(i);
-		        try {Thread.sleep(100);}catch (Exception e){e.printStackTrace();}
+		        try {Thread.sleep(100);}
+		        catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
+				catch (Exception e){
+					LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+		        }
 		        if( m_ThreadExit == true )return;
     		}
     		
-	        try {Thread.sleep(100);}catch (Exception e){e.printStackTrace();}
+	        try {Thread.sleep(100);}
+	        catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e){
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+	        }
 	        
 	        //mGleInterface.setDTMFRead(false);
 	        
     		mGleInterface.setDTMFWrite(10);
     		if( m_ThreadExit == true )return;
 
-    		try {Thread.sleep(100);}catch (Exception e){e.printStackTrace();}
+    		try {Thread.sleep(100);}
+    		catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e){
+				LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+    		}
     		mGleInterface.setDTMFWrite(11);
     	}
     }
@@ -737,7 +776,13 @@ public class DiagnosticMode extends WpadScreen
 		for(int i = ID_OLD.PopupIDDiagnotic.button.COM_PORT_01; i <= ID_OLD.PopupIDDiagnotic.button.COM_PORT_07 ; i++ )
 		{
 			resultTestCommonController(i,0);
-			try {Thread.sleep(100);}catch (Exception e){e.printStackTrace();}
+			try {Thread.sleep(100);}
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e){
+				LogUtil.errorLogInfo("", TAG, e);
+			}
 		}
     }
     
@@ -748,9 +793,12 @@ public class DiagnosticMode extends WpadScreen
 			Settings.System.putInt( this.getContext().getContentResolver(), SCREEN_OFF_TIMEOUT, 1000);
 			int  getSleepTime = Settings.System.getInt(this.getContext().getContentResolver(), SCREEN_OFF_TIMEOUT);
     	}
-    	catch( Exception e)
+    	catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
     	{
-    		
+    		LogUtil.errorLogInfo("", TAG, e);
     	}
 
 //		try
@@ -767,7 +815,10 @@ public class DiagnosticMode extends WpadScreen
 ////			pm.userActivity(0, true);
 //
 //			
-//		}catch( Exception e) 
+//		} catch (RuntimeException re) {
+//            LogUtil.errorLogInfo("", TAG, re);
+//        }
+//		catch (Exception e)
 //		{
 //			
 //		}

+ 67 - 23
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/DuplicatedShortcut.java

@@ -12,6 +12,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import kr.co.icontrols.wallpadmain.MainActivity;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -39,32 +40,58 @@ public class DuplicatedShortcut extends WpadScreen {
             mContext = context;
             initInfo();
 
-            IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
-            ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01_1280, 0, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+                ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
 
-            IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_icon_caution, 0, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON);
-            ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+                IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_icon_caution, 0, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON);
+                ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).Y);
 
-            BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM);
-            ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+                BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal_1280, R.drawable.popup_btn_confirm_pressed_1280, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM);
+                ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
 
-            TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
-            ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
-            TXT_INSTRUCTION.setText(strInstruction);
+                TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+                ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+                TXT_INSTRUCTION.setText(strInstruction);
+            }
+            else {
+                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+                ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+
+                IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_icon_caution, 0, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON);
+                ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+
+                BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM);
+                ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+
+                TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+                ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+                TXT_INSTRUCTION.setText(strInstruction);
+            }
 
             Sound().Play(SND.effect.WARNING005);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] DuplicatedShortcut(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void initInfo() {
         try {
-        } catch (Exception e) {
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nInstructionSize = 46;
+            else nInstructionSize = 35;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -77,9 +104,13 @@ public class DuplicatedShortcut extends WpadScreen {
         try {
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -97,9 +128,13 @@ public class DuplicatedShortcut extends WpadScreen {
                     ((PopupActivity)mContext).finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,27 +156,36 @@ public class DuplicatedShortcut extends WpadScreen {
         try {
             switch (nID) {
                 case ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.BACKGROUND:
-                    position.setPopupPosition(117, 	83, 	790, 	434);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(145, 	112, 	990, 	576);
+                    else position.setPopupPosition(117, 	83, 	790, 	434);
                     return position;
 
                 case ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.IMAGES.ICON:
-                    position.setPopupPosition(422, 	210, 	180, 	180);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(550, 	329, 	180, 	180);
+                    else position.setPopupPosition(422, 	210, 	180, 	180);
                     return position;
 
                 case ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.BTNS.CONFIRM:
-                    position.setPopupPosition(367, 	435, 	290, 	64);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(460, 	585, 	360, 	80);
+                    else position.setPopupPosition(367, 	435, 	290, 	64);
                     return position;
 
                 case ID.POPUPS.DUPLICATEDSHORTCUT.ELEMENTS.TEXTS.INSTRUCTION:
-                    position.setPopupPosition(119, 	85, 	786, 	110);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(148, 	115, 	984, 	174);
+                    else position.setPopupPosition(119, 	85, 	786, 	110);
                     return position;
 
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 95 - 29
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ElevatorCall.java

@@ -15,6 +15,7 @@ import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
@@ -97,9 +98,13 @@ public class ElevatorCall extends WpadScreen {
             if (Common.FINISH_TIME_ENABLE) super.setFinishTimerCreate(Common.FINISH_TIME_POPUP_NORMAL_SEC);
 
             getBR_ElevatorState();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] initInfo(Context context)");
-	        e.printStackTrace();
+	        //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -109,9 +114,13 @@ public class ElevatorCall extends WpadScreen {
             bEasyModeUsage = mWallpadStatusData.GetEasyModeUxUse();
             mWallpadStatusData.closeDB();
             Log.i(TAG, "[getEasyModeUsage] bEasyModeUsage [" + bEasyModeUsage + "]");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getEasyModeUsage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -120,9 +129,13 @@ public class ElevatorCall extends WpadScreen {
             Intent sendIntent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
             sendIntent.putExtra(Common.BR_MAIN_NOTI.KIND ,Common.BR_MAIN_NOTI.REQ_ELEVATOR_CALL_STATE);
             mContext.sendBroadcast(sendIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getBR_ElevatorState()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -207,9 +220,13 @@ public class ElevatorCall extends WpadScreen {
                 ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.ELEVATORCALL.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.ELEVATORCALL.ELEMENTS.TEXTS.INSTRUCTION).Y);
                 TXT_INSTRUCTION.setText(strInstruction);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ElevatorCall(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -241,9 +258,13 @@ public class ElevatorCall extends WpadScreen {
 				IMG_ELEV_UP.setButtonFrontImage();
 				IMG_ELEV_DOWN.setButtonFrontImage();
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] displayElevCallStatus(ELEV_STATUS ElevStatus)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -253,9 +274,14 @@ public class ElevatorCall extends WpadScreen {
             if (bEnabled) BTN_MANUAL.setVisibility(View.VISIBLE);
             else BTN_MANUAL.setVisibility(View.INVISIBLE);
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setInfoBtnVisible(int bEnabled)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
 	}
@@ -264,9 +290,13 @@ public class ElevatorCall extends WpadScreen {
         try {
             IMG_ELEV_UP.setButtonFrontImage();
             IMG_ELEV_DOWN.setButtonFrontImage();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] drawImageElevatorClear()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -324,9 +354,13 @@ public class ElevatorCall extends WpadScreen {
 //                    ((PopupActivity) (getContext())).startManualPopup(ID_OLD.infoScreen.INFO_POPUP_ELEV_CALL);
 //                }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -358,9 +392,13 @@ public class ElevatorCall extends WpadScreen {
             		super.setFinishTimerCreate( 3);
             	}
 	    	}
-    	} catch( Exception e) {
+    	} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
     }
 
@@ -429,9 +467,13 @@ public class ElevatorCall extends WpadScreen {
                         displayElevCallStatus(eElevCallStatus);
                     }
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
 		        Log.e(TAG, "[Exception] EventNotificationBR");
-		        e.printStackTrace();
+		        //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
 		}
 	};
@@ -444,9 +486,13 @@ public class ElevatorCall extends WpadScreen {
 			if (bUp) intent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ELE_ARRIVAL_UP);
 			else intent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ELE_ARRIVAL_DOWN);
 			this.getContext().sendBroadcast(intent);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ElevatorSampleArrived(boolean bUp)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -458,9 +504,13 @@ public class ElevatorCall extends WpadScreen {
 			intent.putExtra(define.NOTIBR_FLOOR, floor);
 			intent.putExtra(define.NOTIBR_UPDOWN, updown);
 			this.getContext().sendBroadcast(intent);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ElevatorSampleMove(String  floor, int updown)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -479,9 +529,14 @@ public class ElevatorCall extends WpadScreen {
             }
 			DBMGR.closeDB();
 			return numberHo;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 0;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getSampleMyfloor()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return 0;
 		}
 	}
@@ -499,7 +554,13 @@ public class ElevatorCall extends WpadScreen {
     	public void run() {
     		m_MyFloor = getSampleMyfloor();
     		while (true) {
-	    		try {Thread.sleep(1000);}catch (Exception e){e.printStackTrace();}
+	    		try {Thread.sleep(1000);}
+	    		catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e){
+                    LogUtil.errorLogInfo("", TAG, e);
+	    		}
 
 	    		TimerCount++;
 	    		MenuAutoChangeCount++;
@@ -574,9 +635,14 @@ public class ElevatorCall extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 8 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/EnergyUsageAlert.java

@@ -10,6 +10,7 @@ import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -181,9 +182,14 @@ public class EnergyUsageAlert extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 99 - 32
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/EventNotification.java

@@ -15,6 +15,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.MainActivity;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -95,9 +96,13 @@ public class EventNotification extends WpadScreen {
             registerEventNotification(layout);
             displayEventNotification();
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] EventNotification(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -114,9 +119,13 @@ public class EventNotification extends WpadScreen {
             }
             getEasyModeUsage();
             getEventNotificationInfo();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -128,9 +137,13 @@ public class EventNotification extends WpadScreen {
             Log.i(TAG, "[getEasyModeUsage] bEasyModeUsage [" + bEasyModeUsage + "]");
             if (bEasyModeUsage) nCntSize = 18;
             else nCntSize = 17;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getEasyModeUsage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -143,9 +156,13 @@ public class EventNotification extends WpadScreen {
         try {
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -172,9 +189,13 @@ public class EventNotification extends WpadScreen {
                     Log.w(TAG, "[onTouchEvent] The nTargetID is out of range!! -> nTargetID [" + nTargetID + "]");
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -208,9 +229,13 @@ public class EventNotification extends WpadScreen {
                 Log.w(TAG, "[runEventIconPressed] Not supported notification type -> eType [" + eType + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runEventIconPressed(EVENTS.EVENT_TYPE eType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -232,9 +257,13 @@ public class EventNotification extends WpadScreen {
 //            intent.putExtra(Common.BR_WIDGET_INSERT, true );
 //            intent.putExtra(Common.BR_INSERT_WIDGET_ID , nAddShortcutID);
 //            super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -279,9 +308,14 @@ public class EventNotification extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -428,9 +462,14 @@ public class EventNotification extends WpadScreen {
                     Log.w(TAG, "[calcObjectPosition] Not supported nID [" + nID + "]");
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] calcObjectPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
         return position;
@@ -444,9 +483,13 @@ public class EventNotification extends WpadScreen {
             WallpadCallHistoryData mWallpadCallHistoryData = new WallpadCallHistoryData(getContext());
             try {
                 nMissedCallCnt = mWallpadCallHistoryData.RowCallHistoryCountData();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] getEventNotificationInfo() -> mWallpadCallHistoryData");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             mWallpadCallHistoryData.closeDB();
 
@@ -454,9 +497,13 @@ public class EventNotification extends WpadScreen {
             WallpadVisitorPicData_A20 mWallpadVisitorPicData_A20 = new WallpadVisitorPicData_A20(getContext());
             try {
                 nVisitorPicCnt = mWallpadVisitorPicData_A20.RowVisitorPictureCountData();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] getEventNotificationInfo() -> mWallpadVisitorPicData_A20");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             mWallpadVisitorPicData_A20.closeDB();
 
@@ -466,9 +513,13 @@ public class EventNotification extends WpadScreen {
                 nNoticeCnt = mWallpadStatusData.GetNoticeCNT();
                 nParcelCnt = mWallpadStatusData.GetParcelCNT();
                 nPostCnt = mWallpadStatusData.GetPostCNT();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] getEventNotificationInfo() -> mWallpadStatusData");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             mWallpadStatusData.closeDB();
 
@@ -506,9 +557,13 @@ public class EventNotification extends WpadScreen {
             }
 
             Log.d(TAG,"[getEventNotificationInfo] nMissedCallCnt [" + nMissedCallCnt + "], nVisitorPicCnt [" + nVisitorPicCnt + "], nNoticeCnt [" + nNoticeCnt + "], nParcelCnt [" + nParcelCnt + "], nPostCnt [" + nPostCnt + "], nElecVehicleCharging [" + nElecVehicleCharging + "]");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getEventNotificationInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -697,9 +752,13 @@ public class EventNotification extends WpadScreen {
 
             Log.i(TAG, "[registerEventNotification] nEnabledEventCnt [" + nEnabledEventCnt + "], nNotiIndex [" + nNotiIndex + "]");
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerEventNotification(Context mContext, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -792,9 +851,13 @@ public class EventNotification extends WpadScreen {
                 Log.w(TAG, "[displayEventNotification] Event Cnt is not same!! nNotiIndex [" + nNotiIndex + "], nEnabledEventCnt [" + nEnabledEventCnt + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayEventNotification()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -809,9 +872,13 @@ public class EventNotification extends WpadScreen {
             mIntent.putExtra(strAPKType, nAPKType);
             mIntent.putExtra(strMenuType, nMenuType);
             mContext.sendBroadcast(mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestAPKRunBR(int nMenuType)");
-            e.printStackTrace() ;
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 152 - 26
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupAdd.java

@@ -5,13 +5,16 @@ import com.artncore.wallpadapi.WallPadAPI;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Color;
-import android.text.Layout;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
+import kr.co.icontrols.wallpadmain.MainActivity;
+import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
 import kr.co.icontrols.wallpadmain.util.IconManager;
@@ -44,6 +47,11 @@ public class GroupAdd extends WpadScreen {
     int nCurrentPageNo = 1;   // 현재 페이지 번호
     int nMAXIconNoOnaPage = 8;   // 한 화면에 들어가는 최대 아이콘 개수
 
+    private int nLongKeyCnt = 0;
+    private int nPreviousTargetID = 0;
+    private int LONGKEY_THRESHOLD = 3;
+    private int shortcutCnt = 0, shortcutMax = 0;
+
     int nTitleSize = 35;
     int nNameSize = 22;
     String strTitle = "부가";
@@ -59,9 +67,13 @@ public class GroupAdd extends WpadScreen {
                 nNameSize = 22;
             }
             mPopupIconTable = new IconInfoTable();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -126,9 +138,13 @@ public class GroupAdd extends WpadScreen {
             }
 
             getAddIcons(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GroupAdd(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -138,9 +154,13 @@ public class GroupAdd extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[GroupAdd] ========== onClose ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -153,6 +173,7 @@ public class GroupAdd extends WpadScreen {
             int nEvent = event.getAction();
 
             if (nEvent == MotionEvent.ACTION_UP) {
+                nLongKeyCnt = 0;
                 if (nTargetID == ID.POPUPS.GROUPADD.ELEMENTS.BTNS.CLOSE) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     super.finish();
@@ -177,9 +198,49 @@ public class GroupAdd extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+            else if (nEvent == MotionEvent.ACTION_POINTER_DOWN) {
+                if (ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 <= nTargetID && nTargetID <= ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_08) {
+                    if (nPreviousTargetID == nTargetID) {
+                        nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                                shortcutCnt = MainActivity.nShortcutCnt_HS;
+                                shortcutMax = MainActivity.nShortcutMax_HS;
+                            }
+                            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                                shortcutCnt = MainActivity.nShortcutCnt_Metro;
+                                shortcutMax = MainActivity.nShortcutMax_Metro;
+                            }
+                            Log.v(TAG, "[onTouchEvent] shortcutCnt [" + shortcutCnt + "], shortcutMax [" + shortcutMax + "]");
+
+                            if (shortcutMax > 0) {
+                                if (shortcutCnt >= shortcutMax) {
+                                    Log.w(TAG, "[onTouchEvent] No more Shortcuts allowed!!");
+                                    ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_NOMORESHORTCUT, false);
+                                    return;
+                                } else {
+                                    addShortcut(nTargetID - ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -298,9 +359,14 @@ public class GroupAdd extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -333,9 +399,13 @@ public class GroupAdd extends WpadScreen {
             mPopupIconTable.printValue();
             getTotalPageNo();
             updateScreen(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getAddIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -371,21 +441,25 @@ public class GroupAdd extends WpadScreen {
                 Log.i(TAG, "[updateScreen] i [" + i + "], nIndex [" + nIndex + "]");
 
                 if (i < nCurrentIconCnt) {
-                    BTN_SHORTCUT_ICON[i] = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i).W, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i).H, mPopupIconTable.getIconInfoByIndex(nIndex).getNormalImage(), mPopupIconTable.getIconInfoByIndex(nIndex).getPressedImage(), ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i);
+                    BTN_SHORTCUT_ICON[i] = new WpadImageView(mContext, TOUCH_KIND.BUTTON_LC, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i).W, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i).H, mPopupIconTable.getIconInfoByIndex(nIndex).getNormalImage(), mPopupIconTable.getIconInfoByIndex(nIndex).getPressedImage(), ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[i], getPosition(ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i).X, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i).Y);
-                    BTN_SHORTCUT_ICON[i].setTouchDelayMs(500);
-                    BTN_SHORTCUT_ICON[i].setVisibility(View.VISIBLE);
+                    if(BTN_SHORTCUT_ICON[i]!=null) BTN_SHORTCUT_ICON[i].setTouchDelayMs(500);
+                    if(BTN_SHORTCUT_ICON[i]!=null) BTN_SHORTCUT_ICON[i].setVisibility(View.VISIBLE);
 
                     TXT_SHORTCUT_NAME[i] = new WpadTextView(mContext, false, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.TEXTS.ICON_01 + i).W, getPosition(ID.POPUPS.GROUPADD.ELEMENTS.TEXTS.ICON_01 + i).H, Gravity.CENTER_HORIZONTAL, Color.WHITE, nNameSize, false, ID.POPUPS.GROUPADD.ELEMENTS.BTNS.ICON_01 + i);
                     ViewRegistration(layout, TXT_SHORTCUT_NAME[i], getPosition(ID.POPUPS.GROUPADD.ELEMENTS.TEXTS.ICON_01 + i).X , getPosition(ID.POPUPS.GROUPADD.ELEMENTS.TEXTS.ICON_01 + i).Y);
-                    TXT_SHORTCUT_NAME[i].setText(mPopupIconTable.getIconInfoByIndex(nIndex).getIconName());
-                    TXT_SHORTCUT_NAME[i].setVisibility(View.VISIBLE);
+                    if(TXT_SHORTCUT_NAME[i]!=null) TXT_SHORTCUT_NAME[i].setText(mPopupIconTable.getIconInfoByIndex(nIndex).getIconName());
+                    if(TXT_SHORTCUT_NAME[i]!=null) TXT_SHORTCUT_NAME[i].setVisibility(View.VISIBLE);
                 }
                 nIndex++;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] updateScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -395,9 +469,13 @@ public class GroupAdd extends WpadScreen {
             nMAXPageNo = mPopupIconTable.getCnt() / nMAXIconNoOnaPage;
             if ((mPopupIconTable.getCnt() % nMAXIconNoOnaPage) > 0) nMAXPageNo++;
             Log.i(TAG, "[getTotalPageNo] nMAXPageNo [" + nMAXPageNo + "]");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getTotalPageNo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -413,9 +491,13 @@ public class GroupAdd extends WpadScreen {
                 if (nCurrentPageNo < 1) nCurrentPageNo = nMAXPageNo;
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlPageNo(boolean bUp)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -427,9 +509,53 @@ public class GroupAdd extends WpadScreen {
             intent.putExtra(Common.BR_RUN_WIDGET, true );
             intent.putExtra(Common.BR_RUN_WIDGET_ID , nIconID);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nIconID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void addShortcut(int nTargetID) {
+        try {
+            Log.i(TAG, "[addShortcut] nTargetID = " + nTargetID);
+            int nIndex = nTargetID + (nCurrentPageNo - 1) * nMAXIconNoOnaPage;
+            Log.d(TAG, "[addShortcut] nIndex [" + nIndex + "]");
+
+            int nIconID = mPopupIconTable.getIconInfoByIndex(nIndex).getIconID();
+            Log.d(TAG, "[addShortcut] nIconID [" + nIconID + "]");
+
+            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+
+            Intent mIntent = new Intent();
+            mIntent.putExtra(Common.WIDGET_SELECTED_ID, nIconID);
+            ((PopupActivity) mContext).ChangeScreen(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 125 - 17
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupCtrl.java

@@ -1,6 +1,5 @@
 package kr.co.icontrols.wallpadmain.popup;
 
-import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.wallpadapi.WallPadAPI;
 
 import android.content.Context;
@@ -12,9 +11,10 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
-import java.util.List;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.MainActivity;
+import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
 import kr.co.icontrols.wallpadmain.util.IconManager;
@@ -40,6 +40,11 @@ public class GroupCtrl extends WpadScreen {
     IconInfoTable mIconInfoTable;
     IconInfoTable mPopupIconTable;
 
+    private int nLongKeyCnt = 0;
+    private int nPreviousTargetID = 0;
+    private int LONGKEY_THRESHOLD = 3;
+    private int shortcutCnt = 0, shortcutMax = 0;
+
     int nTitleSize = 35;
     int nNameSize = 22;
     String strTitle = "제어";
@@ -55,9 +60,13 @@ public class GroupCtrl extends WpadScreen {
                 nNameSize = 22;
             }
             mPopupIconTable = new IconInfoTable();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -95,9 +104,13 @@ public class GroupCtrl extends WpadScreen {
             }
 
             registerCtrlIcons(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GroupCtrl(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -107,9 +120,13 @@ public class GroupCtrl extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[GroupCtrl] ========== onClose ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -122,6 +139,7 @@ public class GroupCtrl extends WpadScreen {
             int nEvent = event.getAction();
 
             if (nEvent == MotionEvent.ACTION_UP) {
+                nLongKeyCnt = 0;
                 if (nTargetID == ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.CLOSE) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     super.finish();
@@ -134,9 +152,49 @@ public class GroupCtrl extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+            else if (nEvent == MotionEvent.ACTION_POINTER_DOWN) {
+                if (ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 <= nTargetID && nTargetID <= ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_08) {
+                    if (nPreviousTargetID == nTargetID) {
+                        nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                                shortcutCnt = MainActivity.nShortcutCnt_HS;
+                                shortcutMax = MainActivity.nShortcutMax_HS;
+                            }
+                            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                                shortcutCnt = MainActivity.nShortcutCnt_Metro;
+                                shortcutMax = MainActivity.nShortcutMax_Metro;
+                            }
+                            Log.v(TAG, "[onTouchEvent] shortcutCnt [" + shortcutCnt + "], shortcutMax [" + shortcutMax + "]");
+
+                            if (shortcutMax > 0) {
+                                if (shortcutCnt >= shortcutMax) {
+                                    Log.w(TAG, "[onTouchEvent] No more Shortcuts allowed!!");
+                                    ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_NOMORESHORTCUT, false);
+                                    return;
+                                } else {
+                                    addShortcut(nTargetID - ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -245,9 +303,14 @@ public class GroupCtrl extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -276,7 +339,7 @@ public class GroupCtrl extends WpadScreen {
                 if ((mIconInfoTable.getIconInfoByIndex(i).getIconID() / 1000) == (ID.ICONS.MENU_CTRL / 1000)) {
                     Log.d(TAG, "[registerCtrlIcons] i [" + i + "], nIndex [" + nIndex + "], ID [" + mIconInfoTable.getIconInfoByIndex(i).getIconID() + "], Name [" + mIconInfoTable.getIconInfoByIndex(i).getIconName() + "]");
 
-                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex);
+                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON_LC, getPosition(ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[nIndex] ,	getPosition(ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex).X, getPosition(ID.POPUPS.GROUPCTRL.ELEMENTS.BTNS.ICON_01 + nIndex).Y);
                     BTN_SHORTCUT_ICON[nIndex].setTouchDelayMs(500);
 
@@ -290,9 +353,13 @@ public class GroupCtrl extends WpadScreen {
                 }
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerCtrlIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -304,9 +371,50 @@ public class GroupCtrl extends WpadScreen {
             intent.putExtra(Common.BR_RUN_WIDGET, true );
             intent.putExtra(Common.BR_RUN_WIDGET_ID , nIconID);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nIconID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void addShortcut(int nTargetID) {
+        try {
+            Log.i(TAG, "[addShortcut] nTargetID = " + nTargetID);
+            int nIconID = mPopupIconTable.getIconInfoByIndex(nTargetID).getIconID();
+            Log.d(TAG, "[addShortcut] nIconID [" + nIconID + "]");
+
+            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+
+            Intent mIntent = new Intent();
+            mIntent.putExtra(Common.WIDGET_SELECTED_ID, nIconID);
+            ((PopupActivity) mContext).ChangeScreen(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 126 - 15
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupEnergy.java

@@ -10,7 +10,10 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
+import kr.co.icontrols.wallpadmain.MainActivity;
+import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
 import kr.co.icontrols.wallpadmain.declare.DataClasses.IconInfoTable;
@@ -39,6 +42,11 @@ public class GroupEnergy extends WpadScreen {
     IconInfoTable mIconInfoTable;
     IconInfoTable mPopupIconTable;
 
+    private int nLongKeyCnt = 0;
+    private int nPreviousTargetID = 0;
+    private int LONGKEY_THRESHOLD = 3;
+    private int shortcutCnt = 0, shortcutMax = 0;
+
     int nTitleSize = 35;
     int nNameSize = 22;
     String strTitle = "에너지";
@@ -54,9 +62,13 @@ public class GroupEnergy extends WpadScreen {
                 nNameSize = 22;
             }
             mPopupIconTable = new IconInfoTable();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -94,9 +106,13 @@ public class GroupEnergy extends WpadScreen {
             }
 
             registerEnergyIcons(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GroupEnergy(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -106,9 +122,13 @@ public class GroupEnergy extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[GroupEnergy] ========== onClose ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,6 +141,7 @@ public class GroupEnergy extends WpadScreen {
             int nEvent = event.getAction();
 
             if (nEvent == MotionEvent.ACTION_UP) {
+                nLongKeyCnt = 0;
                 if (nTargetID == ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.CLOSE) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     super.finish();
@@ -133,9 +154,49 @@ public class GroupEnergy extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+            else if (nEvent == MotionEvent.ACTION_POINTER_DOWN) {
+                if (ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 <= nTargetID && nTargetID <= ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_08) {
+                    if (nPreviousTargetID == nTargetID) {
+                        nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                                shortcutCnt = MainActivity.nShortcutCnt_HS;
+                                shortcutMax = MainActivity.nShortcutMax_HS;
+                            }
+                            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                                shortcutCnt = MainActivity.nShortcutCnt_Metro;
+                                shortcutMax = MainActivity.nShortcutMax_Metro;
+                            }
+                            Log.v(TAG, "[onTouchEvent] shortcutCnt [" + shortcutCnt + "], shortcutMax [" + shortcutMax + "]");
+
+                            if (shortcutMax > 0) {
+                                if (shortcutCnt >= shortcutMax) {
+                                    Log.w(TAG, "[onTouchEvent] No more Shortcuts allowed!!");
+                                    ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_NOMORESHORTCUT, false);
+                                    return;
+                                } else {
+                                    addShortcut(nTargetID - ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -244,9 +305,14 @@ public class GroupEnergy extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -275,7 +341,7 @@ public class GroupEnergy extends WpadScreen {
                 if ((mIconInfoTable.getIconInfoByIndex(i).getIconID() / 1000) == (ID.ICONS.MENU_ENERGY / 1000)) {
                     Log.d(TAG, "[registerEnergyIcons] i [" + i + "], nIndex [" + nIndex + "], ID [" + mIconInfoTable.getIconInfoByIndex(i).getIconID() + "], Name [" + mIconInfoTable.getIconInfoByIndex(i).getIconName() + "]");
 
-                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex);
+                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON_LC, getPosition(ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[nIndex] ,	getPosition(ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex).X, getPosition(ID.POPUPS.GROUPENERGY.ELEMENTS.BTNS.ICON_01 + nIndex).Y);
                     BTN_SHORTCUT_ICON[nIndex].setTouchDelayMs(500);
 
@@ -288,9 +354,13 @@ public class GroupEnergy extends WpadScreen {
                 }
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerEnergyIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -302,9 +372,50 @@ public class GroupEnergy extends WpadScreen {
             intent.putExtra(Common.BR_RUN_WIDGET, true );
             intent.putExtra(Common.BR_RUN_WIDGET_ID , nIconID);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nIconID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void addShortcut(int nTargetID) {
+        try {
+            Log.i(TAG, "[addShortcut] nTargetID = " + nTargetID);
+            int nIconID = mPopupIconTable.getIconInfoByIndex(nTargetID).getIconID();
+            Log.d(TAG, "[addShortcut] nIconID [" + nIconID + "]");
+
+            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+
+            Intent mIntent = new Intent();
+            mIntent.putExtra(Common.WIDGET_SELECTED_ID, nIconID);
+            ((PopupActivity) mContext).ChangeScreen(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 124 - 16
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupSecurity.java

@@ -12,9 +12,10 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
-import java.util.List;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.MainActivity;
+import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
 import kr.co.icontrols.wallpadmain.util.IconManager;
@@ -40,6 +41,11 @@ public class GroupSecurity extends WpadScreen {
     IconInfoTable mIconInfoTable;
     IconInfoTable mPopupIconTable;
 
+    private int nLongKeyCnt = 0;
+    private int nPreviousTargetID = 0;
+    private int LONGKEY_THRESHOLD = 3;
+    private int shortcutCnt = 0, shortcutMax = 0;
+
     int nTitleSize = 35;
     int nNameSize = 22;
     String strTitle = "방범";
@@ -55,9 +61,13 @@ public class GroupSecurity extends WpadScreen {
                 nNameSize = 22;
             }
             mPopupIconTable = new IconInfoTable();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -95,9 +105,13 @@ public class GroupSecurity extends WpadScreen {
             }
 
             registerSecurityIcons(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GroupSecurity(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -107,9 +121,13 @@ public class GroupSecurity extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[GroupSecurity] ========== onClose ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -122,6 +140,7 @@ public class GroupSecurity extends WpadScreen {
             int nEvent = event.getAction();
 
             if (nEvent == MotionEvent.ACTION_UP) {
+                nLongKeyCnt = 0;
                 if (nTargetID == ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.CLOSE) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     super.finish();
@@ -165,9 +184,49 @@ public class GroupSecurity extends WpadScreen {
                     }
                 }
             }
-        } catch (Exception e) {
+            else if (nEvent == MotionEvent.ACTION_POINTER_DOWN) {
+                if (ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 <= nTargetID && nTargetID <= ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_08) {
+                    if (nPreviousTargetID == nTargetID) {
+                        nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                                shortcutCnt = MainActivity.nShortcutCnt_HS;
+                                shortcutMax = MainActivity.nShortcutMax_HS;
+                            }
+                            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                                shortcutCnt = MainActivity.nShortcutCnt_Metro;
+                                shortcutMax = MainActivity.nShortcutMax_Metro;
+                            }
+                            Log.v(TAG, "[onTouchEvent] shortcutCnt [" + shortcutCnt + "], shortcutMax [" + shortcutMax + "]");
+
+                            if (shortcutMax > 0) {
+                                if (shortcutCnt >= shortcutMax) {
+                                    Log.w(TAG, "[onTouchEvent] No more Shortcuts allowed!!");
+                                    ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_NOMORESHORTCUT, false);
+                                    return;
+                                } else {
+                                    addShortcut(nTargetID - ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -276,9 +335,14 @@ public class GroupSecurity extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -307,7 +371,7 @@ public class GroupSecurity extends WpadScreen {
                 if ((mIconInfoTable.getIconInfoByIndex(i).getIconID() / 1000) == (ID.ICONS.MENU_SECURITY / 1000)) {
                     Log.d(TAG, "[registerAddIcons] i [" + i + "], nIndex [" + nIndex + "], ID [" + mIconInfoTable.getIconInfoByIndex(i).getIconID() + "], Name [" + mIconInfoTable.getIconInfoByIndex(i).getIconName() + "]");
 
-                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex);
+                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON_LC, getPosition(ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[nIndex] ,	getPosition(ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex).X, getPosition(ID.POPUPS.GROUPSECURITY.ELEMENTS.BTNS.ICON_01 + nIndex).Y);
                     BTN_SHORTCUT_ICON[nIndex].setTouchDelayMs(500);
 
@@ -320,9 +384,13 @@ public class GroupSecurity extends WpadScreen {
                 }
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerSecurityIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -334,10 +402,50 @@ public class GroupSecurity extends WpadScreen {
             intent.putExtra(Common.BR_RUN_WIDGET, true );
             intent.putExtra(Common.BR_RUN_WIDGET_ID , nIconID);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nIconID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
+    public void addShortcut(int nTargetID) {
+        try {
+            Log.i(TAG, "[addShortcut] nTargetID = " + nTargetID);
+            int nIconID = mPopupIconTable.getIconInfoByIndex(nTargetID).getIconID();
+            Log.d(TAG, "[addShortcut] nIconID [" + nIconID + "]");
+
+            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+
+            Intent mIntent = new Intent();
+            mIntent.putExtra(Common.WIDGET_SELECTED_ID, nIconID);
+            ((PopupActivity) mContext).ChangeScreen(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
 }

+ 126 - 15
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupSetting.java

@@ -10,7 +10,10 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
+import kr.co.icontrols.wallpadmain.MainActivity;
+import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
 import kr.co.icontrols.wallpadmain.util.IconManager;
@@ -36,6 +39,11 @@ public class GroupSetting extends WpadScreen {
     IconInfoTable mIconInfoTable;
     IconInfoTable mPopupIconTable;
 
+    private int nLongKeyCnt = 0;
+    private int nPreviousTargetID = 0;
+    private int LONGKEY_THRESHOLD = 3;
+    private int shortcutCnt = 0, shortcutMax = 0;
+
     int nTitleSize = 35;
     int nNameSize = 22;
     String strTitle = "설정";
@@ -51,9 +59,13 @@ public class GroupSetting extends WpadScreen {
                 nNameSize = 22;
             }
             mPopupIconTable = new IconInfoTable();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -91,9 +103,13 @@ public class GroupSetting extends WpadScreen {
             }
 
             registerSettingIcons(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GroupSetting(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -103,9 +119,13 @@ public class GroupSetting extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[GroupSetting] ========== onClose ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -118,6 +138,7 @@ public class GroupSetting extends WpadScreen {
             int nEvent = event.getAction();
 
             if (nEvent == MotionEvent.ACTION_UP) {
+                nLongKeyCnt = 0;
                 if (nTargetID == ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.CLOSE) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     super.finish();
@@ -130,9 +151,49 @@ public class GroupSetting extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+            else if (nEvent == MotionEvent.ACTION_POINTER_DOWN) {
+                if (ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 <= nTargetID && nTargetID <= ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_08) {
+                    if (nPreviousTargetID == nTargetID) {
+                        nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                                shortcutCnt = MainActivity.nShortcutCnt_HS;
+                                shortcutMax = MainActivity.nShortcutMax_HS;
+                            }
+                            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                                shortcutCnt = MainActivity.nShortcutCnt_Metro;
+                                shortcutMax = MainActivity.nShortcutMax_Metro;
+                            }
+                            Log.v(TAG, "[onTouchEvent] shortcutCnt [" + shortcutCnt + "], shortcutMax [" + shortcutMax + "]");
+
+                            if (shortcutMax > 0) {
+                                if (shortcutCnt >= shortcutMax) {
+                                    Log.w(TAG, "[onTouchEvent] No more Shortcuts allowed!!");
+                                    ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_NOMORESHORTCUT, false);
+                                    return;
+                                } else {
+                                    addShortcut(nTargetID - ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -241,9 +302,14 @@ public class GroupSetting extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -272,7 +338,7 @@ public class GroupSetting extends WpadScreen {
                 if ((mIconInfoTable.getIconInfoByIndex(i).getIconID() / 1000) == (ID.ICONS.MENU_SETTING / 1000)) {
                     Log.d(TAG, "[registerAddIcons] i [" + i + "], nIndex [" + nIndex + "], ID [" + mIconInfoTable.getIconInfoByIndex(i).getIconID() + "], Name [" + mIconInfoTable.getIconInfoByIndex(i).getIconName() + "]");
 
-                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex);
+                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON_LC, getPosition(ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[nIndex] ,	getPosition(ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex).X, getPosition(ID.POPUPS.GROUPSETTING.ELEMENTS.BTNS.ICON_01 + nIndex).Y);
                     BTN_SHORTCUT_ICON[nIndex].setTouchDelayMs(500);
 
@@ -285,9 +351,13 @@ public class GroupSetting extends WpadScreen {
                 }
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerSettingIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -299,9 +369,50 @@ public class GroupSetting extends WpadScreen {
             intent.putExtra(Common.BR_RUN_WIDGET, true );
             intent.putExtra(Common.BR_RUN_WIDGET_ID , nIconID);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nIconID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void addShortcut(int nTargetID) {
+        try {
+            Log.i(TAG, "[addShortcut] nTargetID = " + nTargetID);
+            int nIconID = mPopupIconTable.getIconInfoByIndex(nTargetID).getIconID();
+            Log.d(TAG, "[addShortcut] nIconID [" + nIconID + "]");
+
+            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+
+            Intent mIntent = new Intent();
+            mIntent.putExtra(Common.WIDGET_SELECTED_ID, nIconID);
+            ((PopupActivity) mContext).ChangeScreen(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 125 - 17
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/GroupTalk.java

@@ -1,6 +1,5 @@
 package kr.co.icontrols.wallpadmain.popup;
 
-import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.wallpadapi.WallPadAPI;
 
 import android.content.Context;
@@ -12,9 +11,10 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
-import java.util.List;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.MainActivity;
+import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
 import kr.co.icontrols.wallpadmain.util.IconManager;
@@ -40,6 +40,11 @@ public class GroupTalk extends WpadScreen {
     IconInfoTable mIconInfoTable;
     IconInfoTable mPopupIconTable;
 
+    private int nLongKeyCnt = 0;
+    private int nPreviousTargetID = 0;
+    private int LONGKEY_THRESHOLD = 3;
+    private int shortcutCnt = 0, shortcutMax = 0;
+
     int nTitleSize = 35;
     int nNameSize = 22;
     String strTitle = "통화";
@@ -55,9 +60,13 @@ public class GroupTalk extends WpadScreen {
                 nNameSize = 22;
             }
             mPopupIconTable = new IconInfoTable();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -95,9 +104,13 @@ public class GroupTalk extends WpadScreen {
             }
 
             registerTalkIcons(layout);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] GroupTalk(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -107,9 +120,13 @@ public class GroupTalk extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[GroupTalk] ========== onClose ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -122,6 +139,7 @@ public class GroupTalk extends WpadScreen {
             int nEvent = event.getAction();
 
             if (nEvent == MotionEvent.ACTION_UP) {
+                nLongKeyCnt = 0;
                 if (nTargetID == ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.CLOSE) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     super.finish();
@@ -134,9 +152,49 @@ public class GroupTalk extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+            else if (nEvent == MotionEvent.ACTION_POINTER_DOWN) {
+                if (ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 <= nTargetID && nTargetID <= ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_08) {
+                    if (nPreviousTargetID == nTargetID) {
+                        nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                                shortcutCnt = MainActivity.nShortcutCnt_HS;
+                                shortcutMax = MainActivity.nShortcutMax_HS;
+                            }
+                            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                                shortcutCnt = MainActivity.nShortcutCnt_Metro;
+                                shortcutMax = MainActivity.nShortcutMax_Metro;
+                            }
+                            Log.v(TAG, "[onTouchEvent] shortcutCnt [" + shortcutCnt + "], shortcutMax [" + shortcutMax + "]");
+
+                            if (shortcutMax > 0) {
+                                if (shortcutCnt >= shortcutMax) {
+                                    Log.w(TAG, "[onTouchEvent] No more Shortcuts allowed!!");
+                                    ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_NOMORESHORTCUT, false);
+                                    return;
+                                } else {
+                                    addShortcut(nTargetID - ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -245,9 +303,14 @@ public class GroupTalk extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -276,7 +339,7 @@ public class GroupTalk extends WpadScreen {
                 if ((mIconInfoTable.getIconInfoByIndex(i).getIconID() / 1000) == (ID.ICONS.MENU_TALK / 1000)) {
                     Log.d(TAG, "[registerAddIcons] i [" + i + "], nIndex [" + nIndex + "], ID [" + mIconInfoTable.getIconInfoByIndex(i).getIconID() + "], Name [" + mIconInfoTable.getIconInfoByIndex(i).getIconName() + "]");
 
-                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex);
+                    BTN_SHORTCUT_ICON[nIndex] = new WpadImageView(mContext, TOUCH_KIND.BUTTON_LC, getPosition(ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex).W, getPosition(ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex).H, mIconInfoTable.getIconInfoByIndex(i).getNormalImage(), mIconInfoTable.getIconInfoByIndex(i).getPressedImage(), ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[nIndex] ,	getPosition(ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex).X, getPosition(ID.POPUPS.GROUPTALK.ELEMENTS.BTNS.ICON_01 + nIndex).Y);
                     BTN_SHORTCUT_ICON[nIndex].setTouchDelayMs(500);
 
@@ -289,9 +352,13 @@ public class GroupTalk extends WpadScreen {
                 }
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerTalkIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -303,9 +370,50 @@ public class GroupTalk extends WpadScreen {
             intent.putExtra(Common.BR_RUN_WIDGET, true );
             intent.putExtra(Common.BR_RUN_WIDGET_ID , nIconID);
             super.setPopupResult(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nIconID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void addShortcut(int nTargetID) {
+        try {
+            Log.i(TAG, "[addShortcut] nTargetID = " + nTargetID);
+            int nIconID = mPopupIconTable.getIconInfoByIndex(nTargetID).getIconID();
+            Log.d(TAG, "[addShortcut] nIconID [" + nIconID + "]");
+
+            if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+            else if (Common.eGUIType == Common.GUI_TYPE.METRO) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nIconID) {
+                        Log.w(TAG, "[addShortcut] Duplicated nShortcutID [" + nIconID + "]");
+                        ((PopupActivity) mContext).setChangeScreen(ID.POPUPS.POPUP_DUPLICATEDSHORTCUT, false);
+                        return;
+                    }
+                }
+            }
+
+            Intent mIntent = new Intent();
+            mIntent.putExtra(Common.WIDGET_SELECTED_ID, nIconID);
+            ((PopupActivity) mContext).ChangeScreen(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 12 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/InterFloorNoiseError.java

@@ -11,6 +11,7 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -49,7 +50,10 @@ public class InterFloorNoiseError extends WpadScreen {
             if (soundOut) {
                 Sound().Play(SND.effect.EFFECT1);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
         }
     }
@@ -160,9 +164,14 @@ public class InterFloorNoiseError extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 12 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/InterFloorNoiseOccured.java

@@ -14,6 +14,7 @@ import android.widget.RelativeLayout;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
@@ -49,7 +50,10 @@ public class InterFloorNoiseOccured extends WpadScreen {
             if (soundOut) {
                 Sound().Play(SND.effect.EFFECT1);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
         }
     }
@@ -160,9 +164,14 @@ public class InterFloorNoiseOccured extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 13 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ModeLamp.java

@@ -12,6 +12,7 @@ import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
 import kr.co.icontrols.gledeviceinterface.jni;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -62,14 +63,23 @@ public class ModeLamp extends WpadScreen
     		
     		
     	}
-    	catch( Exception e )
+    	catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e )
     	{
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
     	}
     	
         try { mGleInterface = new jni(); }
-        catch(Exception e) { Log.e( "iMapServer" ,"[ExceptionError] - onCreate->mGleInterface Create : " + e); }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+        	Log.e( "iMapServer" ,"[ExceptionError] - onCreate->mGleInterface Create : " + e);
+        }
     }
 	
 	public ModeLamp(Context context, RelativeLayout layout)

+ 50 - 16
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/MorningCall.java

@@ -19,6 +19,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import kr.co.icontrols.wallpadmain.MainActivity;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -159,9 +160,14 @@ public class MorningCall extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -173,9 +179,13 @@ public class MorningCall extends WpadScreen {
             if (nMorningCallMelodyType != 0) Sound().PlayRepeat( SND.bell.MONINGCALL_01 + nMorningCallMelodyType - 1 , 0);
 
             sendHandlerMsgDelayed(HANDLERMSG.STEP2_STOP_SOUND, 0, 0, n1stSoundPlayTime);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] play1stMorningCallMelody()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -185,9 +195,13 @@ public class MorningCall extends WpadScreen {
             Sound().StopRepeat();
 
             sendHandlerMsgDelayed(HANDLERMSG.STEP3_PLAY_SOUND, 0, 0, n2ndSoundPauseTime);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] pause1stMorningCallMelody()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -198,9 +212,13 @@ public class MorningCall extends WpadScreen {
             if (nMorningCallMelodyType != 0) Sound().PlayRepeat( SND.bell.MONINGCALL_01 + nMorningCallMelodyType - 1 , 0);
 
             sendHandlerMsgDelayed(HANDLERMSG.STEP4_STOP_SOUND_N_FINISH, 0, 0, n3rdSoundPlayTime);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] play2ndMorningCallMelody()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -209,9 +227,13 @@ public class MorningCall extends WpadScreen {
             Log.i(TAG, "[stopNfinishMorningCallMelody] ========== START ==========");
             Sound().StopRepeat();
             Exit();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] stopNfinishMorningCallMelody()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -258,9 +280,13 @@ public class MorningCall extends WpadScreen {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -272,9 +298,13 @@ public class MorningCall extends WpadScreen {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -283,9 +313,13 @@ public class MorningCall extends WpadScreen {
             Log.i(TAG, "[sendHandlerMsgDelayed] ========== START ==========");
 //            Message HandleMsg = MainHandler.obtainMessage();
             MainHandler.removeCallbacksAndMessages(null);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] removePendingHandlerMsg()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 67 - 23
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/NoMoreShortcut.java

@@ -19,6 +19,7 @@ import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import com.util.LogUtil;
 
 public class NoMoreShortcut extends WpadScreen {
 
@@ -39,32 +40,58 @@ public class NoMoreShortcut extends WpadScreen {
             mContext = context;
             initInfo();
 
-            IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
-            ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01_1280, 0, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+                ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
 
-            IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_icon_caution, 0, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON);
-            ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+                IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_icon_caution, 0, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON);
+                ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).Y);
 
-            BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM);
-            ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+                BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal_1280, R.drawable.popup_btn_confirm_pressed_1280, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM);
+                ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
 
-            TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
-            ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
-            TXT_INSTRUCTION.setText(strInstruction);
+                TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+                ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+                TXT_INSTRUCTION.setText(strInstruction);
+            }
+            else {
+                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).H, R.drawable.back_popup_01, 0, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND);
+                ViewRegistration(layout, IMG_BACKGROUND, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND).Y);
+
+                IMG_ICON = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).H, R.drawable.popup_icon_caution, 0, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON);
+                ViewRegistration(layout, IMG_ICON, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON).Y);
+
+                BTN_CONFIRM = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).H, R.drawable.popup_btn_confirm_normal, R.drawable.popup_btn_confirm_pressed, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM);
+                ViewRegistration(layout, BTN_CONFIRM, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM).Y);
+
+                TXT_INSTRUCTION = new WpadTextView(context, false, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).W, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).H, Gravity.CENTER, Color.WHITE, nInstructionSize, true, ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION);
+                ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION).Y);
+                TXT_INSTRUCTION.setText(strInstruction);
+            }
 
             Sound().Play(SND.effect.WARNING005);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] NoMoreShortcut(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void initInfo() {
         try {
-        } catch (Exception e) {
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nInstructionSize = 46;
+            else nInstructionSize = 35;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -77,9 +104,13 @@ public class NoMoreShortcut extends WpadScreen {
         try {
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -97,9 +128,13 @@ public class NoMoreShortcut extends WpadScreen {
                     ((PopupActivity)mContext).finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,27 +156,36 @@ public class NoMoreShortcut extends WpadScreen {
         try {
             switch (nID) {
                 case ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.BACKGROUND:
-                    position.setPopupPosition(117, 	83, 	790, 	434);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(145, 	112, 	990, 	576);
+                    else position.setPopupPosition(117, 	83, 	790, 	434);
                     return position;
 
                 case ID.POPUPS.NOMORESHORTCUT.ELEMENTS.IMAGES.ICON:
-                    position.setPopupPosition(422, 	210, 	180, 	180);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(550, 	329, 	180, 	180);
+                    else position.setPopupPosition(422, 	210, 	180, 	180);
                     return position;
 
                 case ID.POPUPS.NOMORESHORTCUT.ELEMENTS.BTNS.CONFIRM:
-                    position.setPopupPosition(367, 	435, 	290, 	64);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(460, 	585, 	360, 	80);
+                    else position.setPopupPosition(367, 	435, 	290, 	64);
                     return position;
 
                 case ID.POPUPS.NOMORESHORTCUT.ELEMENTS.TEXTS.INSTRUCTION:
-                    position.setPopupPosition(119, 	85, 	786, 	110);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPopupPosition(148, 	115, 	984, 	174);
+                    else position.setPopupPosition(119, 	85, 	786, 	110);
                     return position;
 
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 38 - 12
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/NoticeDetectStranger.java

@@ -12,6 +12,7 @@ import android.widget.RelativeLayout;
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.define;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
@@ -100,9 +101,13 @@ public class NoticeDetectStranger extends WpadScreen {
                 ViewRegistration(layout, mMentTxt, getPosition(ID.POPUPS.NOTICESTRANGER.ELEMENTS.TEXTS.MENT).X, getPosition(ID.POPUPS.NOTICESTRANGER.ELEMENTS.TEXTS.MENT).Y);
                 mMentTxt.setText(strTXT_MENT);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] PopupNoticeDetectStranger(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -146,9 +151,13 @@ public class NoticeDetectStranger extends WpadScreen {
                 Sound().Play(SND.effect.EFFECT1);
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -170,9 +179,13 @@ public class NoticeDetectStranger extends WpadScreen {
                 }
                 super.finish();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View view, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -192,9 +205,13 @@ public class NoticeDetectStranger extends WpadScreen {
             notiIntent.setAction(define.NOTIFY_ACNAME);
             notiIntent.putExtra(define.NOTIBR_KIND, kind);
             mContext.sendBroadcast(notiIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -242,8 +259,13 @@ public class NoticeDetectStranger extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
-            e.printStackTrace();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -252,9 +274,13 @@ public class NoticeDetectStranger extends WpadScreen {
         try {
             bTouch = true;
             setPopupResult(false);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 26 - 8
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ParcelReceived.java

@@ -11,6 +11,7 @@ import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.*;
@@ -70,9 +71,13 @@ public class ParcelReceived extends WpadScreen {
                 ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.PARCELRECEIVED.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.PARCELRECEIVED.ELEMENTS.TEXTS.INSTRUCTION).Y);
                 TXT_INSTRUCTION.setText(strInstruction);
             }
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 		    Log.e(TAG, "[Exception] ParcelReceived(Context context, RelativeLayout layout)");
-		    e.printStackTrace();
+		    //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -89,9 +94,13 @@ public class ParcelReceived extends WpadScreen {
             if (soundOut) {
                 Sound().PlayMent(SND.mode.BOX_ARRIVED);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -117,9 +126,13 @@ public class ParcelReceived extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -163,9 +176,14 @@ public class ParcelReceived extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 32 - 10
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/PostReceived.java

@@ -10,6 +10,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -73,9 +74,13 @@ public class PostReceived extends WpadScreen {
                 ViewRegistration(layout, TXT_INSTRUCTION, getPosition(ID.POPUPS.POSTRECEIVED.ELEMENTS.TEXTS.INSTRUCTION).X, getPosition(ID.POPUPS.POSTRECEIVED.ELEMENTS.TEXTS.INSTRUCTION).Y);
                 TXT_INSTRUCTION.setText(strInstruction);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] PostReceived(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -92,9 +97,13 @@ public class PostReceived extends WpadScreen {
             if (soundOut) {
                 Sound().Play(WpadSound.SND.effect.EFFECT1);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -119,9 +128,13 @@ public class PostReceived extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -165,9 +178,14 @@ public class PostReceived extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -175,9 +193,13 @@ public class PostReceived extends WpadScreen {
     protected void onOutSideTouchExit() {
         try {
             super.finish();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 39 - 12
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ReleaseInMode.java

@@ -19,6 +19,7 @@ import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import com.util.LogUtil;
 
 public class ReleaseInMode extends WpadScreen {
 	String TAG = "ReleaseInMode";
@@ -143,9 +144,13 @@ public class ReleaseInMode extends WpadScreen {
                 }
             }
             playNotifySound();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ReleaseInMode(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -179,9 +184,14 @@ public class ReleaseInMode extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -221,9 +231,14 @@ public class ReleaseInMode extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -253,9 +268,13 @@ public class ReleaseInMode extends WpadScreen {
                         Log.d(TAG, "[DB SAVE]-WallpadStatusData.ALARM_NONE ");
                         GetDB().SetAlarmStatus(WallpadStatusData.ALARM_NONE);
                     }
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) {
                     Log.d(TAG, "[Exception]-" + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                 }
                 super.finish();
             }
@@ -276,9 +295,13 @@ public class ReleaseInMode extends WpadScreen {
             SetData.closeDB();
             Log.d(TAG, "[playNotifySound] bPlay = " + bPlay);
             if (bPlay) Sound().Play(SND.effect.EFFECT1);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playNotifySound()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -290,9 +313,13 @@ public class ReleaseInMode extends WpadScreen {
             mIntent.setAction(Common.BR_PLAY_SOUND);
             mIntent.putExtra(strSoundID, nSoundID);
             mContext.sendBroadcast(mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestSoundPlay(int nSoundID)");
-            e.printStackTrace() ;
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 26 - 8
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ReleaseOutMode.java

@@ -18,6 +18,7 @@ import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import com.util.LogUtil;
 
 public class ReleaseOutMode extends WpadScreen {
 
@@ -106,9 +107,13 @@ public class ReleaseOutMode extends WpadScreen {
 //                super.setSoundNoRelease(true);
                 try {
                     ComeBackHomeDB();
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) {
                     Log.d(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 super.finish();
             }
@@ -134,9 +139,13 @@ public class ReleaseOutMode extends WpadScreen {
 				}
 			}
 			wdb.closeDB();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.d(TAG, "[Exception] ComeBackHomeDB()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 
@@ -175,9 +184,14 @@ public class ReleaseOutMode extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -190,9 +204,13 @@ public class ReleaseOutMode extends WpadScreen {
             SetData.closeDB();
             Log.d(TAG, "[playNotifySound] bPlay = " + bPlay);
             if (bPlay) Sound().Play(SND.effect.EFFECT1);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playNotifySound()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 8 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/ScheduleNotification.java

@@ -19,6 +19,7 @@ import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import com.util.LogUtil;
 
 public class ScheduleNotification extends WpadScreen {
 	String TAG = "ScheduleNotification";
@@ -171,9 +172,14 @@ public class ScheduleNotification extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 32 - 10
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/SmartKeyEmergency.java

@@ -10,6 +10,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.PopupActivity;
 import kr.co.icontrols.wallpadmain.R;
@@ -70,9 +71,13 @@ public class SmartKeyEmergency extends WpadScreen {
             }
 
             playNotifySound();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] SmartKeyEmergency(Context context, RelativeLayout layout)");
-	        e.printStackTrace();
+	        //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -81,9 +86,13 @@ public class SmartKeyEmergency extends WpadScreen {
 	    try {
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 	
@@ -144,9 +153,14 @@ public class SmartKeyEmergency extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -168,9 +182,13 @@ public class SmartKeyEmergency extends WpadScreen {
             if ((strLocation != null) && (strCardNo != null)) strInstruction = "비상이 발생하였습니다.\r\n" + "위치 : " + strLocation + ", 카드번호 : " + strCardNo;
             else strInstruction = "스마트키에서 비상이 발생하였습니다.";
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getAlarmInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -182,9 +200,13 @@ public class SmartKeyEmergency extends WpadScreen {
             SetData.closeDB();
             Log.d(TAG, "[playNotifySound] bPlay = " + bPlay);
             if (bPlay) Sound().PlayMent(WpadSound.SND.emergency.ALARM);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playNotifySound()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 38 - 12
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/VehicleArrived.java

@@ -18,6 +18,7 @@ import kr.co.icontrols.wallpadmain.declare.*;
 import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.*;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
 
 public class VehicleArrived extends WpadScreen {
@@ -62,9 +63,13 @@ public class VehicleArrived extends WpadScreen {
                 Log.w(TAG, "[VehicleArrived] Intent is NULL!!!");
             }
             bEnableParkingLocation = true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] initInfo()");
-	        e.printStackTrace();
+	        //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -127,9 +132,13 @@ public class VehicleArrived extends WpadScreen {
             }
 
             playNotifySound();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 	        Log.e(TAG, "[Exception] VehicleArrived(Context context, RelativeLayout layout)");
-	        e.printStackTrace();;
+	        //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);;
         }
 	}
 
@@ -138,9 +147,13 @@ public class VehicleArrived extends WpadScreen {
 	    try {
             super.onClose();
             Log.d(TAG, "[onClose] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 	}
 
@@ -167,9 +180,13 @@ public class VehicleArrived extends WpadScreen {
                     super.finish();
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
     
@@ -232,9 +249,14 @@ public class VehicleArrived extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -247,9 +269,13 @@ public class VehicleArrived extends WpadScreen {
             SetData.closeDB();
             Log.d(TAG, "[playNotifySound] bPlay = " + bPlay);
             if (bPlay) Sound().PlayMent(WpadSound.SND.mode.CAR_ARRIVED);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] playNotifySound()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 138 - 44
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/EASYUI_MAIN.java

@@ -18,6 +18,7 @@ import com.artncore.commons.define;
 import com.artncore.wallpadapi.WallPadAPI;
 import java.util.Calendar;
 import java.util.List;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadmain.MainActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
@@ -146,9 +147,13 @@ public class EASYUI_MAIN extends WpadScreen {
             getWeatherInfo();
             updateWeather();
             displayNotificatoinIcon();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] EASYUI_MAIN(Context context, RelativeLayout layout, WallPadAPI wallpadapi , CallSubMenuScreen callAPK)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -181,14 +186,22 @@ public class EASYUI_MAIN extends WpadScreen {
             }
 
             String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-            Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
-            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                m_ElevatorDirectCall = true;
+            if(strElevShortEnabled!=null)
+            {
+                Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
+                if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+                    m_ElevatorDirectCall = true;
+                }
             }
 
-        }  catch (Exception e) {
+
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -213,9 +226,13 @@ public class EASYUI_MAIN extends WpadScreen {
             else {
                 Log.w(TAG, "[getWeatherInfo] Internet is not supported!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -225,9 +242,13 @@ public class EASYUI_MAIN extends WpadScreen {
             super.onClose();
             Log.i(TAG, "[onClose] ===== START =====");
 //            registorBRName_LivingEM(false);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -243,9 +264,13 @@ public class EASYUI_MAIN extends WpadScreen {
             else {
                 Log.i(TAG, "[onBrReceive] Not supported action [" + strAction + "]");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         super.onBrReceive(intent);
     }
@@ -326,9 +351,13 @@ public class EASYUI_MAIN extends WpadScreen {
                     return;
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -341,9 +370,13 @@ public class EASYUI_MAIN extends WpadScreen {
             String strReceiveScreen = data.getStringExtra(Common.BR_RECEIVE_SCREEN);
             String strPresetInfo = data.getStringExtra(Common.BR_LIVINGLIGHT_PRESET_INFO);
             Log.d(TAG, "[onPopupResult] strSenderScreen [" + strSenderScreen + "], strReceiveScreen [" + strReceiveScreen + "], strPresetInfo [" + strPresetInfo + "]") ;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -448,9 +481,13 @@ public class EASYUI_MAIN extends WpadScreen {
 //                case 40 : nImgResourceID = R.drawable.w_40; break;
 //                case 41 : nImgResourceID = R.drawable.w_41; break;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherImgResource(int nWeatherCode)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return nImgResourceID;
     }
@@ -465,9 +502,13 @@ public class EASYUI_MAIN extends WpadScreen {
             else {
                 Log.w(TAG, "[updateWeather] Internet is not supported!!");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] updateWeather()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -525,9 +566,13 @@ public class EASYUI_MAIN extends WpadScreen {
                 }
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayNotificatoinIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -542,9 +587,13 @@ public class EASYUI_MAIN extends WpadScreen {
             filter.addAction(Common.MAIN_SCREEN_NOW_UPDATE);
             filter.addAction(define.NOTIFY_ACNAME__LIVING_LIGHT_MODE);
             mContext.registerReceiver(MainScreenBroadcastReceiver, filter);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerEventAlarmBr()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -564,9 +613,13 @@ public class EASYUI_MAIN extends WpadScreen {
                 // 팝업 띄워서 외출모드 해제 유도
                 ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_RELEASEOUTMODE);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] checkSecurityMode()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -647,13 +700,21 @@ public class EASYUI_MAIN extends WpadScreen {
                         updateCalendarClock();
                         bAdminJoinPwRun = false;
                         nLongKeyCnt = 0;
-                    } catch (Exception e) {
-                        e.printStackTrace();
+                    } catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
+                    catch (Exception e) {
+                        //e.printStackTrace();            
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] MainScreenBroadcastReceiver()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -690,18 +751,26 @@ public class EASYUI_MAIN extends WpadScreen {
             Log.i(TAG, "[getCalendar] CALENDAR [" + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nHour)) + ":" + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nMin)) + "]");
 
             displayCalendar();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void updateCalendarClock() {
         try {
             getCalendar();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] updateCalendarClock()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -711,9 +780,13 @@ public class EASYUI_MAIN extends WpadScreen {
 
             TXT_CLOCK.setText(MainCal.nHour + ":" + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nMin)));
             TXT_CALENDAR.setText(MainCal.nYear + "." + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nMonth + 1)) + "." + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nDate)));
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -811,9 +884,14 @@ public class EASYUI_MAIN extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -834,9 +912,15 @@ public class EASYUI_MAIN extends WpadScreen {
             ShortcutTable.AddWidgetData(nShortcutCnt, nID);
             mWallpadStatusData.closeDB();
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            mWallpadStatusData.closeDB();
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] addShortcutDB(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             mWallpadStatusData.closeDB();
             return false;
         }
@@ -849,7 +933,13 @@ public class EASYUI_MAIN extends WpadScreen {
         public void run() {
             while (true) {
                 try {
-                    try {Thread.sleep(1000);}catch (Exception e){e.printStackTrace();}
+                    try {Thread.sleep(1000);}
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
+                    catch (Exception e){
+                        LogUtil.errorLogInfo("", TAG, e);
+                    }
                     TimerCount++;
 
                     if (TimerCount % 20 == 0) {
@@ -873,9 +963,13 @@ public class EASYUI_MAIN extends WpadScreen {
                         }
                     }
                     if (TimerCount > 100000) TimerCount = 0;
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) {
                     Log.e(TAG, "[Exception] MainScreenThread.run()");
-                    e.printStackTrace();
+                    //e.printStackTrace();            
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
             }
         }

+ 281 - 261
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/HYOSUNGUI_MAIN_HA.java

@@ -37,7 +37,7 @@ import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-
+import com.util.LogUtil;
 
 import static android.content.Intent.ACTION_TIME_TICK;
 
@@ -131,21 +131,21 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
             initScreen();
 
-            IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, WpadScale.getWidthPixels(), WpadScale.getHeightPixels(), R.drawable.back_main_01 , 0, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACKGROUND);
-            ViewRegistration(layout, IMG_BACKGROUND,0, 0);
-
-            IMG_BACK_LINE_1 = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).H, R.drawable.hyosungui_main_line_1 , 0, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1);
-            ViewRegistration(layout, IMG_BACK_LINE_1,getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).Y);
-
-            int nID = ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01;
-            for (int  i = 0; i < mNOTIFICATION.length; i++) {
-                mNOTIFICATION[i] = new NOTIFICATION();
-                mNOTIFICATION[i].BTN_NOTI = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(nID).W, getPosition(nID).H, 0, 0, nID);
-                ViewRegistration(layout, mNOTIFICATION[i].BTN_NOTI, getPosition(nID).X, getPosition(nID).Y);
-                mNOTIFICATION[i].BTN_NOTI.setTouchDelayMs(300);
-                mNOTIFICATION[i].BTN_NOTI.setVisibility(View.INVISIBLE);
-                nID++;
-            }
+//            IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, WpadScale.getWidthPixels(), WpadScale.getHeightPixels(), R.drawable.back_main_01 , 0, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACKGROUND);
+//            ViewRegistration(layout, IMG_BACKGROUND,0, 0);
+//
+//            IMG_BACK_LINE_1 = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).H, R.drawable.hyosungui_main_line_1 , 0, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1);
+//            ViewRegistration(layout, IMG_BACK_LINE_1,getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1).Y);
+//
+//            int nID = ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01;
+//            for (int  i = 0; i < mNOTIFICATION.length; i++) {
+//                mNOTIFICATION[i] = new NOTIFICATION();
+//                mNOTIFICATION[i].BTN_NOTI = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(nID).W, getPosition(nID).H, 0, 0, nID);
+//                ViewRegistration(layout, mNOTIFICATION[i].BTN_NOTI, getPosition(nID).X, getPosition(nID).Y);
+//                mNOTIFICATION[i].BTN_NOTI.setTouchDelayMs(300);
+//                mNOTIFICATION[i].BTN_NOTI.setVisibility(View.INVISIBLE);
+//                nID++;
+//            }
 
 
             registerMainIcon(layout);
@@ -163,7 +163,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 //            displayAnalogClock();
         } catch (Exception e) {
             Log.e(TAG, "[Exception] HYOSUNGUI_MAIN_HA(Context context, RelativeLayout layout, WallPadAPI wallpadapi , CallSubMenuScreen callAPK)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -173,17 +174,22 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             registerEventAlarmBr();
 
             String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-            Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
-            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                m_ElevatorDirectCall = true;
+            if(strElevShortEnabled!=null)
+            {
+                Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
+                if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+                    m_ElevatorDirectCall = true;
+                }
             }
 
+
 //            getWeatherInfo();
 
 //            registorBRName_LivingEM(true);
         }  catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -195,7 +201,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 //            registorBRName_LivingEM(false);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -210,7 +217,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         super.onBrReceive(intent);
     }
@@ -246,119 +254,124 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
                 nTouchUpPosY = 0;
 
                 nLongKeyCnt = 0;
-                if (ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_05) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    int nIndex = nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01;
-                    Log.v(TAG, "[onTouchEvent] nTargetID [" + nTargetID + "], nIndex [" + nIndex + "]");
-                    runNotiIconPressed(mNOTIFICATION[nIndex].eNotiType);
-                }
-                else if (ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_2) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    int nMenuID = mIconInfoTable.getIconInfoByIndex(nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1).getIconID();
-                    Log.d(TAG, "[onTouchEvent] BTNS.FUNCTION -> nMenuID [" + nMenuID + "]");
-                    if (nMenuID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID()) {
-                        // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
-                        String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-                        Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
-                        if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                            Sound().Play(SND.effect.TOUCH_LATCHED);
-                            Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
-                            intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
-                            getContext().sendBroadcast(intent);
-                        }
-                        else {
-                            ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
-                        }
-                    }
-                    else {
-                        ((MainActivity)mContext).runIcon(nMenuID);
-                    }
-                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1) {
+//                if (ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_05) {
 //                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SETTING_CALENDAR.getID());
+//                    int nIndex = nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01;
+//                    Log.v(TAG, "[onTouchEvent] nTargetID [" + nTargetID + "], nIndex [" + nIndex + "]");
+//                    runNotiIconPressed(mNOTIFICATION[nIndex].eNotiType);
 //                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_2) {
+//                else if (ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_2) {
 //                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
-//                    String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-//                    Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
-//                    if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-//                        Sound().Play(SND.effect.TOUCH_LATCHED);
-//                        Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
-//                        intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
-//                        getContext().sendBroadcast(intent);
+//                    int nMenuID = mIconInfoTable.getIconInfoByIndex(nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1).getIconID();
+//                    Log.d(TAG, "[onTouchEvent] BTNS.FUNCTION -> nMenuID [" + nMenuID + "]");
+//                    if (nMenuID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID()) {
+//                        // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
+//                        String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
+//                        if(strElevShortEnabled!=null)
+//                        {
+//                            Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
+//                            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+//                                Sound().Play(SND.effect.TOUCH_LATCHED);
+//                                Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
+//                                intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
+//                                getContext().sendBroadcast(intent);
+//                            }
+//                            else {
+//                                ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+//                            }
+//                        }
+//
 //                    }
 //                    else {
-//                        ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
-////                        ((MainActivity)(getContext())).StartPopup(ID_OLD.SCREENS.ElevatorPopupScreen);
+//                        ((MainActivity)mContext).runIcon(nMenuID);
 //                    }
 //                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_3) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.TALK_GUARD.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_4) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ENERGY_REMOTEMETER.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_1) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_WEATHER.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_2) {
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SETTING_CALENDAR.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_2) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
+////                    String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
+////                    Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
+////                    if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+////                        Sound().Play(SND.effect.TOUCH_LATCHED);
+////                        Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
+////                        intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
+////                        getContext().sendBroadcast(intent);
+////                    }
+////                    else {
+////                        ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+//////                        ((MainActivity)(getContext())).StartPopup(ID_OLD.SCREENS.ElevatorPopupScreen);
+////                    }
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_3) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.TALK_GUARD.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_4) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ENERGY_REMOTEMETER.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_1) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_WEATHER.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_2) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_HEATING.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_3) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SECURITY_SETARMED.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_4) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SETTING_CONFIG.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_1) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_LIGHT.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_2) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_GAS.getID());
+////                }
+////                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_3) {
+////                    Sound().Play(SND.effect.TOUCH_LATCHED);
+////                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_NOTICE.getID());
+////                }
+//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL) {
 //                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_HEATING.getID());
+//                    ((MainActivity)mContext).startManualPopup(ID.MANUAL.MANUAL_METROUI_MAIN);
 //                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_3) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SECURITY_SETARMED.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_4) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SETTING_CONFIG.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_1) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_LIGHT.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_2) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_GAS.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_3) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_NOTICE.getID());
-//                }
-                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    ((MainActivity)mContext).startManualPopup(ID.MANUAL.MANUAL_METROUI_MAIN);
-                }
             }
             else if (nEventID == MotionEvent.ACTION_POINTER_DOWN) {
-                if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1) {
-                    if (nPreviousTargetID == nTargetID) {
-                        if (((MainActivity)mContext).getMainSubScreenLoadingComplite() == false) return;
-                        nLongKeyCnt++;
-                        Log.d(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
-                        if (nLongKeyCnt > LONGKEY_THRESHOLD_ADMIN) {
-                            if (bAdminJoinPwRun == false) {
-                                bAdminJoinPwRun = true;
-                                ((MainActivity)mContext).StartPopup(ID_OLD.SCREENS.InputPwPopupScreen);
-                            }
-                        }
-                    }
-                    else {
-                        nPreviousTargetID = nTargetID;
-                        nLongKeyCnt = 0;
-                        Log.d(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
-                    }
-                    return;
-                }
+//                if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1) {
+//                    if (nPreviousTargetID == nTargetID) {
+//                        if (((MainActivity)mContext).getMainSubScreenLoadingComplite() == false) return;
+//                        nLongKeyCnt++;
+//                        Log.d(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+//                        if (nLongKeyCnt > LONGKEY_THRESHOLD_ADMIN) {
+//                            if (bAdminJoinPwRun == false) {
+//                                bAdminJoinPwRun = true;
+//                                ((MainActivity)mContext).StartPopup(ID_OLD.SCREENS.InputPwPopupScreen);
+//                            }
+//                        }
+//                    }
+//                    else {
+//                        nPreviousTargetID = nTargetID;
+//                        nLongKeyCnt = 0;
+//                        Log.d(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+//                    }
+//                    return;
+//                }
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -369,7 +382,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             Log.i(TAG, "[onPopupResult] ========== START ==========");
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -409,7 +423,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -418,7 +433,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             getCalendar();
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateCalendarClock()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -430,7 +446,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             TXT_CLOCK.setText(MainCal.nHour + ":" + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nMin)));
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -440,26 +457,12 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             return TXT_DayofWeek[MainCal.nWeekday - 1];
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDayofWeekValue(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return TXT_DayofWeek[0];
         }
     }
 
-
-    private void displayAnalogClock() {
-        try {
-            AnalogClock mAnalogClock = new AnalogClock(this.getContext());
-            mAnalogClock.setId(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.OBJECTS.ANALOGCLOCK);
-            RelativeLayout.LayoutParams Params = new RelativeLayout.LayoutParams(200, 200);
-            mAnalogClock.setLayoutParams(Params);
-            getLayout().addView(mAnalogClock);
-        } catch (Exception e) {
-            Log.e(TAG, "[Exception] displayAnalogClock()");
-            e.printStackTrace();
-        }
-    }
-
-
     private void getWeatherInfo() {
         try {
             WallpadStatusData mWallpadStatusData = new WallpadStatusData(this.getContext());
@@ -506,7 +509,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -530,7 +534,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateWeather()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -582,7 +587,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherImgResource(int nWeaherCode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return nImgResourceID;
     }
@@ -607,14 +613,14 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
                 IconInfoTable.IconInfo mIconInfo = mIconInfoTable.getIconInfoByIndex(i);
                 if (mIconInfo != null) {
                     if (mIconInfo.getIconID() == ID.ICONS.MENUS.MAIN_CALRENDAR.getID()) {
-                        BTN_FUNCTION[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i);
-                        ViewRegistration(layout, BTN_FUNCTION[i], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).Y);
-                        BTN_FUNCTION[i].setTouchDelayMs(500);
+//                        BTN_FUNCTION[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i);
+//                        ViewRegistration(layout, BTN_FUNCTION[i], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).Y);
+//                        BTN_FUNCTION[i].setTouchDelayMs(500);
                     }
                     else {
-                        BTN_FUNCTION[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i);
-                        ViewRegistration(layout, BTN_FUNCTION[i], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).Y);
-                        BTN_FUNCTION[i].setTouchDelayMs(500);
+//                        BTN_FUNCTION[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i);
+//                        ViewRegistration(layout, BTN_FUNCTION[i], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1 + i).Y);
+//                        BTN_FUNCTION[i].setTouchDelayMs(500);
                     }
                 }
                 else {
@@ -623,7 +629,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerMainIcon(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -699,7 +706,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayNotificatoinIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -728,52 +736,56 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runNotiIconPressed(NOTIFICATION.NOTI_TYPE eType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void registerCalendar() {
         try {
-            TXT_CALENDAR_DAYOFWEEK = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).H, Gravity.CENTER, Color.WHITE, nFontsize_CalendarDayofWeek, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK);
-            ViewRegistration(this.getLayout(), TXT_CALENDAR_DAYOFWEEK, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).Y);
-
-            TXT_CLOCK = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).H, Gravity.CENTER, Color.WHITE, nFontsize_Clock, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK);
-            ViewRegistration(this.getLayout(), TXT_CLOCK, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).Y);
+//            TXT_CALENDAR_DAYOFWEEK = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).H, Gravity.CENTER, Color.WHITE, nFontsize_CalendarDayofWeek, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK);
+//            ViewRegistration(this.getLayout(), TXT_CALENDAR_DAYOFWEEK, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).Y);
+//
+//            TXT_CLOCK = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).H, Gravity.CENTER, Color.WHITE, nFontsize_Clock, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK);
+//            ViewRegistration(this.getLayout(), TXT_CLOCK, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK).Y);
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void registerWeather() {
         try {
-            IMG_WEATHER = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).H, R.drawable.hyosungui_main_weather_01 , 0, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER);
-            ViewRegistration(this.getLayout(), IMG_WEATHER,getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).Y);
-
-            TXT_TEMPERATURE_CURRENT = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).H, Gravity.LEFT, Color.WHITE, nFontsize_TemperCurrent, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT);
-            ViewRegistration(this.getLayout(), TXT_TEMPERATURE_CURRENT, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).Y);
-
-            TXT_TEMPERATURE_LOWEST_HIGHEST = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).H, Gravity.LEFT, Color.WHITE, nFontsize_TemperLowestNHighest, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST);
-            ViewRegistration(this.getLayout(), TXT_TEMPERATURE_LOWEST_HIGHEST, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).Y);
+//            IMG_WEATHER = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).H, R.drawable.hyosungui_main_weather_01 , 0, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER);
+//            ViewRegistration(this.getLayout(), IMG_WEATHER,getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER).Y);
+//
+//            TXT_TEMPERATURE_CURRENT = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).H, Gravity.LEFT, Color.WHITE, nFontsize_TemperCurrent, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT);
+//            ViewRegistration(this.getLayout(), TXT_TEMPERATURE_CURRENT, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT).Y);
+//
+//            TXT_TEMPERATURE_LOWEST_HIGHEST = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).H, Gravity.LEFT, Color.WHITE, nFontsize_TemperLowestNHighest, false, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST);
+//            ViewRegistration(this.getLayout(), TXT_TEMPERATURE_LOWEST_HIGHEST, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST).Y);
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerWeather()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void registerNotificatoinIcon() {
         try {
 
-            BTN_MANUAL = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).H, R.drawable.metroui_btn_main_manual_normal, R.drawable.metroui_btn_main_manual_pressed, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL);
-            ViewRegistration(this.getLayout(), BTN_MANUAL, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).Y);
-            BTN_MANUAL.setVisibility(View.INVISIBLE);
+//            BTN_MANUAL = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).H, R.drawable.metroui_btn_main_manual_normal, R.drawable.metroui_btn_main_manual_pressed, ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL);
+//            ViewRegistration(this.getLayout(), BTN_MANUAL, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.MANUAL).Y);
+//            BTN_MANUAL.setVisibility(View.INVISIBLE);
 
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerNotificatoinIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -795,7 +807,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkSecurityMode()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -811,7 +824,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             mContext.registerReceiver(MainScreenBroadcastReceiver, filter);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerEventAlarmBr()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -895,12 +909,14 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
                         bAdminJoinPwRun = false;
                         nLongKeyCnt = 0;
                     } catch (Exception e) {
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] MainScreenBroadcastReceiver()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -912,92 +928,93 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         try {
             switch (nID) {
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACKGROUND:
-                    position.setPosition(0, 0, 1024, 600);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1:
-                    position.setPosition(67, 217, 294, 8);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER:
-                    position.setPosition(92, 250, 110, 100);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01:
-                    position.setPosition(0, 0, 72, 70);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_02:
-                    position.setPosition(72, 0, 72, 70);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_03:
-                    position.setPosition(144, 0, 72, 70);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_04:
-                    position.setPosition(216, 0, 72, 70);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_05:
-                    position.setPosition(288, 0, 72, 70);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1:
-                    position.setPosition(67, 67, 294, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_2:
-                    position.setPosition(518, 67, 290, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_3:
-                    position.setPosition(816, 67, 141, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_1:
-                    position.setPosition(67, 225, 294, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_2:
-                    position.setPosition(518, 225, 141, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_3:
-                    position.setPosition(667, 225, 290, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_1:
-                    position.setPosition(518, 383, 141, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_2:
-                    position.setPosition(667, 383, 290, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK:
-                    position.setPosition(67, 100, 294, 90);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK:
-                    position.setPosition(67, 90, 294, 25);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT:
-                    position.setPosition(213, 250, 120, 60);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST:
-                    position.setPosition(213, 310, 120, 30);
-                    return position;
-
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACKGROUND:
+//                    position.setPosition(0, 0, 1024, 600);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.BACK_LINE_1:
+//                    position.setPosition(67, 217, 294, 8);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.IMAGES.WEATHER:
+//                    position.setPosition(92, 250, 110, 100);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_01:
+//                    position.setPosition(0, 0, 72, 70);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_02:
+//                    position.setPosition(72, 0, 72, 70);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_03:
+//                    position.setPosition(144, 0, 72, 70);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_04:
+//                    position.setPosition(216, 0, 72, 70);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.NOTIFICATION_05:
+//                    position.setPosition(288, 0, 72, 70);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_1:
+//                    position.setPosition(67, 67, 294, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_2:
+//                    position.setPosition(518, 67, 290, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_1_3:
+//                    position.setPosition(816, 67, 141, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_1:
+//                    position.setPosition(67, 225, 294, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_2:
+//                    position.setPosition(518, 225, 141, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_2_3:
+//                    position.setPosition(667, 225, 290, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_1:
+//                    position.setPosition(518, 383, 141, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.BTNS.FUNCTION_3_2:
+//                    position.setPosition(667, 383, 290, 150);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CLOCK:
+//                    position.setPosition(67, 100, 294, 90);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK:
+//                    position.setPosition(67, 90, 294, 25);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_CURRENT:
+//                    position.setPosition(213, 250, 120, 60);
+//                    return position;
+//
+//                case ID.SCREENS.MAIN_HYOSUNGUI_HA.ELEMENTS.TEXTS.TEMPERATURE_LOWEST_HIGHEST:
+//                    position.setPosition(213, 310, 120, 30);
+//                    return position;
+//
                 default:
                     return position;
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -1011,7 +1028,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
             return bUsage;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkInterFloorNoiseFuncUsage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1030,7 +1048,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkInterFloorNoiseError()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1076,7 +1095,8 @@ public class HYOSUNGUI_MAIN_HA extends WpadScreen {
                     if (TimerCount > 100000) TimerCount = 0;
                 } catch (Exception e) {
                     Log.e(TAG, "Thread Exception : TimerCount : " + TimerCount);
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
 
             }

+ 515 - 208
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/HYOSUNGUI_MAIN_HN.java

@@ -3,6 +3,7 @@ package kr.co.icontrols.wallpadmain.screen;
 import java.util.Calendar;
 import java.util.List;
 
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.WallpadStatusData.WeatherItem;
 import com.artncore.WallPadDataMgr.WallpadStatusData.WeatherTable;
@@ -14,17 +15,21 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.graphics.Color;
+import android.os.Build;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
-import android.widget.AnalogClock;
 import android.widget.RelativeLayout;
+
+import kr.co.icontrols.v40ioctl.V40IOInterface;
+import kr.co.icontrols.v40ioctl.V40IOInterface2;
 import kr.co.icontrols.wallpadmain.MainActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
 import kr.co.icontrols.wallpadmain.declare.Common.BR_MAIN_LIVE_CHECKER;
 import kr.co.icontrols.wallpadmain.declare.DataClasses.IconInfoTable;
+import kr.co.icontrols.wallpadmain.declare.DataClasses.IconUnitInfo;
 import kr.co.icontrols.wallpadmain.declare.ID;
 import kr.co.icontrols.wallpadmain.declare.ID_OLD;
 import kr.co.icontrols.wallpadmain.menu.CallSubMenuScreen;
@@ -37,7 +42,7 @@ import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-
+import com.util.LogUtil;
 
 import static android.content.Intent.ACTION_TIME_TICK;
 
@@ -56,11 +61,18 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
     // 화면 매뉴얼 버튼
     WpadImageView BTN_MANUAL;
     // 달력, 시계, 날씨 등
+    WpadImageView BTN_CLOCK, BTN_WEATHER;
     WpadImageView IMG_WEATHER;
     WpadTextView TXT_CALENDAR_DAYOFWEEK,  TXT_CLOCK;
     WpadTextView TXT_TEMPERATURE_LOWEST_HIGHEST, TXT_TEMPERATURE_CURRENT;
-    int nFontsize_CalendarDayofWeek = 15, nFontsize_CalendarDate = 75, nFontsize_CalendarWeekDay = 30, nFontsize_Clock = 70, nFontsize_AMPM = 30;
-    int nFontsize_TemperLowestNHighest = 20, nFontsize_TemperCurrent = 50, nFontsize_RainfallProbability = 25, nFontsize_Weather = 25;
+    int nFontsize_CalendarDayofWeek = 15, nFontsize_Clock = 70;
+    int nFontsize_TemperLowestNHighest = 20, nFontsize_TemperCurrent = 50;
+
+    // 바로가기 아이콘
+    WpadImageView [] BTN_SHORTCUT_BUTTON = new WpadImageView[MainActivity.nShortcutMax_HS]; // 버튼
+    WpadImageView [] BTN_SHORTCUT_ICON = new WpadImageView[MainActivity.nShortcutMax_HS]; // 아이콘
+    WpadTextView [] TXT_SHORTCUT_NAME = new WpadTextView[MainActivity.nShortcutMax_HS]; // 명칭
+    int nNameFontSize = 17;
 
     // 이벤트 알림 아이콘
     static class NOTIFICATION {
@@ -147,23 +159,29 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                 nID++;
             }
 
-
-            registerMainIcon(layout);
+            registerShortcutIcon(layout); // 즐겨찾기 편집 가능하도록 수정
             registerCalendar();
             registerWeather();
-//            registerNotificatoinIcon();
 
             mMainScreenThread = new MainScreenThread();
             mMainScreenThread.start();
 
             getCalendar();
             getWeatherInfo();
-            displayNotificatoinIcon();
+            displayNotificationIcon();
+
+            // 시계, 날씨
+            BTN_CLOCK = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK).H, 0, 0, ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK);
+            ViewRegistration(layout, BTN_CLOCK, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK).Y);
+            BTN_CLOCK.setTouchDelayMs(500);
 
-//            displayAnalogClock();
+            BTN_WEATHER = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER).H, 0, 0, ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER);
+            ViewRegistration(layout, BTN_WEATHER, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER).Y);
+            BTN_WEATHER.setTouchDelayMs(500);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] HYOSUNGUI_MAIN_HN(Context context, RelativeLayout layout, WallPadAPI wallpadapi , CallSubMenuScreen callAPK)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -173,17 +191,22 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             registerEventAlarmBr();
 
             String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-            Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
-            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                m_ElevatorDirectCall = true;
+            if(strElevShortEnabled!=null)
+            {
+                Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
+                if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+                    m_ElevatorDirectCall = true;
+                }
             }
 
+
 //            getWeatherInfo();
 
 //            registorBRName_LivingEM(true);
         }  catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -195,7 +218,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 //            registorBRName_LivingEM(false);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -210,7 +234,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         super.onBrReceive(intent);
     }
@@ -224,7 +249,7 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             int nEventID = event.getAction();
             int nTargetID = v.getId();
 
-            Log.d(TAG, "[onTouchEvent] nEventID [" + nEventID + "], nTargetID [" + nTargetID + "]");
+//            Log.d(TAG, "[onTouchEvent] nEventID [" + nEventID + "], nTargetID [" + nTargetID + "]");
             if (nEventID == MotionEvent.ACTION_DOWN) {
                 nTouchDownPosX = (int) event.getX();
                 nTouchDownPosY = (int) event.getY();
@@ -233,7 +258,7 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                 nTouchUpPosX = (int) event.getX();
                 nTouchUpPosY = (int) event.getY();
                 if (Math.abs(nTouchDownPosX - nTouchUpPosX) > 50 || Math.abs(nTouchDownPosY - nTouchUpPosY) > 50) {
-                    Log.w(TAG, "[onTouchEvent] Ignor touch event! Touch point moved too much away.");
+                    Log.w(TAG, "[onTouchEvent] Ignore touch event! Touch point moved too much away.");
                     nTouchDownPosX = 0;
                     nTouchDownPosY = 0;
                     nTouchUpPosX = 0;
@@ -252,99 +277,52 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     Log.v(TAG, "[onTouchEvent] nTargetID [" + nTargetID + "], nIndex [" + nIndex + "]");
                     runNotiIconPressed(mNOTIFICATION[nIndex].eNotiType);
                 }
-                else if (ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_3) {
+                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER) {
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                    ((MainActivity) mContext).runIcon(ID.ICONS.MENUS.ADD_WEATHER.getID());
+                }
+                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK) {
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                    ((MainActivity) mContext).runIcon(ID.ICONS.MENUS.SETTING_CALENDAR.getID());
+                }
+                else if (ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_3_3) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
-                    int nMenuID = mIconInfoTable.getIconInfoByIndex(nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1).getIconID();
-                    Log.d(TAG, "[onTouchEvent] BTNS.FUNCTION -> nMenuID [" + nMenuID + "]");
+                    int nIndex = nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1;
+                    int nMenuID = MainActivity.HSScreenShortcutList.get(nIndex).widgetID;
+                    Log.v(TAG, "[onTouchEvent] nTargetID [" + nTargetID + "], nIndex [" + nIndex + "], nMenuID [" + nMenuID + "]");
                     if (nMenuID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID()) {
                         // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
-                        String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-                        Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
-                        if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                            Sound().Play(SND.effect.TOUCH_LATCHED);
-                            Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
-                            intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
-                            getContext().sendBroadcast(intent);
-                        }
-                        else {
-                            ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+                        String strElevShortEnabled = Common.getSubDevListItem(this.getContext(), Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
+                        if (strElevShortEnabled != null) {
+                            Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
+                            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+                                Sound().Play(SND.effect.TOUCH_LATCHED);
+                                Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
+                                intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
+                                getContext().sendBroadcast(intent);
+                            } else {
+                                ((MainActivity) (getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+                            }
                         }
-                    }
-                    else {
-                        ((MainActivity)mContext).runIcon(nMenuID);
+                    } else {
+                        ((MainActivity) mContext).runIcon(nMenuID);
                     }
                 }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SETTING_CALENDAR.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_2) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
-//                    String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-//                    Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
-//                    if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-//                        Sound().Play(SND.effect.TOUCH_LATCHED);
-//                        Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
-//                        intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
-//                        getContext().sendBroadcast(intent);
-//                    }
-//                    else {
-//                        ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
-////                        ((MainActivity)(getContext())).StartPopup(ID_OLD.SCREENS.ElevatorPopupScreen);
-//                    }
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_3) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.TALK_GUARD.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_4) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ENERGY_REMOTEMETER.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_1) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_WEATHER.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_2) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_HEATING.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_3) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SECURITY_SETARMED.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_4) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SETTING_CONFIG.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_1) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_LIGHT.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_2) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.CTRL_GAS.getID());
-//                }
-//                else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_3) {
-//                    Sound().Play(SND.effect.TOUCH_LATCHED);
-//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_NOTICE.getID());
-//                }
                 else if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.MANUAL) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
-                    ((MainActivity)mContext).startManualPopup(ID.MANUAL.MANUAL_METROUI_MAIN);
+                    ((MainActivity) mContext).startManualPopup(ID.MANUAL.MANUAL_METROUI_MAIN);
                 }
             }
             else if (nEventID == MotionEvent.ACTION_POINTER_DOWN) {
-                if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1) {
+                if (nTargetID == ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK) {
                     if (nPreviousTargetID == nTargetID) {
-                        if (((MainActivity)mContext).getMainSubScreenLoadingComplite() == false) return;
+                        if (((MainActivity) mContext).getMainSubScreenLoadingComplite() == false) return;
                         nLongKeyCnt++;
                         Log.d(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
                         if (nLongKeyCnt > LONGKEY_THRESHOLD_ADMIN) {
                             if (bAdminJoinPwRun == false) {
                                 bAdminJoinPwRun = true;
-                                ((MainActivity)mContext).StartPopup(ID_OLD.SCREENS.InputPwPopupScreen);
+                                ((MainActivity) mContext).StartPopup(ID_OLD.SCREENS.InputPwPopupScreen);
                             }
                         }
                     }
@@ -355,10 +333,28 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     }
                     return;
                 }
+                else if (ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_3_3) {
+                    if (nPreviousTargetID == nTargetID) {
+                        if (MainActivity.getPopupActivityRun()) return;
+                        else nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            deleteShortcut(nTargetID - ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1);
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -367,9 +363,16 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
         try {
             super.onPopupResult(data);
             Log.i(TAG, "[onPopupResult] ========== START ==========");
-        } catch (Exception e) {
+            String strSenderScreen = data.getStringExtra(Common.BR_SENDER_SCREEN);
+            String strReceiveScreen = data.getStringExtra(Common.BR_RECEIVE_SCREEN);
+            Log.d(TAG, "[onPopupResult] strSenderScreen [" + strSenderScreen + "], strReceiveScreen [" + strReceiveScreen + "]") ;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -409,7 +412,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -418,7 +422,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             getCalendar();
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateCalendarClock()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -430,7 +435,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             TXT_CLOCK.setText(MainCal.nHour + ":" + Common.ZeroPadding_Head(2, Integer.toString(MainCal.nMin)));
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -440,26 +446,12 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             return TXT_DayofWeek[MainCal.nWeekday - 1];
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDayofWeekValue(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return TXT_DayofWeek[0];
         }
     }
 
-
-    private void displayAnalogClock() {
-        try {
-            AnalogClock mAnalogClock = new AnalogClock(this.getContext());
-            mAnalogClock.setId(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.OBJECTS.ANALOGCLOCK);
-            RelativeLayout.LayoutParams Params = new RelativeLayout.LayoutParams(200, 200);
-            mAnalogClock.setLayoutParams(Params);
-            getLayout().addView(mAnalogClock);
-        } catch (Exception e) {
-            Log.e(TAG, "[Exception] displayAnalogClock()");
-            e.printStackTrace();
-        }
-    }
-
-
     private void getWeatherInfo() {
         try {
             WallpadStatusData mWallpadStatusData = new WallpadStatusData(this.getContext());
@@ -506,7 +498,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -530,7 +523,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateWeather()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -582,48 +576,143 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherImgResource(int nWeaherCode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return nImgResourceID;
     }
 
-    private void registerMainIcon(RelativeLayout layout) {
+    private void registerShortcutIcon(RelativeLayout layout) {
         try {
             mIconManager = new IconManager(mContext, mWallPadAPI);
             if (mIconManager == null) {
-                Log.w(TAG, "[registerMainIcon] mIconManager is null!!");
+                Log.w(TAG, "[registerShortcutIcon] mIconManager is null!!");
                 return;
             }
 
-            mIconInfoTable = mIconManager.getHyosungHNMainIcons();
+            mIconInfoTable = mIconManager.getAvailableIcons();
             if (mIconInfoTable == null) {
-                Log.w(TAG, "[registerMainIcon] mIconInfoTable is null!!");
+                Log.w(TAG, "[registerShortcutIcon] mIconInfoTable is null!!");
                 return;
             }
 
-            Log.i(TAG, "[registerMainIcon] mIconInfoTable.getCnt() [" + mIconInfoTable.getCnt() +"]");
-            for (int i = 0; i < mIconInfoTable.getCnt(); i++) {
-                Log.d(TAG, "[registerMainIcon] mIconInfoTable.getIconInfoByIndex(" + i + ").getIconID() : " + mIconInfoTable.getIconInfoByIndex(i).getIconID() + ", mIconInfoTable.getIconInfoByIndex(" + i + ").getIconName() : " + mIconInfoTable.getIconInfoByIndex(i).getIconName());
-                IconInfoTable.IconInfo mIconInfo = mIconInfoTable.getIconInfoByIndex(i);
-                if (mIconInfo != null) {
-                    if (mIconInfo.getIconID() == ID.ICONS.MENUS.MAIN_CALRENDAR.getID()) {
-                        BTN_FUNCTION[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i);
-                        ViewRegistration(layout, BTN_FUNCTION[i], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).Y);
-                        BTN_FUNCTION[i].setTouchDelayMs(500);
+            // DB 또는 파일에서 설정된 데이터를 읽어와서 갱신한다.
+            WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            MainActivity.HSScreenShortcutList = ShortcutTable.GetWidgetData();
+            mWallpadStatusData.closeDB();
+
+            MainActivity.nShortcutCnt_HS = MainActivity.HSScreenShortcutList.size();
+            Log.d(TAG, "[registerShortcutIcon] nShortcutCnt_HS [" + MainActivity.nShortcutCnt_HS + "]");
+
+            WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getContext());
+            int nElevUse = mWallpadDeviceSet.Get_Elevator_Info();
+            boolean bCtrlUse = mWallpadDeviceSet.Get_MainGUICtrlUse();
+            boolean bRemoteMeterUse = mWallpadDeviceSet.Get_RemoteMeter_Use();
+            mWallpadDeviceSet.closeDB();
+//                Log.d(TAG, "[registerShortcutIcon] nElevUse [" + nElevUse + "], bCtrlUse [" + bCtrlUse + "], bRemoteMeterUse [" + bRemoteMeterUse + "]");
+
+            int nDelCount = 0;
+            int index = 0;
+            for (int i = 0; i < MainActivity.nShortcutCnt_HS; i++) {
+                int nID = MainActivity.HSScreenShortcutList.get(i).widgetID;
+//                Log.d(TAG, "[registerShortcutIcon] widgetID[" + i + "] = " + nID);
+                if (nID == ID.ICONS.MENUS.MAIN_CALRENDAR.getID() || nID == ID.ICONS.MENUS.MAIN_WEATHER.getID()) {
+                    nDelCount++;
+                    procDeleteShortcutPopupResult(true, nID);
+                    continue;
+                }
+                if (nElevUse == WallpadDeviceSet.ELEVATOR_NONE) {
+                    if (nID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
                     }
-                    else {
-                        BTN_FUNCTION[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i);
-                        ViewRegistration(layout, BTN_FUNCTION[i], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1 + i).Y);
-                        BTN_FUNCTION[i].setTouchDelayMs(500);
+                }
+                if (!bCtrlUse) {
+                    if (ID.ICONS.MENUS.CTRL_LIGHT.getID() <= nID && nID <= ID.ICONS.MENUS.CTRL_SYSTEMAIRCON.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
                     }
                 }
+                if (!bRemoteMeterUse) {
+                    if (nID == ID.ICONS.MENUS.ENERGY_REMOTEMETER.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
+                    }
+                }
+
+                IconInfoTable.IconInfo mIconInfo = mIconInfoTable.getIconInfoByID(nID);
+                if (mIconInfo != null) {
+                    Log.d(TAG, "[registerShortcutIcon] getIconName[" + i + "] = " + mIconInfo.getIconName());
+                    if ((index <= MainActivity.nShortcutMax_HS - 3) && (index % 3 != 0))
+                        BTN_SHORTCUT_BUTTON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index).H, R.drawable.btn_small_normal, R.drawable.btn_small_pressed, ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index);
+                    else
+                        BTN_SHORTCUT_BUTTON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index).H, R.drawable.btn_big_normal, R.drawable.btn_big_pressed, ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index);
+                    ViewRegistration(layout, BTN_SHORTCUT_BUTTON[index], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1 + index).Y);
+                    BTN_SHORTCUT_BUTTON[index].setTouchDelayMs(500);
+
+                    BTN_SHORTCUT_ICON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_1 + index).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_1 + index).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_1 + index);
+                    ViewRegistration(layout, BTN_SHORTCUT_ICON[index], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_1 + index).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_1 + index).Y);
+
+                    TXT_SHORTCUT_NAME[index] = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_1 + index).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_1 + index).H, Gravity.LEFT, Color.parseColor("#b1b1b1"), nNameFontSize, false, ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_1 + index);
+                    ViewRegistration(layout, TXT_SHORTCUT_NAME[index], getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_1 + index).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_1 + index).Y);
+                    TXT_SHORTCUT_NAME[index].setText(mIconInfo.getIconName());
+
+                    index++;
+                } else {
+                    Log.w(TAG, "[registerShortcutIcon] mIconInfo is null!!!");
+                }
+            }
+
+            if (nDelCount > 0) {
+                Log.w(TAG, "[registerShortcutIcon] WallPad Reboot!!!!! === nDelCount [" + nDelCount + "]");
+                if (Build.VERSION.SDK_INT > 23) {
+                    V40IOInterface2 mV40IOInterface2 = new V40IOInterface2();
+                    mV40IOInterface2.setV40Reboot(5);
+                }
                 else {
-                    Log.w(TAG, "[registerMainIcon] mIconInfo is null!!");
+                    V40IOInterface mV40IOInterface = new V40IOInterface();
+                    mV40IOInterface.setV40Reboot(5);
                 }
             }
-        } catch (Exception e) {
-            Log.e(TAG, "[Exception] registerMainIcon(RelativeLayout layout)");
-            e.printStackTrace();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] registerShortcutIcon(RelativeLayout layout)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private void unRegisterWidgetIcon(RelativeLayout layout) {
+        try {
+            for (int i = 0; i < MainActivity.nShortcutMax_HS; i++) {
+                if (BTN_SHORTCUT_BUTTON[i] != null) {
+                    layout.removeView(BTN_SHORTCUT_BUTTON[i]);
+                    BTN_SHORTCUT_BUTTON[i] = null;
+                }
+
+                if (BTN_SHORTCUT_ICON[i] != null) {
+                    layout.removeView(BTN_SHORTCUT_ICON[i]);
+                    BTN_SHORTCUT_ICON[i] = null;
+                }
+
+                if (TXT_SHORTCUT_NAME[i] != null) {
+                    layout.removeView(TXT_SHORTCUT_NAME[i]);
+                    TXT_SHORTCUT_NAME[i] = null;
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] unRegisterWidgetIcon(RelativeLayout layout)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -631,10 +720,10 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
     boolean bEventNoti = false;
     boolean bSecurityMode = false;
     boolean bEmergencyStop = false;
-    private void displayNotificatoinIcon() {
+    private void displayNotificationIcon() {
         try {
             // 화면 매뉴얼 사용여부
-            if (((MainActivity)mContext).GetManualUse()) bManualUsage = true;
+            if (((MainActivity) mContext).GetManualUse()) bManualUsage = true;
             else bManualUsage = false;
 
             if (MainActivity.nMissedCallCnt > 0 || MainActivity.nVisitorPicCnt > 0 || MainActivity.nNoticeCnt > 0 || MainActivity.nParcelCnt > 0 || MainActivity.nPostCnt > 0 || MainActivity.nElecVehicleChangingCnt > 0) bEventNoti = true;
@@ -645,7 +734,7 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             int nSecurityMode = mWallpadStatusData.GetAlarmStatus();
             mWallpadStatusData.closeDB();
 
-            Log.w(TAG, "[displayNotificatoinIcon] nSecurityMode [" + nSecurityMode + "]");
+            Log.w(TAG, "[displayNotificationIcon] nSecurityMode [" + nSecurityMode + "]");
 
             // 방범설정 상태
             if (nSecurityMode == WallpadStatusData.GUARD_IN || nSecurityMode == WallpadStatusData.OUT_MODE) bSecurityMode = true;
@@ -659,7 +748,7 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                 mNOTIFICATION[i].BTN_NOTI.setVisibility(View.INVISIBLE);
             }
 
-            Log.w(TAG, "[displayNotificatoinIcon] bManualUsage [" + bManualUsage + "], bEventNoti [" + bEventNoti + "], bSecurityMode [" + bSecurityMode + "], bEmergencyStop [" + bEmergencyStop + "]");
+            Log.w(TAG, "[displayNotificationIcon] bManualUsage [" + bManualUsage + "], bEventNoti [" + bEventNoti + "], bSecurityMode [" + bSecurityMode + "], bEmergencyStop [" + bEmergencyStop + "]");
 
             int nNotiIndex = 0;
             if (!Common.getDeviceServeiceLoadComplite()) {
@@ -698,8 +787,9 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             }
 
         } catch (Exception e) {
-            Log.e(TAG, "[Exception] displayNotificatoinIcon()");
-            e.printStackTrace();
+            Log.e(TAG, "[Exception] displayNotificationIcon()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -708,19 +798,19 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             Log.v(TAG, "[runNotiIconPressed] eType [" + eType + "]");
 
             if (eType == NOTIFICATION.NOTI_TYPE.DEVICELOADING) {
-                ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_DEVICELOADING);
+                ((MainActivity) mContext).StartPopup(ID.POPUPS.POPUP_DEVICELOADING);
             }
             else if (eType == NOTIFICATION.NOTI_TYPE.MANUAL) {
-                ((MainActivity)mContext).startManualPopup(ID.MANUAL.MANUAL_HYOSUNGUI_MAIN_HN);
+                ((MainActivity) mContext).startManualPopup(ID.MANUAL.MANUAL_HYOSUNGUI_MAIN_HN);
             }
             else if (eType == NOTIFICATION.NOTI_TYPE.EVENT) {
-                ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_EVENTNOTIFICATION);
+                ((MainActivity) mContext).StartPopup(ID.POPUPS.POPUP_EVENTNOTIFICATION);
             }
             else if (eType == NOTIFICATION.NOTI_TYPE.SECURITYMODE) {
                 checkSecurityMode();
             }
             else if (eType == NOTIFICATION.NOTI_TYPE.EMERGENCYSTOP) {
-                ((MainActivity)mContext).runSecurityAPK(ID.LINKEDSCREEN.SubMenuSecurity.SecurityMain);
+                ((MainActivity) mContext).runSecurityAPK(ID.LINKEDSCREEN.SubMenuSecurity.SecurityMain);
             }
             else {
                 Log.w(TAG, "[runNotiIconPressed] Not supported notification type -> eType [" + eType + "]");
@@ -728,7 +818,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runNotiIconPressed(NOTIFICATION.NOTI_TYPE eType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -742,7 +833,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -759,21 +851,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerWeather()");
-            e.printStackTrace();
-        }
-    }
-
-    public void registerNotificatoinIcon() {
-        try {
-
-            BTN_MANUAL = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.MANUAL).W, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.MANUAL).H, R.drawable.metroui_btn_main_manual_normal, R.drawable.metroui_btn_main_manual_pressed, ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.MANUAL);
-            ViewRegistration(this.getLayout(), BTN_MANUAL, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.MANUAL).X, getPosition(ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.MANUAL).Y);
-            BTN_MANUAL.setVisibility(View.INVISIBLE);
-
-
-        } catch (Exception e) {
-            Log.e(TAG, "[Exception] registerNotificatoinIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -787,20 +866,19 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
             if (nSecurityMode == WallpadStatusData.GUARD_IN) {
                 // 팝업 띄워서 재택모드 해제 유도
-                ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_RELEASEINMODE);
+                ((MainActivity) mContext).StartPopup(ID.POPUPS.POPUP_RELEASEINMODE);
             }
             else if (nSecurityMode == WallpadStatusData.OUT_MODE) {
                 // 팝업 띄워서 외출모드 해제 유도
-                ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_RELEASEOUTMODE);
+                ((MainActivity) mContext).StartPopup(ID.POPUPS.POPUP_RELEASEOUTMODE);
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkSecurityMode()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
-
-
     private void registerEventAlarmBr() {
         try {
             IntentFilter filter = new IntentFilter();
@@ -811,7 +889,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             mContext.registerReceiver(MainScreenBroadcastReceiver, filter);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerEventAlarmBr()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -835,11 +914,11 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     Log.d(TAG,"[MainScreenBroadcastReceiver]  nKind [" + nKind + "]");
                     if (nKind ==  Common.BR_MAIN_NOTI.UI_UPDATE_PARCEL) {
                         Log.d(TAG, "[MainScreenBroadcastReceiver] (BR.nKind) UI_UPDATE_PARCEL");
-                        displayNotificatoinIcon();
+                        displayNotificationIcon();
                     }
                     else if (nKind == Common.BR_MAIN_NOTI.UI_UPDATE_POST) {
                         Log.d(TAG, "[MainScreenBroadcastReceiver] (BR.nKind) UI_UPDATE_POST");
-                        displayNotificatoinIcon();
+                        displayNotificationIcon();
                     }
                 }
                 else if (strActionName.equals(define.NOTIFY_ACNAME)) {
@@ -848,8 +927,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     Log.d(TAG,"[MainScreenBroadcastReceiver]  nKind [" + nKind + "]");
                     if (nKind == define.NOTIFY_UPDATENOTICE) {
                         Log.d(TAG, "[MainScreenBroadcastReceiver] (BR.nKind) NOTIFY_UPDATENOTICE");
-                        ((MainActivity)mContext).checkEventNotifications();
-                        displayNotificatoinIcon();
+                        ((MainActivity) mContext).checkEventNotifications();
+                        displayNotificationIcon();
                     }
                     else if (nKind == define.NOTIFY_UPDATEWEATHER) {
                         Log.d(TAG, "[MainScreenBroadcastReceiver] (BR.nKind) NOTIFY_UPDATEWEATHER");
@@ -873,15 +952,15 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 //                        }
                         Log.d(TAG,"[MainScreenBroadcastReceiver] nMissedCallCnt [" + MainActivity.nMissedCallCnt + "], nVisitorPicCnt [" + MainActivity.nVisitorPicCnt + "], nNoticeCnt [" + MainActivity.nNoticeCnt + "]");
                         Log.d(TAG,"[MainScreenBroadcastReceiver] nParcelCnt [" + MainActivity.nParcelCnt + "], nPostCnt [" + MainActivity.nPostCnt + "], nElecVehicleChangingCnt [" + MainActivity.nElecVehicleChangingCnt + "]");
-                        displayNotificatoinIcon();
+                        displayNotificationIcon();
                     }
                     else if (nKind == define.NOTIFY_DEVICE_INIT_COMPLETION) {
                         Log.d(TAG, "[MainScreenBroadcastReceiver] (BR.nKind) NOTIFY_DEVICE_INIT_COMPLETION");
                         Common.setDeviceServeiceLoadComplite();
-                        displayNotificatoinIcon();
+                        displayNotificationIcon();
                     }
                     else if (nKind == define.NOTIFY_INTERLAYTER_SENSOR_STATUS_CHANGE) {
-                        if (checkInterFloorNoiseFuncUsage()) displayNotificatoinIcon();
+                        if (checkInterFloorNoiseFuncUsage()) displayNotificationIcon();
                     }
                 }
                 else if (strActionName.equals(Common.MAIN_SCREEN_NOW_UPDATE)) {
@@ -889,24 +968,26 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     // 메인화면 업데이트 요청시
                     try {
                         if (IMG_BACKGROUND != null) IMG_BACKGROUND.setImageResource(R.drawable.back_main_01);
-                        ((MainActivity)mContext).checkEventNotifications();
-                        displayNotificatoinIcon();
+                        ((MainActivity) mContext).checkEventNotifications();
+                        displayNotificationIcon();
                         updateCalendarClock();
                         bAdminJoinPwRun = false;
                         nLongKeyCnt = 0;
                     } catch (Exception e) {
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] MainScreenBroadcastReceiver()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
 
     private POSITION getPosition(int nID) {
-        Log.i(TAG, "[getPosition] nID = " + nID);
+//        Log.i(TAG, "[getPosition] nID = " + nID);
         POSITION position = new POSITION();
         position.setPosition(0, 0, 1024, 600);
 
@@ -924,6 +1005,14 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     position.setPosition(92, 250, 110, 100);
                     return position;
 
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.CLOCK:
+                    position.setPosition(67, 67, 294, 150);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.WEATHER:
+                    position.setPosition(67, 225, 294, 150);
+                    return position;
+
                 case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.NOTIFICATION_01:
                     position.setPosition(0, 0, 72, 70);
                     return position;
@@ -944,50 +1033,114 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                     position.setPosition(288, 0, 72, 70);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_1:
-                    position.setPosition(67, 67, 294, 150);
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_1:
+                    position.setPosition(474, 91, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_2:
+                    position.setPosition(698, 91, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_1_3:
+                    position.setPosition(847, 91, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_2_1:
+                    position.setPosition(474, 249, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_2_2:
+                    position.setPosition(698, 249, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_2_3:
+                    position.setPosition(847, 249, 80, 80);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_2:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_3_1:
+                    position.setPosition(176, 407, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_3_2:
+                    position.setPosition(474, 407, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_ICON_3_3:
+                    position.setPosition(772, 407, 80, 80);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_1:
                     position.setPosition(369, 67, 290, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_3:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_2:
                     position.setPosition(667, 67, 141, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_1_4:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_1_3:
                     position.setPosition(816, 67, 141, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_1:
-                    position.setPosition(67, 225, 294, 150);
-                    return position;
-
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_2:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_2_1:
                     position.setPosition(369, 225, 290, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_3:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_2_2:
                     position.setPosition(667, 225, 141, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_2_4:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_2_3:
                     position.setPosition(816, 225, 141, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_1:
-                    position.setPosition(67, 383, 294, 150);
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_3_1:
+                    position.setPosition(71, 383, 290, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_2:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_3_2:
                     position.setPosition(369, 383, 290, 150);
                     return position;
 
-                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.FUNCTION_3_3:
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.BTNS.SHORTCUT_BUTTON_3_3:
                     position.setPosition(667, 383, 290, 150);
                     return position;
 
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_1:
+                    position.setPosition(384, 185, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_2:
+                    position.setPosition(682, 185, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_1_3:
+                    position.setPosition(831, 185, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_2_1:
+                    position.setPosition(384, 343, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_2_2:
+                    position.setPosition(682, 343, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_2_3:
+                    position.setPosition(831, 343, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_3_1:
+                    position.setPosition(86, 501, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_3_2:
+                    position.setPosition(384, 501, 111, 20);
+                    return position;
+
+                case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.SHORTCUT_3_3:
+                    position.setPosition(682, 501, 111, 20);
+                    return position;
+
                 case ID.SCREENS.MAIN_HYOSUNGUI_HN.ELEMENTS.TEXTS.CLOCK:
                     position.setPosition(67, 100, 294, 90);
                     return position;
@@ -1009,7 +1162,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             }
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -1023,7 +1177,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             return bUsage;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkInterFloorNoiseFuncUsage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1042,7 +1197,8 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
 
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkInterFloorNoiseError()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1082,25 +1238,176 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                         }
                     }
 
-                    // 테스트 시험 코드임...
-                    //testPopupCode();
-
                     if (TimerCount > 100000) TimerCount = 0;
                 } catch (Exception e) {
                     Log.e(TAG, "Thread Exception : TimerCount : " + TimerCount);
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
+
+            }
+        }
+    }
+
+
+    ////////////////////////////////////////////////////////////////////////////
+    /////////////////////////// 메인화면 즐겨찾기 편집 //////////////////////////
+    ///////////////////////////////////////////////////////////////////////////
+    private void deleteShortcut(int nIndex) {
+        try {
+            Log.i(TAG, "[deleteShortcut] nIndex = " + nIndex);
+            if (MainActivity.HSScreenShortcutList.size() >= nIndex) {
+                Intent mIntent = new Intent();
+                mIntent.putExtra(Common.WIDGET_SELECTED_ID, MainActivity.HSScreenShortcutList.get(nIndex).widgetID);
+                ((MainActivity) mContext).StartPopup(ID_OLD.SCREENS.DeleteWidgetPopupScreen, mIntent);
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] deleteShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void procDeleteShortcutPopupResult(boolean bDelete, int nShortcutID) {
+        try {
+            Log.d(TAG, "[procDeleteShortcutPopupResult] bDelete : " + bDelete + ", nShortcutID : " + nShortcutID);
+            if (bDelete == true && MainActivity.HSScreenShortcutList != null) {
+                for (int i = 0; i < MainActivity.HSScreenShortcutList.size(); i++) {
+//                    Log.d(TAG, "[procDeleteShortcutPopupResult] MainActivity.HSScreenShortcutList.get(" + i + ").widgetID = " + MainActivity.HSScreenShortcutList.get(i).widgetID);
+                    if (MainActivity.HSScreenShortcutList.get(i).widgetID == nShortcutID) {
+                        if (deleteShortcutDB(nShortcutID)) {
+                            unRegisterWidgetIcon(getLayout());
+                            reOrderingShortcut();
+                            registerShortcutIcon(getLayout());
+                        }
+                        else {
+                            Log.w(TAG, "[procDeleteShortcutPopupResult] deleteShortcutDB = false!!");
+                        }
+                    }
                 }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] procDeleteShortcutPopupResult(boolean bDelete, int nShortcutID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void procAddShortcutPopupResult(boolean bAdd, int nShortcutID) {
+        try {
+            Log.d(TAG, "[procAddShortcutPopupResult] bAdd : " + bAdd + ", nShortcutID : " + nShortcutID);
+            if (bAdd) {
+                if (addShortcutDB(nShortcutID)) {
+                    unRegisterWidgetIcon(getLayout());
+                    reOrderingShortcut();
+                    registerShortcutIcon(getLayout());
+                }
+                else {
+                    Log.w(TAG, "[procAddShortcutPopupResult] addShortcutDB = false!!");
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] procAddShortcutPopupResult(boolean bAdd, int nShortcutID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    List<WallpadStatusData.WidgetItem> AddShortcutList;
 
+    private boolean addShortcutDB(int nID) {
+        Log.d(TAG, "[addShortcutDB] nID [" + nID + "]");
+        WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+        try {
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            AddShortcutList = ShortcutTable.GetWidgetData();
+            int nShortcutCnt = AddShortcutList.size();
+            Log.i(TAG, "[addShortcutDB] nShortcutCnt [" + nShortcutCnt + "]");
+
+            if (nShortcutCnt >= MainActivity.nShortcutMax_HS) {
+                mWallpadStatusData.closeDB();
+                return false;
             }
+            ShortcutTable.AddWidgetData(nShortcutCnt, nID);
+            mWallpadStatusData.closeDB();
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            mWallpadStatusData.closeDB();
+            return false;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcutDB(int nID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            mWallpadStatusData.closeDB();
+            return false;
         }
+    }
 
+    private boolean deleteShortcutDB(int nID) {
+        try {
+            Log.d(TAG, "[deleteShortcutDB] nID [" + nID + "]");
+            WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            ShortcutTable.DeleteWidgetDataID(nID);
+            mWallpadStatusData.closeDB();
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] deleteShortcutDB(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
     }
 
+    private void reOrderingShortcut() {
+        Log.d(TAG,"[reOrderingShortcut] ========== START ==========");
+        WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+        try {
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            List<WallpadStatusData.WidgetItem> DBShortcutList  = ShortcutTable.GetWidgetData();
+//            Log.d(TAG, "[reOrderingShortcut] DBShortcutList.size = " + DBShortcutList.size());
 
+            IconUnitInfo[] mIconUnitInfo = new IconUnitInfo[DBShortcutList.size()];
 
+            for (int i = 0; i < DBShortcutList.size(); i++) {
+                Log.v(TAG, "[reOrderingShortcut] widgetID [" + i + "] = " + DBShortcutList.get(i).widgetID);
+                mIconUnitInfo[i] = new IconUnitInfo(DBShortcutList.get(i).widgetID, "none", 0, 0, 0, 0, 0);
+            }
 
+            for (int i = 0; i <= DBShortcutList.size(); i++) {
+                ShortcutTable.DeleteWidgetData(i);
+            }
 
+            for (int i = 0; i < mIconUnitInfo.length; i++) {
+                ShortcutTable.AddWidgetData(i, mIconUnitInfo[i].getIconID());
+            }
 
+//            Log.d(TAG, "[reOrderingShortcut] ShortcutTable.GetWidgetData().size() = " + ShortcutTable.GetWidgetData().size());
+//            for (int i = 0; i < DBShortcutList.size(); i++) { // debugging
+//                Log.e(TAG, "[reOrderingShortcut] ShortcutTable.GetWidgetData(" + i + ").widgetID = " + ShortcutTable.GetWidgetData().get(i).widgetID);
+//            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] reOrderingShortcut()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+        mWallpadStatusData.closeDB();
+    }
 
 
 }

File diff suppressed because it is too large
+ 407 - 147
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/MAIN.java


+ 617 - 109
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_MAIN.java

@@ -3,6 +3,7 @@ package kr.co.icontrols.wallpadmain.screen;
 import java.util.Calendar;
 import java.util.List;
 import com.artncore.WallPadDataMgr.WallpadCallHistoryData;
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.WallpadStatusData.WeatherItem;
 import com.artncore.WallPadDataMgr.WallpadStatusData.WeatherTable;
@@ -16,19 +17,28 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.graphics.Color;
+import android.graphics.PorterDuff;
+import android.os.Build;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.AnalogClock;
 import android.widget.RelativeLayout;
+import com.util.LogUtil;
+
+import kr.co.icontrols.v40ioctl.V40IOInterface;
+import kr.co.icontrols.v40ioctl.V40IOInterface2;
 import kr.co.icontrols.wallpadmain.MainActivity;
 import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
 import kr.co.icontrols.wallpadmain.declare.Common.BR_MAIN_LIVE_CHECKER;
 import kr.co.icontrols.wallpadmain.declare.ID;
 import kr.co.icontrols.wallpadmain.declare.ID_OLD;
+import kr.co.icontrols.wallpadmain.declare.DataClasses.IconInfoTable;
+import kr.co.icontrols.wallpadmain.declare.DataClasses.IconUnitInfo;
 import kr.co.icontrols.wallpadmain.menu.CallSubMenuScreen;
+import kr.co.icontrols.wallpadmain.util.IconManager;
 import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.WpadImageView;
@@ -53,6 +63,15 @@ public class METROUI_MAIN extends WpadScreen {
     WpadImageView IMG_NEW_NOTIFICATION;
     // 메뉴버튼
     WpadImageView BTN_CALENDAR, BTN_CLOCK, BTN_WEATHER, BTN_TALK_GUARD, BTN_SECURITY_MAIN, BTN_ELEVATOR, BTN_ICONS_SMALL, BTN_ICONS_BIG;
+
+    WpadImageView [] BTN_SHORTCUT_BUTTON = new WpadImageView[MainActivity.nShortcutMax_Metro]; // 버튼
+    WpadImageView [] BTN_SHORTCUT_ICON = new WpadImageView[MainActivity.nShortcutMax_Metro]; // 아이콘
+    WpadTextView [] TXT_SHORTCUT_NAME = new WpadTextView[MainActivity.nShortcutMax_Metro]; // 명칭
+    int[] mBackGroundN = {R.drawable.btn_purple_normal, R.drawable.btn_skyblue_normal, R.drawable.btn_red_normal};
+    int[] mBackGroundP = {R.drawable.btn_purple_pressed, R.drawable.btn_skyblue_pressed, R.drawable.btn_red_pressed};
+    int[] mBackGroundN_1280 = {R.drawable.btn_purple_normal__1280, R.drawable.btn_skyblue_normal_1280, R.drawable.btn_red_normal_1280};
+    int[] mBackGroundP_1280 = {R.drawable.btn_purple_pressed_1280, R.drawable.btn_skyblue_pressed_1280, R.drawable.btn_red_pressed_1280};
+
     // 화면 매뉴얼 버튼
     WpadImageView BTN_MANUAL;
     // 유동 이벤트 알림 아이콘
@@ -76,7 +95,7 @@ public class METROUI_MAIN extends WpadScreen {
     WpadTextView TXT_CALENDAR_YEAR_MONTH, TXT_CALEDAR_DATE, TXT_DAYOFWEEK, TXT_CLOCK, TXT_AMPM;
     WpadTextView TXT_TEMPERATURE_LOWEST_HIGHEST, TXT_TEMPERATURE_CURRENT, TXT_RAINFALL_AM, TXT_RAINFALL_PM, TXT_WEATHER_CURRENT;
     int nFontsize_CalendarYearMonth = 30, nFontsize_CalendarDate = 75, nFontsize_CalendarWeekDay = 30, nFontsize_Clock = 75, nFontsize_AMPM = 30;
-    int nFontsize_TemperLowestNHighest = 30, nFontsize_TemperCurrent = 75, nFontsize_RainfallProbability = 25, nFontsize_Weather = 25;
+    int nFontsize_TemperLowestNHighest = 30, nFontsize_TemperCurrent = 75, nFontsize_RainfallProbability = 25, nFontsize_Weather = 25, nFontsize_Info = 30;
 
     // 메뉴 리스트 처리 및 서브 스크린 호출
     private CallSubMenuScreen m_CallAPK = null;
@@ -133,6 +152,9 @@ public class METROUI_MAIN extends WpadScreen {
 
     private boolean m_ElevatorDirectCall = false;
 
+    IconManager mIconManager;
+    IconInfoTable mIconInfoTable;
+
     public METROUI_MAIN(Context context, RelativeLayout layout, WallPadAPI wallpadapi , CallSubMenuScreen callAPK) {
         super(context, layout);
         try {
@@ -159,18 +181,6 @@ public class METROUI_MAIN extends WpadScreen {
                 ViewRegistration(layout, BTN_WEATHER, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.WEATHER).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.WEATHER).Y);
                 BTN_WEATHER.setTouchDelayMs(300);
 
-                BTN_TALK_GUARD = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).H, R.drawable.metroui_btn_main_talk_guard_normal_1280, R.drawable.metroui_btn_main_talk_guard_pressed_1280, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD);
-                ViewRegistration(layout, BTN_TALK_GUARD, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).Y);
-                BTN_TALK_GUARD.setTouchDelayMs(300);
-
-                BTN_SECURITY_MAIN = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).H, R.drawable.metroui_btn_main_security_main_normal_1280, R.drawable.metroui_btn_main_security_main_pressed_1280, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN);
-                ViewRegistration(layout, BTN_SECURITY_MAIN, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).Y);
-                BTN_SECURITY_MAIN.setTouchDelayMs(300);
-
-                BTN_ELEVATOR = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).H, R.drawable.metroui_btn_main_elev_normal_1280, R.drawable.metroui_btn_main_elev_pressed_1280, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR);
-                ViewRegistration(layout, BTN_ELEVATOR, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).Y);
-                BTN_ELEVATOR.setTouchDelayMs(300);
-
                 IMG_BACK_EVENT_NOTIFICATION = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).H, R.drawable.metroui_main_event_back_1280, 0, ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT);
                 ViewRegistration(this.getLayout(), IMG_BACK_EVENT_NOTIFICATION,getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).Y);
 
@@ -199,18 +209,6 @@ public class METROUI_MAIN extends WpadScreen {
                 ViewRegistration(layout, BTN_WEATHER, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.WEATHER).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.WEATHER).Y);
                 BTN_WEATHER.setTouchDelayMs(300);
 
-                BTN_TALK_GUARD = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).H, R.drawable.metroui_btn_main_talk_guard_normal, R.drawable.metroui_btn_main_talk_guard_pressed, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD);
-                ViewRegistration(layout, BTN_TALK_GUARD, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD).Y);
-                BTN_TALK_GUARD.setTouchDelayMs(300);
-
-                BTN_SECURITY_MAIN = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).H, R.drawable.metroui_btn_main_security_main_normal, R.drawable.metroui_btn_main_security_main_pressed, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN);
-                ViewRegistration(layout, BTN_SECURITY_MAIN, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN).Y);
-                BTN_SECURITY_MAIN.setTouchDelayMs(300);
-
-                BTN_ELEVATOR = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).H, R.drawable.metroui_btn_main_elev_normal, R.drawable.metroui_btn_main_elev_pressed, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR);
-                ViewRegistration(layout, BTN_ELEVATOR, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR).Y);
-                BTN_ELEVATOR.setTouchDelayMs(300);
-
                 IMG_BACK_EVENT_NOTIFICATION = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).H, R.drawable.metroui_main_event_back, 0, ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT);
                 ViewRegistration(this.getLayout(), IMG_BACK_EVENT_NOTIFICATION,getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.BACK_EVENT).Y);
 
@@ -224,6 +222,7 @@ public class METROUI_MAIN extends WpadScreen {
                 BTN_ICONS_BIG.setTouchDelayMs(300);
             }
 
+            registerShortcutIcon(layout); // 즐겨찾기 편집 가능하도록 수정
             registerCalendar();
             registerWeather();
             registerNotificatoinIcon();
@@ -237,9 +236,13 @@ public class METROUI_MAIN extends WpadScreen {
             displayNotificatoinIcon();
 
 //            displayAnalogClock();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] METROUI_MAIN(Context context, RelativeLayout layout, WallPadAPI wallpadapi , CallSubMenuScreen callAPK)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -248,12 +251,19 @@ public class METROUI_MAIN extends WpadScreen {
             Log.d(TAG, "[initScreen] ========== START ==========");
             registerEventAlarmBr();
 
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nFontsize_Info = 30;
+            else nFontsize_Info = 22;
+
             String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-            Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
-            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                m_ElevatorDirectCall = true;
+            if(strElevShortEnabled!=null)
+            {
+                Log.d(TAG, "[initScreen] strElevShortEnabled [" + strElevShortEnabled + "]");
+                if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+                    m_ElevatorDirectCall = true;
+                }
             }
 
+
 //            getWeatherInfo();
 
             mEMData = new EMData();
@@ -282,9 +292,13 @@ public class METROUI_MAIN extends WpadScreen {
             }
 
 //            registorBRName_LivingEM(true);
-        }  catch (Exception e) {
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -295,9 +309,13 @@ public class METROUI_MAIN extends WpadScreen {
             Log.i(TAG, "[onClose] ===== START =====");
             unregisterEventAlarmBr();
 //            registorBRName_LivingEM(false);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -310,9 +328,13 @@ public class METROUI_MAIN extends WpadScreen {
                 Log.d(TAG, "[onBrReceive] (BR) ACTION_TIME_TICK");
                 updateCalendarClock();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         super.onBrReceive(intent);
     }
@@ -366,29 +388,56 @@ public class METROUI_MAIN extends WpadScreen {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.ADD_WEATHER.getID());
                 }
-                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD) {
+                else if (ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_03) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
-                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.TALK_GUARD.getID());
-                }
-                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SECURITY_SETARMED.getID());
-                }
-                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR) {
-                    Sound().Play(SND.effect.TOUCH_LATCHED);
-                    // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
-                    String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
-                    Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
-                    if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
-                        Sound().Play(SND.effect.TOUCH_LATCHED);
-                        Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
-                        intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
-                        getContext().sendBroadcast(intent);
-                    }
-                    else {
-                        ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+                    int nIndex = nTargetID - ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01;
+                    int nMenuID = MainActivity.MetroScreenShortcutList.get(nIndex).widgetID;
+                    Log.v(TAG, "[onTouchEvent] nTargetID [" + nTargetID + "], nIndex [" + nIndex + "], nMenuID [" + nMenuID + "]");
+                    if (nMenuID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID()) {
+                        // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
+                        String strElevShortEnabled = Common.getSubDevListItem(this.getContext(), Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
+                        if (strElevShortEnabled != null) {
+                            Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
+                            if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+                                Sound().Play(SND.effect.TOUCH_LATCHED);
+                                Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
+                                intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
+                                getContext().sendBroadcast(intent);
+                            } else {
+                                ((MainActivity) (getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+                            }
+                        }
+                    } else {
+                        ((MainActivity) mContext).runIcon(nMenuID);
                     }
                 }
+//                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD) {
+//                    Sound().Play(SND.effect.TOUCH_LATCHED);
+//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.TALK_GUARD.getID());
+//                }
+//                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN) {
+//                    Sound().Play(SND.effect.TOUCH_LATCHED);
+//                    ((MainActivity)mContext).runIcon(ID.ICONS.MENUS.SECURITY_SETARMED.getID());
+//                }
+//                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR) {
+//                    Sound().Play(SND.effect.TOUCH_LATCHED);
+//                    // DB를 체크해서 층표시이면 팝업을 띄우고 아니면 바로 호출하도록 한다
+//                    String  strElevShortEnabled = Common.getSubDevListItem(this.getContext() ,Common.SETTING_ITEM_SUB_DEVICE_ELEVATOR);
+//                    if(strElevShortEnabled!=null)
+//                    {
+//                        Log.d(TAG, "[onTouchEvent] strElevShortEnabled [" + strElevShortEnabled + "]");
+//                        if (strElevShortEnabled.contains("사용함") && strElevShortEnabled.contains("기본")) {
+//                            Sound().Play(SND.effect.TOUCH_LATCHED);
+//                            Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
+//                            intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.CALL_ELEVATOR_DOWN);
+//                            getContext().sendBroadcast(intent);
+//                        }
+//                        else {
+//                            ((MainActivity)(getContext())).StartPopup(ID.POPUPS.POPUP_ELEVATORCALL);
+//                        }
+//                    }
+//
+//                }
                 else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ICONS_SMALL || nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ICONS_BIG) {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     ((MainActivity)mContext).moveNextPage();
@@ -401,7 +450,24 @@ public class METROUI_MAIN extends WpadScreen {
                 nLongKeyCnt = 0;
             }
             else if (nEventID == MotionEvent.ACTION_POINTER_DOWN) {
-                if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.CLOCK) {
+                if (ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 <= nTargetID && nTargetID <= ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_03) {
+                    if (nPreviousTargetID == nTargetID) {
+                        if (MainActivity.getPopupActivityRun()) return;
+                        else nLongKeyCnt++;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "], nLongKeyCnt [" + nLongKeyCnt + "]");
+                        if (nLongKeyCnt > LONGKEY_THRESHOLD) {
+                            nLongKeyCnt = 0;
+                            nPreviousTargetID = 0;
+                            deleteShortcut(nTargetID - ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01);
+                        }
+                    }
+                    else {
+                        nPreviousTargetID = nTargetID;
+                        nLongKeyCnt = 0;
+                        Log.v(TAG, "[onTouchEvent] LongKey event [" + nTargetID + "]");
+                    }
+                }
+                else if (nTargetID == ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.CLOCK) {
                     if (nPreviousTargetID == nTargetID) {
                         if (bAdminJoinPwRun) return;
                         if (((MainActivity)mContext).getMainSubScreenLoadingComplite() == false) return;
@@ -422,9 +488,13 @@ public class METROUI_MAIN extends WpadScreen {
                     }
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -433,9 +503,13 @@ public class METROUI_MAIN extends WpadScreen {
         try {
             super.onPopupResult(data);
             Log.i(TAG, "[onPopupResult] ========== START ==========");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -474,18 +548,26 @@ public class METROUI_MAIN extends WpadScreen {
 
             displayCalendar();
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void updateCalendarClock() {
         try {
             getCalendar();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] updateCalendarClock()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -499,9 +581,13 @@ public class METROUI_MAIN extends WpadScreen {
             TXT_CALEDAR_DATE.setText(Integer.toString(MainCal.nDate));
             TXT_DAYOFWEEK.setText(getDayofWeekValue(MainCal.nWeekday));
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -509,9 +595,14 @@ public class METROUI_MAIN extends WpadScreen {
         try {
             Log.d(TAG, "[getDayofWeekValue] nValue : " + nValue);
             return TXT_DayofWeek[MainCal.nWeekday - 1];
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return TXT_DayofWeek[0];
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getDayofWeekValue(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return TXT_DayofWeek[0];
         }
     }
@@ -524,9 +615,13 @@ public class METROUI_MAIN extends WpadScreen {
             RelativeLayout.LayoutParams Params = new RelativeLayout.LayoutParams(200, 200);
             mAnalogClock.setLayoutParams(Params);
             getLayout().addView(mAnalogClock);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayAnalogClock()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -575,9 +670,13 @@ public class METROUI_MAIN extends WpadScreen {
 
             updateWeather();
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -600,9 +699,13 @@ public class METROUI_MAIN extends WpadScreen {
             if (TXT_RAINFALL_PM != null) TXT_RAINFALL_PM.setText(strRainfall_PM + "%");
             else Log.w(TAG, "[updateWeather] TXT_RAINFALL_PM is null!!");
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] updateWeather()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -652,9 +755,13 @@ public class METROUI_MAIN extends WpadScreen {
                 case 40 : nImgResourceID = R.drawable.metroui_main_weather_10; break;
                 case 41 : nImgResourceID = R.drawable.metroui_main_weather_11; break;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherImgResource(int nWeaherCode)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return nImgResourceID;
     }
@@ -681,9 +788,13 @@ public class METROUI_MAIN extends WpadScreen {
             ViewRegistration(this.getLayout(), TXT_DAYOFWEEK, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.CALENDAR_DAYOFWEEK).Y);
 //            TXT_DAYOFWEEK.setBackgroundColor(Color.RED);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerCalendar()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -714,9 +825,13 @@ public class METROUI_MAIN extends WpadScreen {
 //            TXT_WEATHER_CURRENT.setBackgroundColor(Color.RED);
             TXT_WEATHER_CURRENT.setText("흐린 후 맑음");
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerWeather()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -747,9 +862,13 @@ public class METROUI_MAIN extends WpadScreen {
                 nID++;
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerNotificatoinIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -866,9 +985,13 @@ public class METROUI_MAIN extends WpadScreen {
                 BTN_ICONS_BIG.setVisibility(View.VISIBLE);
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayNotificatoinIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -898,9 +1021,13 @@ public class METROUI_MAIN extends WpadScreen {
                 Log.w(TAG, "[runNotiIconPressed] Not supported notification type -> eType [" + eType + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runNotiIconPressed(NOTIFICATION.NOTI_TYPE eType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -920,9 +1047,13 @@ public class METROUI_MAIN extends WpadScreen {
                 // 팝업 띄워서 외출모드 해제 유도
                 ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_RELEASEOUTMODE);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] checkSecurityMode()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -934,18 +1065,26 @@ public class METROUI_MAIN extends WpadScreen {
             filter.addAction(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI);
             filter.addAction(Common.MAIN_SCREEN_NOW_UPDATE);
             mContext.registerReceiver(MainScreenBroadcastReceiver, filter);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerEventAlarmBr()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void unregisterEventAlarmBr() {
         try {
             mContext.unregisterReceiver(MainScreenBroadcastReceiver);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerEventAlarmBr()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1041,13 +1180,21 @@ public class METROUI_MAIN extends WpadScreen {
                         updateCalendarClock();
                         bAdminJoinPwRun = false;
                         nLongKeyCnt = 0;
-                    } catch (Exception e) {
-                        e.printStackTrace();
+                    } catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
+                    catch (Exception e) {
+                        //e.printStackTrace();            
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
                 Log.e(TAG, "[Exception] MainScreenBroadcastReceiver()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -1094,21 +1241,51 @@ public class METROUI_MAIN extends WpadScreen {
                     else position.setPosition(528, 20, 476, 272);
                     return position;
 
-                case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.TALK_GUARD:
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01:
                     if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(25, 410, 298, 365);
                     else position.setPosition(20, 308, 238, 272);
                     return position;
 
-                case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SECURITY_MAIN:
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_02:
                     if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(343, 410, 298, 365);
                     else position.setPosition(274, 308, 238, 272);
                     return position;
 
-                case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ELEVATOR:
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_03:
                     if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(661, 410, 298, 365);
                     else position.setPosition(528, 308, 238, 272);
                     return position;
 
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_01:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(92, 524, 164, 164);
+                    else position.setPosition(72, 388, 135, 135);
+                    return position;
+
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_02:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(410, 524, 164, 164);
+                    else position.setPosition(326, 388, 135, 135);
+                    return position;
+
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_03:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(728, 524, 164, 164);
+                    else position.setPosition(580, 388, 135, 135);
+                    return position;
+
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_01:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(40, 425, 383, 45);
+                    else position.setPosition(36, 324, 222, 30);
+                    return position;
+
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_02:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(358, 425, 383, 45);
+                    else position.setPosition(290, 324, 222, 30);
+                    return position;
+
+                case ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_03:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(676, 425, 383, 45);
+                    else position.setPosition(544, 324, 222, 30);
+                    return position;
+
                 case ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.ICONS_SMALL:
                     if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(1169, 410, 86, 365);
                     else position.setPosition(916, 308, 88, 272);
@@ -1202,9 +1379,14 @@ public class METROUI_MAIN extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -1216,9 +1398,14 @@ public class METROUI_MAIN extends WpadScreen {
             wsd.closeDB();
 
             return bUsage;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] checkInterFloorNoiseFuncUsage()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1235,9 +1422,14 @@ public class METROUI_MAIN extends WpadScreen {
             if (stSensorStatus.equalsIgnoreCase(define.INTERLAYER_NOISE_STATUS_NORMAL)) return false;
             else return true;
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] checkInterFloorNoiseError()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1248,7 +1440,12 @@ public class METROUI_MAIN extends WpadScreen {
         public void run() {
             while (true) {
                 try {
-                    try {Thread.sleep(1000);}catch (Exception e){e.printStackTrace();}
+                    try {Thread.sleep(1000);}catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
+                    catch (Exception e){
+                        LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+                    }
                     TimerCount++;
 
                     if (TimerCount%20 == 0) {
@@ -1281,9 +1478,13 @@ public class METROUI_MAIN extends WpadScreen {
                     //testPopupCode();
 
                     if (TimerCount > 100000) TimerCount = 0;
-                } catch (Exception e) {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) {
                     Log.e(TAG, "Thread Exception : TimerCount : " + TimerCount);
-                    e.printStackTrace();
+                    //e.printStackTrace();            
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
 
             }
@@ -1292,10 +1493,317 @@ public class METROUI_MAIN extends WpadScreen {
     }
 
 
+    ////////////////////////////////////////////////////////////////////////////
+    /////////////////////////// 메인화면 즐겨찾기 편집 //////////////////////////
+    ///////////////////////////////////////////////////////////////////////////
+    private void deleteShortcut(int nIndex) {
+        try {
+            Log.i(TAG, "[deleteShortcut] nIndex = " + nIndex);
+            if (MainActivity.MetroScreenShortcutList.size() >= nIndex) {
+                Intent mIntent = new Intent();
+                mIntent.putExtra(Common.WIDGET_SELECTED_ID, MainActivity.MetroScreenShortcutList.get(nIndex).widgetID);
+                ((MainActivity) mContext).StartPopup(ID_OLD.SCREENS.DeleteWidgetPopupScreen, mIntent);
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] deleteShortcut(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
 
+    public void procDeleteShortcutPopupResult(boolean bDelete, int nShortcutID) {
+        try {
+            Log.d(TAG, "[procDeleteShortcutPopupResult] bDelete : " + bDelete + ", nShortcutID : " + nShortcutID);
+            if (bDelete == true && MainActivity.MetroScreenShortcutList != null) {
+                for (int i = 0; i < MainActivity.MetroScreenShortcutList.size(); i++) {
+//                    Log.d(TAG, "[procDeleteShortcutPopupResult] MainActivity.MetroScreenShortcutList.get(" + i + ").widgetID = " + MainActivity.MetroScreenShortcutList.get(i).widgetID);
+                    if (MainActivity.MetroScreenShortcutList.get(i).widgetID == nShortcutID) {
+                        if (deleteShortcutDB(nShortcutID)) {
+                            unRegisterWidgetIcon(getLayout());
+                            reOrderingShortcut();
+                            registerShortcutIcon(getLayout());
+                        }
+                        else {
+                            Log.w(TAG, "[procDeleteShortcutPopupResult] deleteShortcutDB = false!!");
+                        }
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] procDeleteShortcutPopupResult(boolean bDelete, int nShortcutID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
 
+    public void procAddShortcutPopupResult(boolean bAdd, int nShortcutID) {
+        try {
+            Log.d(TAG, "[procAddShortcutPopupResult] bAdd : " + bAdd + ", nShortcutID : " + nShortcutID);
+            if (bAdd) {
+                if (addShortcutDB(nShortcutID)) {
+                    unRegisterWidgetIcon(getLayout());
+                    reOrderingShortcut();
+                    registerShortcutIcon(getLayout());
+                }
+                else {
+                    Log.w(TAG, "[procAddShortcutPopupResult] addShortcutDB = false!!");
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] procAddShortcutPopupResult(boolean bAdd, int nShortcutID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
 
+    List<WallpadStatusData.WidgetItem> AddShortcutList;
 
+    private boolean addShortcutDB(int nID) {
+        Log.d(TAG, "[addShortcutDB] nID [" + nID + "]");
+        WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+        try {
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            AddShortcutList = ShortcutTable.GetWidgetData();
+            int nShortcutCnt = AddShortcutList.size();
+            Log.i(TAG, "[addShortcutDB] nShortcutCnt [" + nShortcutCnt + "]");
+
+            if (nShortcutCnt >= MainActivity.nShortcutMax_Metro) {
+                mWallpadStatusData.closeDB();
+                return false;
+            }
+            ShortcutTable.AddWidgetData(nShortcutCnt, nID);
+            mWallpadStatusData.closeDB();
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            mWallpadStatusData.closeDB();
+            return false;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] addShortcutDB(int nID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            mWallpadStatusData.closeDB();
+            return false;
+        }
+    }
 
+    private boolean deleteShortcutDB(int nID) {
+        try {
+            Log.d(TAG, "[deleteShortcutDB] nID [" + nID + "]");
+            WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            ShortcutTable.DeleteWidgetDataID(nID);
+            mWallpadStatusData.closeDB();
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] deleteShortcutDB(int nIndex)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
+    }
+
+    private void reOrderingShortcut() {
+        Log.d(TAG,"[reOrderingShortcut] ========== START ==========");
+        WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+        try {
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            List<WallpadStatusData.WidgetItem> DBShortcutList  = ShortcutTable.GetWidgetData();
+//            Log.d(TAG, "[reOrderingShortcut] DBShortcutList.size = " + DBShortcutList.size());
+
+            IconUnitInfo[] mIconUnitInfo = new IconUnitInfo[DBShortcutList.size()];
+
+            for (int i = 0; i < DBShortcutList.size(); i++) {
+                Log.v(TAG, "[reOrderingShortcut] widgetID [" + i + "] = " + DBShortcutList.get(i).widgetID);
+                mIconUnitInfo[i] = new IconUnitInfo(DBShortcutList.get(i).widgetID, "none", 0, 0, 0, 0, 0);
+            }
+
+            for (int i = 0; i <= DBShortcutList.size(); i++) {
+                ShortcutTable.DeleteWidgetData(i);
+            }
+
+            for (int i = 0; i < mIconUnitInfo.length; i++) {
+                ShortcutTable.AddWidgetData(i, mIconUnitInfo[i].getIconID());
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] reOrderingShortcut()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+        mWallpadStatusData.closeDB();
+    }
+
+    private void registerShortcutIcon(RelativeLayout layout) {
+        try {
+            mIconManager = new IconManager(mContext, mWallPadAPI);
+            if (mIconManager == null) {
+                Log.w(TAG, "[registerShortcutIcon] mIconManager is null!!");
+                return;
+            }
+
+            mIconInfoTable = mIconManager.getAvailableIcons();
+            if (mIconInfoTable == null) {
+                Log.w(TAG, "[registerShortcutIcon] mIconInfoTable is null!!");
+                return;
+            }
+
+            // DB 또는 파일에서 설정된 데이터를 읽어와서 갱신한다.
+            WallpadStatusData mWallpadStatusData = new WallpadStatusData(mContext);
+            WallpadStatusData.WidgetTable ShortcutTable = mWallpadStatusData.GetWidgetTableController();
+            MainActivity.MetroScreenShortcutList = ShortcutTable.GetWidgetData();
+            boolean bDefault = mWallpadStatusData.GetMetroUXEditDefaultSet();
+            mWallpadStatusData.closeDB();
+            Log.d(TAG, "[registerShortcutIcon] bDefault [" + bDefault + "]");
+
+            MainActivity.nShortcutCnt_Metro = MainActivity.MetroScreenShortcutList.size();
+            Log.d(TAG, "[registerShortcutIcon] nShortcutCnt_Metro [" + MainActivity.nShortcutCnt_Metro + "]");
+
+            if (MainActivity.nShortcutCnt_Metro == 3) {
+                mWallpadStatusData = new WallpadStatusData(mContext);
+                mWallpadStatusData.SetMetroUXEditDefaultSet(false);
+                bDefault = mWallpadStatusData.GetMetroUXEditDefaultSet();
+                Log.d(TAG, "[registerShortcutIcon] === afrter === bDefault [" + bDefault + "]");
+                mWallpadStatusData.closeDB();
+            }
+
+            WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getContext());
+            int nElevUse = mWallpadDeviceSet.Get_Elevator_Info();
+            boolean bCtrlUse = mWallpadDeviceSet.Get_MainGUICtrlUse();
+            mWallpadDeviceSet.closeDB();
+            Log.d(TAG, "[registerShortcutIcon] nElevUse [" + nElevUse + "], bCtrlUse [" + bCtrlUse + "]");
+
+            int nDelCount = 0;
+            int index = 0;
+            for (int i = 0; i < MainActivity.nShortcutCnt_Metro; i++) {
+                int nID = MainActivity.MetroScreenShortcutList.get(i).widgetID;
+                Log.d(TAG, "[registerShortcutIcon] nID [" + nID + "]");
+
+                if (bDefault) { // 최초 실행 여부
+                    // 기존 DB에서 변경되지 않은 경우 (즐겨찾기 아이콘 변경 없음 - 경비, 방범, 엘리베이터 제외 DB에서 삭제)
+                    if (!(nID == ID.ICONS.MENUS.TALK_GUARD.getID() || nID == ID.ICONS.MENUS.SECURITY_SETARMED.getID() || nID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID())) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
+                    }
+                }
+                if (nElevUse == WallpadDeviceSet.ELEVATOR_NONE) {
+                    if (nID == ID.ICONS.MENUS.MAIN_ELEVATOR.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        procAddShortcutPopupResult(true, ID.ICONS.MENUS.SETTING_CONFIG.getID());
+                        continue;
+                    }
+                }
+                if (!bCtrlUse) {
+                    if (ID.ICONS.MENUS.CTRL_LIGHT.getID() <= nID && nID <= ID.ICONS.MENUS.CTRL_SYSTEMAIRCON.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
+                    }
+                }
+
+                IconInfoTable.IconInfo mIconInfo = mIconInfoTable.getIconInfoByID(nID);
+                if (mIconInfo != null) {
+//                    Log.d(TAG, "[registerShortcutIcon] getIconName[" + i + "] = " + mIconInfo.getIconName());
+//                    Log.d(TAG, "[registerShortcutIcon] index = " + index);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        BTN_SHORTCUT_BUTTON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).H, mBackGroundN_1280[index], mBackGroundP_1280[index], ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index);
+                        ViewRegistration(layout, BTN_SHORTCUT_BUTTON[index], getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).Y);
+                        BTN_SHORTCUT_BUTTON[index].setTouchDelayMs(500);
+                    }
+                    else {
+                        BTN_SHORTCUT_BUTTON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).H, mBackGroundN[index], mBackGroundP[index], ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index);
+                        ViewRegistration(layout, BTN_SHORTCUT_BUTTON[index], getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).Y);
+                        BTN_SHORTCUT_BUTTON[index].setTouchDelayMs(500);
+                    }
+
+                    BTN_SHORTCUT_ICON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_01 + index).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_01 + index).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_01 + index);
+                    ViewRegistration(this.getLayout(), BTN_SHORTCUT_ICON[index], getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_01 + index).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.IMAGES.SHORTCUT_ICON_01 + index).Y);
+                    BTN_SHORTCUT_ICON[index].setColorFilter(Color.parseColor("#ffffffff"), PorterDuff.Mode.SRC_ATOP); // 아이콘 색상 회색 => 흰색 변경
+
+                    TXT_SHORTCUT_NAME[index] = new WpadTextView(this.getContext(), false, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_01 + index).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_01 + index).H, Gravity.LEFT, Color.parseColor("#ffffff"), nFontsize_Info, false, ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_01 + index);
+                    ViewRegistration(layout, TXT_SHORTCUT_NAME[index], getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_01 + index).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.TEXTS.SHORTCUT_TEXT_01 + index).Y);
+                    TXT_SHORTCUT_NAME[index].setText(mIconInfo.getIconName().replace("\n", " "));
+
+                    index++;
+                } else {
+                    Log.w(TAG, "[registerShortcutIcon] mIconInfo is null!!!");
+                }
+
+                if (nDelCount > 0) {
+                    Log.w(TAG, "[registerShortcutIcon] WallPad Reboot!!!!! === nDelCount [" + nDelCount + "]");
+                    if (Build.VERSION.SDK_INT > 23) {
+                        V40IOInterface2 mV40IOInterface2 = new V40IOInterface2();
+                        mV40IOInterface2.setV40Reboot(5);
+                    }
+                    else {
+                        V40IOInterface mV40IOInterface = new V40IOInterface();
+                        mV40IOInterface.setV40Reboot(5);
+                    }
+                }
+            }
+
+            if (index < MainActivity.nShortcutMax_Metro) {
+                // 바둑판 빈칸은 회색 이미지로 채우기
+                for (index = index; index < MainActivity.nShortcutMax_Metro; index++) {
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        BTN_SHORTCUT_BUTTON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).H, R.drawable.btn_blank_1280, 0, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index);
+                        ViewRegistration(layout, BTN_SHORTCUT_BUTTON[index], getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).Y);
+                    } else {
+                        BTN_SHORTCUT_BUTTON[index] = new WpadImageView(this.getContext(), TOUCH_KIND.NONE, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).W, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).H, R.drawable.btn_blank, 0, ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index);
+                        ViewRegistration(layout, BTN_SHORTCUT_BUTTON[index], getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).X, getPosition(ID.SCREENS.MAIN_METROUI.ELEMENTS.BTNS.SHORTCUT_BUTTON_01 + index).Y);
+                    }
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] registerShortcutIcon(RelativeLayout layout)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private void unRegisterWidgetIcon(RelativeLayout layout) {
+        try {
+            for (int i = 0; i < MainActivity.nShortcutMax_Metro; i++) {
+                if (BTN_SHORTCUT_BUTTON[i] != null) {
+                    layout.removeView(BTN_SHORTCUT_BUTTON[i]);
+                    BTN_SHORTCUT_BUTTON[i] = null;
+                }
+
+                if (BTN_SHORTCUT_ICON[i] != null) {
+                    layout.removeView(BTN_SHORTCUT_ICON[i]);
+                    BTN_SHORTCUT_ICON[i] = null;
+                }
+
+                if (TXT_SHORTCUT_NAME[i] != null) {
+                    layout.removeView(TXT_SHORTCUT_NAME[i]);
+                    TXT_SHORTCUT_NAME[i] = null;
+                }
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] unRegisterWidgetIcon(RelativeLayout layout)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
 
 }

+ 44 - 14
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_SUB_01.java

@@ -21,6 +21,7 @@ import kr.co.icontrols.wallpadmain.declare.ID_OLD;
 import kr.co.icontrols.wallpadmain.util.IconManager;
 import kr.co.icontrols.wallpadmain.util.POSITION;
 import kr.co.icontrols.wallpadsupport.WpadImageView;
+import com.util.LogUtil;
 import kr.co.icontrols.wallpadsupport.WpadScale;
 import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
@@ -71,9 +72,13 @@ public class METROUI_SUB_01 extends WpadScreen {
 
             registerBasicIcons(layout);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] METROUI_SUB_01(Context context, RelativeLayout layout, WallPadAPI wallpadapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -81,9 +86,13 @@ public class METROUI_SUB_01 extends WpadScreen {
         try {
             Log.d(TAG, "[initScreen] ========== START ==========");
             registerBRMessage();
-        }  catch (Exception e) {
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,9 +130,13 @@ public class METROUI_SUB_01 extends WpadScreen {
                 Log.w(TAG, "[registerBasicIcons] There is no icons to show the second page!! nIconCnt [" + nIconCnt + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBasicIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -141,9 +154,13 @@ public class METROUI_SUB_01 extends WpadScreen {
             if (intent.getAction().equals(Intent.ACTION_TIME_TICK)) {
                 Log.d(TAG, "[onBrReceive] (BR) ACTION_TIME_TICK");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -185,9 +202,13 @@ public class METROUI_SUB_01 extends WpadScreen {
                     ((MainActivity)mContext).runIcon(mIconInfoTable.getIconInfoByIndex(nIndex).getIconID());
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -197,9 +218,13 @@ public class METROUI_SUB_01 extends WpadScreen {
             filter.addAction(define.NOTIFY_ACNAME);
             filter.addAction(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI);
             filter.addAction(Common.MAIN_SCREEN_NOW_UPDATE);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBRMessage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -285,9 +310,14 @@ public class METROUI_SUB_01 extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 44 - 15
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_SUB_02.java

@@ -26,7 +26,7 @@ import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-
+import com.util.LogUtil;
 
 public class METROUI_SUB_02 extends WpadScreen {
 
@@ -71,9 +71,13 @@ public class METROUI_SUB_02 extends WpadScreen {
 
             registerBasicIcons(layout);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] METROUI_SUB_02(Context context, RelativeLayout layout, WallPadAPI wallpadapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -81,9 +85,13 @@ public class METROUI_SUB_02 extends WpadScreen {
         try {
             Log.d(TAG, "[initScreen] ========== START ==========");
             registerBRMessage();
-        }  catch (Exception e) {
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,9 +129,13 @@ public class METROUI_SUB_02 extends WpadScreen {
                 Log.w(TAG, "[registerBasicIcons] There is no icons to show the second page!! nIconCnt [" + nIconCnt + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBasicIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -141,9 +153,13 @@ public class METROUI_SUB_02 extends WpadScreen {
             if (intent.getAction().equals(Intent.ACTION_TIME_TICK)) {
                 Log.d(TAG, "[onBrReceive] (BR) ACTION_TIME_TICK");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -185,9 +201,13 @@ public class METROUI_SUB_02 extends WpadScreen {
                     ((MainActivity)mContext).runIcon(mIconInfoTable.getIconInfoByIndex(nIndex).getIconID());
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -197,9 +217,13 @@ public class METROUI_SUB_02 extends WpadScreen {
             filter.addAction(define.NOTIFY_ACNAME);
             filter.addAction(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI);
             filter.addAction(Common.MAIN_SCREEN_NOW_UPDATE);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBRMessage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -285,9 +309,14 @@ public class METROUI_SUB_02 extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }

+ 339 - 108
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/METROUI_SUB_GROUP.java

@@ -1,5 +1,6 @@
 package kr.co.icontrols.wallpadmain.screen;
 
+import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.wallpadapi.WallPadAPI;
 
 import android.content.Context;
@@ -20,7 +21,7 @@ import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadSound;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
-
+import com.util.LogUtil;
 
 public class METROUI_SUB_GROUP extends WpadScreen {
 
@@ -36,6 +37,8 @@ public class METROUI_SUB_GROUP extends WpadScreen {
 
     WallPadAPI mWallPadAPI;
 
+    boolean bCtrlUse = false, bEnergyUse = false; // 제어기능 사용 여부, 에너지(실시간검침기, 원격검침) 사용 여부
+
     public METROUI_SUB_GROUP(Context context, RelativeLayout layout, WallPadAPI wallpadapi) {
         super(context, layout);
         try {
@@ -45,116 +48,79 @@ public class METROUI_SUB_GROUP extends WpadScreen {
 
             initScreen();
 
-            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
-                IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, WpadScale.getWidthPixels(), WpadScale.getHeightPixels(), R.drawable.back_main_01_1280, 0, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.IMAGES.BACKGROUND);
-                ViewRegistration(layout, IMG_BACKGROUND,0, 0);
+            IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, WpadScale.getWidthPixels(), WpadScale.getHeightPixels(), getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.IMAGES.BACKGROUND), 0, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.IMAGES.BACKGROUND);
+            ViewRegistration(layout, IMG_BACKGROUND, 0, 0);
 
-                BTN_CTRL = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).H, R.drawable.metroui_btn_ctrl_normal_1280, R.drawable.metroui_btn_ctrl_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL);
+            if (bCtrlUse) {
+                BTN_CTRL = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).H, getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL), getDrawablePressedImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL), ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL);
                 ViewRegistration(layout, BTN_CTRL, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).Y);
                 BTN_CTRL.setTouchDelayMs(300);
+            }
 
-                BTN_TALK = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).H, R.drawable.metroui_btn_talk_normal_1280, R.drawable.metroui_btn_talk_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK);
-                ViewRegistration(layout, BTN_TALK, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).Y);
-                BTN_TALK.setTouchDelayMs(300);
+            BTN_TALK = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).H, getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK), getDrawablePressedImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK), ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK);
+            ViewRegistration(layout, BTN_TALK, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).Y);
+            BTN_TALK.setTouchDelayMs(300);
 
-                BTN_SECURITY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).H, R.drawable.metroui_btn_security_normal_1280, R.drawable.metroui_btn_security_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY);
-                ViewRegistration(layout, BTN_SECURITY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).Y);
-                BTN_SECURITY.setTouchDelayMs(300);
+            BTN_SECURITY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).H, getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY), getDrawablePressedImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY), ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY);
+            ViewRegistration(layout, BTN_SECURITY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).Y);
+            BTN_SECURITY.setTouchDelayMs(300);
 
-                BTN_ADD = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).H, R.drawable.metroui_btn_add_normal_1280, R.drawable.metroui_btn_add_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION);
-                ViewRegistration(layout, BTN_ADD, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).Y);
-                BTN_ADD.setTouchDelayMs(300);
+            BTN_ADD = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).H, getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION), getDrawablePressedImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION), ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION);
+            ViewRegistration(layout, BTN_ADD, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).Y);
+            BTN_ADD.setTouchDelayMs(300);
 
-                BTN_ENERGY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).H, R.drawable.metroui_btn_energy_normal_1280, R.drawable.metroui_btn_energy_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY);
+            if (bEnergyUse) {
+                BTN_ENERGY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).H, getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY), getDrawablePressedImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY), ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY);
                 ViewRegistration(layout, BTN_ENERGY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).Y);
                 BTN_ENERGY.setTouchDelayMs(300);
+            }
 
-                BTN_CONFIG = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).H, R.drawable.metroui_btn_config_normal_1280, R.drawable.metroui_btn_config_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING);
-                ViewRegistration(layout, BTN_CONFIG, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).Y);
-                BTN_CONFIG.setTouchDelayMs(300);
+            BTN_CONFIG = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).H, getDrawableNormalImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING), getDrawablePressedImg(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING), ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING);
+            ViewRegistration(layout, BTN_CONFIG, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).Y);
+            BTN_CONFIG.setTouchDelayMs(300);
 
+            if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
                 BTN_HOME = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).H, R.drawable.metroui_btn_home_normal_1280, R.drawable.metroui_btn_home_pressed_1280, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME);
                 ViewRegistration(layout, BTN_HOME, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).Y);
                 BTN_HOME.setTouchDelayMs(300);
             }
             else {
-                if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG_CTRL_OFF) {
-                    IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, WpadScale.getWidthPixels(), WpadScale.getHeightPixels(), R.drawable.back_main_01 , 0, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.IMAGES.BACKGROUND);
-                    ViewRegistration(layout, IMG_BACKGROUND,0, 0);
-
-                    BTN_TALK = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).H, R.drawable.metroui_ha_btn_talk_normal, R.drawable.metroui_ha_btn_talk_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK);
-                    ViewRegistration(layout, BTN_TALK, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).Y);
-                    BTN_TALK.setTouchDelayMs(300);
-
-                    BTN_SECURITY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).H, R.drawable.metroui_ha_btn_security_normal, R.drawable.metroui_ha_btn_security_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY);
-                    ViewRegistration(layout, BTN_SECURITY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).Y);
-                    BTN_SECURITY.setTouchDelayMs(300);
-
-                    BTN_ADD = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).H, R.drawable.metroui_btn_add_normal, R.drawable.metroui_btn_add_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION);
-                    ViewRegistration(layout, BTN_ADD, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).Y);
-                    BTN_ADD.setTouchDelayMs(300);
-
-                    BTN_ENERGY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).H, R.drawable.metroui_btn_energy_normal, R.drawable.metroui_btn_energy_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY);
-                    ViewRegistration(layout, BTN_ENERGY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).Y);
-                    BTN_ENERGY.setTouchDelayMs(300);
-
-                    BTN_CONFIG = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).H, R.drawable.metroui_btn_config_normal, R.drawable.metroui_btn_config_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING);
-                    ViewRegistration(layout, BTN_CONFIG, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).Y);
-                    BTN_CONFIG.setTouchDelayMs(300);
-
-                    BTN_HOME = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).H, R.drawable.metroui_btn_home_normal, R.drawable.metroui_btn_home_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME);
-                    ViewRegistration(layout, BTN_HOME, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).Y);
-                    BTN_HOME.setTouchDelayMs(300);
-                }
-                else {
-                    IMG_BACKGROUND = new WpadImageView(context, TOUCH_KIND.NONE, WpadScale.getWidthPixels(), WpadScale.getHeightPixels(), R.drawable.back_main_01 , 0, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.IMAGES.BACKGROUND);
-                    ViewRegistration(layout, IMG_BACKGROUND,0, 0);
-
-                    BTN_CTRL = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).H, R.drawable.metroui_btn_ctrl_normal, R.drawable.metroui_btn_ctrl_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL);
-                    ViewRegistration(layout, BTN_CTRL, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL).Y);
-                    BTN_CTRL.setTouchDelayMs(300);
-
-                    BTN_TALK = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).H, R.drawable.metroui_btn_talk_normal, R.drawable.metroui_btn_talk_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK);
-                    ViewRegistration(layout, BTN_TALK, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK).Y);
-                    BTN_TALK.setTouchDelayMs(300);
-
-                    BTN_SECURITY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).H, R.drawable.metroui_btn_security_normal, R.drawable.metroui_btn_security_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY);
-                    ViewRegistration(layout, BTN_SECURITY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY).Y);
-                    BTN_SECURITY.setTouchDelayMs(300);
-
-                    BTN_ADD = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).H, R.drawable.metroui_btn_add_normal, R.drawable.metroui_btn_add_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION);
-                    ViewRegistration(layout, BTN_ADD, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION).Y);
-                    BTN_ADD.setTouchDelayMs(300);
-
-                    BTN_ENERGY = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).H, R.drawable.metroui_btn_energy_normal, R.drawable.metroui_btn_energy_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY);
-                    ViewRegistration(layout, BTN_ENERGY, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY).Y);
-                    BTN_ENERGY.setTouchDelayMs(300);
-
-                    BTN_CONFIG = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).H, R.drawable.metroui_btn_config_normal, R.drawable.metroui_btn_config_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING);
-                    ViewRegistration(layout, BTN_CONFIG, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING).Y);
-                    BTN_CONFIG.setTouchDelayMs(300);
-
-                    BTN_HOME = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).H, R.drawable.metroui_btn_home_normal, R.drawable.metroui_btn_home_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME);
-                    ViewRegistration(layout, BTN_HOME, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).Y);
-                    BTN_HOME.setTouchDelayMs(300);
-                }
+                BTN_HOME = new WpadImageView(context, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).W, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).H, R.drawable.metroui_btn_home_normal, R.drawable.metroui_btn_home_pressed, ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME);
+                ViewRegistration(layout, BTN_HOME, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).X, getPosition(ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME).Y);
+                BTN_HOME.setTouchDelayMs(300);
             }
 
             registerManualIcon();
             displayManualIcon();
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] METROUI_SUB_GROUP(Context context, RelativeLayout layout, WallPadAPI wallpadapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void initScreen() {
         try {
             Log.d(TAG, "[initScreen] ========== START ==========");
-        }  catch (Exception e) {
+            WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getContext());
+            bCtrlUse = mWallpadDeviceSet.Get_MainGUICtrlUse();
+            int nRealMeterUse = mWallpadDeviceSet.Get_RealTimeMetor_Info()[0];
+            boolean bRemoteMeterUse = mWallpadDeviceSet.Get_RemoteMeter_Use();
+            mWallpadDeviceSet.closeDB();
+            Log.d(TAG, "[initScreen] nRealMeterUse [" + nRealMeterUse + "], bRemoteMeterUse [" + bRemoteMeterUse + "]");
+            bEnergyUse = ((nRealMeterUse > 0 ) | bRemoteMeterUse) ? true : false;
+            Log.d(TAG, "[initScreen] bCtrlUse [" + bCtrlUse + "], bEnergyUse [" + bEnergyUse + "]");
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -163,9 +129,13 @@ public class METROUI_SUB_GROUP extends WpadScreen {
         try {
             super.onClose();
             Log.i(TAG, "[onClose] ===== START =====");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -174,9 +144,13 @@ public class METROUI_SUB_GROUP extends WpadScreen {
         try {
             String strAction = intent.getAction();
             Log.i(TAG, "[onBrReceive] Action [" + strAction + "]");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         super.onBrReceive(intent);
     }
@@ -199,7 +173,7 @@ public class METROUI_SUB_GROUP extends WpadScreen {
                 nTouchUpPosX = (int) event.getX();
                 nTouchUpPosY = (int) event.getY();
                 if (Math.abs(nTouchDownPosX - nTouchUpPosX) > 50 || Math.abs(nTouchDownPosY - nTouchUpPosY) > 50) {
-                    Log.w(TAG, "[onTouchEvent] Ignor touch event! Touch point moved too much away.");
+                    Log.w(TAG, "[onTouchEvent] Ignore touch event! Touch point moved too much away.");
                     nTouchDownPosX = 0;
                     nTouchDownPosY = 0;
                     nTouchUpPosX = 0;
@@ -256,9 +230,13 @@ public class METROUI_SUB_GROUP extends WpadScreen {
                     ((MainActivity)mContext).startManualPopup(ID.MANUAL.MANUAL_METROUI_SUB_GROUP);
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -272,9 +250,13 @@ public class METROUI_SUB_GROUP extends WpadScreen {
             boolean bRun = data.getBooleanExtra(Common.BR_RUN_WIDGET, false);
             int nIconID = data.getIntExtra(Common.BR_RUN_WIDGET_ID, 0);
             Log.d(TAG, "[onPopupResult] strSenderScreen [" + strSenderScreen + "], strReceiveScreen [" + strReceiveScreen + "], bRun [" + bRun + "], nIconID [" + nIconID + "]") ;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -301,9 +283,13 @@ public class METROUI_SUB_GROUP extends WpadScreen {
                 BTN_MANUAL.setVisibility(View.INVISIBLE);
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerManualIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -313,9 +299,13 @@ public class METROUI_SUB_GROUP extends WpadScreen {
             if (((MainActivity)mContext).GetManualUse()) BTN_MANUAL.setVisibility(View.VISIBLE);
             else BTN_MANUAL.setVisibility(View.INVISIBLE);
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] displayManualIcon()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -337,24 +327,48 @@ public class METROUI_SUB_GROUP extends WpadScreen {
                     return position;
 
                 case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK:
-                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(442, 25, 397, 365);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) position.setPosition(442, 25, 397, 365);
+                        else position.setPosition(25, 25, 605, 365);
+                    }
                     else {
-                        if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG_CTRL_OFF) position.setPosition(19, 20, 486, 272);
-                        else position.setPosition(354, 20, 317, 272);
+                        if (bCtrlUse) position.setPosition(354, 20, 317, 272);
+                        else position.setPosition(20, 20, 484, 272);
                     }
                     return position;
 
                 case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY:
-                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(859, 25, 396, 365);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) position.setPosition(859, 25, 396, 365);
+                        else position.setPosition(650, 25, 605, 365);
+                    }
                     else {
-                        if (Common.eGUIType == Common.GUI_TYPE.HYOSUNG_CTRL_OFF) position.setPosition(521, 20, 483, 272);
-                        else position.setPosition(687, 20, 317, 272);
+                        if (bCtrlUse) position.setPosition(687, 20, 317, 272);
+                        else position.setPosition(520, 20, 484, 272);
                     }
                     return position;
 
                 case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION:
-                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(25, 410, 266, 365);
-                    else position.setPosition(20, 308, 212, 272);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) position.setPosition(25, 410, 266, 365); // 제어 O, 에너지 O
+                            else position.setPosition(25, 410, 538, 365); // 제어 O, 에너지 X
+                        }
+                        else {
+                            if (bEnergyUse) position.setPosition(25, 410, 266, 365); // 제어 X, 에너지 O
+                            else position.setPosition(25, 410, 538, 365); // 제어 X, 에너지 X
+                        }
+                    }
+                    else {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) position.setPosition(20, 308, 212, 272); // 제어 O, 에너지 O
+                            else position.setPosition(20, 308, 484, 272); // 제어 O, 에너지 X
+                        }
+                        else {
+                            if (bEnergyUse) position.setPosition(20, 308, 212, 272); // 제어 X, 에너지 O
+                            else position.setPosition(20, 308, 484, 272); // 제어 X, 에너지 X
+                        }
+                    }
                     return position;
 
                 case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY:
@@ -363,12 +377,30 @@ public class METROUI_SUB_GROUP extends WpadScreen {
                     return position;
 
                 case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING:
-                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(727, 410, 396, 365);
-                    else position.setPosition(582, 308, 318, 272);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) position.setPosition(727, 410, 396, 365); // 제어 O, 에너지 O
+                            else position.setPosition(583, 410, 539, 365); // 제어 O, 에너지 X
+                        }
+                        else {
+                            if (bEnergyUse) position.setPosition(727, 410, 396, 365); // 제어 X, 에너지 O
+                            else position.setPosition(583, 410, 539, 365); // 제어 X, 에너지 X
+                        }
+                    }
+                    else {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) position.setPosition(582, 308, 318, 272); // 제어 O, 에너지 O
+                            else position.setPosition(520, 308, 380, 272); // 제어 O, 에너지 X
+                        }
+                        else {
+                            if (bEnergyUse) position.setPosition(582, 308, 318, 272); // 제어 X, 에너지 O
+                            else position.setPosition(520, 308, 380, 272); // 제어 X, 에너지 X
+                        }
+                    }
                     return position;
 
                 case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.HOME:
-                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(1142, 410, 112, 365);
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) position.setPosition(1143, 410, 112, 365);
                     else position.setPosition(916, 308, 88, 272);
                     return position;
 
@@ -380,13 +412,212 @@ public class METROUI_SUB_GROUP extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
 
+    private int getDrawableNormalImg(int nID) {
+        int nImage = R.drawable.metroui_btn_talk_normal;
+        try {
+            switch (nID) {
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.IMAGES.BACKGROUND:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nImage = R.drawable.back_main_01_1280;
+                    else nImage = R.drawable.back_main_01;
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nImage = R.drawable.metroui_btn_ctrl_normal_1280;
+                    else nImage = R.drawable.metroui_btn_ctrl_normal;
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_talk_normal_1280;
+                        else nImage = R.drawable.btn_call_not_normal_1280;
+                    }
+                    else {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_talk_normal;
+                        else nImage = R.drawable.btn_call_not_normal;
+                    }
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_security_normal_1280;
+                        else nImage = R.drawable.btn_security_not_ctrl_normal_1280;
+                    }
+                    else {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_security_normal;
+                        else nImage = R.drawable.btn_security_not_ctrl_normal;
+                    }
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_add_normal_1280;
+                            else nImage = R.drawable.btn_add_not_energy_normal_1280;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_add_not_ctrl_normal_1280;
+                            else nImage = R.drawable.btn_add_not_normal_1280;
+                        }
+                    }
+                    else {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_add_normal;
+                            else nImage = R.drawable.btn_add_not_normal;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_add_not_ctrl_normal;
+                            else nImage = R.drawable.btn_add_not_normal;
+                        }
+                    }
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nImage = R.drawable.metroui_btn_energy_normal_1280;
+                    else nImage = R.drawable.metroui_btn_energy_normal;
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_config_normal_1280;
+                            else nImage = R.drawable.btn_set_not_normal_1280;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_set_not_ctrl_normal_1280;
+                            else nImage = R.drawable.btn_set_not_normal_1280;
+                        }
+                    }
+                    else {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_config_normal;
+                            else nImage = R.drawable.btn_set_not_normal;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_set_not_ctrl_normal;
+                            else nImage = R.drawable.btn_set_not_normal;
+                        }
+                    }
+                    return nImage;
+
+                default:
+                    return nImage;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return nImage;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] getDrawableNormalImg(int nID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return nImage;
+        }
+    }
+
+    private int getDrawablePressedImg(int nID) {
+        int nImage = R.drawable.metroui_btn_talk_pressed;
+        try {
+            switch (nID) {
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.CTRL:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nImage = R.drawable.metroui_btn_ctrl_pressed_1280;
+                    else nImage = R.drawable.metroui_btn_ctrl_pressed;
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.TALK:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_talk_pressed_1280;
+                        else nImage = R.drawable.btn_call_not_pressed_1280;
+                    }
+                    else {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_talk_pressed;
+                        else nImage = R.drawable.btn_call_not_pressed;
+                    }
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SECURITY:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_security_pressed_1280;
+                        else nImage = R.drawable.btn_security_not_ctrl_pressed_1280;
+                    }
+                    else {
+                        if (bCtrlUse) nImage = R.drawable.metroui_btn_security_pressed;
+                        else nImage = R.drawable.btn_security_not_ctrl_pressed;
+                    }
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ADDITION:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_add_pressed_1280;
+                            else nImage = R.drawable.btn_add_not_energy_pressed_1280;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_add_pressed_1280;
+                            else nImage = R.drawable.btn_add_not_pressed_1280;
+                        }
+                    }
+                    else {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_add_pressed;
+                            else nImage = R.drawable.btn_add_not_pressed;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_add_not_ctrl_pressed;
+                            else nImage = R.drawable.btn_add_not_pressed;
+                        }
+                    }
+                    return nImage;
+
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.ENERGY:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) nImage = R.drawable.metroui_btn_energy_pressed_1280;
+                    else nImage = R.drawable.metroui_btn_energy_pressed;
+                    return nImage;
 
+                case ID.SCREENS.SUB_METROUI_GROUP.ELEMENTS.BTNS.SETTING:
+                    if (Common.SCREEN_TYPE == Common.SCREEN_TYPE_1280x800) {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_config_pressed_1280;
+                            else nImage = R.drawable.btn_set_not_pressed_1280;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_set_not_ctrl_pressed_1280;
+                            else nImage = R.drawable.btn_set_not_pressed_1280;
+                        }
+                    }
+                    else {
+                        if (bCtrlUse) {
+                            if (bEnergyUse) nImage = R.drawable.metroui_btn_config_pressed;
+                            else nImage = R.drawable.btn_set_not_pressed;
+                        }
+                        else {
+                            if (bEnergyUse) nImage = R.drawable.btn_set_not_ctrl_pressed;
+                            else nImage = R.drawable.btn_set_not_pressed;
+                        }
+                    }
+                    return nImage;
 
+                default:
+                    return nImage;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return nImage;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] getDrawablePressedImg(int nID)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return nImage;
+        }
+    }
 }

+ 50 - 17
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/SUB_01.java

@@ -26,7 +26,7 @@ import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-
+import com.util.LogUtil;
 
 public class SUB_01 extends WpadScreen {
 
@@ -77,9 +77,13 @@ public class SUB_01 extends WpadScreen {
 //
 //            IMG_PAGEINDICATOR_SUB_02 = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.SCREENS.SUB_01.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).W, getPosition(ID.SCREENS.SUB_01.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).H, R.drawable.main_pageindicator_sub_normal , R.drawable.main_pageindicator_sub_normal, ID.SCREENS.SUB_01.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02);
 //            ViewRegistration(layout, IMG_PAGEINDICATOR_SUB_02, getPosition(ID.SCREENS.SUB_01.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).X, getPosition(ID.SCREENS.SUB_01.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).Y);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] SUB_01(Context context, RelativeLayout layout, WallPadAPI wallpadapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -87,9 +91,13 @@ public class SUB_01 extends WpadScreen {
         try {
             Log.d(TAG, "[initScreen] ========== START ==========");
             registerBRMessage();
-        }  catch (Exception e) {
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -131,9 +139,13 @@ public class SUB_01 extends WpadScreen {
                 Log.w(TAG, "[registerBasicIcons] There is no icons to show the second page!! nIconCnt [" + nIconCnt + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBasicIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -151,9 +163,13 @@ public class SUB_01 extends WpadScreen {
             if (intent.getAction().equals(Intent.ACTION_TIME_TICK)) {
                 Log.d(TAG, "[onBrReceive] (BR) ACTION_TIME_TICK");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -201,9 +217,13 @@ public class SUB_01 extends WpadScreen {
                     }
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -213,9 +233,13 @@ public class SUB_01 extends WpadScreen {
             filter.addAction(define.NOTIFY_ACNAME);
             filter.addAction(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI);
             filter.addAction(Common.MAIN_SCREEN_NOW_UPDATE);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBRMessage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -437,9 +461,14 @@ public class SUB_01 extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -463,9 +492,13 @@ public class SUB_01 extends WpadScreen {
             Intent mIntent = new Intent();
             mIntent.putExtra(Common.WIDGET_SELECTED_ID, mIconInfoTable.getIconInfoByIndex(nIconIndex).getIconID());
             ((MainActivity)mContext).StartPopup(ID.POPUPS.POPUP_ADDSHORTCUT, mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] addShortcut(int nIndex)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 74 - 25
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/SUB_02.java

@@ -27,7 +27,7 @@ import kr.co.icontrols.wallpadsupport.WpadScreen;
 import kr.co.icontrols.wallpadsupport.WpadTextView;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadSound.SND;
-
+import com.util.LogUtil;
 
 public class SUB_02 extends WpadScreen {
 
@@ -83,9 +83,13 @@ public class SUB_02 extends WpadScreen {
 //
 //            IMG_PAGEINDICATOR_SUB_02 = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.SCREENS.SUB_02.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).W, getPosition(ID.SCREENS.SUB_02.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).H, R.drawable.main_pageindicator_sub_selected , R.drawable.main_pageindicator_sub_selected, ID.SCREENS.SUB_02.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02);
 //            ViewRegistration(layout, IMG_PAGEINDICATOR_SUB_02, getPosition(ID.SCREENS.SUB_02.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).X, getPosition(ID.SCREENS.SUB_02.ELEMENTS.IMAGES.PAGEINDICATOR_SUB_02).Y);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] SUB_02(Context context, RelativeLayout layout, WallPadAPI wallpadapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -93,9 +97,13 @@ public class SUB_02 extends WpadScreen {
         try {
             Log.d(TAG, "[initScreen] ========== START ==========");
             registerBRMessage();
-        }  catch (Exception e) {
+        }  catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] initScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -112,9 +120,13 @@ public class SUB_02 extends WpadScreen {
                     TXT_SHORTCUT_NAME[i] = null;
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] unRegisterWidgetIcon(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -156,9 +168,13 @@ public class SUB_02 extends WpadScreen {
                 Log.w(TAG, "[registerBasicIcons] There is no icons to show the second page!! nIconCnt [" + nIconCnt + "]");
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBasicIcons(RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -176,9 +192,13 @@ public class SUB_02 extends WpadScreen {
             if (intent.getAction().equals(Intent.ACTION_TIME_TICK)) {
                 Log.d(TAG, "[onBrReceive] (BR) ACTION_TIME_TICK");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -231,9 +251,13 @@ public class SUB_02 extends WpadScreen {
                     }
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -304,9 +328,13 @@ public class SUB_02 extends WpadScreen {
 //                case 40 : resourceID = R.drawable.w_40; break;
 //                case 41 : resourceID = R.drawable.w_41; break;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getWeatherImgResource(int code)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return resourceID;
     }
@@ -327,9 +355,13 @@ public class SUB_02 extends WpadScreen {
                 case 9 : resourceID = R.drawable.man_jump_clock_num_9; break;
                 default : resourceID = R.drawable.man_jump_clock_num_colon; break;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getResourceTimeNum(int num)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return resourceID;
     }
@@ -340,9 +372,13 @@ public class SUB_02 extends WpadScreen {
             filter.addAction(define.NOTIFY_ACNAME);
             filter.addAction(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI);
             filter.addAction(Common.MAIN_SCREEN_NOW_UPDATE);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerBRMessage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -491,9 +527,13 @@ public class SUB_02 extends WpadScreen {
 ////                    ((MainActivity)(getContext())).StartPopup(ID_OLD.SCREENS.InsertWidgetPopupScreen , newIntent);
 //                    break;
 //            }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] runShortcut(int idx)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -715,9 +755,14 @@ public class SUB_02 extends WpadScreen {
                 default:
                     return position;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return position;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getPosition(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return position;
         }
     }
@@ -741,9 +786,13 @@ public class SUB_02 extends WpadScreen {
             Intent mIntent = new Intent();
             mIntent.putExtra(Common.WIDGET_SELECTED_ID, mIconInfoTable.getIconInfoByIndex(nIconIndex).getIconID());
             ((MainActivity)mContext).StartPopup(ID_OLD.SCREENS.InsertWidgetPopupScreen , mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] addShortcut(int nIndex)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 68 - 22
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/EnergyAlramPopupMgr.java

@@ -2,6 +2,7 @@ package kr.co.icontrols.wallpadmain.util;
 
 import android.content.Context;
 import android.util.Log;
+import com.util.LogUtil;
 
 import com.artncore.WallPadDataMgr.wallpaddbmgr;
 
@@ -59,9 +60,13 @@ public final class EnergyAlramPopupMgr {
 		{
 			set_MainInfoDB( context , Name , Integer.toString( ALAM_STEP_INI ) );
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -71,9 +76,13 @@ public final class EnergyAlramPopupMgr {
 		{
 			set_MainInfoDB( context , Name , Integer.toString( ALAM_STEP_NEAR ) );
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -83,9 +92,13 @@ public final class EnergyAlramPopupMgr {
 		{
 			set_MainInfoDB( context , Name , Integer.toString( ALAM_STEP_OVER ) );
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -112,9 +125,13 @@ public final class EnergyAlramPopupMgr {
 			}
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -136,9 +153,14 @@ public final class EnergyAlramPopupMgr {
 			else 
 				return true;
 		}
-		catch( Exception e )
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e )
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
@@ -155,9 +177,13 @@ public final class EnergyAlramPopupMgr {
 			}
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -175,9 +201,13 @@ public final class EnergyAlramPopupMgr {
 			ret = Integer.parseInt(strRet);
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		
 		return ret;
@@ -196,9 +226,13 @@ public final class EnergyAlramPopupMgr {
 			}
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -219,9 +253,13 @@ public final class EnergyAlramPopupMgr {
 			ret = Integer.parseInt(strRet);
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		
 		return ret;	
@@ -241,9 +279,13 @@ public final class EnergyAlramPopupMgr {
 			}
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -272,9 +314,13 @@ public final class EnergyAlramPopupMgr {
 			}
 			mgr.closeDB();
 		}
-		catch( Exception e)
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
 		{
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		
 		return bRet;	

File diff suppressed because it is too large
+ 214 - 145
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ExternalMobileService.java


+ 108 - 30
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IGW200.java

@@ -12,7 +12,7 @@ import com.artncore.wallpadapi.DLockAPI;
 import com.artncore.wallpadapi.DLockAPI.DOORSTATUS;
 import com.artncore.wallpadapi.IGW200dAPI;
 import com.artncore.wallpadapi.WallPadAPI;
-
+import com.util.LogUtil;
 import android.app.ActivityManager;
 import android.app.ActivityManager.RunningTaskInfo;
 import android.content.BroadcastReceiver;
@@ -126,9 +126,14 @@ public class IGW200 {
             intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
             intent.putExtra("keycode", code);
             mContext.sendBroadcast(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -100;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setSendEventBR(int code) code = " + code);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
         }
         return 0;
@@ -174,8 +179,13 @@ public class IGW200 {
 			ComponentName topActivity=taskInfo.get(0).topActivity;
 			String str=topActivity.getPackageName();
 			return str;
-		} catch (Exception e) {
-			e.printStackTrace();
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return "  ";
+        }
+		catch (Exception e) {
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return "  ";
 		}
 	}
@@ -201,7 +211,13 @@ public class IGW200 {
 			else if (strActionName.equals(IGW200dAPI.CID_BR_NAME)) {
 				String CID_Number = intent.getStringExtra("CID_NUMBER");
 				Log.d( TAG , "[IGW200InterfaceBR] CID [" + CID_Number + "]");
-				if (bFirst) try{Thread.sleep(1000);} catch (Exception e){e.printStackTrace();}
+				if (bFirst) try{Thread.sleep(1000);}
+				catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
+				catch (Exception e){
+					LogUtil.errorLogInfo("", TAG, e);
+				}
 				bFirst = false;
 
 				Intent mIntent = new Intent(Common.BR_CALLED_CID);
@@ -326,7 +342,13 @@ public class IGW200 {
 				else {
 					if (mWallPadEmerButton != null) {
 						mWallPadEmerButton.Exit();
-						try{Thread.sleep(100);} catch (Exception e){e.printStackTrace();}
+						try{Thread.sleep(100);}
+						catch (RuntimeException re) {
+							LogUtil.errorLogInfo("", TAG, re);
+						}
+						catch (Exception e){
+							LogUtil.errorLogInfo("", TAG, e);
+						}
 						mWallPadEmerButton = null;
 					}
 				}
@@ -356,10 +378,15 @@ public class IGW200 {
 				Log.e(TAG, "[ctrlDeviceIO] - mIGW200dAPI.ControlOutput()  ret = " + ret + " / ErrorCode = " + mIGW200dAPI.ErrorCode.ErrStr());
 				return -2;
 			}
-		} catch(Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -102;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[ctrlDeviceIO] - [Exception Error] mIGW200dAPI.ControlOutput()");
 			Log.e(TAG, "[ctrlDeviceIO] - " + e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return -102;
 		}
 		//DebugLogOutput("[ctrlDeviceIO] - OK");
@@ -387,15 +414,24 @@ public class IGW200 {
 	                Log.e(TAG, "[changeCallPath] - mIGW200dAPI.ControlTelPath(" + ChangePath + ")  ret = " + ret + " / ErrorCode = " + mIGW200dAPI.ErrorCode.ErrStr());
 	                return -2;
 	            }
-	        } catch(Exception e) {
+	        } catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return -102;
+			}
+			catch (Exception e) {
 	            Log.e(TAG, "[changeCallPath] - [Exception Error] mIGW200dAPI.ControlTelPath()");
 	            Log.e(TAG, "[changeCallPath] - " + e.toString());
-	            e.printStackTrace();
+	            //e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
 	            return -102;
 	        }
-    	} catch (Exception e) {
+    	} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
     		Log.e(TAG, "[changeCallPath] - " + e.toString());
-    		e.printStackTrace();
+    		//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
     	}
         return 0;
     }
@@ -421,10 +457,15 @@ public class IGW200 {
                 Log.e(TAG, "[updateDeviceStatus] getState - ret (" + ret + ")   ErrorCode = " + mIGW200dAPI.ErrorCode.ErrStr());
                 return -2;
             }
-        } catch(Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -102;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[updateDeviceStatus] - [Exception Error] mIGW200dAPI.Refresh(" + real + ")");
             Log.e(TAG, "[updateDeviceStatus] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -102;
         }
         // 3. EMData Copy
@@ -471,10 +512,15 @@ public class IGW200 {
                 Log.e(TAG, "[Device_BathEmerAckRelase] - mIGW200dAPI.BathEmerAckRelase()  ret = " + ret + " / ErrorCode = " + mIGW200dAPI.ErrorCode.ErrStr());
                 return -2;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -102;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Device_BathEmerAckRelase] - [Exception Error] mIGW200dAPI.BathEmerAckRelase()");
             Log.e(TAG, "[Device_BathEmerAckRelase] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -102;
         }
         return 0;
@@ -500,9 +546,13 @@ public class IGW200 {
 	        intent.setComponent(new ComponentName(Common.EMER_ALARM_APK, Common.EMER_ALARM_APK + Common.MAIN_ACTIVITY ));            
 	        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
 	        context.startActivity(intent);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 	}
 	
@@ -516,7 +566,12 @@ public class IGW200 {
 		
 		public WallPadEmerButton() {
 			try { mGleInterface = new jni(); }
-	        catch (Exception e) { Log.e("Exception", "[ExceptionError] - onCreate->mGleInterface Create : " + e); }
+	        catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				Log.e("Exception", "[ExceptionError] - onCreate->mGleInterface Create : " + e);
+			}
 		}
 		
 		public void run() {
@@ -534,16 +589,27 @@ public class IGW200 {
 						}
 					}
 					for (int i = 0 ; i < 10 ; i++) {
-						try{Thread.sleep(50);} catch (Exception e){e.printStackTrace();}
-						if (m_ThreadExit) {
+						try{Thread.sleep(50);}
+						catch (RuntimeException re) {
+							LogUtil.errorLogInfo("", TAG, re);
+						}
+						catch (Exception e){
+							LogUtil.errorLogInfo("", TAG, e);//e.printStackTrace();
+						}
+						if (m_ThreadExit && mGleInterface!=null) {
 							mGleInterface.setEmerLedOnOff(false);
 							return;
 						}
 					}
 				}
 				while (true);
-			} catch (Exception e) {
-				e.printStackTrace();			
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return;
+			}
+			catch (Exception e) {
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
 				e.getStackTrace();
 				return;
 			}
@@ -573,8 +639,12 @@ public class IGW200 {
 	    		DoorLockState = mDLockAPI.data.DoorStatus;
 	    		Log.d(TAG, "[checkSensorforOutmode] DoorLockState [" + DoorLockState + "]");
 	    	}
-		} catch (Exception e) {
-			e.printStackTrace();
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 
         // 현산향이 무선 도어락이 들어가면서 추가되어야 함
@@ -604,8 +674,12 @@ public class IGW200 {
 				DoorLockState = mDLockAPI.data.DoorStatus;
 				Log.d(TAG, "[checkSensorforInmode] DoorLockState [" + DoorLockState + "]");
 			}
-		} catch (Exception e) {
-			e.printStackTrace();
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 
 		// 현산향이 무선 도어락이 들어가면서 추가되어야 함
@@ -657,8 +731,12 @@ public class IGW200 {
 	    			return true;
 	    		}
 	    	}
-		} catch (Exception e) {
-			e.printStackTrace();
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return false;
     }

+ 103 - 30
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IGW300.java

@@ -28,7 +28,7 @@ import android.os.Handler;
 import android.os.Message;
 import android.util.Log;
 import android.view.KeyEvent;
-
+import com.util.LogUtil;
 public class IGW300 {
 
     private Context mContext = null;
@@ -147,9 +147,14 @@ public class IGW300 {
             intent.putExtra(Intent.EXTRA_KEY_EVENT, event);
             intent.putExtra("keycode", code);
             mContext.sendBroadcast(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -100;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] setSendEventBR(int code) code = " + code);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
         }
         return 0;
@@ -195,8 +200,13 @@ public class IGW300 {
             ComponentName topActivity=taskInfo.get(0).topActivity;
             String str=topActivity.getPackageName();
             return str;
-        } catch (Exception e) {
-            e.printStackTrace();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "  ";
+        }
+		catch (Exception e) {
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return "  ";
         }
     }
@@ -340,7 +350,13 @@ public class IGW300 {
                 else {
                     if (mWallPadEmerButton != null) {
                         mWallPadEmerButton.Exit();
-                        try{Thread.sleep(100);} catch (Exception e){e.printStackTrace();}
+                        try{Thread.sleep(100);}
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
+                        catch (Exception e){
+                            LogUtil.errorLogInfo("", TAG, e);
+                        }
                         mWallPadEmerButton = null;
                     }
                 }
@@ -372,10 +388,14 @@ public class IGW300 {
                 Log.e(TAG, "[ctrlDeviceIO] - mIGW300API.ControlOutput()  ret = " + ret + " / ErrorCode = " + mIGW300API.ErrorCode.ErrStr());
                 return -2;
             }
-        } catch(Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -102;
+        }catch(Exception e) {
             Log.e(TAG, "[ctrlDeviceIO] - [Exception Error] mIGW300API.ControlOutput()");
             Log.e(TAG, "[ctrlDeviceIO] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return -102;
         }
         //DebugLogOutput("[ctrlDeviceIO] - OK");
@@ -403,15 +423,23 @@ public class IGW300 {
                     Log.e(TAG, "[changeCallPath] - mIGW300API.ControlTelPath(" + ChangePath + ")  ret = " + ret + " / ErrorCode = " + mIGW300API.ErrorCode.ErrStr());
                     return -2;
                 }
-            } catch(Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return -102;
+            }catch(Exception e) {
                 Log.e(TAG, "[changeCallPath] - [Exception Error] mIGW300API.ControlTelPath()");
                 Log.e(TAG, "[changeCallPath] - " + e.toString());
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
                 return -102;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[changeCallPath] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return 0;
     }
@@ -437,10 +465,14 @@ public class IGW300 {
                 Log.e(TAG, "[updateDeviceStatus] getState - ret (" + ret + ")   ErrorCode = " + mIGW300API.ErrorCode.ErrStr());
                 return -2;
             }
-        } catch(Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -102;
+        }catch(Exception e) {
             Log.e(TAG, "[updateDeviceStatus] - [Exception Error] mIGW300API.Refresh(" + real + ")");
             Log.e(TAG, "[updateDeviceStatus] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return -102;
         }
         // 3. EMData Copy
@@ -487,7 +519,10 @@ public class IGW300 {
 //                Log.e(TAG, "[Device_BathEmerAckRelase] - mIGW200dAPI.BathEmerAckRelase()  ret = " + ret + " / ErrorCode = " + mIGW300API.ErrorCode.ErrStr());
 //                return -2;
 //            }
-//        } catch (Exception e) {
+//        } catch (RuntimeException re) {
+//            LogUtil.errorLogInfo("", TAG, re);
+//        }
+//		catch (Exception e) {
 //            Log.e(TAG, "[Device_BathEmerAckRelase] - [Exception Error] mIGW200dAPI.BathEmerAckRelase()");
 //            Log.e(TAG, "[Device_BathEmerAckRelase] - " + e.toString());
 //            e.printStackTrace();
@@ -516,9 +551,13 @@ public class IGW300 {
             intent.setComponent(new ComponentName(Common.EMER_ALARM_APK, Common.EMER_ALARM_APK + Common.MAIN_ACTIVITY ));
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             context.startActivity(intent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -532,7 +571,12 @@ public class IGW300 {
 
         public WallPadEmerButton() {
             try { mGleInterface = new jni(); }
-            catch (Exception e) { Log.e("Exception", "[ExceptionError] - onCreate->mGleInterface Create : " + e); }
+            catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
+                Log.e("Exception", "[ExceptionError] - onCreate->mGleInterface Create : " + e);
+            }
         }
 
         public void run() {
@@ -550,16 +594,27 @@ public class IGW300 {
                         }
                     }
                     for (int i = 0 ; i < 10 ; i++) {
-                        try{Thread.sleep(50);} catch (Exception e){e.printStackTrace();}
-                        if (m_ThreadExit) {
+                        try{Thread.sleep(50);}
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
+                        catch (Exception e){
+                            LogUtil.errorLogInfo("", TAG, e);
+                        }
+                        if (m_ThreadExit && mGleInterface!=null) {
                             mGleInterface.setEmerLedOnOff(false);
                             return;
                         }
                     }
                 }
                 while (true);
-            } catch (Exception e) {
-                e.printStackTrace();
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return;
+            }
+            catch (Exception e) {
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
                 e.getStackTrace();
                 return;
             }
@@ -621,9 +676,13 @@ public class IGW300 {
                 }
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         // 현산향이 무선 도어락이 들어가면서 추가되어야 함
@@ -666,7 +725,10 @@ public class IGW300 {
                 DoorLockState = mDLockAPI.data.DoorStatus;
                 Log.d(TAG, "[checkSensorforInmode] DoorLockState [" + DoorLockState + "]");
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             e.printStackTrace();
         }*/
 
@@ -707,9 +769,13 @@ public class IGW300 {
                 }
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         // 현산향이 무선 도어락이 들어가면서 추가되어야 함
@@ -761,7 +827,10 @@ public class IGW300 {
                     return true;
                 }
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             e.printStackTrace();
         }*/
 
@@ -810,9 +879,13 @@ public class IGW300 {
                 }
             }
         }
-        catch (Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e)
         {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         return false;

File diff suppressed because it is too large
+ 316 - 221
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IconManager.java


+ 13 - 4
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MainDatabaseManager.java

@@ -13,6 +13,7 @@ import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
+import com.util.LogUtil;
 
 public class MainDatabaseManager {
 
@@ -334,8 +335,12 @@ public class MainDatabaseManager {
             if (wallpadStatusData.GetAlarmStatus() == WallpadStatusData.GUARD_OUT)
                 ret = true;
         }
-        catch (Exception e) {
-            e.printStackTrace();
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         wallpadStatusData.closeDB();
@@ -581,8 +586,12 @@ public class MainDatabaseManager {
                 }
             }
         }
-        catch (Exception e) {
-            e.printStackTrace();
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
 

File diff suppressed because it is too large
+ 353 - 155
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MobileProcService.java


+ 91 - 34
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ShortcutBox.java

@@ -15,7 +15,7 @@ import kr.co.icontrols.wallpadsupport.Version;
 
 import android.content.Context;
 import android.util.Log;
-
+import com.util.LogUtil;
 public class ShortcutBox {
 
 	private final String TAG = "ShortcutBox";
@@ -173,9 +173,14 @@ public class ShortcutBox {
 				}
 			}
 			return ShortcutInfoResult;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return null;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] getShortcutInfo(int shortcutid)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return null;
 		}
 	}
@@ -229,9 +234,13 @@ public class ShortcutBox {
 				}
 			}
 			reOrderingShortcut();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] ShortcutBox(Context context)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		 }
 	}
 	
@@ -255,9 +264,13 @@ public class ShortcutBox {
                 Common.DebugLog("----- add widgetID : " + mShortcutData[Pos].nShortcutID);
             }
 			
-		} catch(Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerWidget(int Pos, int nShortcutID)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return true;
 	}
@@ -297,9 +310,13 @@ public class ShortcutBox {
 			bRet = widgetTbl.AddWidgetData(PlusWidgetPos+1 , mShortcutData[PlusWidgetPos+1].nShortcutID);
 			wpd.closeDB();
 			Common.DebugLog("----- add widgetID : " + mShortcutData[PlusWidgetPos].nShortcutID);
-		} catch( Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] addWidgetRegister(int PlusWidgetPos , int nShortcutID)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return true;
 	}
@@ -312,9 +329,13 @@ public class ShortcutBox {
 			List<WidgetItem> getWidgetList  = widgetTbl.GetWidgetData();
 			wpd.closeDB();
 			RetValue = getWidgetList.size();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerWidgetCount()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return RetValue;
 	}
@@ -329,9 +350,13 @@ public class ShortcutBox {
 				if (getWidgetList.get(i).widgetID == WidgetId)
 					return true;
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getSearchWidget(int WidgetId)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return false;
 	}
@@ -348,9 +373,13 @@ public class ShortcutBox {
 					retIdx = i;
 				}
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getIdxPlusWidget()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return retIdx;
 	}
@@ -387,9 +416,14 @@ public class ShortcutBox {
 				}
 			}
 
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			mWallpadStatusData.closeDB();
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] reOrderingShortcut()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             mWallpadStatusData.closeDB();
 		}
 	}
@@ -406,9 +440,13 @@ public class ShortcutBox {
 			WidgetTable widgetTbl = wpd.GetWidgetTableController();
 			widgetTbl.DeleteWidgetData(Pos);
 			wpd.closeDB();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] deleteWidget(int Pos)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return true;
 	}
@@ -416,18 +454,27 @@ public class ShortcutBox {
 	public boolean deleteWidgetId(int id) {
 		try {
 			for (int i = 0; i < mShortcutData.length; i++) {
-				if (mShortcutData[i].nShortcutID == id) {
-					mShortcutData[i].nShortcutID = 0;
-					mShortcutData[i].mIconUnitInfo = null;
-					nShortcutCnt--;
-					reOrderingShortcut();
-					return true;
+				ShortcutData item = mShortcutData[i];
+				if(item!=null)
+				{
+					if (item.nShortcutID == id) {
+						item.nShortcutID = 0;
+						item.mIconUnitInfo = null;
+						nShortcutCnt--;
+						reOrderingShortcut();
+						return true;
+					}
 				}
+				else return false;
 			}
 			// DB 또는 파일에 리스트를 갱신한다.
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] deleteWidgetId(int id)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return false;
 	}
@@ -435,9 +482,14 @@ public class ShortcutBox {
 	public ShortcutData requestPosWidget(int Pos) {
 		try {
 			return mShortcutData[Pos];
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] requestPosWidget(int Pos)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return null;
 		}
 	}
@@ -486,7 +538,7 @@ public class ShortcutBox {
 			if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
 					|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I) {
                 // 엘리베이터
-                if (strElevEnable.contains("사용함")) {
+                if (strElevEnable!=null && strElevEnable.contains("사용함")) {
                     allWidget[nWidgetCnt++] = new IconUnitInfo(ID.SHORTCUTS.IDS.ELEVATOR, ID.SHORTCUTS.NAMES.ELEVATOR, ID.LINKEDSCREEN.OtherFunc.ELEVATOR_CALL,
                             R.drawable.man_jump_icon_ele_normal_2, R.drawable.man_jump_icon_ele_pressed_2, R.drawable.man_jump_icon_ele_pressed_2, R.drawable.man_jump_icon_ele_pressed_2);
                 }
@@ -614,7 +666,7 @@ public class ShortcutBox {
             }
             else if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010 || Version.getModelType() == Version.MODEL_TYPE.IHN_1010_I) {
                 // 엘리베이터
-                if (strElevEnable.contains("사용함")) {
+                if (strElevEnable!=null && strElevEnable.contains("사용함")) {
                     allWidget[nWidgetCnt++] = new IconUnitInfo(ID.SHORTCUTS.IDS.ELEVATOR, ID.SHORTCUTS.NAMES.ELEVATOR, ID.LINKEDSCREEN.OtherFunc.ELEVATOR_CALL,
                             R.drawable.man_jump_icon_ele_normal_2, R.drawable.man_jump_icon_ele_pressed_2, R.drawable.man_jump_icon_ele_pressed_2, R.drawable.man_jump_icon_ele_pressed_2);
                 }
@@ -742,7 +794,7 @@ public class ShortcutBox {
             }
             else {
                 // 엘리베이터
-                if (strElevEnable.contains("사용함")) {
+                if (strElevEnable!=null && strElevEnable.contains("사용함")) {
                     allWidget[nWidgetCnt++] = new IconUnitInfo(ID.SHORTCUTS.IDS.ELEVATOR, ID.SHORTCUTS.NAMES.ELEVATOR, ID.LINKEDSCREEN.OtherFunc.ELEVATOR_CALL,
                             R.drawable.man_jump_icon_ele_normal_2, R.drawable.man_jump_icon_ele_pressed_2, R.drawable.man_jump_icon_ele_pressed_2, R.drawable.man_jump_icon_ele_pressed_2);
                 }
@@ -870,9 +922,14 @@ public class ShortcutBox {
             }
 
 			return retAllWidget;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			if (mWallpadDeviceSet != null) mWallpadDeviceSet.closeDB();
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getEntireShortcutData()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			if (mWallpadDeviceSet != null) mWallpadDeviceSet.closeDB();
 		}
 		return null;

+ 81 - 26
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ShortcutManager.java

@@ -11,7 +11,7 @@ import kr.co.icontrols.wallpadmain.R;
 import kr.co.icontrols.wallpadmain.declare.Common;
 import kr.co.icontrols.wallpadmain.declare.ID;
 import kr.co.icontrols.wallpadmain.declare.ID_OLD;
-
+import com.util.LogUtil;
 import android.content.Context;
 import android.util.Log;
 
@@ -154,9 +154,14 @@ public class ShortcutManager {
 				}
 			}
 			return ShortcutInfoResult;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] getShortcutInfo(int shortcutid)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return null;
 		}
 	}
@@ -199,9 +204,13 @@ public class ShortcutManager {
 				}
 			}
 			reOrderingShortcut();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] ShortcutManager(Context context, int nMAXShortcutsCnt)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		 }
 	}
 
@@ -239,9 +248,13 @@ public class ShortcutManager {
                 }
             }
             reOrderingShortcut();
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] ShortcutManager(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 	
@@ -265,9 +278,13 @@ public class ShortcutManager {
                 Common.DebugLog("----- add widgetID : " + mShortcutInfo[Pos].nShortcutID);
             }
 			
-		} catch(Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerWidget(int Pos, int nShortcutID)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return true;
 	}
@@ -307,9 +324,13 @@ public class ShortcutManager {
 //			bRet = widgetTbl.AddWidgetData(PlusWidgetPos+1 , mShortcutInfo[PlusWidgetPos+1].nShortcutID);
 //            mWallpadStatusData.closeDB();
 //			Common.DebugLog("----- add widgetID : " + mShortcutInfo[PlusWidgetPos].nShortcutID);
-		} catch( Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] addWidgetRegister(int PlusWidgetPos , int nShortcutID)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return true;
 	}
@@ -322,9 +343,13 @@ public class ShortcutManager {
 			List<WidgetItem> getWidgetList  = widgetTbl.GetWidgetData();
             mWallpadStatusData.closeDB();
 			RetValue = getWidgetList.size();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] registerWidgetCount()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return RetValue;
 	}
@@ -339,9 +364,13 @@ public class ShortcutManager {
 				if (getWidgetList.get(i).widgetID == WidgetId)
 					return true;
 			}
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getSearchWidget(int WidgetId)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return false;
 	}
@@ -358,7 +387,10 @@ public class ShortcutManager {
 //					retIdx = i;
 //				}
 //			}
-//		} catch (Exception e) {
+//		} catch (RuntimeException re) {
+//            LogUtil.errorLogInfo("", TAG, re);
+//        }
+//		catch (Exception e) {
 //            Log.e(TAG, "[Exception] getIdxPlusWidget()");
 //			e.printStackTrace();
 //		}
@@ -397,9 +429,14 @@ public class ShortcutManager {
 				}
 			}
 
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			mWallpadStatusData.closeDB();
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] reOrderingShortcut()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             mWallpadStatusData.closeDB();
 		}
 	}
@@ -416,9 +453,13 @@ public class ShortcutManager {
 			WidgetTable widgetTbl = mWallpadStatusData.GetWidgetTableController();
 			widgetTbl.DeleteWidgetData(Pos);
             mWallpadStatusData.closeDB();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] deleteWidget(int Pos)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return true;
 	}
@@ -435,9 +476,13 @@ public class ShortcutManager {
 				}
 			}
 			// DB 또는 파일에 리스트를 갱신한다.
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] deleteWidgetId(int id)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return false;
 	}
@@ -445,9 +490,14 @@ public class ShortcutManager {
 	public ShortcutInfo requestPosWidget(int Pos) {
 		try {
 			return mShortcutInfo[Pos];
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] requestPosWidget(int Pos)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return null;
 		}
 	}
@@ -614,9 +664,14 @@ public class ShortcutManager {
             }
 
 			return retAllWidget;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			if (mWallpadDeviceSet != null) mWallpadDeviceSet.closeDB();
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getEntireShortcutData()");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			if (mWallpadDeviceSet != null) mWallpadDeviceSet.closeDB();
 		}
 		return null;

+ 29 - 17
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/StringUtil.java

@@ -8,6 +8,7 @@ import java.util.StringTokenizer;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadmain.declare.Common;
 import android.annotation.SuppressLint;
@@ -64,7 +65,11 @@ public class StringUtil {
         } else {
             try {
                 result = Integer.parseInt(str);
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e) {
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
         return result;
@@ -189,28 +194,35 @@ public class StringUtil {
         
         String myDong = addc.Dong;
         String myHo = addc.Ho;
-        if ((myDong.equalsIgnoreCase("NONE") == true) ||(myHo.equalsIgnoreCase("NONE") == true)) {
+        if ((myDong!=null && myDong.equalsIgnoreCase("NONE") == true) ||(myHo!=null && myHo.equalsIgnoreCase("NONE") == true)) {
             return -999;
         }
 
-        String[] TempSplit = addc.IPAddress.split("\\.");
-        int randomValue = -1;
-        if ((TempSplit == null) || (TempSplit.length != 4)) {
-            Log.e(TAG, "[GetDelayTimeBaseIP] TempSplit is Error");
-            return -999;
-        }
-        
-        randomValue = (Integer.parseInt(TempSplit[1]) * 60) + (Integer.parseInt(TempSplit[2]) * 10) + (Integer.parseInt(TempSplit[3]) * 1) + (Integer.parseInt(TempSplit[1]) * 4);
-        
-        if (addc.UseOrNotRentHouse == true) {
-            randomValue = randomValue - 200;
-            if (randomValue < 1) {
-                randomValue = (Integer.parseInt(TempSplit[1]) * 60) + (Integer.parseInt(TempSplit[2]) * 10) + (Integer.parseInt(TempSplit[3]) * 1) + (Integer.parseInt(TempSplit[1]) * 4);
+        if(addc.IPAddress!=null)
+        {
+            String[] TempSplit = addc.IPAddress.split("\\.");
+            int randomValue = -1;
+            if ((TempSplit == null) || (TempSplit.length != 4)) {
+                Log.e(TAG, "[GetDelayTimeBaseIP] TempSplit is Error");
+                return -999;
             }
+
+            randomValue = (Integer.parseInt(TempSplit[1]) * 60) + (Integer.parseInt(TempSplit[2]) * 10) + (Integer.parseInt(TempSplit[3]) * 1) + (Integer.parseInt(TempSplit[1]) * 4);
+
+            if (addc.UseOrNotRentHouse == true) {
+                randomValue = randomValue - 200;
+                if (randomValue < 1) {
+                    randomValue = (Integer.parseInt(TempSplit[1]) * 60) + (Integer.parseInt(TempSplit[2]) * 10) + (Integer.parseInt(TempSplit[3]) * 1) + (Integer.parseInt(TempSplit[1]) * 4);
+                }
+            }
+
+            Log.e(TAG, "[GetDelayTimeBaseIP] return value is " + randomValue);
+            return randomValue;
         }
+        else return -1;
+
+
 
-        Log.e(TAG, "[GetDelayTimeBaseIP] return value is " + randomValue);
-        return randomValue;
     }
 
 }

+ 253 - 114
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/WallPadiMAPUpgrade.java

@@ -5,6 +5,7 @@ import java.io.DataOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FilenameFilter;
+import java.io.IOException;
 import java.net.Socket;
 import java.net.SocketException;
 import java.util.ArrayList;
@@ -35,6 +36,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.commons.APIErrorCode;
 import com.artncore.commons.define;
+import com.util.LogUtil;
 import com.artncore.wallpadimap.WallPadiMAPClient;
 
 public class WallPadiMAPUpgrade {
@@ -134,9 +136,15 @@ public class WallPadiMAPUpgrade {
 			Thread.sleep(300);
 			soc.close();
 			WallPadiMAPUpgrade.active = true;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			WallPadiMAPUpgrade.active = false;
+			return;
+        }
+		catch (Exception e) {
 		    Log.e(TAG, "[Exception] WallPadiMAPUpgrade(Context ctx, Document Docm, Socket soc)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			Log.e(TAG,APIErrorCode.GetLogPrefix()+" Return setActive False");
 			WallPadiMAPUpgrade.active = false;
 			return;			
@@ -183,7 +191,12 @@ public class WallPadiMAPUpgrade {
 			}
 		}
 		
-		try { Thread.sleep(waittime);} catch (Exception e) {e.printStackTrace();}
+		try { Thread.sleep(waittime);} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
+			LogUtil.errorLogInfo("", TAG, e);
+		}
 		
 		try {
 			ProposeUpgrade = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"+
@@ -203,9 +216,15 @@ public class WallPadiMAPUpgrade {
 			Wsdata.closeDB();
 			*/
 			SocClient.SendXMLDoc(ProposeUpgrade, true);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			active = false;
+			return;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] StartUpgrade()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			active = false;
 			return;			
 		}
@@ -544,26 +563,27 @@ public class WallPadiMAPUpgrade {
 			if (filename != null) Log.d( TAG ,  "[checkDownloadFilename] filename [" + filename + "], type [" +  type + "]");
 			else Log.d( TAG ,  "[checkDownloadFilename] filename [null] , type [" +  type + "]");
 
-			// check update option
-			if (!checkUpdateOption(astrFileName[2])) {
-				Log.w( TAG ,  "[checkDownloadFilename] Update option is not correct!!! astrFileName[2] : [" + astrFileName[2] + "]");
-				return false;
-			}
+			if (type == DownloadFileInfo.TYPE_BSP || type == DownloadFileInfo.TYPE_APP) {
 
-			// check & change update module name, if the module name contains "-". ("-" means it has update option)
-			astrFileName[2] = changeUpdateModuleName(astrFileName[2]);
+				// check update option
+				if (!checkUpdateOption(astrFileName[2])) {
+					Log.w( TAG ,  "[checkDownloadFilename] Update option is not correct!!! astrFileName[2] : [" + astrFileName[2] + "]");
+					return false;
+				}
 
-			if (type == DownloadFileInfo.TYPE_BSP && !astrFileName[0].equals(BSP_FILE_ID)) {
-				Log.w( TAG ,  "[checkDownloadFilename] Filetype is not correct!! astrFileName[0] : [" + astrFileName[0] + "], type + [" + type + "]");
-				return false;
-			}
+				// check & change update module name, if the module name contains "#". ("#" means it has update option)
+				astrFileName[2] = changeUpdateModuleName(astrFileName[2]);
 
-			if (type == DownloadFileInfo.TYPE_APP && !astrFileName[0].equals(APP_FILE_ID)) {
-                Log.w( TAG ,  "[checkDownloadFilename] Filetype is not correct!! astrFileName[0] : [" + astrFileName[0] + "], type + [" + type + "]");
-				return false;
-			}
+				if (type == DownloadFileInfo.TYPE_BSP && !astrFileName[0].equals(BSP_FILE_ID)) {
+					Log.w( TAG ,  "[checkDownloadFilename] Filetype is not correct!! astrFileName[0] : [" + astrFileName[0] + "], type + [" + type + "]");
+					return false;
+				}
+
+				if (type == DownloadFileInfo.TYPE_APP && !astrFileName[0].equals(APP_FILE_ID)) {
+					Log.w( TAG ,  "[checkDownloadFilename] Filetype is not correct!! astrFileName[0] : [" + astrFileName[0] + "], type + [" + type + "]");
+					return false;
+				}
 
-			if (type == DownloadFileInfo.TYPE_BSP || type == DownloadFileInfo.TYPE_APP) {
 				if(Version.getModelType() == Version.MODEL_TYPE.IHN_D101) {
                     // V40 플랫폼 업그레이드
                     if (!(astrFileName[1].equals(DEV_V40_ARCH_ID) || astrFileName[1].equals(DEV_A40i_ARCH_ID)) || !astrFileName[2].equals(IHN_D101_ID)  || (astrFileName[3].length() != 14)) {
@@ -729,29 +749,17 @@ public class WallPadiMAPUpgrade {
 					return false;
 				}
 			}
-			/*
-			if (type == DownloadFileInfo.TYPE_BSP)
-			{
-				String Ver = astrFileName[3].substring(0,4)+"."+astrFileName[3].substring(4,6)+"."+astrFileName[3].substring(6,8)+"."+astrFileName[3].substring(8,10);
-				if (type == DownloadFileInfo.TYPE_BSP && Ver.equals(Build.DISPLAY)){
-					WallPadUpgradeLog("is Same Device Version "+Ver+"("+Build.DISPLAY+")");
-					return false;				
-				}
-			}
-			*/
-			//WallpadStatusData statusdata = new WallpadStatusData(ThisCtx);		
-			//String AppVer = statusdata.GetAPPVer();
-			//statusdata.closeDB();
-			//if (type == DownloadFileInfo.TYPE_APP && Ver.equals(AppVer)){
-			//	WallPadUpgradeLog("is Same APP Version "+Ver+"("+AppVer+")");
-			//	return false;				
-			//}
-			if (type == DownloadFileInfo.TYPE_IMG) return true;
+			else if (type == DownloadFileInfo.TYPE_IMG) return true;
 
 			return true;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e) {
 		    Log.e(TAG, "[Exception] checkDownloadFilename(String filename, int type)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		 }
 	}
@@ -762,22 +770,32 @@ public class WallPadiMAPUpgrade {
 	 * @return true: 업데이트 가능, false: 업데이트 불가
 	 */
 	private boolean checkUpdateOption(String strValue) {
-		try {
-			Log.i(TAG, "[checkUpdateOption] strValue [" + strValue + "]");
-			if (strValue.contains("#")) {
-				String[] strParsed = strValue.split("#");
-				String strModuleType = strParsed[1];
-				String strVer = strParsed[2];
+		if(strValue!=null)
+		{
+			try {
+				Log.i(TAG, "[checkUpdateOption] strValue [" + strValue + "]");
+				if (strValue.contains("#")) {
+					String[] strParsed = strValue.split("#");
+					String strModuleType = strParsed[1];
+					String strVer = strParsed[2];
 //				Log.i(TAG, "[checkUpdateOption] strModuleType [" + strModuleType + "], strVer [" + strVer + "]");
-				return checkUpdatableModuleVer(strModuleType, strVer);
+					return checkUpdatableModuleVer(strModuleType, strVer);
+				}
+				else return true;
+
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				return false;
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Exception] checkUpdateOption(String strValue)");
+				//e.printStackTrace();
+				LogUtil.errorLogInfo("", TAG, e);
+				return false;
 			}
-			else return true;
 
-		} catch (Exception e) {
-			Log.e(TAG, "[Exception] checkUpdateOption(String strValue)");
-			e.printStackTrace();
-			return false;
 		}
+		else return false;
 	}
 
 	private boolean checkUpdatableModuleVer(String strModule, String strVer) {
@@ -810,28 +828,42 @@ public class WallPadiMAPUpgrade {
 				}
 			}
 			else return false;
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e) {
 			Log.e(TAG, "[Exception] checkUpdatableModuleVer(String strModule, String strVer)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 	}
 
 	private String changeUpdateModuleName(String strValue) {
 		String strResult = "";
-		try {
-			Log.i(TAG, "[changeUpdateModuleName] strValue [" + strValue + "]");
-			if (strValue.contains("#")) {
-				String[] strParsed = strValue.split("#");
-				strResult = strParsed[0];
+		if(strValue!=null)
+		{
+			try {
+				Log.i(TAG, "[changeUpdateModuleName] strValue [" + strValue + "]");
+				if (strValue.contains("#")) {
+					String[] strParsed = strValue.split("#");
+					strResult = strParsed[0];
+				}
+				else strResult = strValue;
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				strResult = "Exception";
+			}
+			catch (Exception e) {
+				Log.e(TAG, "[Exception] changeUpdateModuleName(String strValue)");
+				//e.printStackTrace();
+				LogUtil.errorLogInfo("", TAG, e);
+				strResult = "Exception";
 			}
-			else strResult = strValue;
-		} catch (Exception e) {
-			Log.e(TAG, "[Exception] changeUpdateModuleName(String strValue)");
-			e.printStackTrace();
-			strResult = "Exception";
+			Log.i(TAG, "[changeUpdateModuleName] strResult [" + strResult + "]");
 		}
-		Log.i(TAG, "[changeUpdateModuleName] strResult [" + strResult + "]");
+
 		return strResult;
 	}
 
@@ -840,9 +872,13 @@ public class WallPadiMAPUpgrade {
 		try {
 			mPackageInfo = ThisCtx.getPackageManager().getPackageInfo(ThisCtx.getPackageName(), 0);
 		}
+		catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
 		catch (Exception e) {
 			Log.e(TAG, "[Exception] getAppVersion()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		return mPackageInfo.versionName;
 	}
@@ -868,7 +904,13 @@ public class WallPadiMAPUpgrade {
 			
 			onoff = true;
 			while (onoff) {
-				try{Thread.sleep(1000);}catch(Exception e){e.printStackTrace();}
+				try{Thread.sleep(1000);}
+				catch (RuntimeException re) {
+					LogUtil.errorLogInfo("", TAG, re);
+				}
+				catch (Exception e) {
+					LogUtil.errorLogInfo("", TAG, e);
+				}
 				Log.e(TAG, "ftp_FileDownloadWatcher start!");
 				if (ProcF == null) ProcF = new File(DownloadFile);
 				if (!ProcF.exists()) return;
@@ -918,20 +960,24 @@ public class WallPadiMAPUpgrade {
 			try {
 				f.setReceiveBufferSize(1024*512);
 			} catch (SocketException e1) {				
-				e1.printStackTrace();
+				//e1.printStackTrace();
+				LogUtil.errorLogInfo("", TAG, e1);
 				//RetryHandler.sendEmptyMessageDelayed(0, retryDelay);
 				ProcDownFail();
 				return;
 			}
 
-			int recebf = f.getReceiveDataSocketBufferSize();			
-			
+			int recebf = f.getReceiveDataSocketBufferSize();
+			FileOutputStream fos = null;
+			BufferedOutputStream ffos = null;
 			try {
 				WallpadStatusData Wsdata =  new WallpadStatusData(ThisCtx);
 				FTPServer = Wsdata.GetFTPIP();
 				Wsdata.closeDB();
 				f.connect(FTPServer);
-				boolean ret = f.login(id, passwd);
+				boolean ret = false;
+				for(int i =0; i< 1; i++)
+					ret = f.login(id, passwd);
 
 				if (ret == false) {
 					ProcDownFail();
@@ -957,9 +1003,9 @@ public class WallPadiMAPUpgrade {
 				}
 				
 				File downloadfile = new File(localFile);
-				if (downloadfile.exists()) downloadfile.delete();
-				FileOutputStream fos = new FileOutputStream(downloadfile);
-				BufferedOutputStream ffos = new BufferedOutputStream(fos);
+				if (downloadfile.exists()) FileDelete(downloadfile);//.delete();
+				fos = new FileOutputStream(downloadfile);
+				ffos = new BufferedOutputStream(fos);
 				path = ftpPATH;
 				boolean result;
 				
@@ -984,17 +1030,45 @@ public class WallPadiMAPUpgrade {
 					handle.sendMessage(msg);
 				}
 				//WatchThread.onoff = false;
-			} catch (Exception e) {
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				ProcDownFail();
+			}
+			catch (Exception e) {
 			    Log.e(TAG, "[Exception] ftp_FileDownload.run() 1");
-				e.printStackTrace();
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
 				ProcDownFail();
 			}
+			finally {
+				if(fos!=null) {
+					try {
+						fos.close();
+					} catch (IOException e) {
+						LogUtil.errorLogInfo("", TAG, e);
+					}
+				}
+				fos = null;
+
+				if(ffos!=null) {
+					try {
+						ffos.close();
+					} catch (IOException e) {
+						LogUtil.errorLogInfo("", TAG, e);
+					}
+					ffos = null;
+				}
+			}
 
 			try{				
 				f.quit();				
-			} catch (Exception e) {
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
                 Log.e(TAG, "[Exception] ftp_FileDownload.run() 2");
-				e.printStackTrace();
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
 			}
 		}	
 
@@ -1004,8 +1078,12 @@ public class WallPadiMAPUpgrade {
 			    CompleteFlag = false; //event_notify 계속보내는 버그로 인하여 추가함
 				f.logout();
 				f.quit();
-			} catch (Exception e) {			
-				e.printStackTrace();
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+			}
+			catch (Exception e) {
+				//e.printStackTrace();
+            	LogUtil.errorLogInfo("", TAG, e);
 			}
 			//WatchThread.onoff = false;
 			
@@ -1031,22 +1109,31 @@ public class WallPadiMAPUpgrade {
             Log.i(TAG, "[cleanSDRoot] =====START =====");
             for (int i = 0; i < strUpgradeFileKeyword_ALL.length; i++) {
 				String[] DeleteFile = findDirectoryFiles(PATH_LOCAL_ROOT, strUpgradeFileKeyword_ALL[i], strUpgradeFileExtention);
-				Log.i(TAG, "[cleanSDRoot] DeleteFile.length = " + DeleteFile.length);
-				File TargetFile;
-				for (int j = 0; j < DeleteFile.length; j++) {
-					TargetFile = new File(PATH_LOCAL_ROOT + DeleteFile[j]);
-					if (TargetFile.delete()) {
-						Log.i(TAG, "[cleanSDRoot] Success to delete!! TargetFile = " + TargetFile.getName());
-					}
-					else {
-						Log.i(TAG, "[cleanSDRoot] Fail to delete!! TargetFile = " + TargetFile.getName());
+				if(DeleteFile!=null)
+				{
+					Log.i(TAG, "[cleanSDRoot] DeleteFile.length = " + DeleteFile.length);
+					File TargetFile;
+					for (int j = 0; j < DeleteFile.length; j++) {
+						TargetFile = new File(PATH_LOCAL_ROOT + DeleteFile[j]);
+						if (TargetFile.delete()) {
+							Log.i(TAG, "[cleanSDRoot] Success to delete!! TargetFile = " + TargetFile.getName());
+						}
+						else {
+							Log.i(TAG, "[cleanSDRoot] Fail to delete!! TargetFile = " + TargetFile.getName());
+						}
 					}
 				}
+
 			}
             return true;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] cleanSDRoot()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1079,21 +1166,29 @@ public class WallPadiMAPUpgrade {
                 };
 
                 String[] mFiles = Directory.list(mFilenameFilter);
-                Log.i(TAG, "[findDirectoryFiles] mFiles.length = " + mFiles.length);
-                strResult = new String[mFiles.length];
-                for (int i = 0; i < strResult.length; i++) {
-                    strResult[i] = mFiles[i];
-                    Log.i(TAG, "[findDirectoryFiles] strResult[" + i + "] = " + strResult[i]);
-                }
+                if(mFiles!=null)
+				{
+					Log.i(TAG, "[findDirectoryFiles] mFiles.length = " + mFiles.length);
+					strResult = new String[mFiles.length];
+					for (int i = 0; i < strResult.length; i++) {
+						strResult[i] = mFiles[i];
+						Log.i(TAG, "[findDirectoryFiles] strResult[" + i + "] = " + strResult[i]);
+					}
+				}
                 return strResult;
             }
             else {
                 Log.i(TAG, "[findDirectoryFiles] Directory is not exist!! [" + strDstDir + "]");
                 return null;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] findDirectoryFiles()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -1107,9 +1202,13 @@ public class WallPadiMAPUpgrade {
             Log.i(TAG, "[checkMemorySize] strInternalTotalMemorySize [" + strInternalTotalMemorySize + "], strAvailableInternalMemorySize [" + strAvailableInternalMemorySize + "]");
             Log.i(TAG, "[checkMemorySize] strExternalTotalMemorySize [" + strExternalTotalMemorySize + "], strAvailableExternalMemorySize [" + strAvailableExternalMemorySize + "]");
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] checkMemorySize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1123,9 +1222,14 @@ public class WallPadiMAPUpgrade {
 
             return totalBlocks * blockSize;
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -99;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getTotalInternalMemorySize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1141,9 +1245,14 @@ public class WallPadiMAPUpgrade {
             long availableBlocks = stat.getAvailableBlocks();
 
             return availableBlocks * blockSize;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -99;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getAvailableInternalMemorySize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1163,9 +1272,14 @@ public class WallPadiMAPUpgrade {
             } else {
                 return -1;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -99;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getTotalExternalMemorySize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1185,9 +1299,14 @@ public class WallPadiMAPUpgrade {
             } else {
                 return -1;
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return -99;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] getAvailableExternalMemorySize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1223,9 +1342,14 @@ public class WallPadiMAPUpgrade {
 
             return resultBuffer.toString();
 
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return null;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] formatSize(long size)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -1242,14 +1366,29 @@ public class WallPadiMAPUpgrade {
                 return true;
             }
             return false;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+			return false;
+        }
+		catch (Exception e) {
             Log.e(TAG, "[Exception] isStorage(boolean requireWriteAccess)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
 
 
+    private synchronized void FileDelete(File file)
+	{
+		if(file!=null && file.exists())
+		{
+			file.delete();
+		}
+	}
+
+
+
 
 
 

File diff suppressed because it is too large
+ 396 - 124
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/iMapServer.java


BIN
WallPadMain/src/main/jniLibs/armeabi-v7a/libwpd_v40interface2-jni.so


Some files were not shown because too many files changed in this diff