Selaa lähdekoodia

[WallPadMain]
1. 5.29일 소스로 업데이트
2. 2443기준일 경우, 원격검침기 사용안함
3. 2443기준일 경우, 콘센트 사용안하게 변경
4. 2443기준일 경우, 조명을 거실조명으로 사용하게 변경

[WallPadOutModeRun, WallPadSecurity, WallPadSupport]
1. 5.29일 소스로 업데이트

jglee 3 vuotta sitten
vanhempi
commit
c60913d656
38 muutettua tiedostoa jossa 2236 lisäystä ja 2045 poistoa
  1. 1 1
      WallPadMain/src/main/AndroidManifest.xml
  2. 1 0
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/IOInterface.java
  3. 50 39
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/MainActivity.java
  4. 2 3
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/PopupActivity.java
  5. 317 135
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/Common.java
  6. 1 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/ID.java
  7. 8 12
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/MobileXmlDefine.java
  8. 10 9
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMapDeviceEvent.java
  9. 1 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMapPublicEvent.java
  10. 4 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_MAIN.java
  11. 12 5
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/menu/CallSubMenuScreen.java
  12. 1 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/AdminPWInput.java
  13. 2 10
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/NoticeDetectStranger.java
  14. 25 0
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/HYOSUNGUI_MAIN_HN.java
  15. 12 7
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/MAIN.java
  16. 4 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IGW300.java
  17. 15 4
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IconManager.java
  18. 4 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ImageStringDataConvert.java
  19. 6 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MainDatabaseManager.java
  20. 233 179
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MobileProcService.java
  21. 2 1
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ShortcutBox.java
  22. 27 2
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/WallPadiMAPUpgrade.java
  23. 101 146
      WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/iMapServer.java
  24. 3 2
      WallPadOutmodeRun/src/main/AndroidManifest.xml
  25. 2 1
      WallPadOutmodeRun/src/main/java/kr/co/icontrols/wallpadoutmoderun/screen/OutModeSecurityRun.java
  26. 2 1
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/manual/SetLinkCtr_Manual.java
  27. 2 1
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/PopupOutModeWaiting.java
  28. 41 244
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/PopupSmartIOTCam.java
  29. 1106 1102
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/SecurityMainScreen.java
  30. 4 2
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/SetLinkCtrlMainScreen.java
  31. 1 1
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/VisitorVideoScreen.java
  32. 3 3
      WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/VisitorVideoViewer.java
  33. 2 2
      WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/Version.java
  34. 42 13
      WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadActivity.java
  35. 6 2
      WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadScale.java
  36. 30 8
      WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadScreen.java
  37. 107 23
      WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadSound.java
  38. 46 78
      WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadUtil.java

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

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadmain"
     android:versionCode="17"
-    android:versionName="2021.05.28.01">
+    android:versionName="2021.05.30.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 1 - 0
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/IOInterface.java

@@ -251,6 +251,7 @@ public class IOInterface {
                 case MODEL_TYPE.IHN_D101K_I:
                 case MODEL_TYPE.IHN_1010GL:
                 case MODEL_TYPE.IHN_1010GL_I:
+                case MODEL_TYPE.IHN_D101_I_OCF:
                 case MODEL_TYPE.IHN_1010GL_I_2443ALT:
                 case MODEL_TYPE.IHN_1010GL_I_6410ALT:
                     if (Build.VERSION.SDK_INT > 23) return BOARD_TYPE.V40_IGW300_NOUGAT;

+ 50 - 39
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/MainActivity.java

@@ -396,7 +396,8 @@ public class MainActivity extends WpadActivity {
         WallpadStatusData mWallpadStatusData = new WallpadStatusData(this);
         try {
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                 Log.i(TAG, "[initLivinglightPreset] Initialize preset for IHN-D101");
                 for (int i = 1; i < 5; i++) {
                     String strPreset = mWallpadStatusData.getLivinglightModeCtrlUnitValues(i, 0);
@@ -1644,7 +1645,8 @@ public class MainActivity extends WpadActivity {
             	// 현산향 
             	AutoIGALStatusReleaseSinario();
                 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) {
+                        || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                        || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                     mSdb_LivingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
                     mSdbAPI = mWallPadAPI.Get_SdbController();
 
@@ -2698,7 +2700,20 @@ public class MainActivity extends WpadActivity {
                             int doorCamType = intent.getIntExtra("DOORCAM_TYPE", -1);
                             Intent data = new Intent();
                             data.putExtra("DOORCAM_TYPE", doorCamType);
-                            StartPopup(ID.POPUPS.POPUP_NOTICESTRANGER, data);
+
+                            mIOInterface.ctrlLcdWakeUp();
+//                            StartPopup(ID.POPUPS.POPUP_NOTICESTRANGER, data); // 시나리오 변경: 거동수상자 알림 팝업 삭제 (바로 녹화 시작)
+
+                            WallpadStatusData SetData = new WallpadStatusData(mContext);
+                            boolean soundOut = SetData.GetSoundOutputOfEventAlarm();
+                            SetData.closeDB();
+                            if (soundOut) Sound().Play(SND.effect.EFFECT1);
+
+                            // 메인 앱으로 BR 전송
+                            Intent notiIntent = new Intent();
+                            notiIntent.setAction(define.NOTIFY_ACNAME);
+                            notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_ACCEPT_RECORD_STRANGER);
+                            mContext.sendBroadcast(notiIntent);
                             break;
 
                         case Common.BR_MAIN_NOTI.ACCEPT_RECORDING:
@@ -2706,11 +2721,6 @@ public class MainActivity extends WpadActivity {
                             m_CallSubMenuScreen.callStartCallAPK(ID.LINKEDSCREEN.SubCall.Door_Record, nEmerState);
                             break;
 
-                        case Common.BR_MAIN_NOTI.ACCEPT_TAKEPIC:
-                            nEmerState = intent.getIntExtra("EMERGENCY_STATE", -1);
-                            m_CallSubMenuScreen.callStartCallAPK(ID.LINKEDSCREEN.SubCall.Door_TakePic, nEmerState);
-                            break;
-
                         default:
                             Log.w(TAG, "[mWallPadNotifyBR] (BR.nKind) Not support!! -> " + kind);
                             break;
@@ -4089,7 +4099,8 @@ public class MainActivity extends WpadActivity {
 											//에너지 미터인 경우 안방 조명을 켜도록 하고
 											//에너지 미터가 안 달린 경우 거실 조명을 켜도록 한다
                                             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) {
+                                                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                                                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                                                 // 안방조명에 1번 조명만 제어하도록 한다
                                                 // 모닝콜이 울리면 일괄소등시나리오에 의해 일괄소등이 해제가 되겠네 ? 음.....이건 아닌데
                                                 // 모닝콜이 울리는 동안만 켜고 끄자 일괄소등 시나리오를 해제할까나? 그러면 팝업 화면에서 제어처리를?
@@ -4501,14 +4512,14 @@ public class MainActivity extends WpadActivity {
 		}
 	}
 
-    class runCallServices extends Thread {
-        public runCallServices() {
-            super();
-        }
-
-        public void run() {
-            try {
-                if (Version.getPlatformType() == Version.PLATFORM_TYPE.A40i) {
+	class runCallServices extends Thread {
+		public runCallServices() {
+			super();
+		}
+		
+		public void run() {
+			try {
+			    if (Version.getPlatformType() == Version.PLATFORM_TYPE.A40i) {
                     if (getIsSubWallpad()) {
                         Log.w(TAG, "[runCallServices.run()] ############### This wallpad is set as a sub-wallpad ###############");
                         Intent SubWallpadServiceLauncher = new Intent ("kr.co.icontrols.callengine.subwallpad.SubWallPadSerialManager.StartService");
@@ -4529,14 +4540,14 @@ public class MainActivity extends WpadActivity {
                         }
                     }
                 }
-                else {
+			    else {
                     int nModelType = Version.getModelType();
-                    if (nModelType == MODEL_TYPE.IHN_750) {
+			        if (nModelType == MODEL_TYPE.IHN_750) {
                         // SIP 서비스만 실행
                         Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.CeresSIPService.StartService");
                         getApplicationContext().startService(sipServiceLauncher);
                     }
-                    else {
+			        else {
                         // SIP/PSTN/Subphone 서비스 실행
                         Intent sipServiceLauncher = new Intent ("kr.co.icontrols.callengine.sip.CeresSIPService.StartService");
                         getApplicationContext().startService(sipServiceLauncher);
@@ -4548,12 +4559,15 @@ public class MainActivity extends WpadActivity {
                         getApplicationContext().startService(SubPhoneServiceLauncher);
                     }
                 }
-            } catch(Exception e) {
-                Log.e(TAG, "[Exception] runCallServices().run()");
-                e.printStackTrace();
+			} catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             }
-        }
-    }
+            catch (Exception e) {
+				Log.e(TAG, "[Exception] runCallServices().run()");
+                LogUtil.errorLogInfo("", TAG, e);
+			}
+		}
+	}
 
     // 방문객원격통화 솔루션 사용여부 판별
     private boolean GetRemoteCallUseInfo() {
@@ -6309,10 +6323,15 @@ public class MainActivity extends WpadActivity {
             else if (0 < strNear.length() && strNear.length() <= 8) EnergyAlramPopupMgr.PopupMsg01 = strNear + "사용량이 목표값에 가까워지고 있습니다.\n확인 하시겠습니까?";
             else EnergyAlramPopupMgr.PopupMsg01 = "";
 
-            if (strNear.length() > 10) EnergyAlramPopupMgr.PopupMsg02 = strOver + "사용량이\n목표값을 초과하였습니다.\n확인 하시겠습니까?";
-            else if (0 < strNear.length() && strNear.length() <= 10) EnergyAlramPopupMgr.PopupMsg02 = strOver + "사용량이 목표값을 초과하였습니다.\n확인 하시겠습니까?";
-            else EnergyAlramPopupMgr.PopupMsg02 = "";
-
+            if (strOver.length() > 10) {
+                EnergyAlramPopupMgr.PopupMsg02 = strOver + "사용량이\n목표값을 초과하였습니다.\n확인 하시겠습니까?";
+            }
+            else if (0 < strOver.length() && strOver.length() <= 10) {
+                EnergyAlramPopupMgr.PopupMsg02 = strOver + "사용량이 목표값을 초과하였습니다.\n확인 하시겠습니까?";
+            }
+            else if(strOver.length() < 0){
+                EnergyAlramPopupMgr.PopupMsg02 = "";
+            }
 
 
 
@@ -6983,10 +7002,6 @@ public class MainActivity extends WpadActivity {
             else if (nScreen == ID.LINKEDSCREEN.SubCall.Door_Record) {
                 eCallType = CALLTYPE.FRONT;
                 eEventType = CALLEVENTTYPE.DETECT_STRANGER;
-            }
-            else if (nScreen == ID.LINKEDSCREEN.SubCall.Door_TakePic) {
-                eCallType = CALLTYPE.FRONT;
-                eEventType = CALLEVENTTYPE.DETECT_STRANGER;
             }
 	        else if (nScreen == ID.LINKEDSCREEN.SubCall.Lobby) eCallType = CALLTYPE.LOBBY;
 	        else if (nScreen == ID.LINKEDSCREEN.SubCall.Guard) eCallType = CALLTYPE.GUARD;
@@ -7034,10 +7049,6 @@ public class MainActivity extends WpadActivity {
                 eCallType = CALLTYPE.FRONT;
                 eEventType = CALLEVENTTYPE.DETECT_STRANGER;
             }
-            else if (nScreen == ID.LINKEDSCREEN.SubCall.Door_TakePic) {
-                eCallType = CALLTYPE.FRONT;
-                eEventType = CALLEVENTTYPE.DETECT_STRANGER;
-            }
             else if (nScreen == ID.LINKEDSCREEN.SubCall.Lobby) eCallType = CALLTYPE.LOBBY;
             else if (nScreen == ID.LINKEDSCREEN.SubCall.Guard) eCallType = CALLTYPE.GUARD;
             else if (nScreen == ID.LINKEDSCREEN.SubCall.Neighboor) eCallType = CALLTYPE.RESIDENCE;
@@ -9506,9 +9517,9 @@ public class MainActivity extends WpadActivity {
                     || Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I
                     || Version.getModelType() == MODEL_TYPE.IHN_1010 || Version.getModelType() == MODEL_TYPE.IHN_1010_I
                     || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                    || Version.getModelType() == MODEL_TYPE.IHN_T1010 || Version.getModelType() == MODEL_TYPE.IHN_T1010_I
                     || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT
-                    || Version.getModelType() == MODEL_TYPE.IHN_1303_I) {
+                    || Version.getModelType() == MODEL_TYPE.IHN_T1010 || Version.getModelType() == MODEL_TYPE.IHN_T1010_I
+                    || Version.getModelType() == MODEL_TYPE.IHN_1303_I || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                 return true;
             }
             else return false;

+ 2 - 3
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/PopupActivity.java

@@ -305,10 +305,9 @@ public class PopupActivity extends WpadActivity {
             if (!bResult) {
                 int kind = -1;
                 if (getSmartDoorCamType() == WallpadDeviceSet.DOORTYPE_IOT_SMART
-                        || getSmartDoorCamType() == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART)
+                        || getSmartDoorCamType() == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART
+                        || getSmartDoorCamType() == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART)
                     kind = define.NOTIFY_ACCEPT_RECORD_STRANGER;
-                else if (getSmartDoorCamType() == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART)
-                    kind = define.NOTIFY_ACCEPT_TAKEPIC_STRANGER;
 
                 // BR 전송
                 Intent notiIntent = new Intent();

+ 317 - 135
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/Common.java

@@ -13,6 +13,7 @@ import com.artncore.commons.define;
 
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageInfo;
 import android.util.Log;
 
 public final class Common {
@@ -1109,18 +1110,14 @@ public final class Common {
 
     // SKT 모바일 서비스
     public static final String MOBILE_SERVICE_ENERGY_UPDATE = "MOBILE_SERVICE_ENERGY_UPDATE";
-    public static void MobileServiceEnergyDataReqBR( Context context )
-    {
-        try
-        {
+    public static void MobileServiceEnergyDataReqBR(Context context) {
+        try {
             Intent iMobileServieIntent = new Intent();
             iMobileServieIntent.setAction(Common.MOBILE_SERVICE_ENERGY_UPDATE);
             context.sendBroadcast(iMobileServieIntent);
-        }
-        catch (RuntimeException re) {
+        } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
-        } catch( Exception e )
-        {
+        } catch( Exception e ) {
             //e.printStackTrace();
             LogUtil.errorLogInfo("", TAG, e);
         }
@@ -1134,211 +1131,396 @@ public final class Common {
      *
      * @return (int) - >0 : 제어기기 구독 상태, <0 : 제어기기 구독 해제
      */
-    public static int getDeviceSubcription(Context context)
-    {
+    public static boolean setDeviceSubcriptionOld(Context context, boolean status) {
+        // 1. get DB
+        WallpadDeviceSet devset = new WallpadDeviceSet(context);
+        boolean retValue = devset.SetSubDevListItem(status , "월패드구독");
+        devset.closeDB();
+        return retValue;
+    }
+
+    /**
+     * 통신사 제어기기 구독 사용 여부
+     *
+     * @return (int) - >0 : 제어기기 구독 상태, <0 : 제어기기 구독 해제
+     */
+    public static boolean getDeviceSubcriptionOld(Context context) {
         // 1. get DB
         WallpadDeviceSet devset = new WallpadDeviceSet(context);
         int retValue = devset.GetDeviceSetted("월패드구독");
         devset.closeDB();
 
         // 2. Check
-        if(retValue == WallpadDeviceSet.DEV_DATA_ENABLE)
-        {
-            return 1;
+        if (retValue == WallpadDeviceSet.DEV_DATA_ENABLE) return true;
+        else return false;
+    }
+
+    /**
+     * HDC Linker 추가
+     *
+     * @return () - > true: 성공, false: 실패
+     */
+    public static String[] setDeviceSubcription(Context context, boolean follow, String company) {
+        Log.i(TAG, "[setDeviceSubcription] follow [" + follow + "], company [" + company + "]");
+        WallpadDeviceSet devset = new WallpadDeviceSet(context);
+        String[] alinkers = devset.getHDCLinker();   // DB에서 기존 Linker를 불러온다.
+        String[] retValue = null;
+
+        String linkers = "";
+        if (alinkers != null) linkers = convertHDCLinkerArrayToString(alinkers);
+        Log.i(TAG, "[setDeviceSubcription] linkers [" + linkers + "]");
+        if (follow) {
+            // 구독 등록
+            if (alinkers == null) {
+                linkers = company;   // 다른 Linker가 존재하지 않는 경우
+            }
+            else {
+                boolean bExist = false;
+                for (int i = 0; i < alinkers.length; i++) {
+                    if (alinkers[i].equalsIgnoreCase(company.toUpperCase())) bExist = true;
+                }
+
+                if (!bExist) {
+                    if (linkers.equalsIgnoreCase("")) linkers = company;   // 다른 Linker가 존재하지 않는 경우
+                    else linkers += "_" + company;   // 다른 Linker가 존재하는 경우
+                }
+            }
+
+            Log.i(TAG, "[setDeviceSubcription] linkers [" + linkers + "]");
+            retValue = convertHDCLinkerStringToArray(linkers);
         }
-        else if(retValue == WallpadDeviceSet.DEV_DATA_DISABLE)
-        {
-            return -1;
+        else {
+            // 구독 삭제
+            if (company.equalsIgnoreCase("ALL")) {
+                retValue = null;
+            }
+            else {
+                if (alinkers != null) {
+                    String[] temp = new String[alinkers.length];
+                    int nCnt = 0;
+                    for (int i = 0; i < alinkers.length; i++) {
+                        if (!alinkers[i].equalsIgnoreCase(company.toUpperCase())) {
+                            temp[nCnt++] = alinkers[i];
+                        }
+                    }
+                    if (nCnt == 0) retValue = null;
+                    else {
+                        retValue = new String[nCnt];
+                        for (int i = 0; i < retValue.length; i++) {
+                            retValue[i] = temp[i];
+                        }
+                    }
+                }
+            }
         }
-        else if(retValue == WallpadDeviceSet.DEV_DATA_NONE)
-        {
-            return -2;
+
+        linkers = convertHDCLinkerArrayToString(retValue);
+        devset.setHDCLinker(retValue);
+        devset.closeDB();
+        if (retValue == null) Common.setDeviceSubcriptionOld(context, false);
+        Log.i(TAG, "[setDeviceSubcription] linkers [" + linkers + "]");
+
+        return retValue;
+    }
+
+    private static String convertHDCLinkerArrayToString(String[] value) {
+        String retValue = "";
+        if (value != null) {
+            for (int i = 0; i < value.length; i++) {
+                if (i == 0) retValue = value[i];
+                else retValue += "_" + value[i];
+            }
         }
-        else
-        {
-            return -3;
+        return retValue;
+    }
+
+    private static String[] convertHDCLinkerStringToArray(String value) {
+        if (!value.equalsIgnoreCase("")) {
+            String[] retValue = value.trim().split("_");
+            return retValue;
         }
+        else return null;
+    }
 
-        //SetSubDevListItem
+    /**
+     * HDC Linker 목록 가져오기
+     *
+     * @return (String) - > HDC Linker 목록 (예. SKT_KT_KAKAO -> 구독하는 항목만 표기하며, null이면 구독 없음. 연동사별 구분은 "_"한다.)
+     */
+    public static String[] getDeviceSubcription(Context context) {
+        WallpadDeviceSet devset = new WallpadDeviceSet(context);
+        String[] retValue = devset.getHDCLinker();
+        devset.closeDB();
+        return retValue;
     }
 
-    public static class VISITORREMOTECALL {
-        public static final String INTERNAL_SERVER_IP ="10.2.110.110";
-        public static final int INTERNAL_SERVER_PORT = 8000;
+    /**
+     * HDC Linker 목록 확인하기
+     *
+     * @return (boolean) - > true: 항목 존재, false: 항목 없음
+     */
+    public static boolean checkDeviceSubscription(Context context, String company) {
+        WallpadDeviceSet devset = new WallpadDeviceSet(context);
+        String[] retValue = devset.getHDCLinker();
+        devset.closeDB();
+
+        for (int i = 0; i < retValue.length; i++) {
+            if (retValue[i].equalsIgnoreCase(company)) return false;
+        }
+        return false;
     }
 
+
+
     /**
-     * 통신사 제어기기 구독 사용 여부
+     * HDC Linker 사용여부 및 목록 저장
      *
-     * @return (int) - >0 : 제어기기 구독 상태, <0 : 제어기기 구독 해제
+     * @return (boolean) - true: 성공, false: 실패
      */
-    public static boolean setDeviceSubcription(Context context , boolean status)
-    {
+    public static boolean setHDCLinkerSubscriptionUsage(Context context, String strLinkers) {
         // 1. get DB
         WallpadDeviceSet devset = new WallpadDeviceSet(context);
-        boolean retValue = devset.SetSubDevListItem(status , "월패드구독");
+        boolean retValue = devset.setHDCLinker(convertHDCLinkerStringToArray(strLinkers));
         devset.closeDB();
         return retValue;
     }
 
+    /**
+     * HDC Linker 사용 여부 (외부 연동사의 월패드 구독 여부)
+     *
+     * @return (boolean) - true: 사용함, false: 사용안함
+     */
+    public static boolean getHDCLinkerSubscriptionUsage(Context context) {
+        // 1. get DB
+        boolean retValue = false;
+        WallpadDeviceSet devset = new WallpadDeviceSet(context);
+        retValue = devset.getHDCLinkerUsage();
+        devset.closeDB();
+        return retValue;
+    }
+
+    /**
+     * HDC Linker 목록 확인
+     *
+     * @return (String) - >HDC Linker 목록 (예. SKT_KT_KAKAO -> 구독하는 항목만 표기하며, null이면 구독 없음. 연동사별 구분은 "_"한다.)
+     */
+    public static String[] getHDCLinkerSubscription(Context context) {
+        // 1. get DB
+        WallpadDeviceSet devset = new WallpadDeviceSet(context);
+        String[] retValue = devset.getHDCLinker();
+        devset.closeDB();
 
+        return retValue;
+    }
 
 
 
-    /*
+    public static class VISITORREMOTECALL {
+        public static final String INTERNAL_SERVER_IP ="10.2.110.110";
+        public static final int INTERNAL_SERVER_PORT = 8000;
+    }
+
+    /**
      * 기존 구분되지 않던 구독 방식을 고려해야함. 현장이 운영중에 있으니 월패드 업그레이드가 일어나도 기존 설정값을 그대로 사용 가능해야 함
      * 통신사/포털사 구독 사용 구분
-     * gubun ==> 1 = SKT, 2 = U+ , 3 = KaKao , 4 = KT , 5 = Naver
      */
 
-    public static final int GUBUN_SKT            	= 1;
-    public static final int GUBUN_UPLUS          	= 2;
-    public static final int GUBUN_KAKAO          	= 3;
-    public static final int GUBUN_KT             	= 4;
-    public static final int GUBUN_NAVER          	= 5;
-    public static final int GUBUN_GOOGLE          	= 6;
-    public static final int GUBUN_ALEXA          	= 7;
+    public enum HDC_LINKER {
+        SKT(1, "SKT"),
+        KT(2, "KT"),
+        LGUPLUS(3, "LGUPLUS"),
+        KAKAO(4, "KAKAO"),
+        NAVER(5, "NAVER"),
+        LGE(6, "LGE"),
+        SAMSUNG(7, "SAMSUNG"),
+        GOOGLE(8, "GOOGLE"),
+        AMAZON(9, "AMAZON"),
+        APPLE(10, "APPLE");
 
-    public static int getGubun( String inValue )
-    {
+        private static int nAvailableLinkerCnt = 10;   // 미리 정의된 외부 연동사 항목의 개수에 변화가 생
+        private int mIdx;
+        private String mContent;
+
+        private String strHomeTag = "_HOME";
+
+        private HDC_LINKER(int idx, final String txt) {
+            this.mIdx = idx;
+            this.mContent = txt;
+        }
+
+        public String getContents()
+        {
+            return this.mContent;
+        }
+
+        public String getHomeContents()
+        {
+            return this.mContent + this.strHomeTag;
+        }
+
+        public int getIndex()
+        {
+            return this.mIdx;
+        }
+
+        public static int getAvailableLinkerCnt()
+        {
+            return nAvailableLinkerCnt;
+        }
+
+    }
+
+//    public enum MOBILE_HOME {
+//        SKT_HOME(1, "SKT_HOME"),
+//        KT_HOME(2, "KT_HOME"),
+//        LGUPLUS_HOME(3, "LGUPLUS_HOME"),
+//        KAKAO_HOME(4, "KAKAO_HOME"),
+//        NAVER_HOME(5, "NAVER_HOME"),
+//        LGE_HOME(6, "LGE_HOME"),
+//        SAMSUNG_HOME(7, "SAMSUNG_HOME"),
+//        GOOGLE_HOME(8, "GOOGLE_HOME"),
+//        AMAZON_HOME(9, "AMAZON_HOME"),
+//        APPLE_HOME(10, "APPLE_HOME");
+//
+//        private int mIdx;
+//        private String mContent;
+//
+//        private MOBILE_HOME(int  idx, final String txt) {
+//            this.mIdx = idx;
+//            this.mContent = txt;
+//        }
+//
+//        public String getContents()
+//        {
+//            return this.mContent;
+//        }
+//
+//        public int getIndex()
+//        {
+//            return this.mIdx;
+//        }
+//    }
+
+
+
+
+
+
+
+
+
+
+    public static int getGubun(String inValue) {
         // 1. get DB
         int retValue = 0;
 
-        if(  inValue.compareTo("SKT") == 0  )
-            retValue = GUBUN_SKT;
-        else if(  inValue.compareTo("UPLUS") == 0  )
-            retValue = GUBUN_UPLUS;
-        else if(  inValue.compareTo("KAKAO") == 0  )
-            retValue = GUBUN_KAKAO;
-        else if(  inValue.compareTo("KT") == 0  )
-            retValue = GUBUN_KT;
-        else if(  inValue.compareTo("NAVER") == 0  )
-            retValue = GUBUN_NAVER;
-        else if(  inValue.compareTo("GOOGLE") == 0  )
-            retValue = GUBUN_GOOGLE;
-        else if(  inValue.compareTo("ALEXA") == 0  )
-            retValue = GUBUN_ALEXA;
+        if (inValue.equalsIgnoreCase(HDC_LINKER.SKT.getContents())) retValue = HDC_LINKER.SKT.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.KAKAO.getContents())) retValue = HDC_LINKER.KAKAO.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.NAVER.getContents())) retValue = HDC_LINKER.NAVER.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.GOOGLE.getContents())) retValue = HDC_LINKER.GOOGLE.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.KT.getContents())) retValue = HDC_LINKER.KT.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.LGUPLUS.getContents())) retValue = HDC_LINKER.LGUPLUS.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.LGE.getContents())) retValue = HDC_LINKER.LGE.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.SAMSUNG.getContents())) retValue = HDC_LINKER.SAMSUNG.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.AMAZON.getContents())) retValue = HDC_LINKER.AMAZON.getIndex();
+        else if (inValue.equalsIgnoreCase(HDC_LINKER.APPLE.getContents())) retValue = HDC_LINKER.APPLE.getIndex();
 
         return retValue;
     }
 
-    public static String getGubunXMLMsg(Context context)
-    {
+    public static String getGubunXMLMsg(Context context) {
         String retValue = "";
-        boolean [] gubunList = getGubunSubScription(context);
+        boolean[] gubunList = getGubunSubScription(context);
         String inValue = "";
 
-        if( gubunList[GUBUN_SKT] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "SKT";
+        if (gubunList[HDC_LINKER.SKT.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.SKT.getContents();
         }
-        if( gubunList[GUBUN_UPLUS] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "UPLUS";
+
+        if (gubunList[HDC_LINKER.KAKAO.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.KAKAO.getContents();
         }
-        if( gubunList[GUBUN_KAKAO] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "KAKAO";
+
+        if (gubunList[HDC_LINKER.NAVER.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.NAVER.getContents();
         }
-        if( gubunList[GUBUN_KT] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "KT";
+
+        if (gubunList[HDC_LINKER.GOOGLE.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.GOOGLE.getContents();
         }
-        if( gubunList[GUBUN_NAVER] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "NAVER";
+
+        if (gubunList[HDC_LINKER.KT.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.KT.getContents();
         }
-        if( gubunList[GUBUN_GOOGLE] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "GOOGLE";
+
+        if (gubunList[HDC_LINKER.LGUPLUS.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.LGUPLUS.getContents();
         }
-        if( gubunList[GUBUN_ALEXA] == true )
-        {
-            if( inValue.length() > 0 )inValue += "_";
-            inValue += "ALEXA";
+
+        if (gubunList[HDC_LINKER.LGE.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.LGE.getContents();
         }
-        retValue = "      <req_company>"+ inValue + "</req_company>\r\n";
 
-        return retValue;
-    }
+        if (gubunList[HDC_LINKER.SAMSUNG.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.SAMSUNG.getContents();
+        }
 
-    public static boolean setGubunSubScription(Context context , int gubun , boolean status)
-    {
-        // 1. get DB
-        WallpadDeviceSet devset = new WallpadDeviceSet(context);
-        boolean retValue = false;
+        if (gubunList[HDC_LINKER.AMAZON.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.AMAZON.getContents();
+        }
 
-        if( gubun == GUBUN_SKT )
-            retValue = devset.SetSubDevListItem(status , "구독_SKT");
-        else if( gubun == GUBUN_UPLUS )
-            retValue = devset.SetSubDevListItem(status , "구독_유플러스");
-        else if( gubun == GUBUN_KAKAO )
-            retValue = devset.SetSubDevListItem(status , "구독_카카오");
-        else if( gubun == GUBUN_KT )
-            retValue = devset.SetSubDevListItem(status , "구독_KT");
-        else if( gubun == GUBUN_NAVER )
-            retValue = devset.SetSubDevListItem(status , "구독_네이버");
-        else if( gubun == GUBUN_GOOGLE )
-            retValue = devset.SetSubDevListItem(status , "구독_구글");
-        else if( gubun == GUBUN_ALEXA )
-            retValue = devset.SetSubDevListItem(status , "구독_알렉사");
-        devset.closeDB();
+        if (gubunList[HDC_LINKER.APPLE.getIndex()]) {
+            if (inValue.length() > 0 ) inValue += "_";
+            inValue += HDC_LINKER.APPLE.getContents();
+        }
+        retValue = "      <req_company>"+ inValue + "</req_company>\r\n";
 
         return retValue;
     }
 
-    public static boolean [] getGubunSubScription(Context context)
-    {
+    public static boolean [] getGubunSubScription(Context context) {
         // 1. get DB
         WallpadDeviceSet devset = new WallpadDeviceSet(context);
-        boolean [] retValue = {false,false,false,false,false,false,false,false,false} ;
+        boolean[] retValue = { false, false, false, false, false, false, false, false, false } ;
 
         int intValue = devset.GetDeviceSetted("월패드구독");
-        if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-        {
+        if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE ) {
             // 기존 현장에서 구독된 상태
             // SKT와 유플러스 현장 고려해야 함
-            if( Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL )
-                retValue[GUBUN_SKT] = true;
-            else
-                retValue[GUBUN_UPLUS] = true;
+            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) retValue[HDC_LINKER.SKT.getIndex()] = true;
+            else retValue[HDC_LINKER.LGUPLUS.getIndex()] = true;
         }
-        else
-        {
+        else {
             // 월패드구독 디비값을 사용하지 않으면 처음 사용하는 현장
             intValue = devset.GetDeviceSetted("구독_SKT");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_SKT] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE) retValue[HDC_LINKER.SKT.getIndex()] = true;
 
             intValue = devset.GetDeviceSetted("구독_유플러스");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_UPLUS] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE) retValue[HDC_LINKER.LGUPLUS.getIndex()] = true;
 
             intValue = devset.GetDeviceSetted("구독_카카오");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_KAKAO] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE ) retValue[HDC_LINKER.KAKAO.getIndex()] = true;
 
             intValue = devset.GetDeviceSetted("구독_KT");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_KT] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE) retValue[HDC_LINKER.KT.getIndex()] = true;
 
             intValue = devset.GetDeviceSetted("구독_네이버");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_NAVER] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE) retValue[HDC_LINKER.NAVER.getIndex()] = true;
 
             intValue = devset.GetDeviceSetted("구독_구글");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_GOOGLE] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE) retValue[HDC_LINKER.GOOGLE.getIndex()] = true;
 
             intValue = devset.GetDeviceSetted("구독_알렉사");
-            if( intValue == WallpadDeviceSet.DEV_DATA_ENABLE )
-                retValue[GUBUN_ALEXA] = true;
+            if (intValue == WallpadDeviceSet.DEV_DATA_ENABLE) retValue[HDC_LINKER.AMAZON.getIndex()] = true;
         }
 
         devset.closeDB();

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

@@ -1682,6 +1682,7 @@ public final class ID {
             public final static int AirQualty = BASE + 91;				 // 공기질 센서
             public final static int ElecCooktop = BASE + 101;				 // 전기레인지
             public final static int CooktopOutlet = BASE + 111;				 // 쿡탑콘센트
+
         }
 
         public static final class SubMenuEnergy {
@@ -1707,7 +1708,6 @@ public final class ID {
             public final static int CallList            = BASE + 61;        // 통화내역
             public final static int Visitor             = BASE + 71;        // 방문자사진
             public final static int Door_Record         = BASE + 81;        // 거동수상자 녹화
-            public final static int Door_TakePic        = BASE + 91;        // 거동수상자 사진촬영
         }
 
         public static final class SubMenuSecurity {

+ 8 - 12
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/declare/MobileXmlDefine.java

@@ -38,8 +38,7 @@ public final class MobileXmlDefine {
 		}
 	}
 	
-	public enum XML_LIGHT
-	{
+	public enum XML_LIGHT {
 		LIVING_LIGHT( 0 , "livinglight"),
 		LIGHT01( 1 , "light01"),
 		LIGHT02( 2 , "light02"),
@@ -53,8 +52,7 @@ public final class MobileXmlDefine {
 		private int mIdx;
 		private String mContent;
 		
-		private XML_LIGHT( int  idx, final String txt )
-		{
+		private XML_LIGHT( int  idx, final String txt ) {
 			this.mIdx = idx;
 			this.mContent = txt;
 		}
@@ -70,8 +68,7 @@ public final class MobileXmlDefine {
 		}
 	}
 	
-	public enum XML_ELECT
-	{
+	public enum XML_ELECT {
 		ELECTRIC01( 1 , "electric01"),
 		ELECTRIC02( 2 , "electric02"),
 		ELECTRIC03( 3 , "electric03"),
@@ -86,8 +83,7 @@ public final class MobileXmlDefine {
 		private int mIdx;
 		private String mContent;
 		
-		private XML_ELECT( int  idx, final String txt )
-		{
+		private XML_ELECT( int  idx, final String txt ) {
 			this.mIdx = idx;
 			this.mContent = txt;
 		}
@@ -135,8 +131,7 @@ public final class MobileXmlDefine {
 		}
 	}
 	
-	public enum XML_MSG_NAME
-	{
+	public enum XML_MSG_NAME {
 		MSG_DEVICE_EVENT( 1 , "msg_device_event"),
 		MSG_HOME_DEVICE_SET_CONTROL( 2 , "msg_home_device_set_control"),
 		MSG_HOME_DEVICE_GET_STATUS( 3 , "msg_home_device_get_status"),
@@ -159,8 +154,7 @@ public final class MobileXmlDefine {
 		private int mIdx;
 		private String mContent;
 		
-		private XML_MSG_NAME( int  idx, final String txt )
-		{
+		private XML_MSG_NAME( int  idx, final String txt ) {
 			this.mIdx = idx;
 			this.mContent = txt;
 		}
@@ -175,4 +169,6 @@ public final class MobileXmlDefine {
 			return this.mIdx;
 		}
 	}
+
+
 }

+ 10 - 9
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/imap/iMapDeviceEvent.java

@@ -53,14 +53,15 @@ public class iMapDeviceEvent extends WallPadiMAPClient {
         
         this.ctx = ctx;
     }
-    
-    private String SendXMLDeviceStatusEvent( String model_id , int dev_num, String status) {
+
+    private String SendXMLDeviceStatusEvent(String hdcLinkers, String model_id, int dev_num, String status) {
          String retXML = XMLHeader +
-                "   <service type = \"notice\" name= \"" + XML_MSG_NAME.MSG_DEVICE_EVENT.getContents()+"\">\r\n"+
-                "      <model_id>"+ model_id + "</model_id>\r\n"+
-                "      <dev_num>"+ dev_num + "</dev_num>\r\n"+
-                "      <status>"+ status+ "</status>\r\n"+
-                "   </service>\r\n</imap>";
+                 "   <service type = \"notice\" name= \"" + XML_MSG_NAME.MSG_DEVICE_EVENT.getContents()+"\">\r\n"+
+                 "      <req_company>" + hdcLinkers + "</req_company>\r\n"+
+                 "      <model_id>" + model_id + "</model_id>\r\n"+
+                 "      <dev_num>" + dev_num + "</dev_num>\r\n"+
+                 "      <status>" + status+ "</status>\r\n"+
+                 "   </service>\r\n</imap>";
 
         Log.i(TAG, "[SendXMLDeviceStatusEvent] ========== Start ==========");
         Log.i(TAG, retXML);
@@ -93,8 +94,8 @@ public class iMapDeviceEvent extends WallPadiMAPClient {
     		Proc.ProcError();
     }
     
-    public void DoWork(String model_id, int dev_num, String status) {
+    public void DoWork(String hdcLinkers, String model_id, int dev_num, String status) {
         SetServerIPConfig(ServerIP, SvrPort);
-        SendXMLDoc(SendXMLDeviceStatusEvent(model_id, dev_num, status ), false);
+        SendXMLDoc(SendXMLDeviceStatusEvent(hdcLinkers, model_id, dev_num, status), false);
     }
 }

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

@@ -79,6 +79,6 @@ public class iMapPublicEvent extends WallPadiMAPClient{
     public void DoWork(String xmlBody, String cmd) 
     {   
         SetServerIPConfig(ServerIP, SvrPort);
-        SendXMLDoc(SendXMLDeviceStatusEvent( xmlBody , cmd), false);
+        SendXMLDoc(SendXMLDeviceStatusEvent(xmlBody , cmd), false);
     }
 }

+ 4 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/manual/MANUAL_MAIN.java

@@ -116,7 +116,8 @@ public class MANUAL_MAIN extends WpadScreen {
 
             // page 2
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 IMG_GUIDE_02_MAINSCREEN = new WpadImageView(context, TOUCH_KIND.NONE, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.IMAGES.GUIDE_02_MAINSCREEN_IHND101).W, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.IMAGES.GUIDE_02_MAINSCREEN_IHND101).H, R.drawable.img_manual_example_main_ihnd101, 0, ID.MANUAL.MANUALMAIN.ELEMENTS.IMAGES.GUIDE_02_MAINSCREEN_IHND101);
                 ViewRegistration(layout, IMG_GUIDE_02_MAINSCREEN, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.IMAGES.GUIDE_02_MAINSCREEN_IHND101).X, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.IMAGES.GUIDE_02_MAINSCREEN_IHND101).Y);
             }
@@ -137,7 +138,8 @@ public class MANUAL_MAIN extends WpadScreen {
             TXT_GUIDE_02_TITLE_MAINSCREEN.setText(strGuide02TitleMainScreen);
 
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 TXT_GUIDE_02_INFO_MAINSCREEN = new WpadTextView(context, false, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_02_INFO_MAINSCREEN_IHND101).W, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_02_INFO_MAINSCREEN_IHND101).H, Gravity.LEFT, Color.WHITE, nManualInfoFontSize, false, ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_02_INFO_MAINSCREEN_IHND101);
                 ViewRegistration(layout, TXT_GUIDE_02_INFO_MAINSCREEN, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_02_INFO_MAINSCREEN_IHND101).X, getPosition(ID.MANUAL.MANUALMAIN.ELEMENTS.TEXTS.GUIDE_02_INFO_MAINSCREEN_IHND101).Y);
                 TXT_GUIDE_02_INFO_MAINSCREEN.setText(strGuide02MainScreen_IHND101);

+ 12 - 5
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/menu/CallSubMenuScreen.java

@@ -88,7 +88,8 @@ public class CallSubMenuScreen {
 				if (retArray[0] == COMPONENT_USE) {
 					Common.DebugLog("Get_Light_info :" + retArray[1] );
 					if (Version.getModelType() == MODEL_TYPE.IHN_D101 || Version.getModelType() == MODEL_TYPE.IHN_D101_I
-							|| Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I) {
+							|| Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I
+							|| Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
 						if (UseIparkEnergy == 1) {
 							LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDC_EachLamp;
 						}
@@ -100,9 +101,12 @@ public class CallSubMenuScreen {
 							|| Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
 						LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp;
 					}
+					else if (Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT ) {
+						LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp;
+					}
 					else {
 						if (GetZeroEnergyHouseInfo() == true) {
-							LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp;
+							LampID = ID.LINKEDSCREEN.SubMenuCtrl.HDC_EachLamp;
 						}
 						else {
 							if (retArray[1] == WallpadDeviceSet.LIGHT_TYPE_ROOM) {
@@ -161,7 +165,8 @@ public class CallSubMenuScreen {
 			if (retArray != null) {
 				if (retArray[0] == COMPONENT_USE) {
 					if (Version.getModelType() == MODEL_TYPE.IHN_D101 || Version.getModelType() == MODEL_TYPE.IHN_D101_I
-							|| Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I) {
+							|| Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I
+							|| Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
 						if (retArray[1] == WallpadDeviceSet.DOORLOCK_TYPE_RF) {
 							DoorLockID = ID.LINKEDSCREEN.SubMenuCtrl.DoorLockWL;
 						}
@@ -176,7 +181,7 @@ public class CallSubMenuScreen {
 			}
 
 			//콘센트
-			if (m_WpApi != null) {
+			if (m_WpApi != null && Version.getModelType() != Version.MODEL_TYPE.IHN_1010GL_I_2443ALT) {
 				try {
 					if (LampID == ID.LINKEDSCREEN.SubMenuCtrl.OutSide_EachLamp) {
 						MultiSwitchAPI MSAPI = m_WpApi.Get_MultiSwitchController();
@@ -282,7 +287,8 @@ public class CallSubMenuScreen {
 		Log.d(TAG, "-----CheckMultiSwitchConcent ");
 
 		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) {
+				&& Version.getModelType() != Version.MODEL_TYPE.IHN_D101K && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K_I
+				&& Version.getModelType() != MODEL_TYPE.IHN_D101_I_OCF) {
 			WallpadDeviceSet devDB = new WallpadDeviceSet(mContext);
 			int [] retArray = devDB.Get_Light_info();
 			devDB.closeDB();
@@ -895,6 +901,7 @@ public class CallSubMenuScreen {
 			int startScreen = ID.LINKEDSCREEN.SubMenuCtrl.Gas;
 			Log.v(TAG, "[callStartHomeCtrlAPK] m_MakeListHomeCtr [" + m_MakeListHomeCtrl + "]");
 
+			makeHomeCtrlMenuList();
 			if (m_MakeListHomeCtrl == false) {
 				makeHomeCtrlMenuList();
 			}

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

@@ -41,7 +41,7 @@ public class AdminPWInput extends WpadScreen {
 	WpadImageView BTN_CONFIRM, BTN_BACK, BTN_DELETE, BTN_CLOSE;
 	WpadTextView TXT_TITLE;
 
-	String strTitle = "비밀번호 입력";
+	String strTitle = "관리자 비밀번호 입력";
 	int nTitleSize = 35;
     
 	private String strInputPassWord = "";

+ 2 - 10
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/popup/NoticeDetectStranger.java

@@ -131,16 +131,11 @@ public class NoticeDetectStranger extends WpadScreen {
             Intent intent = getScreenIntent();
             doorCamType = intent.getIntExtra("DOORCAM_TYPE", -1);
             Log.d(TAG, "[Initialize] doorCamType [" + doorCamType + "]");
-            if (doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART || doorCamType == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART) {
+            if (doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART || doorCamType == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART || doorCamType == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) {
                 strTXT_INSTRUCTION = "영상 녹화를 시작하시겠습니까?";
                 strTXT_MENT = "3초 이내 선택하지 않는 경우, 자동으로 녹화가 시작됩니다.";
                 nIconID = R.drawable.icon_recording;
             }
-            else if (doorCamType == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) {
-                strTXT_INSTRUCTION = "사진 촬영을 시작하시겠습니까?";
-                strTXT_MENT = "3초 이내 선택하지 않는 경우, 자동으로 촬영이 시작됩니다.";
-                nIconID = R.drawable.icon_recording;
-            }
 
             WallpadStatusData SetData = new WallpadStatusData(mContext);
             boolean soundOut = SetData.GetSoundOutputOfEventAlarm();
@@ -192,12 +187,9 @@ public class NoticeDetectStranger extends WpadScreen {
     private void setPopupResult (boolean bAccept) {
         try {
             int kind = -1;
-            if (doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART || doorCamType == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART) {
+            if (doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART || doorCamType == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART || doorCamType == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) {
                 kind = bAccept ? define.NOTIFY_ACCEPT_RECORD_STRANGER : define.NOTIFY_REJECT_RECORD_STRANGER;
             }
-            else if (doorCamType == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) {
-                kind = bAccept ? define.NOTIFY_ACCEPT_TAKEPIC_STRANGER : define.NOTIFY_REJECT_TAKEPIC_STRANGER;
-            }
             Log.d(TAG, "[setPopupResult] kind [" + kind + "]");
 
             // 메인 앱으로 BR 전송

+ 25 - 0
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/HYOSUNGUI_MAIN_HN.java

@@ -608,9 +608,13 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
             WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getContext());
             int nElevUse = mWallpadDeviceSet.Get_Elevator_Info();
             boolean bCtrlUse = mWallpadDeviceSet.Get_MainGUICtrlUse();
+            boolean bLightUse = mWallpadDeviceSet.Get_Light_info()[0] > 0 ? true : false; // 조명
+            boolean bGasUse = mWallpadDeviceSet.Get_GAS_Info() > 0 ? true : false; // 가스
+            boolean bHeatUse = mWallpadDeviceSet.Get_Thermo_Info() > 0 ? true : false; // 난방
             boolean bRemoteMeterUse = mWallpadDeviceSet.Get_RemoteMeter_Use();
             mWallpadDeviceSet.closeDB();
 //                Log.d(TAG, "[registerShortcutIcon] nElevUse [" + nElevUse + "], bCtrlUse [" + bCtrlUse + "], bRemoteMeterUse [" + bRemoteMeterUse + "]");
+            Log.d(TAG, "[registerShortcutIcon] bLightUse [" + bLightUse + "], bGasUse [" + bGasUse + "], bHeatUse [" + bHeatUse + "]");
 
             int nDelCount = 0;
             int index = 0;
@@ -636,6 +640,27 @@ public class HYOSUNGUI_MAIN_HN extends WpadScreen {
                         continue;
                     }
                 }
+                if (!bLightUse) {
+                    if (nID == ID.ICONS.MENUS.CTRL_LIGHT.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
+                    }
+                }
+                if (!bGasUse) {
+                    if (nID == ID.ICONS.MENUS.CTRL_GAS.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
+                    }
+                }
+                if (!bHeatUse) {
+                    if (nID == ID.ICONS.MENUS.CTRL_HEATING.getID()) {
+                        nDelCount++;
+                        procDeleteShortcutPopupResult(true, nID);
+                        continue;
+                    }
+                }
                 if (!bRemoteMeterUse) {
                     if (nID == ID.ICONS.MENUS.ENERGY_REMOTEMETER.getID()) {
                         nDelCount++;

+ 12 - 7
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/screen/MAIN.java

@@ -298,7 +298,8 @@ public class MAIN extends WpadScreen {
             Log.w(TAG, "[registerLightCtrlBTN] ========== START ==========");
 
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 if (Common.CurrentDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
                     Log.w(TAG, "[registerLightCtrlBTN] Register 4 preset buttons!! -> IHN_D101");
                     BTN_LIGHT_PRESET_01 = new WpadImageView(mContext, TOUCH_KIND.BUTTON, getPosition(ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_PRESET_01).W, getPosition(ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_PRESET_01).H, new int[] { R.drawable.btn_main_lightpreset_book_normal, R.drawable.btn_main_lightpreset_book_pressed }, new int[] { R.drawable.btn_main_lightpreset_book_selected, R.drawable.btn_main_lightpreset_book_pressed }, ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_PRESET_01);
@@ -458,7 +459,9 @@ public class MAIN extends WpadScreen {
                         continue;
                     }
                 }
+
                 IconInfoTable.IconInfo mIconInfo = mIconInfoTable.getIconInfoByID(MainActivity.MainScreenShortcutList.get(i).widgetID);
+                Log.d(TAG, "-----------------i : " + i);
                 if (mIconInfo != null) {
                     BTN_SHORTCUT_ICON[i] = new WpadImageView(this.getContext(), TOUCH_KIND.BUTTON_LC, getPosition(ID.SCREENS.MAIN.ELEMENTS.BTNS.SHORTCUT_1_1 + i).W, getPosition(ID.SCREENS.MAIN.ELEMENTS.BTNS.SHORTCUT_1_1 + i).H, mIconInfo.getNormalImage(), mIconInfo.getPressedImage(), ID.SCREENS.MAIN.ELEMENTS.BTNS.SHORTCUT_1_1 + i);
                     ViewRegistration(layout, BTN_SHORTCUT_ICON[i], getPosition(ID.SCREENS.MAIN.ELEMENTS.BTNS.SHORTCUT_1_1 + i).X, getPosition(ID.SCREENS.MAIN.ELEMENTS.BTNS.SHORTCUT_1_1 + i).Y);
@@ -485,7 +488,8 @@ public class MAIN extends WpadScreen {
     private void initDeviceController() {
         try {
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 if (Common.CurrentDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST) {
                     if (loadLivingEMController(mWallPadAPI) >= 0) updateLivingEMStatus(false);
                     else EMDriverCheckHandler.sendEmptyMessage(0);
@@ -666,10 +670,9 @@ public class MAIN extends WpadScreen {
                     Log.v(TAG, "[onTouchEvent] ID.SCREENS.MANUAL_MAIN.ELEMENTS.BTNS.LIGHT_PRESET_04_DIMMING");
                     setDimmingLightCtrlPreset(4);
                 }
-                else if (ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_HDCLIVING_01 <= nTargetID && nTargetID <= ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_HDCLIVING_06) {
+                else if (ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_HDCLIVING_01 <= nTargetID && nTargetID <= ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_HDCLIVING_05) {
                     Log.v(TAG, "[onTouchEvent] ID.SCREENS.MANUAL_MAIN.ELEMENTS.BTNS.LIGHT_HDCLIVING");
                     ctrlHDCLivingLight((nTargetID - ID.SCREENS.MAIN.ELEMENTS.BTNS.LIGHT_HDCLIVING_01) + 1);
-
                 }
             }
             else if (nEventID == MotionEvent.ACTION_POINTER_DOWN) {
@@ -1085,7 +1088,7 @@ public class MAIN extends WpadScreen {
                 nNotiIndex++;
             }
 
-            if (bEventNoti) {
+            if (bEventNoti&& !getIsSubWallpad()) {
                 mNOTIFICATION[nNotiIndex].BTN_NOTI.setImageChange(R.drawable.btn_icon_notification_event_normal, R.drawable.btn_icon_notification_event_pressed);
                 mNOTIFICATION[nNotiIndex].BTN_NOTI.setVisibility(View.VISIBLE);
                 mNOTIFICATION[nNotiIndex].eNotiType = NOTIFICATION.NOTI_TYPE.EVENT;
@@ -2253,7 +2256,8 @@ public class MAIN extends WpadScreen {
     private void displayPresetBTN(int nPresetNo, int nResult) {
         try {
             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) {
+                    && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K_I
+                    && Version.getModelType() != Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 Log.w(TAG,"[displayPresetBTN] Not supported model!! -> " + Build.MODEL);
             }
 
@@ -2317,7 +2321,8 @@ public class MAIN extends WpadScreen {
     private void updatePresetBTN() {
         try {
             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) {
+                    && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K_I
+                    && Version.getModelType() != Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 Log.w(TAG,"[updatePresetBTN] Not supported model!! -> " + Build.MODEL);
                 return;
             }

+ 4 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IGW300.java

@@ -109,7 +109,8 @@ public class IGW300 {
                 mWallPadInterface.DoControl(WallPadInterface.IOCTL_MOOD_BACKLIGHT_SET, 255);
             }
             else 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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 setSendEventBR(WallPadInterface.EVT_BLACKOUT_OCCURRED);
             }
         }
@@ -120,7 +121,8 @@ public class IGW300 {
                 mWallPadInterface.DoControl(WallPadInterface.IOCTL_MOOD_BACKLIGHT_SET, 0);
             }
             else 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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 setSendEventBR(WallPadInterface.EVT_BLACKOUT_RELEASED);
             }
         }

+ 15 - 4
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/IconManager.java

@@ -318,7 +318,8 @@ public class IconManager {
 
             // 거실조명 or 조명
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 if (Common.CurrentDistributionPanelType == Version.DISTRIBUTION_MODEL.KNX_DIST) {
                     mIconInfoTable.addIconInfo(ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getID(), ID.ICONS.MENUS.CTRL_LIGHT.getNameKR(), ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp,
                             R.drawable.icon_ctrl_light_normal, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed);
@@ -346,6 +347,12 @@ public class IconManager {
                                     R.drawable.icon_ctrl_outlet_normal, R.drawable.icon_ctrl_outlet_pressed, R.drawable.icon_ctrl_outlet_pressed, R.drawable.icon_ctrl_outlet_pressed);
                         }
                     }
+                    //이진규 추가 확인이 필요함(남창우 M안테 물어보기)
+                    else if (naLightEnable[1] == WallpadDeviceSet.LIGHT_TYPE_HDC_INTLIGHT_NORMAL) {
+                        mIconInfoTable.addIconInfo(ID.ICONS.MENUS.CTRL_LIGHT.getID(), ID.ICONS.MENUS.CTRL_LIGHT.getNameKR(), ID.LINKEDSCREEN.SubMenuCtrl.HDCLivingNEach_Lamp,
+                                R.drawable.icon_ctrl_light_normal, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed);
+                        //OutSide_livingLamp
+                    }
                     else if (naLightEnable[1] == WallpadDeviceSet.LIGHT_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT) {
                         mIconInfoTable.addIconInfo(ID.ICONS.MENUS.CTRL_LIGHT.getID(), ID.ICONS.MENUS.CTRL_LIGHT.getNameKR(), ID.LINKEDSCREEN.SubMenuCtrl.OutSide_EachLamp,
                                 R.drawable.icon_ctrl_light_normal, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed);
@@ -549,6 +556,7 @@ public class IconManager {
                         R.drawable.icon_energy_remotemeter_normal, R.drawable.icon_energy_remotemeter_pressed, R.drawable.icon_energy_remotemeter_pressed, R.drawable.icon_energy_remotemeter_pressed);
 
                 // 에너지 사용량 (원격검침이 사용되면 에너지 사용량 아이콘도 함께 사용한다)
+                if(Version.getModelType() != Version.MODEL_TYPE.IHN_1010GL_I_2443ALT)
                 mIconInfoTable.addIconInfo(ID.ICONS.MENUS.ENERGY_ENERGYCONSUMPTION.getID(), ID.ICONS.MENUS.ENERGY_ENERGYCONSUMPTION.getNameKR(), ID.LINKEDSCREEN.SubMenuEnergy.EnergyMgr,
                         R.drawable.icon_energy_consumption_normal, R.drawable.icon_energy_consumption_pressed, R.drawable.icon_energy_consumption_pressed, R.drawable.icon_energy_consumption_pressed);
             }
@@ -698,7 +706,8 @@ public class IconManager {
                 if (bCtrlUse) {
                     // 거실조명 or 조명
                     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) {
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                         mIconInfoTable.addIconInfo(ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getID(), ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getNameKR(), ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp,
                                 R.drawable.metroui_icon_group_ctrl_light_normal_1280, R.drawable.metroui_icon_group_ctrl_light_pressed_1280, R.drawable.metroui_icon_group_ctrl_light_pressed_1280, R.drawable.metroui_icon_group_ctrl_light_pressed_1280);
                     }
@@ -1040,7 +1049,8 @@ public class IconManager {
                 if (bCtrlUse) {
                     // 거실조명 or 조명
                     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) {
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                         mIconInfoTable.addIconInfo(ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getID(), ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getNameKR(), ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp,
                                 R.drawable.metroui_icon_group_ctrl_light_normal, R.drawable.metroui_icon_group_ctrl_light_pressed, R.drawable.metroui_icon_group_ctrl_light_pressed, R.drawable.metroui_icon_group_ctrl_light_pressed);
                     } else {
@@ -1613,7 +1623,8 @@ public class IconManager {
 
             // 거실조명 or 조명
             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) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 mIconInfoTable.addIconInfo(ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getID(), ID.ICONS.MENUS.CTRL_LIVINGLIGHT.getNameKR(), ID.LINKEDSCREEN.SubMenuCtrl.HDC_LivingLamp,
                         R.drawable.icon_ctrl_light_normal, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed, R.drawable.icon_ctrl_light_pressed);
             }

+ 4 - 1
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ImageStringDataConvert.java

@@ -12,10 +12,13 @@ import android.graphics.BitmapFactory;
 import android.util.Base64;
 import android.util.Log;
 
+import com.artncore.commons.define;
+
 public class ImageStringDataConvert {
 	private static String TAG = "ImageStringDataConvert";
 	//public static final String VISITOR_ROOT = "/storage/emulated/0/Bestin/VisitorPictures/";
-	public static final String VISITOR_ROOT =  "/sdcard/BESTIN/VisitorPicture/";
+//	public static final String VISITOR_ROOT =  "/sdcard/BESTIN/VisitorPicture/";
+	public static final String VISITOR_ROOT =  define.VISITOR_PICTURE_LOCATION;
 
 
 	public static Bitmap decode(String encodedImage) 

+ 6 - 1
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MainDatabaseManager.java

@@ -4,6 +4,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import kr.co.icontrols.wallpadmain.declare.Common;
+import kr.co.icontrols.wallpadsupport.Version;
+
 import android.content.Context;
 import android.os.Handler;
 import android.util.Log;
@@ -659,7 +661,10 @@ public class MainDatabaseManager {
                         break;
 
                     case SETTING_ITEM_SUB_DEVICE_VENTILATION:
-                        devInfo = "1(1:환기시스템(사용함)종류( 기본 ))";
+//                        if(Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT)
+//                            devInfo = "1(1:환기시스템(사용안함)종류( 기본 ))";
+//                        else
+                            devInfo = "1(1:환기시스템(사용함)종류( 기본 ))";
                         break;
 
                     case SETTING_ITEM_SUB_DEVICE_SYSTEM_AIRCON:

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 233 - 179
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/MobileProcService.java


+ 2 - 1
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/ShortcutBox.java

@@ -536,7 +536,8 @@ 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) {
+					|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+					|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 // 엘리베이터
                 if (strElevEnable!=null && strElevEnable.contains("사용함")) {
                     allWidget[nWidgetCnt++] = new IconUnitInfo(ID.SHORTCUTS.IDS.ELEVATOR, ID.SHORTCUTS.NAMES.ELEVATOR, ID.LINKEDSCREEN.OtherFunc.ELEVATOR_CALL,

+ 27 - 2
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/WallPadiMAPUpgrade.java

@@ -540,8 +540,11 @@ public class WallPadiMAPUpgrade {
     public static final String IHN_1050_ID = "IHN1050";   // 대우건설향 월패드
 	public static final String IHN_D101_I_ID = "IHND101-I";   // 조그월패드 (중국생산)
 	public static final String IHN_D101K_I_ID = "IHND101K-I";   // 카카오 조그월패드 (중국생산)
+	public static final String IHN_D101_I_OCF_ID = "IHND101-I-OCF";   // 조그월패드 (OCF 월패드, 중국생산)
 	public static final String IHN_1010_I_ID = "IHN1010-I";   // 대외향 월패드 (중국생산)
 	public static final String IHN_1010GL_I_ID = "IHN1010GL-I";   // 연합사업지용 월패드 (중국생산)
+	public static final String IHN_1010GL_I_2443ALT_ID = "IHN1010GL-I-2443ALT";   // 현산향 2443 대체품 월패드 (중국생산)
+	public static final String IHN_1010GL_I_6410ALT_ID = "IHN1010GL-I-6410ALT";   // 현산향 6410 대체품 월패드 (중국생산)
 	public static final String IHN_T1010_I_ID = "IHNT1010-I";   // 힘찬건설향 월패드 (중국생산)
 	public static final String IHN_HS101_I_ID = "IHNHS101-I";   //  효성건설향 월패드 (중국생산)
 	public static final String IHN_1030_I_ID = "IHN1030-I";   // 보급형(엔트리급) 월패드 (중국생산)
@@ -550,8 +553,6 @@ public class WallPadiMAPUpgrade {
 	public static final String IHN_1050DW_I_ID = "IHN1050DW-I";   // 대우건설향 월패드 (중국생산)
 	public static final String IHN_1020B_I_ID = "IHN1020B-I";   //  IHN-1020B-A2 대체용 월패드 (중국생산)
 	public static final String IHN_1303_I_ID = "IHN1303-I";   //  13.3인치 월패드 (중국생산)
-	public static final String IHN_1010GL_I_2443ALT_ID = "IHN1010GL-I-2443ALT";   // 현산향 2443 대체용 월패드
-	public static final String IHN_1010GL_I_6410ALT_ID = "IHN1010GL-I-6410ALT";   // 현산향 6410 대체용 월패드
 	
 	private boolean checkDownloadFilename(String filename, int type) {
 		try {
@@ -619,6 +620,14 @@ public class WallPadiMAPUpgrade {
 						return false;
 					}
 				}
+				else if(Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
+					// V40 플랫폼 업그레이드
+					if (!(astrFileName[1].equals(DEV_V40_ARCH_ID) || astrFileName[1].equals(DEV_A40i_ARCH_ID)) || !astrFileName[2].equals(IHN_D101_I_OCF_ID)  || (astrFileName[3].length() != 14)) {
+						Log.d( TAG ,  "[checkDownloadFilename] astrFileName[1] : + " + astrFileName[1] + ", DEV_V40_ARCH_ID :" + DEV_V40_ARCH_ID);
+						Log.d( TAG ,  "[checkDownloadFilename] astrFileName[3].length() : + " + astrFileName[3].length());
+						return false;
+					}
+				}
                 else if(Version.getModelType() == Version.MODEL_TYPE.IHN_1010) {
                     // V40 플랫폼 업그레이드
                     if (!(astrFileName[1].equals(DEV_V40_ARCH_ID) || astrFileName[1].equals(DEV_A40i_ARCH_ID)) || !astrFileName[2].equals(IHN_1010_ID)  || (astrFileName[3].length() != 14)) {
@@ -651,6 +660,22 @@ public class WallPadiMAPUpgrade {
 						return false;
 					}
 				}
+				else if(Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT) {
+					// V40 플랫폼 업그레이드
+					if (!(astrFileName[1].equals(DEV_V40_ARCH_ID) || astrFileName[1].equals(DEV_A40i_ARCH_ID)) || !astrFileName[2].equals(IHN_1010GL_I_2443ALT_ID)  || (astrFileName[3].length() != 14)) {
+						Log.d( TAG ,  "[checkDownloadFilename] astrFileName[1] : + " + astrFileName[1] + ", DEV_V40_ARCH_ID :" + DEV_V40_ARCH_ID);
+						Log.d( TAG ,  "[checkDownloadFilename] astrFileName[3].length() : + " + astrFileName[3].length());
+						return false;
+					}
+				}
+				else if(Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+					// V40 플랫폼 업그레이드
+					if (!(astrFileName[1].equals(DEV_V40_ARCH_ID) || astrFileName[1].equals(DEV_A40i_ARCH_ID)) || !astrFileName[2].equals(IHN_1010GL_I_6410ALT_ID)  || (astrFileName[3].length() != 14)) {
+						Log.d( TAG ,  "[checkDownloadFilename] astrFileName[1] : + " + astrFileName[1] + ", DEV_V40_ARCH_ID :" + DEV_V40_ARCH_ID);
+						Log.d( TAG ,  "[checkDownloadFilename] astrFileName[3].length() : + " + astrFileName[3].length());
+						return false;
+					}
+				}
 				else if(Version.getModelType() == Version.MODEL_TYPE.IHN_1030_I) {
 					// V40 플랫폼 업그레이드
 					if (!(astrFileName[1].equals(DEV_V40_ARCH_ID) || astrFileName[1].equals(DEV_A40i_ARCH_ID)) || !astrFileName[2].equals(IHN_1030_I_ID)  || (astrFileName[3].length() != 14)) {

+ 101 - 146
WallPadMain/src/main/java/kr/co/icontrols/wallpadmain/util/iMapServer.java

@@ -220,9 +220,9 @@ public class iMapServer extends Service {
 //    private boolean bBlockCallEvent = false;
 
     // iCMD 연동시 smartlight(DC분전반 조명제어)기기를 기존의 livinglight/light(거실조명/각방조명)로 대체 여부
-    // true : smartlight 제어
-    // false: 기존 livinglight/light로 smartlight 제어
-    private boolean bSmartLightAsNormalLight = true;
+    // true : 기존 livinglight/light로 smartlight 제어
+    // false: livinglight/light로 livinglight/light 제어
+    private boolean bSmartLightAsNormalLight = false;   // 스마트홈 2.0 앱에서 smartlight 제어기능을 추가하기에 더이상 사용하지 않는다 (2021.05.18)
 
 	////////////////////////////////////////////////////////////////////////////////
     // 엘리베이터관련
@@ -462,11 +462,6 @@ public class iMapServer extends Service {
             mSound = new WpadSound(getApplicationContext());
             ElevatorUp = new ElevatorClass(true);
             ElevatorDown = new ElevatorClass(false);
-            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) {
-                bSmartLightAsNormalLight = true;
-            }
-            else bSmartLightAsNormalLight = false;
         }
         catch (RuntimeException re)
         {
@@ -855,7 +850,8 @@ public class iMapServer extends Service {
                                     if (Version.getModelType() == MODEL_TYPE.IHN_D101 || Version.getModelType() == MODEL_TYPE.IHN_D101_I
                                             || Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I
                                             || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                                            || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                                            || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                                         bSensorOk = mIGW300.checkSensorforOutmode();
                                     }
                                     else if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
@@ -1051,30 +1047,6 @@ public class iMapServer extends Service {
                             }
                             break;
 
-                        case define.NOTIFY_ACCEPT_TAKEPIC_STRANGER:
-                            Log.i(TAG, "[mWallPadNotifyBR] define.NOTIFY_ACCEPT_TAKEPIC_STRANGER");
-                            if (getUseSmartDoorCam()) {
-                                if (getStrangerTakePic()) {
-                                    // 알람 상태 확인
-                                    WallpadStatusData mWallpadStatusData = new WallpadStatusData(getApplicationContext());
-                                    int nAlarmStatus = mWallpadStatusData.GetAlarmStatus();
-                                    mWallpadStatusData.closeDB();
-                                    Log.d(TAG, "[mWallPadNotifyBR] nAlarmStatus [" + nAlarmStatus + "]");
-                                    if (nAlarmStatus == WallpadStatusData.GUARD_OUT_WAIT) {
-                                        // 외출 대기중 (설정진행중)일 경우 촬영안함(거동수상자 감지시간이 설정대기시간보다 짧을 경우 외출모드 안걸리므로)
-                                        ctrlSmartIOTCamStatusMode(Common.SmartRFCamStatusMode.STATUS_OFF);
-                                        ctrlSmartIOTCamLEDMode(Common.SmartRFCamLEDMode.LED_OFF);
-                                    } else {
-                                        Log.d(TAG, "[mWallPadNotifyBR] Send BR --> Common.BR_MAIN_NOTI.ACCEPT_TAKEPIC");
-                                        Intent Newintent = new Intent();
-                                        Newintent.setAction(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI);
-                                        Newintent.putExtra(Common.BR_MAIN_NOTI.KIND, BR_MAIN_NOTI.ACCEPT_TAKEPIC);
-                                        getApplicationContext().sendBroadcast(Newintent);
-                                    }
-                                }
-                            }
-                            break;
-
                         case define.NOTIFY_REJECT_RECORD_STRANGER:
                         case define.NOTIFY_REJECT_TAKEPIC_STRANGER:
                             Log.i(TAG, "[mWallPadNotifyBR] define.NOTIFY_REJECT_RECORD_STRANGER");
@@ -1182,7 +1154,8 @@ public class iMapServer extends Service {
                     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
                             || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                            || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                            || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                         if (mIGW300.checkSensorforOutmode()) {
                             CallOutModeWaitingActivity(AlarmStatus);
                         }
@@ -1454,7 +1427,8 @@ public class iMapServer extends Service {
             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
                     || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                    || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                 mIGW300.ctrlDeviceIO(IGW300API.OUTPUT.DOOR_POWER, true);
                 if (getUseSmartDoorCam()) {
                     ctrlSmartIOTCamLEDMode(Common.SmartRFCamLEDMode.LED_ON);
@@ -1556,7 +1530,8 @@ public class iMapServer extends Service {
             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
                     || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                    || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                 mIGW300.changeCallPath(IGW300API.TEL_PATH.OFF);
                 if (getUseSmartDoorCam()) {
                     ctrlSmartIOTCamLEDMode(Common.SmartRFCamLEDMode.LED_OFF);
@@ -2377,7 +2352,8 @@ public class iMapServer extends Service {
                                 else 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
                                         || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                                        || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                                        || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                                        || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                                     mIGW300.ctrlDeviceIO(IGW300API.OUTPUT.DOOR_POWER, true);
                                     mIGW300.ctrlDeviceIO(IGW300API.OUTPUT.BELL_CONT, true);
                                 }
@@ -2406,7 +2382,8 @@ public class iMapServer extends Service {
 					case WallPadInterface.EVT_SENSOR_EMRGENCY:
                     case WallPadInterface.EVT_SENSOR_EMRGENCY_IHN1010_BTN_EMR_IHN101GL:
                         if ((Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                                || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) && (ReceiveEvt.getKeyCode() == WallPadInterface.EVT_SENSOR_EMRGENCY_IHN1010_BTN_EMR_IHN101GL)) {
+                                || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                                && (ReceiveEvt.getKeyCode() == WallPadInterface.EVT_SENSOR_EMRGENCY_IHN1010_BTN_EMR_IHN101GL)) {
                             Log.w(TAG, "########## EMERGENCY BUTTON ##########");
                             // 월패드 비상버튼 입력 SA 와 GLE 공통
                             Log.d("imap", "MgrAppRun : " + MgrAppRun + " , Common.DIAGNOSTIC_MODE :" + Common.DIAGNOSTIC_MODE);
@@ -2913,7 +2890,8 @@ public class iMapServer extends Service {
         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
                 || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
             IGW300APICheckHandler.sendEmptyMessage(0);
         }
 
@@ -3456,7 +3434,8 @@ public class iMapServer extends Service {
                             retXML = iCMDProcSDPSmartLightControl(doc);
                         }
 						else if (cmd.equalsIgnoreCase("remote_access_livinglight")) {
-						    if (ModelType == MODEL_TYPE.IHN_1020GL) {
+						    if (ModelType == MODEL_TYPE.IHN_1020GL || ModelType == MODEL_TYPE.IHN_1010GL || ModelType == MODEL_TYPE.IHN_1010GL_I
+                                    || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
                                 retXML = iCMDProc_I_LightControl(doc);
                             }
 						    else {
@@ -3465,10 +3444,12 @@ public class iMapServer extends Service {
 						}
 						else if (cmd.equalsIgnoreCase("remote_access_electric")) {
 						    if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
-                                    || ModelType == Version.MODEL_TYPE.IHN_D101K || ModelType == Version.MODEL_TYPE.IHN_D101K_I) {
+                                    || ModelType == Version.MODEL_TYPE.IHN_D101K || ModelType == Version.MODEL_TYPE.IHN_D101K_I
+                                    || ModelType == MODEL_TYPE.IHN_D101_I_OCF) {
 						        retXML = iCMDProcSDPConcentControl(doc);
 						    }
-						    else if (ModelType == MODEL_TYPE.IHN_1020GL) {
+						    else if (ModelType == MODEL_TYPE.IHN_1020GL || ModelType == MODEL_TYPE.IHN_1010GL || ModelType == MODEL_TYPE.IHN_1010GL_I
+                                    || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
                                 retXML = iCMDProcEnergyMeterConcentControl(doc);
                             }
 						    else {
@@ -3491,7 +3472,8 @@ public class iMapServer extends Service {
                             retXML = iCMDProcCurtainControl(doc);
                         }
 						else if (cmd.equalsIgnoreCase("remote_access_light")) {
-                            if (ModelType == Version.MODEL_TYPE.IHN_1020GL) {
+                            if (ModelType == MODEL_TYPE.IHN_1020GL || ModelType == MODEL_TYPE.IHN_1010GL || ModelType == MODEL_TYPE.IHN_1010GL_I
+                                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
                                 retXML = iCMDProcEnergyMeterLightControl(doc);
                             }
 						    else {
@@ -3552,7 +3534,8 @@ public class iMapServer extends Service {
                         }
                         else if( cmd.equalsIgnoreCase("remote_entire_access_light_control")) {
                             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) {
+                                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                                 retXML = iCMDProcEntireLightControl(doc); // 전체 조명 제어
                             }
                         }
@@ -4727,7 +4710,8 @@ public class iMapServer extends Service {
                                     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
                                             || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                                            || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                                            || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF)
                                     {
                                         String devInfo = devval;
                                         if(devInfo!=null)
@@ -6168,7 +6152,8 @@ public class iMapServer extends Service {
                 else if (devlist[i].equals("light")) {
                     try {
                         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) {
+                                || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                                || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                             if (bSmartLightAsNormalLight) {
                                 if (mSdbAPI != null) {
                                     strResult +="         <devinfo name=\"light\" value=\""+ mSdbAPI.data.BadRoom_Em_Count +"\"/>\r\n";
@@ -6219,7 +6204,8 @@ public class iMapServer extends Service {
                     try {
                         int[] lightinfo = devSet.Get_Light_info();
                         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) {
+                                || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                                || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                             if (bSmartLightAsNormalLight) {
                                 if (mSdb_LivingRoomLightAPI != null) {
                                     strResult +="         <devinfo name=\"livinglight\" value=\""+ mSdb_LivingRoomLightAPI.data.Info.LightCount +"\"/>\r\n";
@@ -6319,7 +6305,8 @@ public class iMapServer extends Service {
                 else if (devlist[i].equals("electric")) {
                     try {
                         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) {
+                                || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                                || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                             int nOutlet = 0;
                             if (mSdb_LivingRoomLightAPI != null) {
                                 if (mSdbAPI != null) {
@@ -7058,7 +7045,8 @@ public class iMapServer extends Service {
                             else 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
                                     || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                                    || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                                 if (mIGW300.checkSensorforInmode()) {
                                     SetData.SetAlarmStatus(WallpadStatusData.GUARD_IN);
                                     Intent intent = new Intent();
@@ -7115,7 +7103,8 @@ public class iMapServer extends Service {
                                 else 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
                                         || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                                        || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                                        || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                                        || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                                     if (mIGW300.checkSensorforOutmode()) {
                                         Common.SendAppFinishReqBR(getApplicationContext());
                                         Intent intent = new Intent();
@@ -7747,7 +7736,7 @@ public class iMapServer extends Service {
 
                     for (int i = 0; i < nTotalLightCnt; i++) {
                         if (i == 0) {
-                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ (i + 1) + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount  + "\">\r\n";
+                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\"" + mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ mDefaultRoomNameList_Light[i] + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount + "\">\r\n";
                             for (int j = 0; j < mSdb_LivingRoomLightAPI.data.Info.LightCount; j++) {
                                 String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -7777,7 +7766,7 @@ public class iMapServer extends Service {
                             retStr += "      </status_map>\r\n";
                         }
                         else {
-                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\"null\" dev_name=\""+ (i + 1) + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[i - 1].Info.LightCount  + "\">\r\n";
+                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\"null\" dev_name=\""+ mDefaultRoomNameList_Light[i] + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[i - 1].Info.LightCount + "\">\r\n";
                             for (int j = 0; j < mSdbAPI.data.BadRoom_EnergyMeter[i - 1].Info.LightCount; j++) {
                                 String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -7838,7 +7827,7 @@ public class iMapServer extends Service {
                     retStr += "      <dev_cnt>\"1\"</dev_cnt>\r\n";
 
                     if (nDevNo == 1) {
-                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ nDevNo + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount  + "\">\r\n";
+                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ mDefaultRoomNameList_Light[nDevNo - 1] + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount + "\">\r\n";
                         for (int j = 0; j < mSdb_LivingRoomLightAPI.data.Info.LightCount; j++) {
                             String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -7868,7 +7857,7 @@ public class iMapServer extends Service {
                         retStr += "      </status_map>\r\n";
                     }
                     else {
-                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\"null\" dev_name=\""+ nDevNo + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[nDevNo - 2].Info.LightCount  + "\">\r\n";
+                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\"null\" dev_name=\""+ mDefaultRoomNameList_Light[nDevNo - 1] + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[nDevNo - 2].Info.LightCount + "\">\r\n";
                         for (int j = 0; j < mSdbAPI.data.BadRoom_EnergyMeter[nDevNo - 2].Info.LightCount; j++) {
                             String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -7927,41 +7916,14 @@ public class iMapServer extends Service {
 
                     for (int i = 0; i < nTotalLightCnt; i++) {
                         if (i == 0) {
-
-                            mSdb_LivingRoomLightAPI.SetLight((byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false,
+                            mSdb_LivingRoomLightAPI.SetLight2((byte) 0xFF, convertSmartLightPowerValue(unit_status),
                                     unit_dimming.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_dimming),
                                     unit_color.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_color));
-
-//                            if (!unit_status.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightOnOff((byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false);
-//                            }
-//
-//                            if (!unit_dimming.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightDimming((byte) 0xFF, (byte) Integer.parseInt(unit_dimming));
-//                            }
-//
-//                            if (!unit_color.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightColor((byte) 0xFF, (byte) Integer.parseInt(unit_color));
-//                            }
                         }
                         else {
-
-                            mSdbAPI.SetLight((byte) (i - 1), (byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false,
+                            mSdbAPI.SetLight2((byte) (i - 1), (byte) 0xFF, convertSmartLightPowerValue(unit_status),
                                     unit_dimming.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_dimming),
                                     unit_color.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_color));
-
-
-//                            if (!unit_status.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightOnOff((byte) (i - 1), (byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false);
-//                            }
-//
-//                            if (!unit_dimming.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightDimming((byte) (i - 1), (byte) 0xFF, (byte) Integer.parseInt(unit_dimming));
-//                            }
-//
-//                            if (!unit_color.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightColor((byte) (i - 1), (byte) 0xFF, (byte) Integer.parseInt(unit_color));
-//                            }
                         }
                     }
 
@@ -7970,7 +7932,7 @@ public class iMapServer extends Service {
 
                     for (int i = 0; i < nTotalLightCnt; i++) {
                         if (i == 0) {
-                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ (i + 1) + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount  + "\">\r\n";
+                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ mDefaultRoomNameList_Light[i] + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount + "\">\r\n";
                             for (int j = 0; j < mSdb_LivingRoomLightAPI.data.Info.LightCount; j++) {
                                 String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -8000,7 +7962,7 @@ public class iMapServer extends Service {
                             retStr += "      </status_map>\r\n";
                         }
                         else {
-                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\"null\" dev_name=\""+ (i + 1) + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[i - 1].Info.LightCount  + "\">\r\n";
+                            retStr += "      <status_map dev_num=\""+ (i + 1) + "\" dev_mode=\"null\" dev_name=\""+ mDefaultRoomNameList_Light[i] + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[i - 1].Info.LightCount + "\">\r\n";
                             for (int j = 0; j < mSdbAPI.data.BadRoom_EnergyMeter[i - 1].Info.LightCount; j++) {
                                 String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -8063,38 +8025,14 @@ public class iMapServer extends Service {
 
                     if (unit_num.equalsIgnoreCase("all")) {
                         if (nDevNo == 1) {
-                            mSdb_LivingRoomLightAPI.SetLight((byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false,
+                            mSdb_LivingRoomLightAPI.SetLight2((byte) 0xFF, convertSmartLightPowerValue(unit_status),
                                     unit_dimming.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_dimming),
                                     unit_color.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_color));
-
-//                            if (!unit_status.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightOnOff((byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false);
-//                            }
-//
-//                            if (!unit_dimming.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightDimming((byte) 0xFF, (byte) Integer.parseInt(unit_dimming));
-//                            }
-//
-//                            if (!unit_color.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightColor((byte) 0xFF, (byte) Integer.parseInt(unit_color));
-//                            }
                         }
                         else {
-                            mSdbAPI.SetLight((byte) (nDevNo -2), (byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false,
+                            mSdbAPI.SetLight2((byte) (nDevNo -2), (byte) 0xFF, convertSmartLightPowerValue(unit_status),
                                     unit_dimming.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_dimming),
                                     unit_color.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_color));
-
-//                            if (!unit_status.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightOnOff((byte) (nDevNo -2), (byte) 0xFF, (unit_status.equalsIgnoreCase("on")) ? true : false);
-//                            }
-//
-//                            if (!unit_dimming.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightDimming((byte) (nDevNo -2), (byte) 0xFF, (byte) Integer.parseInt(unit_dimming));
-//                            }
-//
-//                            if (!unit_color.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightColor((byte) (nDevNo -2), (byte) 0xFF, (byte) Integer.parseInt(unit_color));
-//                            }
                         }
                     }
                     else {
@@ -8114,44 +8052,20 @@ public class iMapServer extends Service {
                         }
 
                         if (nDevNo == 1) {
-                            mSdb_LivingRoomLightAPI.SetLight((byte) (nUnitNo - 1), (unit_status.equalsIgnoreCase("on")) ? true : false,
+                            mSdb_LivingRoomLightAPI.SetLight2((byte) (nUnitNo - 1), convertSmartLightPowerValue(unit_status),
                                     unit_dimming.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_dimming),
                                     unit_color.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_color));
-
-//                            if (!unit_status.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightOnOff((byte) (nUnitNo - 1), (unit_status.equalsIgnoreCase("on")) ? true : false);
-//                            }
-//
-//                            if (!unit_dimming.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightDimming((byte) (nUnitNo - 1), (byte) Integer.parseInt(unit_dimming));
-//                            }
-//
-//                            if (!unit_color.equalsIgnoreCase("null")) {
-//                                mSdb_LivingRoomLightAPI.SetLightColor((byte) (nUnitNo - 1), (byte) Integer.parseInt(unit_color));
-//                            }
                         }
                         else {
-                            mSdbAPI.SetLight((byte) (nDevNo -2), (byte) (nUnitNo - 1), (unit_status.equalsIgnoreCase("on")) ? true : false,
+                            mSdbAPI.SetLight2((byte) (nDevNo -2), (byte) (nUnitNo - 1), convertSmartLightPowerValue(unit_status),
                                     unit_dimming.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_dimming),
                                     unit_color.equalsIgnoreCase("null") ? define.DEVICE_ALL_OR_NOTHING : (byte) Integer.parseInt(unit_color));
-
-//                            if (!unit_status.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightOnOff((byte) (nDevNo -2), (byte) (nUnitNo - 1), (unit_status.equalsIgnoreCase("on")) ? true : false);
-//                            }
-//
-//                            if (!unit_dimming.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightDimming((byte) (nDevNo -2), (byte) (nUnitNo - 1), (byte) Integer.parseInt(unit_dimming));
-//                            }
-//
-//                            if (!unit_color.equalsIgnoreCase("null")) {
-//                                mSdbAPI.SetLightColor((byte) (nDevNo -2), (byte) (nUnitNo - 1), (byte) Integer.parseInt(unit_color));
-//                            }
                         }
                     }
 
                     if (nDevNo == 1) {
                         mSdb_LivingRoomLightAPI.Refresh();
-                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ nDevNo + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount  + "\">\r\n";
+                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\""+ mDefaultRoomNameList_Light[nDevNo - 1] + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount + "\">\r\n";
                         for (int j = 0; j < mSdb_LivingRoomLightAPI.data.Info.LightCount; j++) {
                             String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -8182,7 +8096,7 @@ public class iMapServer extends Service {
                     }
                     else {
                         mSdbAPI.Refresh((byte) 0xFF, (byte) 0xFF);
-                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\"null\" dev_name=\""+ nDevNo + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[nDevNo - 2].Info.LightCount  + "\">\r\n";
+                        retStr += "      <status_map dev_num=\""+ nDevNo + "\" dev_mode=\"null\" dev_name=\""+ mDefaultRoomNameList_Light[nDevNo - 1] + "\" unit_cnt=\"" + mSdbAPI.data.BadRoom_EnergyMeter[nDevNo - 2].Info.LightCount + "\"/>\r\n";
                         for (int j = 0; j < mSdbAPI.data.BadRoom_EnergyMeter[nDevNo - 2].Info.LightCount; j++) {
                             String status_power = "off", status_dim = "null", status_color = "null";
 
@@ -8240,7 +8154,7 @@ public class iMapServer extends Service {
                     retStr += "      <dev_cnt>\"1\"</dev_cnt>\r\n";
 
                     if (!dev_mode.equals("null")) mSdb_LivingRoomLightAPI.SetLightMode((byte) Integer.parseInt(dev_mode));
-                    retStr += "      <status_map dev_num=\"1\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\"1\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount  + "\">\r\n";
+                    retStr += "      <status_map dev_num=\"1\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\"" + mDefaultRoomNameList_Light[0] + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount + "\">\r\n";
                     // 각방EM 모드제어 API 추가해야함 (JEFF,2019.09.29)
                     retStr += "   </service>\r\n</imap>\r\n";
                 }
@@ -8274,7 +8188,7 @@ public class iMapServer extends Service {
 
                     if (!dev_mode.equals("null")) mSdb_LivingRoomLightAPI.SetLightMode((byte) Integer.parseInt(dev_mode));
 
-                    retStr += "      <status_map dev_num=\"1\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\"1\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount  + "\">\r\n";
+                    retStr += "      <status_map dev_num=\"1\" dev_mode=\""+ mSdb_LivingRoomLightAPI.data.Data.LightMode + "\" dev_name=\"" + mDefaultRoomNameList_Light[0] + "\" unit_cnt=\"" + mSdb_LivingRoomLightAPI.data.Info.LightCount + "\" room_name=\"" + mDefaultRoomNameList_Light[0] + "\">\r\n";
                     retStr += "   </service>\r\n</imap>\r\n";
                 }
             }
@@ -8339,7 +8253,7 @@ public class iMapServer extends Service {
                 }
                 else {
                     LightAPI lightCTR = mWallPadAPI.Get_LightController();
-                    if(lightCTR!=null)
+                    if (lightCTR!=null)
                     {
                         if (lightCTR.Refresh(false)==0) {
                             retStr += " result=\"ok\">\r\n      <action>\"status\"</action>\r\n      <status_map dev_num=\""+ lightcmd.devnum +"\" unit_cnt=\""+lightCTR.data.LightCount+"\"/>\r\n";
@@ -9325,7 +9239,17 @@ public class iMapServer extends Service {
 //            PowerManager mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
 //            Log.i(TAG, "[wakeupLCD] mPowerManager.isScreenOn() = " + mPowerManager.isScreenOn());
 //            if (!mPowerManager.isScreenOn()) mIOInterface.ctrlLcdWakeUp();
-            mIOInterface.ctrlLcdWakeUp();
+
+            WallpadStatusData WsDB = new WallpadStatusData(getApplicationContext());
+            int AlarmStatus = WsDB.GetAlarmStatus();
+            WsDB.closeDB();
+            if (AlarmStatus == WallpadStatusData.ALARM_ARISE || AlarmStatus == WallpadStatusData.GUARD_OUT || AlarmStatus == WallpadStatusData.GUARD_OUT_WAIT) {
+                Log.w(TAG, "[wakeupLCD] wakeupLCD denied!!! === AlarmStatus [" + AlarmStatus + "]");
+                return; // 방범 설정되어 있는 경우 알림 팝업이 출력되지 않으므로 LCD ON 하지 않음
+            } else {
+                Log.d(TAG, "[wakeupLCD] wakdupLCD!!!");
+                mIOInterface.ctrlLcdWakeUp();
+            }
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
         }
@@ -9515,7 +9439,7 @@ public class iMapServer extends Service {
 			noticeCNT+=newcnt;
 		}
 
-		Log.d(TAG, "[ProcUpdateNews] News Version : " + strNewsVer);
+		Log.d(TAG, "[ProcUpdateNews] NotiVer [" + NotiVer +"], News Version [" + strNewsVer + "]");
 		DBMGR.SetNoticeVer(strNewsVer);
 		DBMGR.SetNoticeCNT(noticeCNT);
         DBMGR.closeDB();
@@ -14311,7 +14235,8 @@ public class iMapServer extends Service {
         try {
             // 영업샘플 모드 판단
             if (Version.getModelType() == MODEL_TYPE.IHN_D101 || Version.getModelType() == MODEL_TYPE.IHN_D101_I
-                    || Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I) {
+                    || Version.getModelType() == MODEL_TYPE.IHN_D101K || Version.getModelType() == MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
                 Log.i(TAG, "[startDistributionPanel] Normal working or Business sample mode!!!");
                 WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getApplicationContext());
                 int nResult = mWallpadDeviceSet.Get_DistributionPannelType_Info();
@@ -14764,6 +14689,8 @@ public class iMapServer extends Service {
                 String strSavedWebCtrlPW = mWallpadStatusData.GetWebCtrPW();
                 mWallpadStatusData.closeDB();
 
+                Log.w(TAG, "[checkRemoteCtrlAuthentication] strSavedWebCtrlPW [" + strSavedWebCtrlPW + "]");
+
                 if (!checkPWValidation(strSavedWebCtrlPW)) {
                     Log.w(TAG, "[checkRemoteCtrlAuthentication] strSavedWebCtrlPW is not valid!!");
                     strReplyMsg += " \"deny\" >\r\n   </service>\r\n</imap>";
@@ -15793,7 +15720,8 @@ public class iMapServer extends Service {
                 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
                         || Version.getModelType() == MODEL_TYPE.IHN_1010GL || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I
-                        || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                        || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                        || Version.getModelType() == MODEL_TYPE.IHN_D101_I_OCF) {
 
                     if (!checkAvailableBSPDoorCamConfig()) {
                         Log.w(TAG, "[checkDoorCamConfig] Current BSP Version is not support!!");
@@ -16137,6 +16065,33 @@ public class iMapServer extends Service {
         }
     }
 
+    /** 조명 ON/OFF 상태 */
+    public static class LIGHT_ONOFF {
+        /** ON */
+        public static byte ON = (byte) 0x01;
+        /** OFF */
+        public static byte OFF = (byte) 0x02;
+        /** OFF */
+        public static byte DONTCARE = (byte) 0xFF;
+    }
+
+    private byte convertSmartLightPowerValue(String cmd) {
+        try {
+            if (cmd.equalsIgnoreCase("on")) return LIGHT_ONOFF.ON;
+            else if (cmd.equalsIgnoreCase("off")) return LIGHT_ONOFF.OFF;
+            else return LIGHT_ONOFF.DONTCARE;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
+        }
+        catch (Exception e) {
+            Log.e(TAG, "[Exception] convertSmartLightPowerValue(String cmd)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return -1;
+        }
+    }
+
 
 
 

+ 3 - 2
WallPadOutmodeRun/src/main/AndroidManifest.xml

@@ -2,10 +2,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadoutmoderun"
     android:versionCode="1"
-    android:versionName="2021.05.28.01">
+    android:versionName="2021.05.29.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.INTERNET" />
 

+ 2 - 1
WallPadOutmodeRun/src/main/java/kr/co/icontrols/wallpadoutmoderun/screen/OutModeSecurityRun.java

@@ -74,7 +74,8 @@ public class OutModeSecurityRun extends WpadScreen{
             else 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
                     || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)
             {
                 Common.command_iGW300(this.getContext(), Common.IGW300_SENSOR_CHECK);
             }

+ 2 - 1
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/manual/SetLinkCtr_Manual.java

@@ -59,7 +59,8 @@ public class SetLinkCtr_Manual extends WpadScreen {
                     "환기동작 : 체크하시면 외출 복귀 시 환기가 동작됩니다." + "\r\n";
 
             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)
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)
             {
                 linkExplain += "웰컴조명 : 거실등/복도등/주방등을 선택하여 외출 해제시 조명을 켭니다.(일괄소등 해제인 경우)"  + "\r\n";
             }

+ 2 - 1
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/PopupOutModeWaiting.java

@@ -676,7 +676,8 @@ public class PopupOutModeWaiting extends WpadScreen
 		else 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
 				|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-				|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+				|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+				|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
 			Log.d(TAG, "[OutModeCheckSensor] ========== IHN-D101(-I)/IHN-D101K(-I)/IHN-1010GL(-I) ==========");
 			IGW300API.Data mData = Common.getIGW300UpdateData();
 			if(mData!=null)

+ 41 - 244
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/PopupSmartIOTCam.java

@@ -37,7 +37,7 @@ public class PopupSmartIOTCam extends WpadScreen {
     WpadImageView OkBtn, CancelBtn, topCancelBtn, ManualBtn;
     WpadTextView title;
 
-    static int SET_CNT = 3; // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 4로 수정!!!!!!!)
+    static int SET_CNT = 1;
     WpadTextView [] textTitle = new WpadTextView[SET_CNT];
     WpadTextView [] textValue = new WpadTextView[SET_CNT];
     WpadImageView [] btnPrev = new WpadImageView[SET_CNT];
@@ -49,37 +49,26 @@ public class PopupSmartIOTCam extends WpadScreen {
 
     // ******** 스마트현관카메라 설정값 ********
     private boolean bCurrentRecordingSet = bDefaultRecordingSet;      // 거동수상자 녹화 설정: 사용
-    private int mCurrentSensitivity = mDefaultSensitivity;            // 센서감도 설정: 1~5 단계
-    private int mCurrentDuration = mDefaultDuration;                  // 감지 유지시간: 30~250 초
-//    private int mCurrentCamBrightness = mDefaultCamBrightness;        // 화면밝기 설정: 1~10 단계
-    private int mCurrentRecordTime = mDefaultRecordTime;              // 녹화시간 설정: 30~120 초
+    private int mCurrentRecordTime = mDefaultRecordTime;              // 녹화시간 설정: 10/20/30초 (기본값: 30초)
 
     // 초기값 (Default)
     private final static boolean bDefaultRecordingSet = true;
-    private final static int mDefaultSensitivity = 5;
-    private final static int mDefaultDuration = 10;
-//    private final static int mDefaultCamBrightness = 5;
     private final static int mDefaultRecordTime = 30;
     // MIN (최소값)
-    private final int MIN_SENSOR_SENSITIVITY = 1;
-    private final int MIN_SENSOR_DURATION = 10;
-//    private final int MIN_BRIGHTNESS = 1;
-    private final int MIN_RECORD_TIME = 30;
+    private final int MIN_RECORD_TIME = 10;
     // MAX (최대값)
-    private final int MAX_SENSOR_SENSITIVITY = 5;
-    private final int MAX_SENSOR_DURATION = 250;
-//    private final int MAX_BRIGHTNESS = 10;
-    private final int MAX_RECORD_TIME = 120;
+    private final int MAX_RECORD_TIME = 30;
 
     public final String TXT_MINUTE = "분";
     public final String TXT_SECOND = "초";
 
     public final String TXT_RECORDING_SETTING = "거동수상자 녹화 설정";
-    public final String TXT_SENSOR_SENSITIVITY = "센서감도 설정";
-    public final String TXT_SENSOR_DURATION = "감지 유지시간 설정";
-//    public final String TXT_CAM_BRIGHTNESS = "화면밝기 설정"; // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 주석 해제!!!!!!!)
     public final String TXT_RECORDING_TIME = "녹화시간 설정";
 
+    // 고정값 (센서감감도, 감지 유지시간)
+    private final byte DEFINE_SENSOR_SENSITIVITY = (byte) 0x05;
+    private final byte DEFINE_SENSOR_DURATION = (byte) 0x05;
+
     Context mContext;
     WallPadAPI mWallPadAPI;
     SmartKeyRfDoorAPI smartKeyRfDoorAPI;
@@ -105,11 +94,7 @@ public class PopupSmartIOTCam extends WpadScreen {
             Background = new WpadImageView(context, WpadImageView.TOUCH_KIND.NONE, 990, 680, R.drawable.popup_bg_a, 0, ID.SmartIOTCamPopup.image.BACKGROUND);
             ViewRegistration(layout, Background, 0, 0);
 
-            // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 주석 해제!!!!!!!)
-//            Line_Background = new WpadImageView(context, WpadImageView.TOUCH_KIND.NONE, 870, 272, R.drawable.bg_line, 0, ID.SmartIOTCamPopup.image.BACKGROUND);
-//            ViewRegistration(layout, Line_Background, Common.PopupNomalMarginLEFT(205), Common.PopupNomalMarginTOP(259));
-
-            Line_Background = new WpadImageView(context, WpadImageView.TOUCH_KIND.NONE, 870, 182, R.drawable.bg_line_2, 0, ID.SmartIOTCamPopup.image.BACKGROUND);
+            Line_Background = new WpadImageView(context, WpadImageView.TOUCH_KIND.NONE, 870, 182, R.drawable.bg_line_1, 0, ID.SmartIOTCamPopup.image.BACKGROUND);
             ViewRegistration(layout, Line_Background, Common.PopupNomalMarginLEFT(205), Common.PopupNomalMarginTOP(259));
 
             topCancelBtn = new WpadImageView(context, WpadImageView.TOUCH_KIND.BUTTON, 80, 80, R.drawable.topbar_icon_close_normal, R.drawable.topbar_icon_close_pressed, ID.SmartIOTCamPopup.button.CANCEL_TOP);
@@ -165,18 +150,6 @@ public class PopupSmartIOTCam extends WpadScreen {
                 changeRecordingSet(true);
             } else if (TargetId == ID.SmartIOTCamPopup.button.CHECK_NOTUSE) {
                 changeRecordingSet(false);
-            } else if (TargetId == ID.SmartIOTCamPopup.button.PREV1) {
-                ChangeSensorSensitivity(false);
-            } else if (TargetId == ID.SmartIOTCamPopup.button.NEXT1) {
-                ChangeSensorSensitivity(true);
-            } else if (TargetId == ID.SmartIOTCamPopup.button.PREV2) {
-                ChangeSensorDuration(false);
-            } else if (TargetId == ID.SmartIOTCamPopup.button.NEXT2) {
-                ChangeSensorDuration(true);
-            } else if (TargetId == ID.SmartIOTCamPopup.button.PREV3) {
-//                ChangeCamBrightness(false);
-            } else if (TargetId == ID.SmartIOTCamPopup.button.NEXT3) {
-//                ChangeCamBrightness(true);
             } else if (TargetId == ID.SmartIOTCamPopup.button.PREV4) {
                 ChangeRecordTime(false);
             } else if (TargetId == ID.SmartIOTCamPopup.button.NEXT4) {
@@ -196,16 +169,7 @@ public class PopupSmartIOTCam extends WpadScreen {
                 smartKeyRfDoorAPI = mWallPadAPI.Get_SmartKeyRfDoorController();
 
                 // 항목 추가
-                SetKind data = new SetKind(ID.SmartIOTCamPopup.button.PREV1, ID.SmartIOTCamPopup.button.NEXT1, TXT_SENSOR_SENSITIVITY);
-                SettingData.add(data);
-
-                data = new SetKind(ID.SmartIOTCamPopup.button.PREV2, ID.SmartIOTCamPopup.button.NEXT2, TXT_SENSOR_DURATION);
-                SettingData.add(data);
-
-//                data = new SetKind(ID.SmartIOTCamPopup.button.PREV3, ID.SmartIOTCamPopup.button.NEXT3, TXT_CAM_BRIGHTNESS);
-//                SettingData.add(data); // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 주석 해제!!!!!!!)
-
-                data = new SetKind(ID.SmartIOTCamPopup.button.PREV4, ID.SmartIOTCamPopup.button.NEXT4, TXT_RECORDING_TIME);
+                SetKind data = new SetKind(ID.SmartIOTCamPopup.button.PREV4, ID.SmartIOTCamPopup.button.NEXT4, TXT_RECORDING_TIME);
                 SettingData.add(data);
 
                 return true;
@@ -237,16 +201,18 @@ public class PopupSmartIOTCam extends WpadScreen {
 
     private boolean GetDBConfigValue() {
         try {
-            // DB => 영상녹화 여부 설정, 녹화시간, 영상밝기
+            // DB => 영상녹화 여부 설정, 녹화시간
             WallpadStatusData DBMGR = new WallpadStatusData(getContext());
             bCurrentRecordingSet = DBMGR.GetStrangerRecordingOnOff();
-            mCurrentSensitivity = DBMGR.GetSmartDoorCamSensorSensitivity();
-            mCurrentDuration = DBMGR.GetSmartDoorCamSensorDuration();
-//            mCurrentCamBrightness = DBMGR.GetSmartDoorCamBrightness();
             mCurrentRecordTime = DBMGR.GetSmartDoorCamRecordTime();
+            if (mCurrentRecordTime > MAX_RECORD_TIME) {
+                // 녹화시간 설정 DB 값이 변경되었으므로 맞추기
+                Log.d(TAG, "[GetDBConfigValue] mCurrentRecordTime [" + mCurrentRecordTime + "]");
+                mCurrentRecordTime = MAX_RECORD_TIME;
+                DBMGR.SetSmartDoorCamRecordTime(mCurrentRecordTime);
+            }
             DBMGR.closeDB();
-            Log.d(TAG, "[GetDBConfigValue] RecordingSet [" + bCurrentRecordingSet + "], Sensitivity [" + mCurrentSensitivity + "]" +
-                    ", Duration [" + mCurrentDuration + "], RecordTime [" + mCurrentRecordTime + "]");
+            Log.d(TAG, "[GetDBConfigValue] RecordingSet [" + bCurrentRecordingSet + "], RecordTime [" + mCurrentRecordTime + "]");
 
             return true;
         } catch (RuntimeException re) {
@@ -263,32 +229,13 @@ public class PopupSmartIOTCam extends WpadScreen {
 
     private boolean SaveDBConfigValue() {
         try {
-            Log.d(TAG, "[SaveDBConfigValue] bCurrentRecordingSet [" + bCurrentRecordingSet + "]");
-            if (!bCurrentRecordingSet) return true;
-
-            // 녹화 설정 확인 후 DB에 녹화시간, 영상밝기 저장
+            // DB에 녹화시간, 영상밝기 저장
             WallpadStatusData DBMGR = new WallpadStatusData(getContext());
             DBMGR.SetStrangerRecordingOnOff(bCurrentRecordingSet);
-            DBMGR.SetSmartDoorSensorSensitivity(mCurrentSensitivity);
-            DBMGR.SetSmartDoorSensorDuration(mCurrentDuration);
-//                DBMGR.SetSmartDoorCamBrightness(mCurrentCamBrightness);
             DBMGR.SetSmartDoorCamRecordTime(mCurrentRecordTime);
             DBMGR.closeDB();
-            Log.d(TAG, "[SaveDBConfigValue] RecordingSet [" + bCurrentRecordingSet + "], Sensitivity " + mCurrentSensitivity + "]" +
-                    ", Duration [" + mCurrentDuration + "], RecordTime [" + mCurrentRecordTime + "]");
-
-            // API => 센서감도, 감지유지시간
-            if (smartKeyRfDoorAPI != null) {
-                String[] retData = smartKeyRfDoorAPI.SetSensorConfig((byte) mCurrentSensitivity, (byte) mCurrentDuration).split(define.DEVCTR_CMD_SPLITER);
-                if (retData != null) {
-                    if (retData[0].contains("SUCCESS")) {
-                        Log.d(TAG, "[SaveDBConfigValue] SetSensorConfig SUCCESS!!!");
-                        return true;
-                    }
-                }
-            } else {
-                Log.w(TAG, "[SaveDBConfigValue] smartKeyRfDoorAPI is null!!");
-            }
+            Log.d(TAG, "[SaveDBConfigValue] RecordingSet [" + bCurrentRecordingSet + "], RecordTime [" + mCurrentRecordTime + "]");
+            return true;
         } catch (RuntimeException re) {
 			LogUtil.errorLogInfo("", TAG, re);
 		}
@@ -389,15 +336,6 @@ public class PopupSmartIOTCam extends WpadScreen {
 
                     item.SetViewIdx(arrayIdx);
 
-                    if (item.mTitle.equals(TXT_SENSOR_SENSITIVITY)) {
-                        DrawSensorSensitivity(mCurrentSensitivity);
-                    }
-                    if (item.mTitle.equals(TXT_SENSOR_DURATION)) {
-                        DrawSensorDuration(mCurrentDuration);
-                    }
-//                if (SettingData.get(j).mTitle.equals(TXT_CAM_BRIGHTNESS)) {
-//                    DrawCamBrightness(mCurrentCamBrightness); // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 주석 해제!!!!!!!)
-//                }
                     if (item.mTitle.equals(TXT_RECORDING_TIME)) {
                         DrawRecordTime(mCurrentRecordTime);
                     }
@@ -464,27 +402,28 @@ public class PopupSmartIOTCam extends WpadScreen {
             bCurrentRecordingSet = bUse;
             Log.d(TAG, "[changeRecordingSet] bCurrentRecordingSet [" + bCurrentRecordingSet + "]");
 
-            // LED & MODE 제어
+            // API => 센서감도, 감지유지시간
             if (smartKeyRfDoorAPI != null) {
-                int cam, led;
-                if (bCurrentRecordingSet) {
-                    cam = ctrlSmartIOTCamStatusMode(Common.SmartRFCamStatusMode.STATUS_AUTO_ON);
-                    led = ctrlSmartIOTCamLEDMode(Common.SmartRFCamLEDMode.LED_AUTO_ON);
-                } else {
-                    cam = ctrlSmartIOTCamStatusMode(Common.SmartRFCamStatusMode.STATUS_AUTO_OFF);
-                    led = ctrlSmartIOTCamLEDMode(Common.SmartRFCamLEDMode.LED_AUTO_OFF);
+                boolean bRet = false;
+                String[] retData = smartKeyRfDoorAPI.SetSensorConfig(DEFINE_SENSOR_SENSITIVITY, DEFINE_SENSOR_DURATION).split(define.DEVCTR_CMD_SPLITER);
+                if (retData != null) {
+                    if (retData[0].contains("SUCCESS")) {
+                        Log.d(TAG, "[changeRecordingSet] SetSensorConfig SUCCESS!!!");
+                        bRet = true;
+                    }
                 }
 
-                if (cam >= 0 && led >= 0) {
-                    Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-
-                    // 통신 성공시에만 녹화 여부 설정되도록!
-                    DrawRecordingSet(bCurrentRecordingSet);
+                // 상태, LED 제어
+                int cam, led;
+                cam = ctrlSmartIOTCamStatusMode(Common.SmartRFCamStatusMode.STATUS_AUTO_OFF);
+                led = ctrlSmartIOTCamLEDMode(Common.SmartRFCamLEDMode.LED_AUTO_OFF);
+                Log.d(TAG, "[changeRecordingSet] cam [" + cam + "], led [" + led + "]");
+                if (cam >= 0 && led >= 0) bRet = true;
+                else bRet = false;
 
-                    // DB 저장
-                    WallpadStatusData DBMGR = new WallpadStatusData(getContext());
-                    DBMGR.SetStrangerRecordingOnOff(bCurrentRecordingSet);
-                    DBMGR.closeDB();
+                if (bRet) {
+                    Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
+                    DrawRecordingSet(bCurrentRecordingSet); // 통신 성공시에만 녹화 여부 설정되도록!
                     return;
                 }
             } else {
@@ -553,8 +492,6 @@ public class PopupSmartIOTCam extends WpadScreen {
                     btnNext[i].setButtonEventOffDisable();
                 }
 
-                DrawSensorSensitivity(mCurrentSensitivity);
-                DrawSensorDuration(mCurrentDuration);
                 DrawRecordTime(mCurrentRecordTime);
             } else {
                 useCheckBox.setImageResource(useCheckBox.getDefaultImageID());
@@ -576,155 +513,15 @@ public class PopupSmartIOTCam extends WpadScreen {
         }
     }
 
-    private void ChangeSensorSensitivity(boolean Up) {
-        try {
-            if (Up) {
-                if (mCurrentSensitivity != MAX_SENSOR_SENSITIVITY) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                mCurrentSensitivity++;
-                if (mCurrentSensitivity >= MAX_SENSOR_SENSITIVITY) mCurrentSensitivity = MAX_SENSOR_SENSITIVITY;
-            } else {
-                if (mCurrentSensitivity != MIN_SENSOR_SENSITIVITY) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                mCurrentSensitivity--;
-                if (mCurrentSensitivity <= MIN_SENSOR_SENSITIVITY) mCurrentSensitivity = MIN_SENSOR_SENSITIVITY;
-            }
-
-            DrawSensorSensitivity(mCurrentSensitivity);
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] ChangeSensorSensitivity(boolean Up)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private void DrawSensorSensitivity(int val) {
-        try {
-            int idx = getViewIdx(TXT_SENSOR_SENSITIVITY);
-            if(textValue[idx]!=null)
-                textValue[idx].setText(String.valueOf(val));
-            if (val == MAX_SENSOR_SENSITIVITY) {
-                if(btnNext[idx]!=null)
-                    btnNext[idx].setButtonRearImage();
-            } else if (val == MIN_SENSOR_SENSITIVITY) {
-                if(btnPrev[idx]!=null)
-                    btnPrev[idx].setButtonRearImage();
-            } else {
-                if(btnNext[idx]!=null)
-                    btnNext[idx].setButtonFrontImage();
-                if(btnPrev[idx]!=null)
-                    btnPrev[idx].setButtonFrontImage();
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] DrawSensorSensitivity(int val)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private void ChangeSensorDuration(boolean Up) {
-        try {
-            if (Up) {
-                if (mCurrentDuration != MAX_SENSOR_DURATION) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                mCurrentDuration += 5;
-                if (mCurrentDuration >= MAX_SENSOR_DURATION) mCurrentDuration = MAX_SENSOR_DURATION;
-            } else {
-                if (mCurrentDuration != MIN_SENSOR_DURATION) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                mCurrentDuration -= 5;
-                if (mCurrentDuration <= MIN_SENSOR_DURATION) mCurrentDuration = MIN_SENSOR_DURATION;
-            }
-
-            DrawSensorDuration(mCurrentDuration);
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] ChangeSensorDuration(boolean Up)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private void DrawSensorDuration(int val) {
-        try {
-            Log.d(TAG, "[DrawSensorDuration] val [" + val + "]");
-            int idx = getViewIdx(TXT_SENSOR_DURATION);
-            if(textValue[idx]!=null)
-                textValue[idx].setText(String.valueOf(val) + TXT_SECOND);
-            if (val == MAX_SENSOR_DURATION) {
-                if(btnNext[idx]!=null)
-                    btnNext[idx].setButtonRearImage();
-            } else if (val == MIN_SENSOR_DURATION) {
-                if(btnPrev[idx]!=null)
-                    btnPrev[idx].setButtonRearImage();
-            } else {
-                if(btnNext[idx]!=null)
-                    btnNext[idx].setButtonFrontImage();
-                if(btnPrev[idx]!=null)
-                    btnPrev[idx].setButtonFrontImage();
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] DrawSensorDuration(int val)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 주석 해제!!!!!!!)
-//    private void ChangeCamBrightness(boolean Up) {
-//        try {
-//            if (Up) {
-//                if (mCurrentCamBrightness != MAX_BRIGHTNESS) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-//                mCurrentCamBrightness++;
-//                if (mCurrentCamBrightness >= MAX_BRIGHTNESS) mCurrentCamBrightness = MAX_BRIGHTNESS;
-//            } else {
-//                if (mCurrentCamBrightness != MIN_BRIGHTNESS) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-//                mCurrentCamBrightness--;
-//                if (mCurrentCamBrightness <= MIN_BRIGHTNESS) mCurrentCamBrightness = MIN_BRIGHTNESS;
-//            }
-//
-////            DrawCamBrightness(mCurrentCamBrightness); // 현재 BSP는 밝기조절 안됨 (TODO BSP 수정 후 주석 해제!!!!!!!)
-//        } catch (Exception e) {
-//            Log.e(TAG, "[Exception] ChangeCamBrightness(boolean Up)");
-//            e.printStackTrace();
-//        }
-//    }
-//
-//    private void DrawCamBrightness(int val) {
-//        try {
-//            Log.d(TAG, "[DrawCamBrightness] val [" + val + "]");
-//            int idx = getViewIdx(TXT_CAM_BRIGHTNESS);
-//            textValue[idx].setText(String.valueOf(val));
-//            if (val == MAX_BRIGHTNESS) {
-//                btnNext[idx].setButtonRearImage();
-//            } else if (val == MIN_BRIGHTNESS) {
-//                btnPrev[idx].setButtonRearImage();
-//            } else {
-//                btnNext[idx].setButtonFrontImage();
-//                btnPrev[idx].setButtonFrontImage();
-//            }
-//        } catch (Exception e) {
-//            Log.e(TAG, "[Exception] DrawCamBrightness(int val)");
-//            e.printStackTrace();
-//        }
-//    }
-
     private void ChangeRecordTime(boolean Up) {
         try {
             if (Up) {
                 if (mCurrentRecordTime != MAX_RECORD_TIME) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                mCurrentRecordTime += 30;
+                mCurrentRecordTime += 10;
                 if (mCurrentRecordTime >= MAX_RECORD_TIME) mCurrentRecordTime = MAX_RECORD_TIME;
             } else {
                 if (mCurrentRecordTime != MIN_RECORD_TIME) Sound().Play(WpadSound.SND.effect.TOUCH_LATCHED);
-                mCurrentRecordTime -= 30;
+                mCurrentRecordTime -= 10;
                 if (mCurrentRecordTime <= MIN_RECORD_TIME) mCurrentRecordTime = MIN_RECORD_TIME;
             }
 

+ 1106 - 1102
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/SecurityMainScreen.java

@@ -1,1102 +1,1106 @@
-package kr.co.icontrols.wallpadsecurity.screen;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Color;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.RelativeLayout;
-
-import kr.co.icontrols.wallpadsecurity.MainActivity;
-import kr.co.icontrols.wallpadsecurity.R;
-import kr.co.icontrols.wallpadsecurity.declare.Common;
-import kr.co.icontrols.wallpadsecurity.declare.ID;
-import kr.co.icontrols.wallpadsupport.Version;
-import kr.co.icontrols.wallpadsupport.WpadImageView;
-import com.util.LogUtil;
-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.artncore.WallPadDataMgr.*;
-import com.artncore.devicectr.WallPadInterface;
-import com.artncore.wallpadapi.DLockAPI;
-import com.artncore.wallpadapi.DLockAPI.DOORSTATUS;
-import com.artncore.wallpadapi.FP_DlockAPI;
-import com.artncore.wallpadapi.IGW200dAPI;
-import com.artncore.wallpadapi.WallPadAPI;
-import com.artncore.wallpadapi.IGW300API;
-
-public class SecurityMainScreen extends WpadScreen {
-
-    // [Define]
-    String TAG = this.getClass().getSimpleName();
-
-    private void DebugLogOutput(String s) {
-        if (Common.DEBUG_LOG_ON) Log.d(TAG, s);
-    }
-
-    // [View - ImageView(Background or Image - No touch)]
-    WpadImageView Background;
-    WpadImageView StatusWindow;
-
-    // [View - ImageView(Button - touch)]
-    WpadImageView StopBtn;
-
-    WpadImageView OutSecurityModeBtn = null;
-    WpadImageView InSecurityModeBtn = null;
-    WpadImageView BedSecurityModeBtn = null;
-
-    WpadImageView lineO1;
-    WpadImageView line02;
-    WpadImageView line03;
-
-    WpadImageView Btn_Left01;
-    WpadImageView Btn_Left02;
-    WpadImageView Text_Box01;
-
-
-    WpadImageView Btn_Right01;
-    WpadImageView Btn_Right02;
-    WpadImageView Text_Box02;
-
-    // [View - TextView]
-    private WpadTextView Title;
-    WpadTextView LineText01;
-    WpadTextView LineText02;
-    WpadTextView LineText03;
-
-    WpadTextView textValue01;
-    WpadTextView textValue02;
-
-
-    private int nOutWaitTime = 30;
-    private int nInWaitTime = 30;
-    private boolean bSmartSwitch485 = false;
-    private boolean bUseGuardSensorCheck = true; // 그냥외출모드
-    private boolean bReleasePwIntput = true;
-    private WpadImageView UseSenser, NoSensor;
-    private WpadTextView UseText, NoUseText;
-
-    private WallPadAPI mWallPadAPI = null;
-    DLockAPI doorLockAPI = null;
-    FP_DlockAPI FPdoorLockAPI = null;
-
-
-    private Context mContext;
-
-    // [Value]
-    private int OPERATION_MODE = Common.MODE;
-
-    // [Class] 2017.09.07
-
-
-    public static class ImgPosion {
-        int x = 0;
-        int y = 0;
-
-        public static int GetX(int OrgPos) {
-            return OrgPos - 200;
-        }
-
-        public static int GetY(int OrgPos) {
-            return OrgPos - 61;
-        }
-    }
-
-
-    private void initInfo() {
-        // DB에 변경된 패스워드를 저장하도록 한다.
-        try {
-            // DB 에서 현재 설정된 패스워드를 얻어오도록 한다.
-            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
-            if (wdb != null) {
-                nOutWaitTime = wdb.GetOutModeWaitTime();
-                nInWaitTime = wdb.GetComeBackWaitTime();
-                bUseGuardSensorCheck = wdb.GetUseGuardSensorCheck();
-                bReleasePwIntput = wdb.GetUseGuardReleasePW();
-                wdb.closeDB();
-
-                // 485 스마트 스위치 연동 모델인지 체크
-                if (Version.getModelType() != Version.MODEL_TYPE.IHN_1020GL) {
-                    WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
-                    int[] BatchInfo = devSet.Get_BatchSW_Info();
-                    devSet.closeDB();
-
-                    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
-                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
-                    {
-                        if (BatchInfo[0] == 1 && BatchInfo[1] == WallpadDeviceSet.BATCH_TYPE_HDC_LCD_SMART) {
-                            bSmartSwitch485 = true;
-                        }
-                    }
-                    else {
-                        if (BatchInfo[0] == 1 && BatchInfo[1] == WallpadDeviceSet.BATCH_TYPE_SMART) {
-                            bSmartSwitch485 = true;
-                        }
-                    }
-                }
-                Log.d(TAG, "[initInfo] mOutWaitTime [" + nOutWaitTime + "], mInWaitTime [" + nInWaitTime + "], m_UseGuardSensorCheck [" + bUseGuardSensorCheck + "], m_ReleasePwIntput [" + bReleasePwIntput + "]");
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] initInfo()");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private boolean OutModeCheckSensor(boolean bUseOutModeWaiting) {
-        try {
-            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
-                IGW200dAPI.Data mData = Common.getIGW200UpdateData();
-
-                if(mData!=null)
-                {
-                    boolean bMotionSensor = mData.senIn.Motion;
-                    boolean bMagneticSensor = mData.senIn.Magnetic;
-                    Log.d(TAG, "[OutModeCheckSensor] bMotionSensor [" + bMotionSensor + "], bMagneticSensor [" + bMagneticSensor + "]");
-                    byte hDoorLockState = DOORSTATUS.Close;
-
-                    if (mWallPadAPI != null) {
-                        if (mWallPadAPI.Check_Connect()) {
-                            DLockAPI doorLockAPI = mWallPadAPI.Get_DLockController();
-                            doorLockAPI.Refresh(true);
-                            hDoorLockState = doorLockAPI.data.DoorStatus;
-                            Log.d(TAG, "[OutModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                        }
-                        else {
-                            Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                        }
-                    }
-                    else {
-                        Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI is null!!");
-                    }
-
-                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
-                    if (Common.isWirelessDoorlock(getContext())) hDoorLockState = DOORSTATUS.Close;
-
-                    if (bMotionSensor == false && bMagneticSensor == false && hDoorLockState == DOORSTATUS.Close) return true;
-                    else return false;
-                }
-                else return false;
-            }
-            else 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
-                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
-			{
-			    // IGW300(G/W)를 사용하는 경우
-				IGW300API.Data mData = Common.getIGW300UpdateData();
-
-				boolean bMotionSensor_In = false;
-                boolean bMotionSensor_Out = false;
-                if(mData!=null) {
-                    boolean bMagneticSensor = mData.senIn.Magnetic;
-                    byte hDoorLockState = DOORSTATUS.Close;
-
-                    WallpadDeviceSet devSet = new WallpadDeviceSet(getContext());
-                    String[] GetValue = devSet.GetSettingData("디지털도어락");
-                    devSet.closeDB();
-                    if (GetValue == null) {
-                        Log.w(TAG, "[OutModeCheckSensor] GetSettingData(디지털도어락) is null");
-                        return false;
-                    }
-
-                    Log.d(TAG, "[OutModeCheckSensor] GetSettingData(디지털도어락) is value: " + GetValue[1]);
-
-                    if (GetValue[1].indexOf("유선") > 0) {
-                        Log.d(TAG, "[OutModeCheckSensor] WiredDoorlock");
-                        if (mWallPadAPI != null) {
-                            if (mWallPadAPI.Check_Connect()) {
-                                doorLockAPI = mWallPadAPI.Get_DLockController();
-                                doorLockAPI.Refresh(true);
-                                hDoorLockState = doorLockAPI.data.DoorStatus;
-                                Log.d(TAG, "[OutModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                            }
-                            else {
-                                Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                            }
-                        }
-                        else {
-                            Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI is null!!");
-                        }
-                    }
-                    else if (GetValue[1].indexOf("지문인식") > 0) {
-                        Log.d(TAG, "[OutModeCheckSensor] WiredDoorlock (FingerPrint)");
-                        if (mWallPadAPI != null) {
-                            if (mWallPadAPI.Check_Connect()) {
-                                FPdoorLockAPI = mWallPadAPI.Get_FP_DLockController();
-                                FPdoorLockAPI.Refresh(true);
-                                hDoorLockState = FPdoorLockAPI.data.DoorStatus;
-                                Log.d(TAG, "[OutModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                            }
-                            else {
-                                Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                            }
-                        }
-                        else {
-                            Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI is null!!");
-                        }
-                    }
-
-                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
-                    if (Common.isWirelessDoorlock(getContext()) == true) {
-                        hDoorLockState = DOORSTATUS.Close;
-                    }
-
-                    int[] SensorInfoDB;
-                    SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
-
-                    if (SensorInfoDB[0] == 1) {
-                        // 내부동체가 사용함이면 상태 검사
-                        bMotionSensor_In = mData.senIn.In_Motion;
-                        Log.d(TAG, "[OutModeCheckSensor] In Motion USE !!! : " + bMotionSensor_In);
-                    }
-
-                    if (SensorInfoDB[1] == 1) {
-                        // 외부동체가 사용함이면 상태 검사
-                        bMotionSensor_Out = mData.senIn.Out_Motion;
-                        Log.d(TAG, "[OutModeCheckSensor] Out Motion USE !!! : " + bMotionSensor_Out );
-                    }
-
-                    if (bUseOutModeWaiting) {
-                        // 외출모드 대기화면을 사용하는 경우에는 댁내에 사람이 있는 경우이므로, 내부동체를 무시한다.
-                        bMotionSensor_In = false;
-                    }
-
-                    Log.d(TAG, "[OutModeCheckSensor] bMotionSensor_In [" + bMotionSensor_In + "], bMotionSensor_Out [" + bMotionSensor_Out + "], bMagneticSensor [" + bMagneticSensor + "]");
-
-                    if (bMotionSensor_In == false && bMotionSensor_Out == false && bMagneticSensor == false && hDoorLockState == DOORSTATUS.Close) return true;
-                    else return false;
-                }
-                else return false;
-
-			}
-            else {
-                // G/W 사용을 하지 않는 경우
-                WallPadInterface mWallPadInterface = ((MainActivity) (super.getContext())).getWallPadInterface();
-                if (mWallPadInterface == null) {
-                    Log.e(TAG, "[OutModeCheckSensor] Wallpadinterface is null!!");
-                    return false;
-                }
-
-                int nSensorIn = 0, nSensorOut = 0, nSensorMagnetic = 0;
-
-                nSensorMagnetic = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MAG0_STATE, 0);
-
-                int[] SensorInfoDB;
-                SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
-
-                if (SensorInfoDB[0] == 1) {
-                    // 내부동체가 사용함이면 상태 검사
-                    nSensorIn = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTIN_STATE, 0);
-                }
-
-                if (SensorInfoDB[1] == 1) {
-                    // 외부동체가 사용함이면 상태 검사
-                    nSensorOut = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTOUT_STATE, 0);
-                }
-
-                if (Common.GetUseOutMotionConvertInMotionSetting() == true) {
-                    nSensorOut = 0;
-                }
-
-                if (bUseOutModeWaiting) {
-                    // 외출모드 대기화면을 사용하는 경우에는 댁내에 사람이 있는 경우이므로, 내부동체를 무시한다.
-                    nSensorIn = 0;
-                }
-
-                Log.d(TAG, "[OutModeCheckSensor] nSensorIn [" + nSensorIn + "], nSensorOut [" + nSensorOut + "], nSensorMagnetic [" + nSensorMagnetic + "]");
-                if ((nSensorMagnetic == 0) && (nSensorIn == 0) && (nSensorOut == 0)) return true;
-                else return false;
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] OutModeCheckSensor(boolean bUseOutModeWaiting)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return false;
-        }
-    }
-
-    private boolean InModeCheckSensor() {
-        try {
-            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
-                IGW200dAPI.Data mData = Common.getIGW200UpdateData();
-
-                if(mData!=null)
-                {
-                    boolean bMotionSensor = mData.senIn.Motion;
-                    boolean bMagneticSensor = mData.senIn.Magnetic;
-                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor [" + bMotionSensor + "], bMagneticSensor [" + bMagneticSensor + "]");
-
-                    byte hDoorLockState = DOORSTATUS.Close;
-
-                    WallpadDeviceSet devSet = new WallpadDeviceSet(getContext());
-                    String[] GetValue = devSet.GetSettingData("디지털도어락");
-                    devSet.closeDB();
-                    if (GetValue == null) {
-                        Log.w(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is null");
-                        return false;
-                    }
-
-                    Log.d(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is value: " + GetValue[1]);
-
-                    if (GetValue[1].indexOf("유선") > 0) {
-                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock");
-
-                        if (mWallPadAPI != null) {
-                            if (mWallPadAPI.Check_Connect()) {
-                                doorLockAPI = mWallPadAPI.Get_DLockController();
-                                doorLockAPI.Refresh(true);
-                                hDoorLockState = doorLockAPI.data.DoorStatus;
-                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                            }
-                            else {
-                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                            }
-                        }
-                        else {
-                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
-                        }
-                    }
-                    else if (GetValue[1].indexOf("지문인식") > 0) {
-                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock (FingerPrint)");
-                        if (mWallPadAPI != null) {
-                            if (mWallPadAPI.Check_Connect()) {
-                                FPdoorLockAPI = mWallPadAPI.Get_FP_DLockController();
-                                FPdoorLockAPI.Refresh(true);
-                                hDoorLockState = FPdoorLockAPI.data.DoorStatus;
-                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                            }
-                            else {
-                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                            }
-                        }
-                        else {
-                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
-                        }
-                    }
-
-                    // 인왕산 아이파크 특별 적용
-                    WallpadDeviceSet devset = new WallpadDeviceSet(this.getContext());
-                    if (devset != null) {
-                        int GetDataInt = devset.Get_Security_IndoorMode_Sensor_Use();
-                        if (GetDataInt == 0)
-                            bMotionSensor = false;
-                    }
-
-                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
-                    if (Common.isWirelessDoorlock(getContext()) == true) {
-                        hDoorLockState = DOORSTATUS.Close;
-                    }
-
-                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor [" + bMotionSensor + "], bMagneticSensor [" + bMagneticSensor + "], hDoorLockState [" + hDoorLockState + "]");
-                    if (bMotionSensor == false && bMagneticSensor == false && (hDoorLockState == DOORSTATUS.Close || hDoorLockState == DOORSTATUS.Close_LockingForce)) return true;
-                    else return false;
-                }
-                else return false;
-            }
-            else 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
-                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
-            {
-                IGW300API.Data mData = Common.getIGW300UpdateData();
-
-                boolean bMotionSensor_Out = false;
-                int[] SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
-                if (SensorInfoDB[1] == 1 && mData!=null) {
-                    // 외부동체가 사용함이면 상태 검사
-                    bMotionSensor_Out = mData.senIn.Out_Motion;
-                }
-                else {
-                    bMotionSensor_Out = false;
-                }
-
-                if(mData!=null)
-                {
-                    boolean bMagneticSensor = mData.senIn.Magnetic;
-                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor_Out [" + bMotionSensor_Out + "], bMagneticSensor [" + bMagneticSensor + "]");
-
-                    byte hDoorLockState = DOORSTATUS.Close;
-
-                    WallpadDeviceSet devSet = new WallpadDeviceSet(getContext());
-                    String[] GetValue = devSet.GetSettingData("디지털도어락");
-                    devSet.closeDB();
-                    if (GetValue == null) {
-                        Log.w(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is null");
-                        return false;
-                    }
-
-                    Log.d(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is value: " + GetValue[1]);
-
-                    if (GetValue[1].indexOf("유선") > 0) {
-                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock");
-
-                        if (mWallPadAPI != null) {
-                            if (mWallPadAPI.Check_Connect()) {
-                                doorLockAPI = mWallPadAPI.Get_DLockController();
-                                doorLockAPI.Refresh(true);
-                                hDoorLockState = doorLockAPI.data.DoorStatus;
-                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                            } else {
-                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                            }
-                        } else {
-                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
-                        }
-                    }
-                    else if (GetValue[1].indexOf("지문인식") > 0) {
-                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock (FingerPrint)");
-                        if (mWallPadAPI != null) {
-                            if (mWallPadAPI.Check_Connect()) {
-                                FPdoorLockAPI = mWallPadAPI.Get_FP_DLockController();
-                                FPdoorLockAPI.Refresh(true);
-                                hDoorLockState = FPdoorLockAPI.data.DoorStatus;
-                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
-                            }
-                            else {
-                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
-                            }
-                        }
-                        else {
-                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
-                        }
-                    }
-
-                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
-                    if (Common.isWirelessDoorlock(getContext()) == true) {
-                        hDoorLockState = DOORSTATUS.Close;
-                    }
-
-                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor_Out [" + bMotionSensor_Out + "], bMagneticSensor [" + bMagneticSensor + "], hDoorLockState [" + hDoorLockState + "]");
-
-                    if (bMotionSensor_Out == false && bMagneticSensor == false && (hDoorLockState == DOORSTATUS.Close || hDoorLockState == DOORSTATUS.Close_LockingForce)) return true;
-                    else return false;
-                }
-                else
-                    return false;
-
-            }
-            else {
-                WallPadInterface mWallPadInterface = ((MainActivity) (super.getContext())).getWallPadInterface();
-                int sensorMag = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MAG0_STATE, 0);
-                int[] SensorInfoDB;
-                SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
-
-                int sensorOut = 0;
-
-                if (SensorInfoDB[1] == 1) {
-                    // 외부동체가 사용함이면 상태 검사
-                    sensorOut = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTOUT_STATE, 0);
-                }
-
-                //int sensorOut = wallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTOUT_STATE, 0);
-
-                if (Common.GetUseOutMotionConvertInMotionSetting() == true) {
-                    sensorOut = 0;
-                }
-
-                if (Version.getGatewayUsage()) {
-                    // 현산향인 경우
-                    if (sensorMag == 0) return true;
-                    else return false;
-                }
-                else {
-                    if (sensorMag == 0 && sensorOut == 0) return true;
-                    else return false;
-                }
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-			return false;
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] InModeCheckSensor()");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return false;
-        }
-    }
-
-    public SecurityMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode) {
-        super(context, layout);
-        try {
-            Log.d(TAG, "[START - Screen] --------------------------------------------");
-            mWallPadAPI = wpapi;
-            mContext = context;
-            initInfo();
-            OPERATION_MODE = operationMode;
-
-            ((MainActivity) mContext).setManualBtnVisible(((MainActivity) mContext).getManualUse(), 1019);
-
-            Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.SecurityMainScreen.image.BACKGROUND);
-            ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
-
-            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020SA_A) {
-                //  LH 향 방범 화면
-                int[] GuardImg = {R.drawable.guard_mode_btn_goout_security_normal, R.drawable.guard_mode_btn_goout_security_pressed};
-                int[] OutImg = {R.drawable.guard_mode_btn_goout_mode_normal, R.drawable.guard_mode_btn_goout_mode_pressed};
-
-                OutSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 245, 292, GuardImg, OutImg, ID.SecurityMainScreen.button.OUT_SECURITY);
-                ViewRegistration(layout, OutSecurityModeBtn, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
-
-                int[] BedGuardImg = {R.drawable.guard_mode_btn_sleep_security_normal, R.drawable.guard_mode_btn_sleep_security_pressed};
-                int[] BedImg = {R.drawable.guard_mode_btn_sleep_mode_normal, R.drawable.guard_mode_btn_sleep_mode_pressed};
-
-                BedSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 243, 292, BedGuardImg, BedImg, ID.SecurityMainScreen.button.BED_SECURITY);
-                ViewRegistration(layout, BedSecurityModeBtn, Common.ImgPosion.GetX(458), Common.ImgPosion.GetY(110));
-
-                InSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 244, 292, R.drawable.guard_mode_btn_home_security_normal, R.drawable.guard_mode_btn_home_security_pressed, ID.SecurityMainScreen.button.IN_SECURITY);
-                ViewRegistration(layout, InSecurityModeBtn, ImgPosion.GetX(821), ImgPosion.GetY(110));
-
-                lineO1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE01);
-                ViewRegistration(layout, lineO1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
-
-                // 방범센서 사용안하는 그냥 외출모드 사용시
-                if (bUseGuardSensorCheck == false) {
-                    OutSecurityModeBtn.setButtonRearImage();
-                }
-                if (Common.GetInBedCheckSensor(this.getContext()) == false) {
-                    BedSecurityModeBtn.setButtonRearImage();
-                }
-
-            }
-            else {
-                if (bSmartSwitch485) {
-                    // 485 스마트 스위치 연동 현장
-                    int[] GuardImg = {R.drawable.guard_s_btn_goout_normal, R.drawable.guard_s_btn_goout_pressed};
-                    int[] OutImg = {R.drawable.guard_btn_goout_normal, R.drawable.guard_btn_goout_pressed};
-
-                    OutSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, GuardImg, OutImg, ID.SecurityMainScreen.button.OUT_SECURITY);
-                    ViewRegistration(layout, OutSecurityModeBtn, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
-                    OutSecurityModeBtn.setTouchDelayMs(500);
-
-                    InSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, R.drawable.guard_s_btn_home_normal, R.drawable.guard_s_btn_home_pressed, ID.SecurityMainScreen.button.IN_SECURITY);
-                    ViewRegistration(layout, InSecurityModeBtn, Common.ImgPosion.GetX(640), Common.ImgPosion.GetY(110));
-                    InSecurityModeBtn.setTouchDelayMs(500);
-
-                    lineO1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE01);
-                    ViewRegistration(layout, lineO1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(592));
-
-                    line02 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE02);
-                    ViewRegistration(layout, line02,  Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(696));
-
-                    LineText03 = new WpadTextView(context, false, 525, 101, Gravity.CENTER, Color.parseColor("#966432"), Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_01);
-                    ViewRegistration(layout, LineText03, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(491));
-                    LineText03.setText("취소시 비밀번호 입력");
-
-                    // 체크박스 시작
-                    UseSenser = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 88, 88, R.drawable.but_check_default, R.drawable.but_check_checked, ID.SecurityMainScreen.button.CHECKBOX_USE);
-                    ViewRegistration(layout, UseSenser, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(495));
-                    UseText = new WpadTextView(context, true, 148, 101, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.CHECKBOX_USE);
-                    ViewRegistration(layout, UseText, Common.ImgPosion.GetX(731), Common.ImgPosion.GetY(491));
-                    UseText.setText("사용");
-                    NoSensor = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 88, 88, R.drawable.but_check_default, R.drawable.but_check_checked, ID.SecurityMainScreen.button.CHECKBOX_NO_USE);
-                    ViewRegistration(layout, NoSensor, Common.ImgPosion.GetX(881), Common.ImgPosion.GetY(495));
-                    NoUseText = new WpadTextView(context, true, 148, 101, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.CHECKBOX_NO_USE);
-                    ViewRegistration(layout, NoUseText, Common.ImgPosion.GetX(972), Common.ImgPosion.GetY(491));
-                    NoUseText.setText("사용안함");
-                    DrawCheckBoxPwRelease(bReleasePwIntput);
-                    // 체크박스 끝
-
-                    Btn_Left01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_01);
-                    ViewRegistration(layout, Btn_Left01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(618));
-                    Btn_Right01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_01);
-                    ViewRegistration(layout, Btn_Right01, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(618));
-                    //Text_Box01 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0, ID.SecurityMainScreen.image.TEXT_BG01);
-                    //ViewRegistration(layout, Text_Box01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(541));
-
-                    Btn_Left02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_02);
-                    ViewRegistration(layout, Btn_Left02, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(722));
-                    Btn_Right02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_02);
-                    ViewRegistration(layout, Btn_Right02, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(722));
-                    //Text_Box02 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0,ID.SecurityMainScreen.image.TEXT_BG02);
-                    //ViewRegistration(layout, Text_Box02, ImgPosion.GetX(708), ImgPosion.GetY(540));
-
-
-                    LineText01 = new WpadTextView(context, false, 525, 102, Gravity.CENTER, Color.parseColor("#966432"), Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_01);
-                    ViewRegistration(layout, LineText01, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(594));
-                    LineText01.setText("외출설정 대기시간");
-
-                    LineText02 = new WpadTextView(context, false, 525, 102, Gravity.CENTER, Color.parseColor("#966432"), Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_02);
-                    ViewRegistration(layout, LineText02, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(698));
-                    LineText02.setText("외출복귀 대기시간");
-
-                    textValue01 = new WpadTextView(context, false, 247, 102, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_01);
-                    ViewRegistration(layout, textValue01, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(594));
-                    OutPrintText(textValue01, nOutWaitTime);
-
-                    textValue02 = new WpadTextView(context, false, 247, 102, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_02);
-                    ViewRegistration(layout, textValue02, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(698));
-                    OutPrintText(textValue02, nInWaitTime);
-
-                    // 바범센서 사용안하는 그냥 외출모드 사용시
-                    if (!bUseGuardSensorCheck) {
-                        OutSecurityModeBtn.setButtonRearImage();
-                    }
-                }
-                else {
-                    // 현산향, 대외향
-                    OutSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, R.drawable.guard_btn_goout_normal, R.drawable.guard_btn_goout_pressed, ID.SecurityMainScreen.button.OUT_SECURITY);
-                    ViewRegistration(layout, OutSecurityModeBtn, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
-                    OutSecurityModeBtn.setTouchDelayMs(500);
-
-                    InSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, R.drawable.guard_btn_home_normal, R.drawable.guard_btn_home_pressed, ID.SecurityMainScreen.button.IN_SECURITY);
-                    ViewRegistration(layout, InSecurityModeBtn, Common.ImgPosion.GetX(640), Common.ImgPosion.GetY(110));
-                    InSecurityModeBtn.setTouchDelayMs(500);
-
-                    lineO1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE01);
-                    ViewRegistration(layout, lineO1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
-
-                    Btn_Left01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_01);
-                    ViewRegistration(layout, Btn_Left01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(541));
-                    Btn_Right01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_01);
-                    ViewRegistration(layout, Btn_Right01, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(541));
-                    //Text_Box01 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0, ID.SecurityMainScreen.image.TEXT_BG01);
-                    //ViewRegistration(layout, Text_Box01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(541));
-
-                    Btn_Left02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_02);
-                    ViewRegistration(layout, Btn_Left02, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(697));
-                    Btn_Right02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_02);
-                    ViewRegistration(layout, Btn_Right02, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(697));
-                    //Text_Box02 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0,ID.SecurityMainScreen.image.TEXT_BG02);
-                    //ViewRegistration(layout, Text_Box02, ImgPosion.GetX(708), ImgPosion.GetY(540));
-
-                    LineText01 = new WpadTextView(context, false, 525, 154, Gravity.CENTER, 0xFF966432, Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_01);
-                    ViewRegistration(layout, LineText01, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(491));
-                    LineText01.setText("외출설정 대기시간");
-
-                    LineText02 = new WpadTextView(context, false, 525, 153, Gravity.CENTER, 0xFF966432, Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_02);
-                    ViewRegistration(layout, LineText02, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(647));
-                    LineText02.setText("외출복귀 대기시간");
-
-                    textValue01 = new WpadTextView(context, false, 247, 154, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_01);
-                    ViewRegistration(layout, textValue01, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(491));
-                    OutPrintText(textValue01, nOutWaitTime);
-
-                    textValue02 = new WpadTextView(context, false, 247, 153, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_02);
-                    ViewRegistration(layout, textValue02, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(647));
-                    OutPrintText(textValue02, nInWaitTime);
-                }
-
-                //disable버튼 추가
-                if (nOutWaitTime == 180){
-                    Btn_Right01.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
-                }
-                else if (nOutWaitTime == 30){
-                    Btn_Left01.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
-                }
-                else {
-                    Btn_Right01.setButtonEventOffDisable();
-                    Btn_Left01.setButtonEventOffDisable();
-                }
-
-                if (nInWaitTime == 180) {
-                    Btn_Right02.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
-                }
-                else if (nInWaitTime == 30) {
-                    Btn_Left02.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
-                }
-                else {
-                    Btn_Right02.setButtonEventOffDisable();
-                    Btn_Left02.setButtonEventOffDisable();
-                }
-            }
-            Log.d(TAG, "[END - Screen] --------------------------------------------");
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] SecurityMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    @Override
-    protected void onClose() {
-        super.onClose();
-    }
-
-    @Override
-    public void Close() {
-        super.Close();
-    }
-
-    private void DrawCheckBoxPwRelease(boolean bUse) {
-        try {
-            if (bUse == true) {
-                UseSenser.setImageResource(UseSenser.getPressedImageID());
-                NoSensor.setImageResource(NoSensor.getDefaultImageID());
-            }
-            else {
-                UseSenser.setImageResource(UseSenser.getDefaultImageID());
-                NoSensor.setImageResource(NoSensor.getPressedImageID());
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] DrawCheckBoxPwRelease(boolean bUse)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-
-    private void SetOutModeWaitTime(boolean bUp) {
-        nOutWaitTime = ValueChange(nOutWaitTime, bUp);
-        OutPrintText(textValue01, nOutWaitTime);
-
-        //disable버튼 추가
-        if (nOutWaitTime == 180){
-            Btn_Right01.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
-        }
-        else if (nOutWaitTime == 30){
-            Btn_Left01.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
-        }
-        else {
-            Btn_Right01.setButtonEventOffDisable();
-            Btn_Left01.setButtonEventOffDisable();
-        }
-
-        // DB에 변경된 패스워드를 저장하도록 한다.
-        try {
-            // DB 에서 현재 설정된 패스워드를 얻어오도록 한다.
-            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
-            if (wdb != null) {
-                wdb.SetOutModeWaitTime(nOutWaitTime);
-                wdb.closeDB();
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.w(TAG, "[Exception] SetOutModeWaitTime(boolean bUp)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private void SetInModeWaitTime(boolean bUp) {
-        try {
-            nInWaitTime = ValueChange(nInWaitTime, bUp);
-            OutPrintText(textValue02, nInWaitTime);
-
-            //disable버튼 추가
-            if(nInWaitTime == 180){
-                Btn_Right02.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
-            }else if(nInWaitTime == 30){
-                Btn_Left02.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
-            }else{
-                Btn_Right02.setButtonEventOffDisable();
-                Btn_Left02.setButtonEventOffDisable();
-            }
-
-            // DB에 변경된 패스워드를 저장하도록 한다.
-            // DB에서 현재 설정된 패스워드를 얻어오도록 한다.
-            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
-            if (wdb != null) {
-                wdb.SetComeBackWaitTime(nInWaitTime);
-                wdb.closeDB();
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] SetInModeWaitTime(boolean bUp)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    private int ValueChange(int nWaitTime, boolean bUp) {
-        try {
-            int retValue = nWaitTime;
-            if (bUp == true) {
-                if (nWaitTime == 30)
-                    nWaitTime = 60;
-                else if (nWaitTime > 30) {
-                    nWaitTime = nWaitTime + 60;
-                    if (nWaitTime > 180)
-                        nWaitTime = 180;
-                }
-            } else {
-                if (nWaitTime == 60)
-                    nWaitTime = 30;
-                else if (nWaitTime > 60)
-                    nWaitTime = nWaitTime - 60;
-            }
-            retValue = nWaitTime;
-            return retValue;
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-            return nWaitTime;
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] ValueChange(int nWaitTime, boolean bUp)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-            return nWaitTime;
-        }
-    }
-
-    private void OutPrintText(WpadTextView TXTView, int nTime) {
-        try {
-            String strTime = "";
-            if (nTime == 30) strTime = "30초";
-            else if (nTime == 60) strTime = "1분";
-            else if (nTime == 120) strTime = "2분";
-            else if (nTime == 180) strTime = "3분";
-            else strTime = "30초";
-
-            TXTView.setText(strTime);
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] OutPrintText(WpadTextView TXTView, int nTime)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-
-    @Override
-    protected void onPopupResult(Intent intent) {
-        // TODO Auto-generated method stub
-        super.onPopupResult(intent);
-        try {
-            Log.d(TAG, "@@@@@@@@ [onPopupResult] @@@@@@@@");
-            if (intent != null) {
-                int nScreen = intent.getIntExtra("SCREEN", -1);
-                Log.d(TAG, "[onPopupResult] nScreen [" + nScreen + "]");
-                if (nScreen == ID.screen.InputPwPopupScreen) {
-                    boolean bPW = intent.getBooleanExtra("INPUT_PW", false);
-                    Log.d(TAG, "[onPopupResult] nScreen [" + nScreen + "]");
-                    Log.d(TAG, "[onPopupResult] bPW [" + bPW + "]");
-                    if (bPW == false) {
-                        // 화면을 다시 로딩하여 그리도록 한다.
-                        Log.d(TAG, "[onPopupResult]-------------OutSecurityWaitingPopupScreen : ");
-                        //((MainActivity)(getContext())).StartPopup(ID.screen.OutSecurityWaitingPopupScreen);
-                    }
-                }
-                else if (nScreen == ID.screen.InSecurityPopupScreen) {
-                    boolean bPW = intent.getBooleanExtra("SCREEN_ALL_EXIT", false);
-                    Log.d(TAG, "[onPopupResult] bPW [" + bPW + "]");
-                    if (bPW == true) {
-                        // 화면을 다시 로딩하여 그리도록 한다.
-                        super.finish();
-                    }
-                }
-            }
-            else {
-                Log.w(TAG, "[Exception] intent is null!!");
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] onPopupResult(Intent intent)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-    @Override
-    protected void onTouchEvent(View v, MotionEvent event) {
-        super.onTouchEvent(v, event);
-        try {
-            int TargetId = v.getId();
-            int MoveEvent = event.getAction();
-
-            if (MoveEvent == MotionEvent.ACTION_DOWN) {
-
-            }
-            else if (MoveEvent == MotionEvent.ACTION_UP) {
-                if (TargetId == ID.SecurityMainScreen.button.CHECKBOX_USE) {
-                    if (bReleasePwIntput) return;
-
-                    if (bReleasePwIntput == false) {
-                        bReleasePwIntput = true;
-                        DrawCheckBoxPwRelease(bReleasePwIntput);
-                        WallpadStatusData wdb = new WallpadStatusData(this.getContext());
-                        wdb.SetUseGuardReleasePw(bReleasePwIntput);
-                        wdb.closeDB();
-                    }
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.CHECKBOX_NO_USE) {
-                    if (!bReleasePwIntput) return;
-
-                    if (bReleasePwIntput == true) {
-                        bReleasePwIntput = false;
-                        DrawCheckBoxPwRelease(bReleasePwIntput);
-                        WallpadStatusData wdb = new WallpadStatusData(this.getContext());
-                        wdb.SetUseGuardReleasePw(bReleasePwIntput);
-                        wdb.closeDB();
-                    }
-                }
-
-                MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
-
-                if (TargetId == ID.SecurityMainScreen.text.TITLE) {
-                    DebugLogOutput("onTouchEvent - ID: " + ID.SecurityMainScreen.text.TITLE);
-                    MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
-                }
-
-                Log.d(TAG, "[onTouchEvent] TargetId -> " + TargetId);
-                if (TargetId == ID.SecurityMainScreen.button.OUT_SECURITY) {
-                    if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
-                        Log.d(TAG, "[onTouchEvent] - OUT_SECURITY - MODE_BUSINESS_SAMPLE");
-                        return;
-                    }
-                    else {
-                        // 방범센서 사용안하는 그냥 외출모드 사용시
-                        if ((Version.getModelType() == Version.MODEL_TYPE.IHN_1020SA_A && bUseGuardSensorCheck == false) || (bSmartSwitch485 == true && bUseGuardSensorCheck == false)) {
-                            // 그냥 외출모드 설정
-                            // 기기제어 실행
-                            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
-                            wdb.SetAlarmStatus(WallpadStatusData.OUT_MODE);
-                            wdb.closeDB();
-                            OutModeDeviceCtrl(false);
-
-                            //MainActivity.mSound.Play(SND.mode.OUTMODE_SETTING);
-                            int nPlayMentTime = MainActivity.mSound.PlayMent(SND.mode.OUTMODE_SETTING);
-                            ((MainActivity)getContext()).sendHandlerMsgDelayed(100, 0, 0, nPlayMentTime);
-                            //super.setSoundNoRelease(true);
-                            //super.finish();
-                        }
-                        else {
-                            //띄우기 전에 센서 체크~~~~ 센서가 이상이 없다면 외출모드 진행 팝업을 띄우고 센서 감지 이상이 있으면
-                            //센서를 점검하세요라는 팝업/사운드 띄운다.
-                            boolean bSenSorCheck = OutModeCheckSensor(true);
-                            // 아직 실내에 사람이 있으므로 내부동체는 체크하지 않는다.
-                            if (bSenSorCheck) {
-                                //MainActivity.StartPopup(ID.screen.OutSecurityWaitingPopupScreen, Common.POPUP_STYLE_ALARM);
-                                ((MainActivity) (getContext())).StartPopup(ID.screen.OutSecurityWaitingPopupScreen);
-                            }
-                            else {
-                                // 사운드 출력
-                                MainActivity.mSound.PlayMent(SND.mode.HOME_DEVICE_CHECK);
-                            }
-                        }
-                    }
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.IN_SECURITY) {
-                    //ChangeReservation();
-                    //띄우기 전에 센서 체크~~~~ 센서가 이상이 없다면 재택설정 확인 팝업을 띄우고 센서 감지 이상이 있으면
-                    //센서를 점검하세요라는 팝업을 띄운다.
-                    if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
-                        Log.d(TAG, "[onTouch] - OUT_SECURITY - MODE_BUSINESS_SAMPLE");
-                        return;
-                    }
-                    else {
-                        if (Common.GetSensorSampleMode(this.getContext())) {
-                            ((MainActivity) (getContext())).StartPopup(ID.screen.InSecurityPopupScreen);
-                        }
-                        else {
-                            if (InModeCheckSensor() == true) {
-                                //MainActivity.StartPopup(ID.screen.InSecurityPopupScreen, Common.POPUP_STYLE_ALARM);
-                                ((MainActivity) (getContext())).StartPopup(ID.screen.InSecurityPopupScreen);
-                            }
-                            else {
-                                // 사운드 출력
-                                MainActivity.mSound.PlayMent(SND.mode.HOME_DEVICE_CHECK);
-                            }
-                        }
-                    }
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.BED_SECURITY) {
-                    if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
-                        MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
-                        return;
-                    }
-
-                    if (Common.GetInBedCheckSensor(this.getContext())) {
-                        // 센서 체크
-                        if (InModeCheckSensor() == true) {
-                            ((MainActivity) (getContext())).StartPopup(ID.screen.BedSecurityPopupScreen);
-                        }
-                        else {
-                            MainActivity.mSound.PlayMent(SND.mode.HOME_DEVICE_CHECK);
-                        }
-                    }
-                    else {
-                        // 기기제어만
-                        Common.BedModeDeviceCtrl(this.getContext(), true);
-                    }
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.LEFT_01) {
-                    SetOutModeWaitTime(false);
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.RIGHT_01) {
-                    SetOutModeWaitTime(true);
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.LEFT_02) {
-                    SetInModeWaitTime(false);
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-                else if (TargetId == ID.SecurityMainScreen.button.RIGHT_02) {
-                    SetInModeWaitTime(true);
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
-                }
-            }
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            //e.printStackTrace();
-            LogUtil.errorLogInfo("", TAG, e);
-        }
-    }
-
-
-    @Override
-    public void ViewRegistration(RelativeLayout ParentsLayout,
-                                 WpadImageView nImageView, int MarginLeft, int MarginTop) {
-        // TODO Auto-generated method stub
-        super.ViewRegistration(ParentsLayout, nImageView, MarginLeft, MarginTop);
-    }
-
-    @Override
-    public void ViewRegistration(RelativeLayout ParentsLayout,
-                                 WpadTextView nTextView, int MarginLeft, int MarginTop) {
-        // TODO Auto-generated method stub
-        super.ViewRegistration(ParentsLayout, nTextView, MarginLeft, MarginTop);
-    }
-
-    private void OutModeDeviceCtrl(boolean notElevatorCall) {
-        try {
-            Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
-            intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.OUTMODE_CTRL_WORKING);
-            if (notElevatorCall == true)
-                intent.putExtra("Called", 1);
-
-            getContext().sendBroadcast(intent);
-        } catch (RuntimeException re) {
-			LogUtil.errorLogInfo("", TAG, re);
-		}
-		catch (Exception e) {
-            Log.d(TAG, "[Ctrl Exception]-" + e.toString());
-        }
-    }
-}
-
+package kr.co.icontrols.wallpadsecurity.screen;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import kr.co.icontrols.wallpadsecurity.MainActivity;
+import kr.co.icontrols.wallpadsecurity.R;
+import kr.co.icontrols.wallpadsecurity.declare.Common;
+import kr.co.icontrols.wallpadsecurity.declare.ID;
+import kr.co.icontrols.wallpadsupport.Version;
+import kr.co.icontrols.wallpadsupport.WpadImageView;
+import com.util.LogUtil;
+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.artncore.WallPadDataMgr.*;
+import com.artncore.devicectr.WallPadInterface;
+import com.artncore.wallpadapi.DLockAPI;
+import com.artncore.wallpadapi.DLockAPI.DOORSTATUS;
+import com.artncore.wallpadapi.FP_DlockAPI;
+import com.artncore.wallpadapi.IGW200dAPI;
+import com.artncore.wallpadapi.WallPadAPI;
+import com.artncore.wallpadapi.IGW300API;
+
+public class SecurityMainScreen extends WpadScreen {
+
+    // [Define]
+    String TAG = this.getClass().getSimpleName();
+
+    private void DebugLogOutput(String s) {
+        if (Common.DEBUG_LOG_ON) Log.d(TAG, s);
+    }
+
+    // [View - ImageView(Background or Image - No touch)]
+    WpadImageView Background;
+    WpadImageView StatusWindow;
+
+    // [View - ImageView(Button - touch)]
+    WpadImageView StopBtn;
+
+    WpadImageView OutSecurityModeBtn = null;
+    WpadImageView InSecurityModeBtn = null;
+    WpadImageView BedSecurityModeBtn = null;
+
+    WpadImageView lineO1;
+    WpadImageView line02;
+    WpadImageView line03;
+
+    WpadImageView Btn_Left01;
+    WpadImageView Btn_Left02;
+    WpadImageView Text_Box01;
+
+
+    WpadImageView Btn_Right01;
+    WpadImageView Btn_Right02;
+    WpadImageView Text_Box02;
+
+    // [View - TextView]
+    private WpadTextView Title;
+    WpadTextView LineText01;
+    WpadTextView LineText02;
+    WpadTextView LineText03;
+
+    WpadTextView textValue01;
+    WpadTextView textValue02;
+
+
+    private int nOutWaitTime = 30;
+    private int nInWaitTime = 30;
+    private boolean bSmartSwitch485 = false;
+    private boolean bUseGuardSensorCheck = true; // 그냥외출모드
+    private boolean bReleasePwIntput = true;
+    private WpadImageView UseSenser, NoSensor;
+    private WpadTextView UseText, NoUseText;
+
+    private WallPadAPI mWallPadAPI = null;
+    DLockAPI doorLockAPI = null;
+    FP_DlockAPI FPdoorLockAPI = null;
+
+
+    private Context mContext;
+
+    // [Value]
+    private int OPERATION_MODE = Common.MODE;
+
+    // [Class] 2017.09.07
+
+
+    public static class ImgPosion {
+        int x = 0;
+        int y = 0;
+
+        public static int GetX(int OrgPos) {
+            return OrgPos - 200;
+        }
+
+        public static int GetY(int OrgPos) {
+            return OrgPos - 61;
+        }
+    }
+
+
+    private void initInfo() {
+        // DB에 변경된 패스워드를 저장하도록 한다.
+        try {
+            // DB 에서 현재 설정된 패스워드를 얻어오도록 한다.
+            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
+            if (wdb != null) {
+                nOutWaitTime = wdb.GetOutModeWaitTime();
+                nInWaitTime = wdb.GetComeBackWaitTime();
+                bUseGuardSensorCheck = wdb.GetUseGuardSensorCheck();
+                bReleasePwIntput = wdb.GetUseGuardReleasePW();
+                wdb.closeDB();
+
+                // 485 스마트 스위치 연동 모델인지 체크
+                if (Version.getModelType() != Version.MODEL_TYPE.IHN_1020GL) {
+                    WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
+                    int[] BatchInfo = devSet.Get_BatchSW_Info();
+                    devSet.closeDB();
+
+                    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
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                            || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)
+                    {
+                        if (BatchInfo[0] == 1 && BatchInfo[1] == WallpadDeviceSet.BATCH_TYPE_HDC_LCD_SMART) {
+                            bSmartSwitch485 = true;
+                        }
+                    }
+                    else {
+                        if (BatchInfo[0] == 1 && BatchInfo[1] == WallpadDeviceSet.BATCH_TYPE_SMART) {
+                            bSmartSwitch485 = true;
+                        }
+                    }
+                }
+                Log.d(TAG, "[initInfo] mOutWaitTime [" + nOutWaitTime + "], mInWaitTime [" + nInWaitTime + "], m_UseGuardSensorCheck [" + bUseGuardSensorCheck + "], m_ReleasePwIntput [" + bReleasePwIntput + "]");
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] initInfo()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private boolean OutModeCheckSensor(boolean bUseOutModeWaiting) {
+        try {
+            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
+                IGW200dAPI.Data mData = Common.getIGW200UpdateData();
+
+                if(mData!=null)
+                {
+                    boolean bMotionSensor = mData.senIn.Motion;
+                    boolean bMagneticSensor = mData.senIn.Magnetic;
+                    Log.d(TAG, "[OutModeCheckSensor] bMotionSensor [" + bMotionSensor + "], bMagneticSensor [" + bMagneticSensor + "]");
+                    byte hDoorLockState = DOORSTATUS.Close;
+
+                    if (mWallPadAPI != null) {
+                        if (mWallPadAPI.Check_Connect()) {
+                            DLockAPI doorLockAPI = mWallPadAPI.Get_DLockController();
+                            doorLockAPI.Refresh(true);
+                            hDoorLockState = doorLockAPI.data.DoorStatus;
+                            Log.d(TAG, "[OutModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                        }
+                        else {
+                            Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                        }
+                    }
+                    else {
+                        Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI is null!!");
+                    }
+
+                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
+                    if (Common.isWirelessDoorlock(getContext())) hDoorLockState = DOORSTATUS.Close;
+
+                    if (bMotionSensor == false && bMagneticSensor == false && hDoorLockState == DOORSTATUS.Close) return true;
+                    else return false;
+                }
+                else return false;
+            }
+            else 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
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)
+			{
+			    // IGW300(G/W)를 사용하는 경우
+				IGW300API.Data mData = Common.getIGW300UpdateData();
+
+				boolean bMotionSensor_In = false;
+                boolean bMotionSensor_Out = false;
+                if(mData!=null) {
+                    boolean bMagneticSensor = mData.senIn.Magnetic;
+                    Log.d(TAG, "----------------- bMagneticSensor :  " + bMagneticSensor);
+                    byte hDoorLockState = DOORSTATUS.Close;
+
+                    WallpadDeviceSet devSet = new WallpadDeviceSet(getContext());
+                    String[] GetValue = devSet.GetSettingData("디지털도어락");
+                    devSet.closeDB();
+                    if (GetValue == null) {
+                        Log.w(TAG, "[OutModeCheckSensor] GetSettingData(디지털도어락) is null");
+                        return false;
+                    }
+
+                    Log.d(TAG, "[OutModeCheckSensor] GetSettingData(디지털도어락) is value: " + GetValue[1]);
+
+                    if (GetValue[1].indexOf("유선") > 0) {
+                        Log.d(TAG, "[OutModeCheckSensor] WiredDoorlock");
+                        if (mWallPadAPI != null) {
+                            if (mWallPadAPI.Check_Connect()) {
+                                doorLockAPI = mWallPadAPI.Get_DLockController();
+                                doorLockAPI.Refresh(true);
+                                hDoorLockState = doorLockAPI.data.DoorStatus;
+                                Log.d(TAG, "[OutModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                            }
+                            else {
+                                Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                            }
+                        }
+                        else {
+                            Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI is null!!");
+                        }
+                    }
+                    else if (GetValue[1].indexOf("지문인식") > 0) {
+                        Log.d(TAG, "[OutModeCheckSensor] WiredDoorlock (FingerPrint)");
+                        if (mWallPadAPI != null) {
+                            if (mWallPadAPI.Check_Connect()) {
+                                FPdoorLockAPI = mWallPadAPI.Get_FP_DLockController();
+                                FPdoorLockAPI.Refresh(true);
+                                hDoorLockState = FPdoorLockAPI.data.DoorStatus;
+                                Log.d(TAG, "[OutModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                            }
+                            else {
+                                Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                            }
+                        }
+                        else {
+                            Log.w(TAG, "[OutModeCheckSensor] mWallPadAPI is null!!");
+                        }
+                    }
+
+                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
+                    if (Common.isWirelessDoorlock(getContext()) == true) {
+                        hDoorLockState = DOORSTATUS.Close;
+                    }
+
+                    int[] SensorInfoDB;
+                    SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
+
+                    if (SensorInfoDB[0] == 1) {
+                        // 내부동체가 사용함이면 상태 검사
+                        bMotionSensor_In = mData.senIn.In_Motion;
+                        Log.d(TAG, "[OutModeCheckSensor] In Motion USE !!! : " + bMotionSensor_In);
+                    }
+
+                    if (SensorInfoDB[1] == 1) {
+                        // 외부동체가 사용함이면 상태 검사
+                        bMotionSensor_Out = mData.senIn.Out_Motion;
+                        Log.d(TAG, "[OutModeCheckSensor] Out Motion USE !!! : " + bMotionSensor_Out );
+                    }
+
+                    if (bUseOutModeWaiting) {
+                        // 외출모드 대기화면을 사용하는 경우에는 댁내에 사람이 있는 경우이므로, 내부동체를 무시한다.
+                        bMotionSensor_In = false;
+                    }
+
+                    Log.d(TAG, "[OutModeCheckSensor] bMotionSensor_In [" + bMotionSensor_In + "], bMotionSensor_Out [" + bMotionSensor_Out + "], bMagneticSensor [" + bMagneticSensor + "]");
+
+                    if (bMotionSensor_In == false && bMotionSensor_Out == false && bMagneticSensor == false && hDoorLockState == DOORSTATUS.Close) return true;
+                    else return false;
+                }
+                else return false;
+
+			}
+            else {
+                // G/W 사용을 하지 않는 경우
+                WallPadInterface mWallPadInterface = ((MainActivity) (super.getContext())).getWallPadInterface();
+                if (mWallPadInterface == null) {
+                    Log.e(TAG, "[OutModeCheckSensor] Wallpadinterface is null!!");
+                    return false;
+                }
+
+                int nSensorIn = 0, nSensorOut = 0, nSensorMagnetic = 0;
+
+                nSensorMagnetic = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MAG0_STATE, 0);
+
+                int[] SensorInfoDB;
+                SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
+
+                if (SensorInfoDB[0] == 1) {
+                    // 내부동체가 사용함이면 상태 검사
+                    nSensorIn = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTIN_STATE, 0);
+                }
+
+                if (SensorInfoDB[1] == 1) {
+                    // 외부동체가 사용함이면 상태 검사
+                    nSensorOut = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTOUT_STATE, 0);
+                }
+
+                if (Common.GetUseOutMotionConvertInMotionSetting() == true) {
+                    nSensorOut = 0;
+                }
+
+                if (bUseOutModeWaiting) {
+                    // 외출모드 대기화면을 사용하는 경우에는 댁내에 사람이 있는 경우이므로, 내부동체를 무시한다.
+                    nSensorIn = 0;
+                }
+
+                Log.d(TAG, "[OutModeCheckSensor] nSensorIn [" + nSensorIn + "], nSensorOut [" + nSensorOut + "], nSensorMagnetic [" + nSensorMagnetic + "]");
+                if ((nSensorMagnetic == 0) && (nSensorIn == 0) && (nSensorOut == 0)) return true;
+                else return false;
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] OutModeCheckSensor(boolean bUseOutModeWaiting)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
+    }
+
+    private boolean InModeCheckSensor() {
+        try {
+            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020GL) {
+                IGW200dAPI.Data mData = Common.getIGW200UpdateData();
+
+                if(mData!=null)
+                {
+                    boolean bMotionSensor = mData.senIn.Motion;
+                    boolean bMagneticSensor = mData.senIn.Magnetic;
+                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor [" + bMotionSensor + "], bMagneticSensor [" + bMagneticSensor + "]");
+
+                    byte hDoorLockState = DOORSTATUS.Close;
+
+                    WallpadDeviceSet devSet = new WallpadDeviceSet(getContext());
+                    String[] GetValue = devSet.GetSettingData("디지털도어락");
+                    devSet.closeDB();
+                    if (GetValue == null) {
+                        Log.w(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is null");
+                        return false;
+                    }
+
+                    Log.d(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is value: " + GetValue[1]);
+
+                    if (GetValue[1].indexOf("유선") > 0) {
+                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock");
+
+                        if (mWallPadAPI != null) {
+                            if (mWallPadAPI.Check_Connect()) {
+                                doorLockAPI = mWallPadAPI.Get_DLockController();
+                                doorLockAPI.Refresh(true);
+                                hDoorLockState = doorLockAPI.data.DoorStatus;
+                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                            }
+                            else {
+                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                            }
+                        }
+                        else {
+                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
+                        }
+                    }
+                    else if (GetValue[1].indexOf("지문인식") > 0) {
+                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock (FingerPrint)");
+                        if (mWallPadAPI != null) {
+                            if (mWallPadAPI.Check_Connect()) {
+                                FPdoorLockAPI = mWallPadAPI.Get_FP_DLockController();
+                                FPdoorLockAPI.Refresh(true);
+                                hDoorLockState = FPdoorLockAPI.data.DoorStatus;
+                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                            }
+                            else {
+                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                            }
+                        }
+                        else {
+                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
+                        }
+                    }
+
+                    // 인왕산 아이파크 특별 적용
+                    WallpadDeviceSet devset = new WallpadDeviceSet(this.getContext());
+                    if (devset != null) {
+                        int GetDataInt = devset.Get_Security_IndoorMode_Sensor_Use();
+                        if (GetDataInt == 0)
+                            bMotionSensor = false;
+                    }
+
+                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
+                    if (Common.isWirelessDoorlock(getContext()) == true) {
+                        hDoorLockState = DOORSTATUS.Close;
+                    }
+
+                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor [" + bMotionSensor + "], bMagneticSensor [" + bMagneticSensor + "], hDoorLockState [" + hDoorLockState + "]");
+                    if (bMotionSensor == false && bMagneticSensor == false && (hDoorLockState == DOORSTATUS.Close || hDoorLockState == DOORSTATUS.Close_LockingForce)) return true;
+                    else return false;
+                }
+                else return false;
+            }
+            else 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
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)
+            {
+                IGW300API.Data mData = Common.getIGW300UpdateData();
+
+                boolean bMotionSensor_Out = false;
+                int[] SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
+                if (SensorInfoDB[1] == 1 && mData!=null) {
+                    // 외부동체가 사용함이면 상태 검사
+                    bMotionSensor_Out = mData.senIn.Out_Motion;
+                }
+                else {
+                    bMotionSensor_Out = false;
+                }
+
+                if(mData!=null)
+                {
+                    boolean bMagneticSensor = mData.senIn.Magnetic;
+                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor_Out [" + bMotionSensor_Out + "], bMagneticSensor [" + bMagneticSensor + "]");
+
+                    byte hDoorLockState = DOORSTATUS.Close;
+
+                    WallpadDeviceSet devSet = new WallpadDeviceSet(getContext());
+                    String[] GetValue = devSet.GetSettingData("디지털도어락");
+                    devSet.closeDB();
+                    if (GetValue == null) {
+                        Log.w(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is null");
+                        return false;
+                    }
+
+                    Log.d(TAG, "[InModeCheckSensor] GetSettingData(디지털도어락) is value: " + GetValue[1]);
+
+                    if (GetValue[1].indexOf("유선") > 0) {
+                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock");
+
+                        if (mWallPadAPI != null) {
+                            if (mWallPadAPI.Check_Connect()) {
+                                doorLockAPI = mWallPadAPI.Get_DLockController();
+                                doorLockAPI.Refresh(true);
+                                hDoorLockState = doorLockAPI.data.DoorStatus;
+                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                            } else {
+                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                            }
+                        } else {
+                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
+                        }
+                    }
+                    else if (GetValue[1].indexOf("지문인식") > 0) {
+                        Log.d(TAG, "[InModeCheckSensor] WiredDoorlock (FingerPrint)");
+                        if (mWallPadAPI != null) {
+                            if (mWallPadAPI.Check_Connect()) {
+                                FPdoorLockAPI = mWallPadAPI.Get_FP_DLockController();
+                                FPdoorLockAPI.Refresh(true);
+                                hDoorLockState = FPdoorLockAPI.data.DoorStatus;
+                                Log.d(TAG, "[InModeCheckSensor] hDoorLockState: " + hDoorLockState);
+                            }
+                            else {
+                                Log.w(TAG, "[InModeCheckSensor] mWallPadAPI.Check_Connect() is false!!!");
+                            }
+                        }
+                        else {
+                            Log.w(TAG, "[InModeCheckSensor] mWallPadAPI is null!!");
+                        }
+                    }
+
+                    // 현산향이 무선 도어락이 들어가면서 추가되어야 함
+                    if (Common.isWirelessDoorlock(getContext()) == true) {
+                        hDoorLockState = DOORSTATUS.Close;
+                    }
+
+                    Log.d(TAG, "[InModeCheckSensor] bMotionSensor_Out [" + bMotionSensor_Out + "], bMagneticSensor [" + bMagneticSensor + "], hDoorLockState [" + hDoorLockState + "]");
+
+                    if (bMotionSensor_Out == false && bMagneticSensor == false && (hDoorLockState == DOORSTATUS.Close || hDoorLockState == DOORSTATUS.Close_LockingForce)) return true;
+                    else return false;
+                }
+                else
+                    return false;
+
+            }
+            else {
+                WallPadInterface mWallPadInterface = ((MainActivity) (super.getContext())).getWallPadInterface();
+                int sensorMag = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MAG0_STATE, 0);
+                int[] SensorInfoDB;
+                SensorInfoDB = Common.GetInSensorUseOfNotFromDB(getContext());
+
+                int sensorOut = 0;
+
+                if (SensorInfoDB[1] == 1) {
+                    // 외부동체가 사용함이면 상태 검사
+                    sensorOut = mWallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTOUT_STATE, 0);
+                }
+
+                //int sensorOut = wallPadInterface.DoControl(WallPadInterface.IOCTL_SENSOR_MOTOUT_STATE, 0);
+
+                if (Common.GetUseOutMotionConvertInMotionSetting() == true) {
+                    sensorOut = 0;
+                }
+
+                if (Version.getGatewayUsage()) {
+                    // 현산향인 경우
+                    if (sensorMag == 0) return true;
+                    else return false;
+                }
+                else {
+                    if (sensorMag == 0 && sensorOut == 0) return true;
+                    else return false;
+                }
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] InModeCheckSensor()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
+    }
+
+    public SecurityMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode) {
+        super(context, layout);
+        try {
+            Log.d(TAG, "[START - Screen] --------------------------------------------");
+            mWallPadAPI = wpapi;
+            mContext = context;
+            initInfo();
+            OPERATION_MODE = operationMode;
+
+            ((MainActivity) mContext).setManualBtnVisible(((MainActivity) mContext).getManualUse(), 1019);
+
+            Background = new WpadImageView(context, TOUCH_KIND.NONE, 1280, 690, R.drawable.bg_body, 0, ID.SecurityMainScreen.image.BACKGROUND);
+            ViewRegistration(layout, Background, Common.ImgPosion.GetX(0), Common.ImgPosion.GetY(110));
+
+            if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020SA_A) {
+                //  LH 향 방범 화면
+                int[] GuardImg = {R.drawable.guard_mode_btn_goout_security_normal, R.drawable.guard_mode_btn_goout_security_pressed};
+                int[] OutImg = {R.drawable.guard_mode_btn_goout_mode_normal, R.drawable.guard_mode_btn_goout_mode_pressed};
+
+                OutSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 245, 292, GuardImg, OutImg, ID.SecurityMainScreen.button.OUT_SECURITY);
+                ViewRegistration(layout, OutSecurityModeBtn, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
+
+                int[] BedGuardImg = {R.drawable.guard_mode_btn_sleep_security_normal, R.drawable.guard_mode_btn_sleep_security_pressed};
+                int[] BedImg = {R.drawable.guard_mode_btn_sleep_mode_normal, R.drawable.guard_mode_btn_sleep_mode_pressed};
+
+                BedSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 243, 292, BedGuardImg, BedImg, ID.SecurityMainScreen.button.BED_SECURITY);
+                ViewRegistration(layout, BedSecurityModeBtn, Common.ImgPosion.GetX(458), Common.ImgPosion.GetY(110));
+
+                InSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 244, 292, R.drawable.guard_mode_btn_home_security_normal, R.drawable.guard_mode_btn_home_security_pressed, ID.SecurityMainScreen.button.IN_SECURITY);
+                ViewRegistration(layout, InSecurityModeBtn, ImgPosion.GetX(821), ImgPosion.GetY(110));
+
+                lineO1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE01);
+                ViewRegistration(layout, lineO1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
+
+                // 방범센서 사용안하는 그냥 외출모드 사용시
+                if (bUseGuardSensorCheck == false) {
+                    OutSecurityModeBtn.setButtonRearImage();
+                }
+                if (Common.GetInBedCheckSensor(this.getContext()) == false) {
+                    BedSecurityModeBtn.setButtonRearImage();
+                }
+
+            }
+            else {
+                if (bSmartSwitch485) {
+                    // 485 스마트 스위치 연동 현장
+                    int[] GuardImg = {R.drawable.guard_s_btn_goout_normal, R.drawable.guard_s_btn_goout_pressed};
+                    int[] OutImg = {R.drawable.guard_btn_goout_normal, R.drawable.guard_btn_goout_pressed};
+
+                    OutSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, GuardImg, OutImg, ID.SecurityMainScreen.button.OUT_SECURITY);
+                    ViewRegistration(layout, OutSecurityModeBtn, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
+                    OutSecurityModeBtn.setTouchDelayMs(500);
+
+                    InSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, R.drawable.guard_s_btn_home_normal, R.drawable.guard_s_btn_home_pressed, ID.SecurityMainScreen.button.IN_SECURITY);
+                    ViewRegistration(layout, InSecurityModeBtn, Common.ImgPosion.GetX(640), Common.ImgPosion.GetY(110));
+                    InSecurityModeBtn.setTouchDelayMs(500);
+
+                    lineO1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE01);
+                    ViewRegistration(layout, lineO1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(592));
+
+                    line02 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE02);
+                    ViewRegistration(layout, line02,  Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(696));
+
+                    LineText03 = new WpadTextView(context, false, 525, 101, Gravity.CENTER, Color.parseColor("#966432"), Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_01);
+                    ViewRegistration(layout, LineText03, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(491));
+                    LineText03.setText("취소시 비밀번호 입력");
+
+                    // 체크박스 시작
+                    UseSenser = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 88, 88, R.drawable.but_check_default, R.drawable.but_check_checked, ID.SecurityMainScreen.button.CHECKBOX_USE);
+                    ViewRegistration(layout, UseSenser, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(495));
+                    UseText = new WpadTextView(context, true, 148, 101, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.CHECKBOX_USE);
+                    ViewRegistration(layout, UseText, Common.ImgPosion.GetX(731), Common.ImgPosion.GetY(491));
+                    UseText.setText("사용");
+                    NoSensor = new WpadImageView(context, TOUCH_KIND.BUTTON_M, 88, 88, R.drawable.but_check_default, R.drawable.but_check_checked, ID.SecurityMainScreen.button.CHECKBOX_NO_USE);
+                    ViewRegistration(layout, NoSensor, Common.ImgPosion.GetX(881), Common.ImgPosion.GetY(495));
+                    NoUseText = new WpadTextView(context, true, 148, 101, Gravity.LEFT, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.CHECKBOX_NO_USE);
+                    ViewRegistration(layout, NoUseText, Common.ImgPosion.GetX(972), Common.ImgPosion.GetY(491));
+                    NoUseText.setText("사용안함");
+                    DrawCheckBoxPwRelease(bReleasePwIntput);
+                    // 체크박스 끝
+
+                    Btn_Left01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_01);
+                    ViewRegistration(layout, Btn_Left01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(618));
+                    Btn_Right01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_01);
+                    ViewRegistration(layout, Btn_Right01, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(618));
+                    //Text_Box01 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0, ID.SecurityMainScreen.image.TEXT_BG01);
+                    //ViewRegistration(layout, Text_Box01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(541));
+
+                    Btn_Left02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_02);
+                    ViewRegistration(layout, Btn_Left02, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(722));
+                    Btn_Right02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_02);
+                    ViewRegistration(layout, Btn_Right02, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(722));
+                    //Text_Box02 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0,ID.SecurityMainScreen.image.TEXT_BG02);
+                    //ViewRegistration(layout, Text_Box02, ImgPosion.GetX(708), ImgPosion.GetY(540));
+
+
+                    LineText01 = new WpadTextView(context, false, 525, 102, Gravity.CENTER, Color.parseColor("#966432"), Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_01);
+                    ViewRegistration(layout, LineText01, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(594));
+                    LineText01.setText("외출설정 대기시간");
+
+                    LineText02 = new WpadTextView(context, false, 525, 102, Gravity.CENTER, Color.parseColor("#966432"), Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_02);
+                    ViewRegistration(layout, LineText02, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(698));
+                    LineText02.setText("외출복귀 대기시간");
+
+                    textValue01 = new WpadTextView(context, false, 247, 102, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_01);
+                    ViewRegistration(layout, textValue01, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(594));
+                    OutPrintText(textValue01, nOutWaitTime);
+
+                    textValue02 = new WpadTextView(context, false, 247, 102, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_02);
+                    ViewRegistration(layout, textValue02, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(698));
+                    OutPrintText(textValue02, nInWaitTime);
+
+                    // 바범센서 사용안하는 그냥 외출모드 사용시
+                    if (!bUseGuardSensorCheck) {
+                        OutSecurityModeBtn.setButtonRearImage();
+                    }
+                }
+                else {
+                    // 현산향, 대외향
+                    OutSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, R.drawable.guard_btn_goout_normal, R.drawable.guard_btn_goout_pressed, ID.SecurityMainScreen.button.OUT_SECURITY);
+                    ViewRegistration(layout, OutSecurityModeBtn, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(110));
+                    OutSecurityModeBtn.setTouchDelayMs(500);
+
+                    InSecurityModeBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 547, 381, R.drawable.guard_btn_home_normal, R.drawable.guard_btn_home_pressed, ID.SecurityMainScreen.button.IN_SECURITY);
+                    ViewRegistration(layout, InSecurityModeBtn, Common.ImgPosion.GetX(640), Common.ImgPosion.GetY(110));
+                    InSecurityModeBtn.setTouchDelayMs(500);
+
+                    lineO1 = new WpadImageView(context, TOUCH_KIND.NONE, 1094, 2, R.drawable.control_venti_line, 0, ID.SecurityMainScreen.image.LINE01);
+                    ViewRegistration(layout, lineO1, Common.ImgPosion.GetX(93), Common.ImgPosion.GetY(645));
+
+                    Btn_Left01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_01);
+                    ViewRegistration(layout, Btn_Left01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(541));
+                    Btn_Right01 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_01);
+                    ViewRegistration(layout, Btn_Right01, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(541));
+                    //Text_Box01 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0, ID.SecurityMainScreen.image.TEXT_BG01);
+                    //ViewRegistration(layout, Text_Box01, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(541));
+
+                    Btn_Left02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_left, R.drawable.but_arrow_left_p, ID.SecurityMainScreen.button.LEFT_02);
+                    ViewRegistration(layout, Btn_Left02, Common.ImgPosion.GetX(641), Common.ImgPosion.GetY(697));
+                    Btn_Right02 = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 54, R.drawable.but_arrow_right, R.drawable.but_arrow_right_p, ID.SecurityMainScreen.button.RIGHT_02);
+                    ViewRegistration(layout, Btn_Right02, Common.ImgPosion.GetX(968), Common.ImgPosion.GetY(697));
+                    //Text_Box02 = new WpadImageView(context, TOUCH_KIND.NONE, 146, 44, R.drawable.blank_m,0,ID.SecurityMainScreen.image.TEXT_BG02);
+                    //ViewRegistration(layout, Text_Box02, ImgPosion.GetX(708), ImgPosion.GetY(540));
+
+                    LineText01 = new WpadTextView(context, false, 525, 154, Gravity.CENTER, 0xFF966432, Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_01);
+                    ViewRegistration(layout, LineText01, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(491));
+                    LineText01.setText("외출설정 대기시간");
+
+                    LineText02 = new WpadTextView(context, false, 525, 153, Gravity.CENTER, 0xFF966432, Common.fontsize._36, true, ID.SecurityMainScreen.text.LINE_TEXT_02);
+                    ViewRegistration(layout, LineText02, Common.ImgPosion.GetX(116), Common.ImgPosion.GetY(647));
+                    LineText02.setText("외출복귀 대기시간");
+
+                    textValue01 = new WpadTextView(context, false, 247, 154, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_01);
+                    ViewRegistration(layout, textValue01, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(491));
+                    OutPrintText(textValue01, nOutWaitTime);
+
+                    textValue02 = new WpadTextView(context, false, 247, 153, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.SecurityMainScreen.text.VALUE_TEXT_02);
+                    ViewRegistration(layout, textValue02, Common.ImgPosion.GetX(721), Common.ImgPosion.GetY(647));
+                    OutPrintText(textValue02, nInWaitTime);
+                }
+
+                //disable버튼 추가
+                if (nOutWaitTime == 180){
+                    Btn_Right01.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
+                }
+                else if (nOutWaitTime == 30){
+                    Btn_Left01.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
+                }
+                else {
+                    Btn_Right01.setButtonEventOffDisable();
+                    Btn_Left01.setButtonEventOffDisable();
+                }
+
+                if (nInWaitTime == 180) {
+                    Btn_Right02.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
+                }
+                else if (nInWaitTime == 30) {
+                    Btn_Left02.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
+                }
+                else {
+                    Btn_Right02.setButtonEventOffDisable();
+                    Btn_Left02.setButtonEventOffDisable();
+                }
+            }
+            Log.d(TAG, "[END - Screen] --------------------------------------------");
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] SecurityMainScreen(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    @Override
+    protected void onClose() {
+        super.onClose();
+    }
+
+    @Override
+    public void Close() {
+        super.Close();
+    }
+
+    private void DrawCheckBoxPwRelease(boolean bUse) {
+        try {
+            if (bUse == true) {
+                UseSenser.setImageResource(UseSenser.getPressedImageID());
+                NoSensor.setImageResource(NoSensor.getDefaultImageID());
+            }
+            else {
+                UseSenser.setImageResource(UseSenser.getDefaultImageID());
+                NoSensor.setImageResource(NoSensor.getPressedImageID());
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] DrawCheckBoxPwRelease(boolean bUse)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+
+    private void SetOutModeWaitTime(boolean bUp) {
+        nOutWaitTime = ValueChange(nOutWaitTime, bUp);
+        OutPrintText(textValue01, nOutWaitTime);
+
+        //disable버튼 추가
+        if (nOutWaitTime == 180){
+            Btn_Right01.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
+        }
+        else if (nOutWaitTime == 30){
+            Btn_Left01.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
+        }
+        else {
+            Btn_Right01.setButtonEventOffDisable();
+            Btn_Left01.setButtonEventOffDisable();
+        }
+
+        // DB에 변경된 패스워드를 저장하도록 한다.
+        try {
+            // DB 에서 현재 설정된 패스워드를 얻어오도록 한다.
+            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
+            if (wdb != null) {
+                wdb.SetOutModeWaitTime(nOutWaitTime);
+                wdb.closeDB();
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.w(TAG, "[Exception] SetOutModeWaitTime(boolean bUp)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private void SetInModeWaitTime(boolean bUp) {
+        try {
+            nInWaitTime = ValueChange(nInWaitTime, bUp);
+            OutPrintText(textValue02, nInWaitTime);
+
+            //disable버튼 추가
+            if(nInWaitTime == 180){
+                Btn_Right02.setButtonEventOffEnable(R.drawable.but_arrow_right_disable);
+            }else if(nInWaitTime == 30){
+                Btn_Left02.setButtonEventOffEnable(R.drawable.but_arrow_left_disable);
+            }else{
+                Btn_Right02.setButtonEventOffDisable();
+                Btn_Left02.setButtonEventOffDisable();
+            }
+
+            // DB에 변경된 패스워드를 저장하도록 한다.
+            // DB에서 현재 설정된 패스워드를 얻어오도록 한다.
+            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
+            if (wdb != null) {
+                wdb.SetComeBackWaitTime(nInWaitTime);
+                wdb.closeDB();
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] SetInModeWaitTime(boolean bUp)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private int ValueChange(int nWaitTime, boolean bUp) {
+        try {
+            int retValue = nWaitTime;
+            if (bUp == true) {
+                if (nWaitTime == 30)
+                    nWaitTime = 60;
+                else if (nWaitTime > 30) {
+                    nWaitTime = nWaitTime + 60;
+                    if (nWaitTime > 180)
+                        nWaitTime = 180;
+                }
+            } else {
+                if (nWaitTime == 60)
+                    nWaitTime = 30;
+                else if (nWaitTime > 60)
+                    nWaitTime = nWaitTime - 60;
+            }
+            retValue = nWaitTime;
+            return retValue;
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+            return nWaitTime;
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] ValueChange(int nWaitTime, boolean bUp)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            return nWaitTime;
+        }
+    }
+
+    private void OutPrintText(WpadTextView TXTView, int nTime) {
+        try {
+            String strTime = "";
+            if (nTime == 30) strTime = "30초";
+            else if (nTime == 60) strTime = "1분";
+            else if (nTime == 120) strTime = "2분";
+            else if (nTime == 180) strTime = "3분";
+            else strTime = "30초";
+
+            TXTView.setText(strTime);
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] OutPrintText(WpadTextView TXTView, int nTime)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+
+    @Override
+    protected void onPopupResult(Intent intent) {
+        // TODO Auto-generated method stub
+        super.onPopupResult(intent);
+        try {
+            Log.d(TAG, "@@@@@@@@ [onPopupResult] @@@@@@@@");
+            if (intent != null) {
+                int nScreen = intent.getIntExtra("SCREEN", -1);
+                Log.d(TAG, "[onPopupResult] nScreen [" + nScreen + "]");
+                if (nScreen == ID.screen.InputPwPopupScreen) {
+                    boolean bPW = intent.getBooleanExtra("INPUT_PW", false);
+                    Log.d(TAG, "[onPopupResult] nScreen [" + nScreen + "]");
+                    Log.d(TAG, "[onPopupResult] bPW [" + bPW + "]");
+                    if (bPW == false) {
+                        // 화면을 다시 로딩하여 그리도록 한다.
+                        Log.d(TAG, "[onPopupResult]-------------OutSecurityWaitingPopupScreen : ");
+                        //((MainActivity)(getContext())).StartPopup(ID.screen.OutSecurityWaitingPopupScreen);
+                    }
+                }
+                else if (nScreen == ID.screen.InSecurityPopupScreen) {
+                    boolean bPW = intent.getBooleanExtra("SCREEN_ALL_EXIT", false);
+                    Log.d(TAG, "[onPopupResult] bPW [" + bPW + "]");
+                    if (bPW == true) {
+                        // 화면을 다시 로딩하여 그리도록 한다.
+                        super.finish();
+                    }
+                }
+            }
+            else {
+                Log.w(TAG, "[Exception] intent is null!!");
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] onPopupResult(Intent intent)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    @Override
+    protected void onTouchEvent(View v, MotionEvent event) {
+        super.onTouchEvent(v, event);
+        try {
+            int TargetId = v.getId();
+            int MoveEvent = event.getAction();
+
+            if (MoveEvent == MotionEvent.ACTION_DOWN) {
+
+            }
+            else if (MoveEvent == MotionEvent.ACTION_UP) {
+                if (TargetId == ID.SecurityMainScreen.button.CHECKBOX_USE) {
+                    if (bReleasePwIntput) return;
+
+                    if (bReleasePwIntput == false) {
+                        bReleasePwIntput = true;
+                        DrawCheckBoxPwRelease(bReleasePwIntput);
+                        WallpadStatusData wdb = new WallpadStatusData(this.getContext());
+                        wdb.SetUseGuardReleasePw(bReleasePwIntput);
+                        wdb.closeDB();
+                    }
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.CHECKBOX_NO_USE) {
+                    if (!bReleasePwIntput) return;
+
+                    if (bReleasePwIntput == true) {
+                        bReleasePwIntput = false;
+                        DrawCheckBoxPwRelease(bReleasePwIntput);
+                        WallpadStatusData wdb = new WallpadStatusData(this.getContext());
+                        wdb.SetUseGuardReleasePw(bReleasePwIntput);
+                        wdb.closeDB();
+                    }
+                }
+
+                MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
+
+                if (TargetId == ID.SecurityMainScreen.text.TITLE) {
+                    DebugLogOutput("onTouchEvent - ID: " + ID.SecurityMainScreen.text.TITLE);
+                    MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
+                }
+
+                Log.d(TAG, "[onTouchEvent] TargetId -> " + TargetId);
+                if (TargetId == ID.SecurityMainScreen.button.OUT_SECURITY) {
+                    if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
+                        Log.d(TAG, "[onTouchEvent] - OUT_SECURITY - MODE_BUSINESS_SAMPLE");
+                        return;
+                    }
+                    else {
+                        // 방범센서 사용안하는 그냥 외출모드 사용시
+                        if ((Version.getModelType() == Version.MODEL_TYPE.IHN_1020SA_A && bUseGuardSensorCheck == false) || (bSmartSwitch485 == true && bUseGuardSensorCheck == false)) {
+                            // 그냥 외출모드 설정
+                            // 기기제어 실행
+                            WallpadStatusData wdb = new WallpadStatusData(this.getContext());
+                            wdb.SetAlarmStatus(WallpadStatusData.OUT_MODE);
+                            wdb.closeDB();
+                            OutModeDeviceCtrl(false);
+
+                            //MainActivity.mSound.Play(SND.mode.OUTMODE_SETTING);
+                            int nPlayMentTime = MainActivity.mSound.PlayMent(SND.mode.OUTMODE_SETTING);
+                            ((MainActivity)getContext()).sendHandlerMsgDelayed(100, 0, 0, nPlayMentTime);
+                            //super.setSoundNoRelease(true);
+                            //super.finish();
+                        }
+                        else {
+                            //띄우기 전에 센서 체크~~~~ 센서가 이상이 없다면 외출모드 진행 팝업을 띄우고 센서 감지 이상이 있으면
+                            //센서를 점검하세요라는 팝업/사운드 띄운다.
+                            boolean bSenSorCheck = OutModeCheckSensor(true);
+                            // 아직 실내에 사람이 있으므로 내부동체는 체크하지 않는다.
+                            if (bSenSorCheck) {
+                                //MainActivity.StartPopup(ID.screen.OutSecurityWaitingPopupScreen, Common.POPUP_STYLE_ALARM);
+                                ((MainActivity) (getContext())).StartPopup(ID.screen.OutSecurityWaitingPopupScreen);
+                            }
+                            else {
+                                // 사운드 출력
+                                MainActivity.mSound.PlayMent(SND.mode.HOME_DEVICE_CHECK);
+                            }
+                        }
+                    }
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.IN_SECURITY) {
+                    //ChangeReservation();
+                    //띄우기 전에 센서 체크~~~~ 센서가 이상이 없다면 재택설정 확인 팝업을 띄우고 센서 감지 이상이 있으면
+                    //센서를 점검하세요라는 팝업을 띄운다.
+                    if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
+                        Log.d(TAG, "[onTouch] - OUT_SECURITY - MODE_BUSINESS_SAMPLE");
+                        return;
+                    }
+                    else {
+                        if (Common.GetSensorSampleMode(this.getContext())) {
+                            ((MainActivity) (getContext())).StartPopup(ID.screen.InSecurityPopupScreen);
+                        }
+                        else {
+                            if (InModeCheckSensor() == true) {
+                                //MainActivity.StartPopup(ID.screen.InSecurityPopupScreen, Common.POPUP_STYLE_ALARM);
+                                ((MainActivity) (getContext())).StartPopup(ID.screen.InSecurityPopupScreen);
+                            }
+                            else {
+                                // 사운드 출력
+                                MainActivity.mSound.PlayMent(SND.mode.HOME_DEVICE_CHECK);
+                            }
+                        }
+                    }
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.BED_SECURITY) {
+                    if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
+                        MainActivity.mSound.Play(SND.effect.TOUCH_LATCHED);
+                        return;
+                    }
+
+                    if (Common.GetInBedCheckSensor(this.getContext())) {
+                        // 센서 체크
+                        if (InModeCheckSensor() == true) {
+                            ((MainActivity) (getContext())).StartPopup(ID.screen.BedSecurityPopupScreen);
+                        }
+                        else {
+                            MainActivity.mSound.PlayMent(SND.mode.HOME_DEVICE_CHECK);
+                        }
+                    }
+                    else {
+                        // 기기제어만
+                        Common.BedModeDeviceCtrl(this.getContext(), true);
+                    }
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.LEFT_01) {
+                    SetOutModeWaitTime(false);
+                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.RIGHT_01) {
+                    SetOutModeWaitTime(true);
+                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.LEFT_02) {
+                    SetInModeWaitTime(false);
+                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+                else if (TargetId == ID.SecurityMainScreen.button.RIGHT_02) {
+                    SetInModeWaitTime(true);
+                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                }
+            }
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+
+    @Override
+    public void ViewRegistration(RelativeLayout ParentsLayout,
+                                 WpadImageView nImageView, int MarginLeft, int MarginTop) {
+        // TODO Auto-generated method stub
+        super.ViewRegistration(ParentsLayout, nImageView, MarginLeft, MarginTop);
+    }
+
+    @Override
+    public void ViewRegistration(RelativeLayout ParentsLayout,
+                                 WpadTextView nTextView, int MarginLeft, int MarginTop) {
+        // TODO Auto-generated method stub
+        super.ViewRegistration(ParentsLayout, nTextView, MarginLeft, MarginTop);
+    }
+
+    private void OutModeDeviceCtrl(boolean notElevatorCall) {
+        try {
+            Intent intent = new Intent(Common.BR_MAIN_NOTI.ACNAME_MAIN_NOTI, null);
+            intent.putExtra(Common.BR_MAIN_NOTI.KIND, Common.BR_MAIN_NOTI.OUTMODE_CTRL_WORKING);
+            if (notElevatorCall == true)
+                intent.putExtra("Called", 1);
+
+            getContext().sendBroadcast(intent);
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
+            Log.d(TAG, "[Ctrl Exception]-" + e.toString());
+        }
+    }
+}
+

+ 4 - 2
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/SetLinkCtrlMainScreen.java

@@ -199,7 +199,8 @@ public class SetLinkCtrlMainScreen extends WpadScreen{
 					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
 							|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
-							|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+							|| Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+							|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF) {
 						if (BatchInfo[0] == 1 && BatchInfo[1] == WallpadDeviceSet.BATCH_TYPE_HDC_LCD_SMART) {
 							OutModeList.add(MODE_TEXT.OUT_GUARD);
 							ComeBackList.add(MODE_TEXT.RELEASE_GUARD);
@@ -264,7 +265,8 @@ public class SetLinkCtrlMainScreen extends WpadScreen{
 				// 웰컴조명
 				if ((nDistributionPanelType == Version.DISTRIBUTION_MODEL.SMART_DIST)
 						&& (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)) {
+						|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101K || Version.getModelType() == Version.MODEL_TYPE.IHN_D101K_I
+						|| Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I_OCF)) {
 					ComeBackList.add(MODE_TEXT.WELCOME_LIGHT_D101);
 				}
 				

+ 1 - 1
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/VisitorVideoScreen.java

@@ -658,7 +658,7 @@ public class VisitorVideoScreen extends WpadScreen {
                 if (VideoArray.size() > 0) {
                     boolean bInsert = false;
                     for (int j = 0; j < VideoArray.size(); j++) {
-                        if (((VideoClass) VideoArray.get(j)).CurCalendar.compareTo(((VideoClass) FileArray.get(i)).CurCalendar) < 0) {
+                        if (((VideoClass) VideoArray.get(j)).strDateTime.compareTo(((VideoClass) FileArray.get(i)).strDateTime) < 0) {
                             VideoArray.add(j, FileArray.get(i));
                             bInsert = true;
                             break;

+ 3 - 3
WallPadSecurity/src/main/java/kr/co/icontrols/wallpadsecurity/screen/VisitorVideoViewer.java

@@ -245,7 +245,7 @@ public class VisitorVideoViewer extends WpadScreen {
                 mThumbImage.setImageBitmap(mThumbBitmap);
                 if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_IOT_SMART)
                     mThumbImage.setScaleType(ImageView.ScaleType.FIT_START);
-                else if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART)
+                else if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART || ((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART)
                     mThumbImage.setScaleType(ImageView.ScaleType.CENTER_CROP);
                 mFlipper.addView(mThumbImage);
                 WpadRelativeLayoutParams params = new WpadRelativeLayoutParams(720, 540);
@@ -488,7 +488,7 @@ public class VisitorVideoViewer extends WpadScreen {
             mThumbBitmapNext = makeThumbNail(fileNext);
             ((ImageView) view).setImageBitmap(mThumbBitmapNext);
             if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_IOT_SMART) ((ImageView) view).setScaleType(ImageView.ScaleType.FIT_START);
-            else if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART) ((ImageView) view).setScaleType(ImageView.ScaleType.CENTER_CROP);
+            else if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART || ((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) ((ImageView) view).setScaleType(ImageView.ScaleType.CENTER_CROP);
             mFlipper.addView(view);
 
             String strPlayTime = getVideoPlayTimeString(((VisitorVideoScreen.VideoClass) VisitorVideoScreen.VideoArray.get(nFileIdx)).FilePath);
@@ -510,7 +510,7 @@ public class VisitorVideoViewer extends WpadScreen {
             mThumbBitmapNext = makeThumbNail(fileNext);
             ((ImageView) view).setImageBitmap(mThumbBitmapNext);
             if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_IOT_SMART) ((ImageView) view).setScaleType(ImageView.ScaleType.FIT_START);
-            else if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART) ((ImageView) view).setScaleType(ImageView.ScaleType.CENTER_CROP);
+            else if (((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART || ((MainActivity) mContext).DcamSetting == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) ((ImageView) view).setScaleType(ImageView.ScaleType.CENTER_CROP);
             mFlipper.addView(view);
 
             String strPlayTime = getVideoPlayTimeString(((VisitorVideoScreen.VideoClass) VisitorVideoScreen.VideoArray.get(nFileIdx)).FilePath);

+ 2 - 2
WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/Version.java

@@ -59,13 +59,13 @@ import android.os.Build;
 // 2020.08.24.01 : 13.3인치 월패드 모델명 정의 (IHN-1303-I), Gateway 사용여부 함수 추가 (getGatewayUsage())
 // 2020.08.26.01 : Gateway 사용여부 함수 수정 (getGatewayUsage(), IHN-1010GL-I 모델명 추가)
 // 2021.05.27.01 : OCF용 조그다이얼 월패드 모델명 정의 (IHN-D101-I-OCF)
-// 2021.05.28.01 : 2443, 6410 대체용 월패드/로비폰 모델명 정의 (IHN-1010GL-I-2443ALT, IHN-1010-I-2443ALT, IHN-1010GL-I-6410ALT, IHN-1010-I-6410ALT, ILP-300-2443ALT, ILP-300FR-2443ALT, ILP-300-6410ALT, ILP-300FR-6410ALT)
+// 2021.05.29.01 : 2443, 6410 대체용 월패드/로비폰 모델명 정의 (IHN-1010GL-I-2443ALT, IHN-1010-I-2443ALT, IHN-1010GL-I-6410ALT, IHN-1010-I-6410ALT, ILP-300-2443ALT, ILP-300FR-2443ALT, ILP-300-6410ALT, ILP-300FR-6410ALT)
 
 /**
  * WallPadSupport 의 버전을 가져온다.<br>
  */
 public class Version {
-    private static final String VERSION = "2021.05.28.01";
+    private static final String VERSION = "2021.05.29.01";
 
     /**
      * 버전을 가져온다.

+ 42 - 13
WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadActivity.java

@@ -9,10 +9,6 @@
 
 package kr.co.icontrols.wallpadsupport;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.BroadcastReceiver;
@@ -33,6 +29,11 @@ import android.view.WindowManager;
 import android.widget.Button;
 import android.widget.RelativeLayout;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+
 /**
  * @description
  * Activity 를 extends 한 월패드에서 사용하는 추가기능을 붙인 클래스이다.<br>
@@ -148,7 +149,10 @@ public class WpadActivity extends Activity
             if(mWpadNotifyBR != null)
             {
                 try { unregisterReceiver(mWpadNotifyBR); }
-                catch(Exception e) { Log.e(TAG, "[ExceptionError] - onDestroy->unregisterReceiver : " + e); }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e) { Log.e(TAG, "[ExceptionError] - onDestroy->unregisterReceiver : " + e); }
             }
         }
 
@@ -278,7 +282,10 @@ public class WpadActivity extends Activity
             mNextScreenIntentLive = false;
             mNextScreenIntent = null;
         }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - ChangeScreen : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - ChangeScreen : " + e); }
         return bRet;
     }
 
@@ -304,7 +311,10 @@ public class WpadActivity extends Activity
             mNextScreenIntent = null;
         }
         try { bRet = onChangeScreen(nScreenId); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - ChangeScreen : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - ChangeScreen : " + e); }
         return bRet;
     }
 
@@ -365,7 +375,10 @@ public class WpadActivity extends Activity
                 {
                     mCurrentScreen.OutSideTouchExit();
                 }
-                catch(Exception e)
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
+                catch (Exception e)
                 {
                     Log.e(TAG, "[ExceptionError] - onTouchEvent ->  mCurrentScreen.OutSideTouchExit() : " + e);
                 }
@@ -481,7 +494,11 @@ public class WpadActivity extends Activity
                 return null;
             }
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+            return null;
+		}
+		catch (Exception e)
         {
             Log.e(TAG, "[getIntentMunu] - [Exception Error] intent.get... ");
             Log.e(TAG, "[getIntentMunu] - " + e.toString());
@@ -533,7 +550,10 @@ public class WpadActivity extends Activity
     private void BrReceive(Intent intent)
     {
         try { onBrReceive(intent); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - onBrReceive : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - onBrReceive : " + e); }
 
         if(mCurrentScreen != null) mCurrentScreen.BrReceive(intent);
     }
@@ -637,7 +657,10 @@ public class WpadActivity extends Activity
                     filter.addAction(getAction);
                 }
             }
-            catch(Exception e)
+            catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
+            catch (Exception e)
             {
                 Log.e(TAG, "[removeBrActionFilter] - [Exception Error] BrActionList.get()");
                 Log.e(TAG, "[removeBrActionFilter] - " + e.toString());
@@ -866,7 +889,10 @@ public class WpadActivity extends Activity
     private void TouchEvent(View v, MotionEvent event)
     {
         try { onTouchEvent(v, event); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - TouchEvent (" + v.getId() + ", "  + event.getAction() + ") " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - TouchEvent (" + v.getId() + ", "  + event.getAction() + ") " + e); }
     }
 
     // =================================================================================================
@@ -1284,7 +1310,10 @@ public class WpadActivity extends Activity
             getWindow().setAttributes(lp);
             getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
         }
-        catch(Exception e)
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
         {
             Log.e(TAG, "[Exception Error] [WindowReSize] - Param 'window' Check!!! " + e);
         }

+ 6 - 2
WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadScale.java

@@ -81,9 +81,13 @@ public class WpadScale
             mWidthScaleValue  = (double) ((double) mWidthPixels  / (double) nDefaultWidthPixel);
             mHeightScaleValue = (double) ((double) mHeightPixels / (double) nDefaultHeightPixel);
             Log.i(TAG, "[changeAutoScaleValue] After -> mWidthScaleValue [" + mWidthScaleValue +"], mHeightScaleValue [" + mHeightScaleValue +"]");
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) {
             Log.e(TAG, "[Exception] changeAutoScaleValue(int nDefaultWidthPixel, int nDefaultHeightPixel)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 30 - 8
WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadScreen.java

@@ -10,7 +10,6 @@
 package kr.co.icontrols.wallpadsupport;
 
 
-import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import android.annotation.SuppressLint;
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -24,6 +23,8 @@ import android.view.View;
 import android.widget.Button;
 import android.widget.RelativeLayout;
 
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+
 /**
  * @description
  * Activity 내부에 화면 일부 (Screen) 만을 구현할시 사용할 클래스<br>
@@ -120,7 +121,10 @@ public class WpadScreen
     public void Close()
     {
         try { onClose(); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - Close : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - Close : " + e); }
     }
 
     /**
@@ -203,7 +207,10 @@ public class WpadScreen
     public void KeyDown(int keyCode, KeyEvent event)
     {
         try { onKeyDown(keyCode, event); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - onKeyDown : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - onKeyDown : " + e); }
     }
 
     /**
@@ -248,7 +255,10 @@ public class WpadScreen
     public void KeyUp(int keyCode, KeyEvent event)
     {
         try { onKeyUp(keyCode, event); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - onKeyUp : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - onKeyUp : " + e); }
     }
 
 
@@ -402,7 +412,10 @@ public class WpadScreen
     public void BrReceive(Intent intent)
     {
         try { onBrReceive(intent); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - BrReceive : " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - BrReceive : " + e); }
     }
 
     // =================================================================================================
@@ -470,7 +483,10 @@ public class WpadScreen
     private void TouchEvent(View v, MotionEvent event)
     {
         try { onTouchEvent(v, event); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - TouchEvent (" + v.getId() + ", "  + event.getAction() + ") " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - TouchEvent (" + v.getId() + ", "  + event.getAction() + ") " + e); }
     }
 
     // =================================================================================================
@@ -865,7 +881,10 @@ public class WpadScreen
     public void PopupResult(Intent data)
     {
         try { onPopupResult(data); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - PopupResult   " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - PopupResult   " + e); }
     }
 
     /**
@@ -889,6 +908,9 @@ public class WpadScreen
     public void OutSideTouchExit()
     {
         try { onOutSideTouchExit(); }
-        catch(Exception e) { Log.e(TAG, "[ExceptionError] - PopupResult   " + e); }
+        catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e) { Log.e(TAG, "[ExceptionError] - PopupResult   " + e); }
     }
 }

+ 107 - 23
WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadSound.java

@@ -9,10 +9,6 @@
 
 package kr.co.icontrols.wallpadsupport;
 
-import java.io.FileDescriptor;
-import java.io.FileInputStream;
-import java.util.LinkedList;
-
 import android.annotation.SuppressLint;
 import android.content.Context;
 import android.media.AudioManager;
@@ -22,6 +18,11 @@ import android.os.Handler;
 import android.os.Message;
 import android.util.Log;
 
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.LinkedList;
+
 
 /**
  * @description
@@ -1031,10 +1032,15 @@ public class WpadSound
 								}
 							}
 						}
+						catch (RuntimeException re) {
+							LogUtil.errorLogInfo("", TAG, re);
+							break;
+						}
 						catch (Exception e)
 						{
 							Log.e(TAG, "[Exception Error] mSoundPool.setOnLoadCompleteListener");
-							e.printStackTrace();
+							//e.printStackTrace();            
+            				LogUtil.errorLogInfo("", TAG, e);
 							break;
 						}
 					}
@@ -1591,10 +1597,15 @@ public class WpadSound
 				//Log.i(TAG, "[Playbase] - Volume_kind : " + volume_kind);
 			}
 		}
-		catch(Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
 		{
 			Log.e(TAG, "[Exception Error] [WpadSound.Play] - Param 'SoundId' not found!!!");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 		return true;
@@ -1625,10 +1636,15 @@ public class WpadSound
 				mPlayQueue.add(PlayList);
 			}
 		}
-		catch(Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return false;
+		}
+		catch (Exception e)
 		{
 			Log.e(TAG, "[Exception Error] [WpadSound.Playbase_lobby] - Param 'SoundId' not found!!!");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 			return false;
 		}
 		return true;
@@ -1657,7 +1673,12 @@ public class WpadSound
 
 		try {
 			mRepeatMediaPlayer.setDataSource(filepath);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			mRepeatMediaPlayer = null;
+			return false;
+		}
+		catch (Exception e) {
 			Log.e(TAG, "[ExceptionError] - PlayRepeat->setDataSource : " + e);
 			mRepeatMediaPlayer = null;
 			return false;
@@ -1665,7 +1686,12 @@ public class WpadSound
 
 		try {
 			mRepeatMediaPlayer.prepare();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			mRepeatMediaPlayer = null;
+			return false;
+		}
+		catch (Exception e) {
 			Log.e(TAG, "[ExceptionError] - PlayRepeat->prepare : " + e);
 			mRepeatMediaPlayer = null;
 			return false;
@@ -1688,7 +1714,12 @@ public class WpadSound
 			try {
 				mRepeatMediaPlayer.start();
 			}
-			catch(Exception e) {
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				setRepeatInit();
+				return false;
+			}
+			catch (Exception e) {
 				setRepeatInit();
 				Log.e(TAG, "[ExceptionError] - PlayRepeat->start#1 : " + e);
 				return false;
@@ -1712,7 +1743,11 @@ public class WpadSound
 							//Log.i(TAG, "[PlayRepeatBase] - handleMessage  start");
 							try {
 								mRepeatMediaPlayer.start();
-							} catch (Exception e) {
+							} catch (RuntimeException re) {
+								LogUtil.errorLogInfo("", TAG, re);
+								StopRepeat();
+							}
+							catch (Exception e) {
 								Log.e(TAG, "[ExceptionError] - PlayRepeat->handleMessage->start : " + e);
 								StopRepeat();
 							}
@@ -1735,7 +1770,12 @@ public class WpadSound
 			try {
 				mRepeatMediaPlayer.start();
 			}
-			catch(Exception e) {
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				setRepeatInit();
+				return false;
+			}
+			catch (Exception e) {
 				setRepeatInit();
 				Log.e(TAG, "[ExceptionError] - PlayRepeat->start#2 : " + e);
 				return false;
@@ -1771,7 +1811,12 @@ public class WpadSound
 						mp.start();
 					}
 				});
-			} catch (Exception e) {
+			} catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				setRepeatInit();
+				return false;
+			}
+			catch (Exception e) {
 				setRepeatInit();
 				Log.e(TAG, "[ExceptionError] - PlayRepeatBase_lobby->start#1 : " + e);
 				return false;
@@ -1795,7 +1840,11 @@ public class WpadSound
 							//Log.i(TAG, "[PlayRepeatBase_lobby] - handleMessage  start");
 							try {
 								mRepeatMediaPlayer.start();
-							} catch (Exception e) {
+							} catch (RuntimeException re) {
+								LogUtil.errorLogInfo("", TAG, re);
+								StopRepeat();
+							}
+							catch (Exception e) {
 								Log.e(TAG, "[ExceptionError] - PlayRepeatBase_lobby->handleMessage->start : " + e);
 								StopRepeat();
 							}
@@ -1818,7 +1867,12 @@ public class WpadSound
 			try {
 				mRepeatMediaPlayer.start();
 			}
-			catch(Exception e) {
+			catch (RuntimeException re) {
+				LogUtil.errorLogInfo("", TAG, re);
+				setRepeatInit();
+				return false;
+			}
+			catch (Exception e) {
 				setRepeatInit();
 				Log.e(TAG, "[ExceptionError] - PlayRepeatBase_lobby->start#2 : " + e);
 				return false;
@@ -1849,17 +1903,35 @@ public class WpadSound
 			fileInputStream = new FileInputStream(filepath);
 			FileDescriptor fileDescriptor = fileInputStream.getFD();
 			mMentMediaPlayer.setDataSource(fileDescriptor);
-			fileInputStream.close();
+
 
 //			mMentMediaPlayer.setDataSource(filepath);
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return -2;
+		}
+		catch (Exception e) {
 			Log.e(TAG, "[ExceptionError] - PlayMent->setDataSource : " + e);
 			return -2;
 		}
+		finally {
+			if(fileInputStream!=null) {
+				try {
+					fileInputStream.close();
+				} catch (IOException e) {
+					LogUtil.errorLogInfo("", TAG, e);
+				}
+			}
+			fileInputStream = null;
+		}
 
 		try {
 			mMentMediaPlayer.prepare();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return -3;
+		}
+		catch (Exception e) {
 			Log.e(TAG, "[ExceptionError] - PlayMent->prepare : " + e);
 			return -3;
 		}
@@ -1873,7 +1945,11 @@ public class WpadSound
 
 		try {
 			mMentMediaPlayer.start();
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return -4;
+		}
+		catch (Exception e) {
 			Log.e(TAG, "[ExceptionError] - PlayMent->start : " + e);
 			return -4;
 		}
@@ -1897,10 +1973,18 @@ public class WpadSound
 			mMentMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
 				@Override
 				public void onPrepared(MediaPlayer mp) {
-					try { mp.start(); } catch (Exception e) { Log.e(TAG, "[Exception] onPrepared"); e.printStackTrace(); }
+					try { mp.start(); }
+					catch (RuntimeException re) {
+						LogUtil.errorLogInfo("", TAG, re);
+					}
+					catch (Exception e) { Log.e(TAG, "[Exception] onPrepared"); LogUtil.errorLogInfo("", TAG, e); }
 				}
 			});
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+			return -1;
+		}
+		catch (Exception e) {
 			Log.e(TAG, "[ExceptionError] - PlayMentBase_lobby->prepare : " + e);
 			return -1;
 		}

+ 46 - 78
WallPadSupport/src/main/java/kr/co/icontrols/wallpadsupport/WpadUtil.java

@@ -18,8 +18,7 @@ import android.widget.RelativeLayout;
  * WallPadSupport Library 내부 또는 외부에서 사용해야될<br>
  * 공통적으로 사용하는 메소드를 정의해 놓은 클래스이다.<br>
  */
-public class WpadUtil
-{
+public class WpadUtil {
     private static String TAG = "WpadUtil";
 
     /**
@@ -35,37 +34,30 @@ public class WpadUtil
      *
      * @return (boolean) true : 성공, false : 실패
      */
-    public static boolean LayoutRegistration(RelativeLayout ParentsLayout, RelativeLayout TargetLayout,
-                                             int w, int h,
-                                             int MarginLeft, int MarginTop,
-                                             int id)
-    {
-        if(ParentsLayout == null)
-        {
+    public static boolean LayoutRegistration(RelativeLayout ParentsLayout, RelativeLayout TargetLayout, int w, int h, int MarginLeft, int MarginTop, int id) {
+        if (ParentsLayout == null) {
             Log.e(TAG, "[LayoutRegistration] - ParentsLayout is null !!!");
             return false;
         }
-        if(TargetLayout == null)
-        {
+
+        if (TargetLayout == null) {
             Log.e(TAG, "[LayoutRegistration] - ParentsLayout is null !!!");
             return false;
         }
-        if((w <= 0) || (h <= 0))
-        {
+
+        if ((w <= 0) || (h <= 0)) {
             Log.e(TAG, "[LayoutRegistration] - w(" + w + ") or h(" + h + ") is less than zero. !!!");
             return false;
         }
-        if((MarginLeft < 0) || (MarginTop < 0))
-        {
-            Log.e(TAG, "[LayoutRegistration] - MarginLeft(" + MarginLeft + ") or MarginLeft(" + MarginLeft + ") is less than zero. !!!");
+
+        if ((MarginLeft < 0) || (MarginTop < 0)) {
+            Log.e(TAG, "[LayoutRegistration] - MarginLeft(" + MarginLeft + ") or MarginTop(" + MarginTop + ") is less than zero. !!!");
             return false;
         }
 
         int Width = w, Height = h;
         int Left = MarginLeft, Top  = MarginTop;
-        if( !( (Width == WpadScale.getWidthPixels()) && (Height == WpadScale.getHeightPixels()) &&
-                (Left == 0) && (Top == 0) ) )
-        {
+        if (!((Width == WpadScale.getWidthPixels()) && (Height == WpadScale.getHeightPixels()) && (Left == 0) && (Top == 0))) {
             Width = WpadScale.getWidth(w);
             Height = WpadScale.getHeight(h);
             Left = WpadScale.getWidth(MarginLeft);
@@ -91,29 +83,24 @@ public class WpadUtil
      *
      * @return (boolean) true : 성공, false : 실패
      */
-    public static boolean ViewRegistration(RelativeLayout ParentsLayout, WpadImageView nImageView,
-                                           int MarginLeft, int MarginTop)
-    {
-        if(ParentsLayout == null)
-        {
+    public static boolean ViewRegistration(RelativeLayout ParentsLayout, WpadImageView nImageView, int MarginLeft, int MarginTop) {
+        if (ParentsLayout == null) {
             Log.e(TAG, "[ViewRegistration-Image] - ParentsLayout is null !!!");
             return false;
         }
-        if(nImageView == null)
-        {
+
+        if (nImageView == null) {
             Log.e(TAG, "[ViewRegistration-Image] - nImageView is null !!!");
             return false;
         }
-        if((MarginLeft < 0) || (MarginTop < 0))
-        {
-            Log.e(TAG, "[ViewRegistration-Image] - MarginLeft(" + MarginLeft + ") or MarginLeft(" + MarginLeft + ") is less than zero. !!!");
+
+        if ((MarginLeft < 0) || (MarginTop < 0)) {
+            Log.e(TAG, "[ViewRegistration-Image] - MarginLeft(" + MarginLeft + ") or MarginTop(" + MarginTop + ") is less than zero. !!!");
             return false;
         }
 
-        int Left = MarginLeft, Top  = MarginTop;
-        if( !( (nImageView.getWidth() == WpadScale.getWidthPixels()) && (nImageView.getHeight() == WpadScale.getHeightPixels()) &&
-                (Left == 0) && (Top == 0) ) )
-        {
+        int Left = MarginLeft, Top = MarginTop;
+        if (!( (nImageView.getWidth() == WpadScale.getWidthPixels()) && (nImageView.getHeight() == WpadScale.getHeightPixels()) && (Left == 0) && (Top == 0))) {
             Left = WpadScale.getWidth(MarginLeft);
             Top = WpadScale.getHeight(MarginTop);
         }
@@ -136,24 +123,19 @@ public class WpadUtil
      *
      * @return (boolean) true : 성공, false : 실패
      */
-    public static boolean ViewMove(WpadImageView nImageView,
-                                   int MarginLeft, int MarginTop)
-    {
-        if(nImageView == null)
-        {
+    public static boolean ViewMove(WpadImageView nImageView, int MarginLeft, int MarginTop) {
+        if (nImageView == null) {
             Log.e(TAG, "[ViewMove-Image] - nImageView is null !!!");
             return false;
         }
-        if((MarginLeft < 0) || (MarginTop < 0))
-        {
-            Log.e(TAG, "[ViewMove-Image] - MarginLeft(" + MarginLeft + ") or MarginLeft(" + MarginLeft + ") is less than zero. !!!");
+
+        if ((MarginLeft < 0) || (MarginTop < 0)) {
+            Log.e(TAG, "[ViewMove-Image] - MarginLeft(" + MarginLeft + ") or MarginTop(" + MarginTop + ") is less than zero. !!!");
             return false;
         }
 
         int Left = MarginLeft, Top  = MarginTop;
-        if( !( (nImageView.getWidth() == WpadScale.getWidthPixels()) && (nImageView.getHeight() == WpadScale.getHeightPixels()) &&
-                (Left == 0) && (Top == 0) ) )
-        {
+        if (!((nImageView.getWidth() == WpadScale.getWidthPixels()) && (nImageView.getHeight() == WpadScale.getHeightPixels()) && (Left == 0) && (Top == 0))) {
             Left = WpadScale.getWidth(MarginLeft);
             Top = WpadScale.getHeight(MarginTop);
         }
@@ -175,22 +157,19 @@ public class WpadUtil
      *
      * @return (boolean) true : 성공, false : 실패
      */
-    public static boolean ViewRegistration(RelativeLayout ParentsLayout, WpadTextView nTextView,
-                                           int MarginLeft, int MarginTop)
-    {
-        if(ParentsLayout == null)
-        {
+    public static boolean ViewRegistration(RelativeLayout ParentsLayout, WpadTextView nTextView, int MarginLeft, int MarginTop) {
+        if (ParentsLayout == null) {
             Log.e(TAG, "[ViewRegistration-Text] - ParentsLayout is null !!!");
             return false;
         }
-        if(nTextView == null)
-        {
+
+        if (nTextView == null) {
             Log.e(TAG, "[ViewRegistration-Text] - nTextView is null !!!");
             return false;
         }
-        if((MarginLeft < 0) || (MarginTop < 0))
-        {
-            Log.e(TAG, "[ViewRegistration-Text] - MarginLeft(" + MarginLeft + ") or MarginLeft(" + MarginLeft + ") is less than zero. !!!");
+
+        if ((MarginLeft < 0) || (MarginTop < 0)) {
+            Log.e(TAG, "[ViewRegistration-Text] - MarginLeft(" + MarginLeft + ") or MarginTop(" + MarginTop + ") is less than zero. !!!");
             return false;
         }
 
@@ -212,17 +191,14 @@ public class WpadUtil
      *
      * @return (boolean) true : 성공, false : 실패
      */
-    public static boolean ViewMove(WpadTextView nTextView,
-                                   int MarginLeft, int MarginTop)
-    {
-        if(nTextView == null)
-        {
+    public static boolean ViewMove(WpadTextView nTextView, int MarginLeft, int MarginTop) {
+        if (nTextView == null) {
             Log.e(TAG, "[ViewMove-Text] - nTextView is null !!!");
             return false;
         }
-        if((MarginLeft < 0) || (MarginTop < 0))
-        {
-            Log.e(TAG, "[ViewMove-Text] - MarginLeft(" + MarginLeft + ") or MarginLeft(" + MarginLeft + ") is less than zero. !!!");
+
+        if ((MarginLeft < 0) || (MarginTop < 0)) {
+            Log.e(TAG, "[ViewMove-Text] - MarginLeft(" + MarginLeft + ") or MarginTop(" + MarginTop + ") is less than zero. !!!");
             return false;
         }
 
@@ -237,12 +213,10 @@ public class WpadUtil
     /**
      * x, y 좌표 Data class
      */
-    public static class POS
-    {
+    public static class POS {
         int x;
         int y;
-        public POS()
-        {
+        public POS() {
             x = 0;
             y = 0;
         }
@@ -256,25 +230,22 @@ public class WpadUtil
      * @param  v   - Target View
      * @return POS - POS.x : X좌표, POS.y : Y 좌표
      */
-    public static POS getViewRawPosition(View v)
-    {
+    public static POS getViewRawPosition(View v) {
         View parentView = v.getRootView();
         int x = 0;
         int y = 0;
 
         boolean find = false;
-        for(int i=0 ; i<100 ; i++)
-        {
+        for (int i = 0;  i <100; i++) {
             x += v.getLeft();
             y += v.getTop();
 
             v = (View)v.getParent();
-            if(parentView == v) { find = true; break; }
+            if (parentView == v) { find = true; break; }
         }
 
         POS pos = new POS();
-        if(find)
-        {
+        if (find) {
             pos.x = x;
             pos.y = y;
         }
@@ -289,13 +260,10 @@ public class WpadUtil
      *
      * @return (boolean) true : 좌표 범위이탈, false : 범위 정상
      */
-    public static boolean PointerCancelCheck(View v, MotionEvent event)
-    {
+    public static boolean PointerCancelCheck(View v, MotionEvent event) {
         int x = (int)event.getX(0);
         int y = (int)event.getY(0);
-        if( ((x >= 0) && (x <= v.getWidth())) &&
-                ((y >= 0) && (y <= v.getHeight())) )
-        {
+        if (((x >= 0) && (x <= v.getWidth())) && ((y >= 0) && (y <= v.getHeight()))) {
             return false;
         }
         return true;

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä