Ver código fonte

[AutoPicture, WallPadAddService]
1. 5.29일 소스 기준으로 업데이트

[MnagerSetting]
1. Widget 및 DB 초기화값 변경
2. 5.29일 소스 기준으로 업데이트

jglee 3 anos atrás
pai
commit
69157b2e08
100 arquivos alterados com 4093 adições e 1180 exclusões
  1. 2 1
      AutoPicture/src/main/AndroidManifest.xml
  2. 174 13
      AutoPicture/src/main/java/kr/co/icontrols/autopicture/MainActivity.java
  3. 141 41
      AutoPicture/src/main/java/kr/co/icontrols/v40ioctl/V40IF.java
  4. 38 11
      AutoPicture/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface2.java
  5. BIN
      ManagerSetting/libs/WallPadAPI.jar
  6. 3 3
      ManagerSetting/src/main/AndroidManifest.xml
  7. 18 6
      ManagerSetting/src/main/java/com/artncore/deviceinterface/WallPadInterface.java
  8. 19 4
      ManagerSetting/src/main/java/com/artncore/managersetting/MainApplication.java
  9. 161 51
      ManagerSetting/src/main/java/com/artncore/managersetting/dao/MainDatabaseManager.java
  10. 20 4
      ManagerSetting/src/main/java/com/artncore/managersetting/domain/Const.java
  11. 19 3
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/AudioRecordController.java
  12. 57 69
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/CameraTestDialog.java
  13. 49 14
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/RecordTestDialog.java
  14. 10 2
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/activities/MainActivity.java
  15. 196 43
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/activities/SetAddress.java
  16. 10 2
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminInRoomSensorSetFragment.java
  17. 5 1
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminMenu.java
  18. 18 4
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminPasswordResetFragment.java
  19. 29 10
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminSettingFragment.java
  20. 9 2
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminSubMenu.java
  21. 44 13
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminSystemResetFragment.java
  22. 41 22
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckControllerFragment.java
  23. 42 12
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckEtcFragment.java
  24. 6 2
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckNetworkFragment.java
  25. 54 26
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckSensorFragment.java
  26. 12 2
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/QueryVersionInfoFragment.java
  27. 3 3
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SetSeverIPFragment.java
  28. 2 1
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingAdditionalFunctionFragment.java
  29. 257 16
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingControllerFragment.java
  30. 237 49
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingDebuggingFragment.java
  31. 350 79
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingDetailFunctionFragment.java
  32. 58 16
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingEMLivingRegiFrag.java
  33. 21 12
      ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingEnergyManagementFragment.java
  34. 2 2
      ManagerSetting/src/main/java/com/artncore/managersetting/util/NetworkUtil.java
  35. 39 6
      ManagerSetting/src/main/java/com/artncore/managersetting/util/StorageUtil.java
  36. 4 0
      ManagerSetting/src/main/java/com/artncore/managersetting/util/StringUtil.java
  37. 24 13
      ManagerSetting/src/main/java/kr/co/icontrols/managersetting/imap/iMAP_ctrl_config_read.java
  38. 24 14
      ManagerSetting/src/main/java/kr/co/icontrols/managersetting/imap/iMAP_hn_config_read.java
  39. 128 32
      ManagerSetting/src/main/java/kr/co/icontrols/v40ioctl/V40IF.java
  40. 41 11
      ManagerSetting/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface.java
  41. 41 11
      ManagerSetting/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface2.java
  42. BIN
      ManagerSetting/src/main/jniLibs/armeabi-v7a/libwpd_v40interface2-jni.so
  43. BIN
      ManagerSetting/src/main/jniLibs/armeabi/libwpd_v40interface2-jni.so
  44. 12 8
      ManagerSetting/src/main/res/layout/activity_set_address_1010.xml
  45. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_1020b_i.xml
  46. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_1030.xml
  47. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_1040.xml
  48. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_1050.xml
  49. 12 8
      ManagerSetting/src/main/res/layout/activity_set_address_1303.xml
  50. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_d101.xml
  51. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_d101k.xml
  52. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_hs101.xml
  53. 10 6
      ManagerSetting/src/main/res/layout/activity_set_address_t1010.xml
  54. 103 41
      ManagerSetting/src/main/res/layout/setting_detail_container_gle.xml
  55. 103 41
      ManagerSetting/src/main/res/layout/setting_detail_container_sa.xml
  56. 33 16
      ManagerSetting/src/main/res/values/strings.xml
  57. 3 3
      WallPadAddService/src/main/AndroidManifest.xml
  58. 14 3
      WallPadAddService/src/main/java/co/kr/cctv/sohoCctv.java
  59. 71 14
      WallPadAddService/src/main/java/com/honeywell/icontrols/HoneyWellCtrl.java
  60. 18 4
      WallPadAddService/src/main/java/com/nexpa/ControlLib.java
  61. 5 1
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractController.java
  62. 13 1
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractHttpController.java
  63. 58 17
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractMultiCameraController.java
  64. 79 16
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractSingleCameraController.java
  65. 49 12
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/DvrInfoParser.java
  66. 5 1
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/EncoderController.java
  67. 33 8
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/EncoderInfoParser.java
  68. 59 14
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/MultiParsingTool.java
  69. 89 22
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/NWCameraInfoParser.java
  70. 49 12
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/NvrInfoParser.java
  71. 12 7
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/Redirection.java
  72. 2 1
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/ResponseData.java
  73. 85 21
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/SingleParsingTool.java
  74. 9 2
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/TimeLineDstCalc.java
  75. 117 41
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/DvrInfo.java
  76. 14 7
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/NWCameraInfo.java
  77. 6 2
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/ResultData.java
  78. 2 0
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/Timeline.java
  79. 38 4
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/MediaStream.java
  80. 18 9
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/MediaStreamCallback.java
  81. 24 0
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/StreamHandleManager.java
  82. 2 1
      WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/VideoInfo.java
  83. 15 5
      WallPadAddService/src/main/java/com/techwin/neighbor/ipolis/PlayerSurfaceView.java
  84. 19 5
      WallPadAddService/src/main/java/com/techwin/neighbor/ipolis/techwinControl.java
  85. 23 3
      WallPadAddService/src/main/java/com/wgi/libwebeyetest/WebGateControl.java
  86. 40 8
      WallPadAddService/src/main/java/kr/co/icontrols/v40ioctl/V40IF.java
  87. 155 57
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/MainActivity.java
  88. 7 1
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/ManualActivity.java
  89. 24 0
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/PopupActivity.java
  90. 12 2
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/declare/Common.java
  91. 7 3
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPBandLocationInfo.java
  92. 65 36
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPCarGuestInfo.java
  93. 9 3
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPCctvInfo.java
  94. 9 4
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPCostInfo.java
  95. 15 7
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPElecCarChargerInfo.java
  96. 15 6
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPElecCarChargingInfo.java
  97. 15 7
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPElecCarHistoryInfo.java
  98. 6 4
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPLocalInfo.java
  99. 7 4
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPNotice.java
  100. 25 14
      WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPRepairInfo.java

+ 2 - 1
AutoPicture/src/main/AndroidManifest.xml

@@ -2,9 +2,10 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.autopicture"
     package="kr.co.icontrols.autopicture"
     android:versionCode="17"
     android:versionCode="17"
-    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.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
 
 
     <application
     <application
         android:allowBackup="true"
         android:allowBackup="true"

+ 174 - 13
AutoPicture/src/main/java/kr/co/icontrols/autopicture/MainActivity.java

@@ -3,13 +3,22 @@ package kr.co.icontrols.autopicture;
 import java.io.File;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Calendar;
 import java.util.List;
 import java.util.List;
 
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.define;
 import com.artncore.commons.define;
-
+import com.util.LogUtil;
+//import com.util.LogUtil;
+
+import android.Manifest;
+import android.content.pm.PackageManager;
+import android.graphics.Matrix;
+import android.graphics.drawable.BitmapDrawable;
+import android.media.ExifInterface;
 import android.os.Bundle;
 import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.os.CountDownTimer;
 import android.os.Handler;
 import android.os.Handler;
@@ -35,6 +44,9 @@ import android.view.animation.AnimationUtils;
 import android.widget.ImageView;
 import android.widget.ImageView;
 import android.widget.ViewFlipper;
 import android.widget.ViewFlipper;
 
 
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.Version;
 
 
@@ -59,7 +71,7 @@ import kr.co.icontrols.wallpadsupport.Version;
  */
  */
 public class MainActivity extends Activity implements OnTouchListener {
 public class MainActivity extends Activity implements OnTouchListener {
 
 
-    private final String TAG = "AutoPictureApp";
+    private final static String TAG = "AutoPictureApp";
 
 
     private final boolean DEBUG_LOG_ON = true;
     private final boolean DEBUG_LOG_ON = true;
 
 
@@ -114,6 +126,8 @@ public class MainActivity extends Activity implements OnTouchListener {
         PopupActivityRun = run;
         PopupActivityRun = run;
     }
     }
 
 
+    private static final int REQUEST_EXTERNAL_STORAGE = 100;
+
     @Override
     @Override
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         super.onCreate(savedInstanceState);
@@ -124,6 +138,15 @@ public class MainActivity extends Activity implements OnTouchListener {
         if (Version.getPlatformType() == Version.PLATFORM_TYPE.A40i) mV40IF = new V40IF();
         if (Version.getPlatformType() == Version.PLATFORM_TYPE.A40i) mV40IF = new V40IF();
         else Log.w(TAG, "[onCreate] Not Supported PLATFORM_TYPE [" + Version.getPlatformType() + "]");
         else Log.w(TAG, "[onCreate] Not Supported PLATFORM_TYPE [" + Version.getPlatformType() + "]");
 
 
+        // 9. Check Permission
+        DebugLogOutput("[Create] - Step1 : Permission Check");
+        boolean hasPermission = (ContextCompat.checkSelfPermission(this,
+                Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED);
+        Log.d(TAG, "[onCreate] hasPermission: " + hasPermission);
+        if (!hasPermission) {
+            LogUtil.SetConsole();
+        }
+
         Intent intent = getIntent();
         Intent intent = getIntent();
         if (intent != null) {
         if (intent != null) {
             AnimationSec = intent.getIntExtra("IMAGE_NEXTSHOW_TIME_UNIT_SEC", -1);
             AnimationSec = intent.getIntExtra("IMAGE_NEXTSHOW_TIME_UNIT_SEC", -1);
@@ -185,6 +208,8 @@ public class MainActivity extends Activity implements OnTouchListener {
                 printfiles(dirInternal);
                 printfiles(dirInternal);
             }
             }
             printfiles(dirUsb);
             printfiles(dirUsb);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, e.toString());
             Log.e(TAG, e.toString());
         }
         }
@@ -232,6 +257,30 @@ public class MainActivity extends Activity implements OnTouchListener {
         }
         }
     }
     }
 
 
+
+    /**
+     * 실제 Permission에 대한 체크가 필요
+     * @param requestCode
+     * @param permissions
+     * @param grantResults
+     */
+    @Override
+    public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
+        Log.d(TAG, "[onRequestPermissionsResult] requestCode: " + requestCode);
+        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+        switch (requestCode) {
+            case REQUEST_EXTERNAL_STORAGE: {
+                if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                    Log.d(TAG, "[onRequestPermissionsResult] PERMISSION_GRANTED");
+                } else {
+                    Log.d(TAG, "[onRequestPermissionsResult] PERMISSION_NOT_GRANTED");
+                }
+                return;
+            }
+        }
+    }
+
+
     @Override
     @Override
     protected void onDestroy() {
     protected void onDestroy() {
         super.onDestroy();
         super.onDestroy();
@@ -319,6 +368,8 @@ public class MainActivity extends Activity implements OnTouchListener {
     private void BrReceive(Intent intent) {
     private void BrReceive(Intent intent) {
         try {
         try {
             onBrReceive(intent);
             onBrReceive(intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - onBrReceive : " + e);
             Log.e(TAG, "[ExceptionError] - onBrReceive : " + e);
         }
         }
@@ -331,9 +382,12 @@ public class MainActivity extends Activity implements OnTouchListener {
             notiIntent.setAction(define.NOTIFY_ACNAME);
             notiIntent.setAction(define.NOTIFY_ACNAME);
             notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_AUTOPICTURE_FINISH);
             notiIntent.putExtra(define.NOTIBR_KIND, define.NOTIFY_AUTOPICTURE_FINISH);
             getApplicationContext().sendBroadcast(notiIntent);
             getApplicationContext().sendBroadcast(notiIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendFinishBR()");
             Log.e(TAG, "[Exception] sendFinishBR()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -362,9 +416,12 @@ public class MainActivity extends Activity implements OnTouchListener {
                     mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.anim_out_updown));
                     mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.anim_out_updown));
                     break;
                     break;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setAutoPictureAnimation(int nAniType)");
             Log.e(TAG, "[Exception] setAutoPictureAnimation(int nAniType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -407,9 +464,12 @@ public class MainActivity extends Activity implements OnTouchListener {
                 }
                 }
 //                Log.d(TAG, "[TimerAutoPictureChanger.run()] 2 bAutoPictureTimerRun [" + bAutoPictureTimerRun + "], PictureMorethanZero [" + PictureMorethanZero + "], sec [" + sec + "]");
 //                Log.d(TAG, "[TimerAutoPictureChanger.run()] 2 bAutoPictureTimerRun [" + bAutoPictureTimerRun + "], PictureMorethanZero [" + PictureMorethanZero + "], sec [" + sec + "]");
                 Log.d(TAG, "[TimerAutoPictureChanger.run()] TimerAutoPictureChanger is end!!!");
                 Log.d(TAG, "[TimerAutoPictureChanger.run()] TimerAutoPictureChanger is end!!!");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] TimerAutoPictureChanger.run()");
                 Log.e(TAG, "[Exception] TimerAutoPictureChanger.run()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
             finish();
             finish();
         }
         }
@@ -420,9 +480,12 @@ public class MainActivity extends Activity implements OnTouchListener {
             bAutoPictureTimerRun = true;
             bAutoPictureTimerRun = true;
             mTimerAutoPictureChanger = new TimerAutoPictureChanger(AnimationSec);
             mTimerAutoPictureChanger = new TimerAutoPictureChanger(AnimationSec);
             mTimerAutoPictureChanger.start();
             mTimerAutoPictureChanger.start();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startAutoPictureTimeThread()");
             Log.e(TAG, "[Exception] startAutoPictureTimeThread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -437,9 +500,12 @@ public class MainActivity extends Activity implements OnTouchListener {
             else {
             else {
                 Log.w(TAG, "[stopAutoPictureTimeThread] mTimerAutoPictureChanger is null!!");
                 Log.w(TAG, "[stopAutoPictureTimeThread] mTimerAutoPictureChanger is null!!");
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stopAutoPictureTimeThread()");
             Log.e(TAG, "[Exception] stopAutoPictureTimeThread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -599,11 +665,14 @@ public class MainActivity extends Activity implements OnTouchListener {
      * @description 사진 미리보기 화면에 표시될 이미지 크기 기반으로 이미지 스케일 및 샘플 사이즈를 조정
      * @description 사진 미리보기 화면에 표시될 이미지 크기 기반으로 이미지 스케일 및 샘플 사이즈를 조정
      */
      */
     public static Bitmap decodeFile(File f, int reqWidth, int reqHeight) {
     public static Bitmap decodeFile(File f, int reqWidth, int reqHeight) {
+        FileInputStream is = null;
+        FileInputStream is_ = null;
         try {
         try {
             // First decode with inJustDecodeBounds=true to check dimensions
             // First decode with inJustDecodeBounds=true to check dimensions
             final BitmapFactory.Options options = new BitmapFactory.Options();
             final BitmapFactory.Options options = new BitmapFactory.Options();
             options.inJustDecodeBounds = true;
             options.inJustDecodeBounds = true;
-            BitmapFactory.decodeStream(new FileInputStream(f), null, options);
+            is_ = new FileInputStream(f);
+            BitmapFactory.decodeStream(is_, null, options);
 
 
             if (options.outMimeType == null) {
             if (options.outMimeType == null) {
                 Log.e("[AutoPicture]", "[decodeStream] options.outMimeType is null");
                 Log.e("[AutoPicture]", "[decodeStream] options.outMimeType is null");
@@ -623,12 +692,94 @@ public class MainActivity extends Activity implements OnTouchListener {
             options.inJustDecodeBounds = false;
             options.inJustDecodeBounds = false;
 //            Log.d("[AutoPicture]", "[decodeStream] options.inJustDecodeBounds [" + options.inJustDecodeBounds + "]");
 //            Log.d("[AutoPicture]", "[decodeStream] options.inJustDecodeBounds [" + options.inJustDecodeBounds + "]");
 
 
-            return BitmapFactory.decodeStream(new FileInputStream(f), null, options);
+            is = new FileInputStream(f);
+            Bitmap bitmap = BitmapFactory.decodeStream(is , null, options);
+            int degree = GetExifOrientation(f.getAbsolutePath());
+            Bitmap temp_bitmap = GetRotatedBitmap(bitmap, degree);
+            return temp_bitmap;
         } catch (FileNotFoundException e) {
         } catch (FileNotFoundException e) {
             // TODO Auto-generated catch block
             // TODO Auto-generated catch block
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
             return null;
         }
         }
+        finally {
+            if(is !=null) {
+                try {
+                    is.close();
+                } catch (IOException e) {
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
+            }
+            is = null;
+
+            if(is_!=null) {
+                try {
+                    is_.close();
+                } catch (IOException e) {
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
+            }
+            is_ = null;
+        }
+    }
+
+    public synchronized static int GetExifOrientation(String filepath) {
+        int degree = 0;
+        ExifInterface exif = null;
+
+        try {
+            exif = new ExifInterface(filepath);
+        } catch (IOException e) {
+            Log.e(TAG, "[Exception] GetExifOrientation()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+
+        if (exif != null) {
+            int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1);
+
+            if (orientation != -1) {
+                // We only recognize a subset of orientation tag values.
+                switch (orientation) {
+                    case ExifInterface.ORIENTATION_ROTATE_90:
+                        degree = 90;
+                        break;
+                    case ExifInterface.ORIENTATION_ROTATE_180:
+                        degree = 180;
+                        break;
+
+                    case ExifInterface.ORIENTATION_ROTATE_270:
+                        degree = 270;
+                        break;
+                }
+
+            }
+        }
+        Log.d(TAG, "[GetExifOrientation] degree [" + degree + "]");
+        return degree;
+    }
+
+    public synchronized static Bitmap GetRotatedBitmap(Bitmap bitmap, int degrees) {
+        if (degrees != 0 && bitmap != null) {
+            Matrix m = new Matrix();
+            m.setRotate(degrees, (float) bitmap.getWidth() / 2, (float) bitmap.getHeight() / 2);
+            try {
+                Bitmap b2 = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m, true);
+                if (bitmap != b2) {
+                    bitmap.recycle();
+                    bitmap = b2;
+                }
+                else if(b2!=null)
+                {
+                    b2.recycle();;
+                    b2 = null;
+                }
+            } catch (OutOfMemoryError ex) {
+                Log.e(TAG, "[Exception] GetRotatedBitmap()");
+            }
+        }
+        return bitmap;
     }
     }
 
 
     /**
     /**
@@ -692,9 +843,13 @@ public class MainActivity extends Activity implements OnTouchListener {
                 sendHandlerMsg(HANDLERMSG.FLAG_KEEP_SCREEN_ON, 0, 0);
                 sendHandlerMsg(HANDLERMSG.FLAG_KEEP_SCREEN_ON, 0, 0);
             }
             }
             return true;
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlLCDOnOff(bOn)");
             Log.e(TAG, "[Exception] ctrlLCDOnOff(bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
             return false;
         }
         }
     }
     }
@@ -732,9 +887,12 @@ public class MainActivity extends Activity implements OnTouchListener {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -746,9 +904,12 @@ public class MainActivity extends Activity implements OnTouchListener {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 }
 }

+ 141 - 41
AutoPicture/src/main/java/kr/co/icontrols/v40ioctl/V40IF.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.v40ioctl;
 import android.os.Build;
 import android.os.Build;
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 public class V40IF {
 public class V40IF {
 
 
     String TAG = "V40IF";
     String TAG = "V40IF";
@@ -32,30 +34,58 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT = new V40IOInterface2();
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT = new V40IOInterface2();
             else mV40IOIF = new V40IOInterface();
             else mV40IOIF = new V40IOInterface();
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] V40IF()");
             Log.e(TAG, "[Exception] V40IF()");
-            e.printStackTrace();
+            ////e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
     public int WpdInterfaceOpen() {
     public int WpdInterfaceOpen() {
         try {
         try {
-            if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceOpen();
-            else return mV40IOIF.WpdInterfaceOpen();
+            if (Build.VERSION.SDK_INT > 23) {
+                if(mV40IOIF_NOUGAT!=null)
+                    return mV40IOIF_NOUGAT.WpdInterfaceOpen();
+                else return -99;
+            }
+            else {
+                if(mV40IOIF!=null)
+                    return mV40IOIF.WpdInterfaceOpen();
+                else return -99;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceOpen()");
             Log.e(TAG, "[Exception] WpdInterfaceOpen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
 
 
     public int WpdInterfaceClose() {
     public int WpdInterfaceClose() {
         try {
         try {
-            if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceClose();
-            else return mV40IOIF.WpdInterfaceClose();
+            if (Build.VERSION.SDK_INT > 23) {
+                if(mV40IOIF_NOUGAT!=null)
+                    return mV40IOIF_NOUGAT.WpdInterfaceClose();
+                else return -99;
+            }
+            else {
+                if(mV40IOIF!=null)
+                    return mV40IOIF.WpdInterfaceClose();
+                return -99;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceClose()");
             Log.e(TAG, "[Exception] WpdInterfaceClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -64,9 +94,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceControl(cmd, arg);
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceControl(cmd, arg);
             else return mV40IOIF.WpdInterfaceControl(cmd, arg);
             else return mV40IOIF.WpdInterfaceControl(cmd, arg);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceControl(int cmd, int arg)");
             Log.e(TAG, "[Exception] WpdInterfaceControl(int cmd, int arg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -75,9 +109,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.SetMacAddr(mac);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.SetMacAddr(mac);
             else mV40IOIF.SetMacAddr(mac);
             else mV40IOIF.SetMacAddr(mac);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SetMacAddr(String mac)");
             Log.e(TAG, "[Exception] SetMacAddr(String mac)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -85,9 +122,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.IpAddr(ip);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.IpAddr(ip);
             else mV40IOIF.IpAddr(ip);
             else mV40IOIF.IpAddr(ip);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] IpAddr(String ip)");
             Log.e(TAG, "[Exception] IpAddr(String ip)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -95,9 +135,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.GatewayIp(gw);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.GatewayIp(gw);
             else mV40IOIF.GatewayIp(gw);
             else mV40IOIF.GatewayIp(gw);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] GatewayIp(String gw)");
             Log.e(TAG, "[Exception] GatewayIp(String gw)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -105,9 +148,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetMask(mask);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetMask(mask);
             else mV40IOIF.NetMask(mask);
             else mV40IOIF.NetMask(mask);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] NetMask(String mask)");
             Log.e(TAG, "[Exception] NetMask(String mask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -115,9 +161,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetAll(ip, mask, gw, mac);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetAll(ip, mask, gw, mac);
             else mV40IOIF.NetAll(ip, mask, gw, mac);
             else mV40IOIF.NetAll(ip, mask, gw, mac);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NetAll(String ip, String mask, String gw, String mac)");
             Log.e(TAG, "[Exception] NetAll(String ip, String mask, String gw, String mac)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -125,9 +174,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.LiveUpdate();
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.LiveUpdate();
             else mV40IOIF.LiveUpdate();
             else mV40IOIF.LiveUpdate();
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] LiveUpdate()");
             Log.e(TAG, "[Exception] LiveUpdate()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -135,9 +187,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.UsbUpdate();
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.UsbUpdate();
             else mV40IOIF.UsbUpdate();
             else mV40IOIF.UsbUpdate();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] UsbUpdate()");
             Log.e(TAG, "[Exception] UsbUpdate()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -145,9 +200,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] LcdWakeUp()");
             Log.e(TAG, "[Exception] LcdWakeUp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -156,9 +215,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.Reboot(sec);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.Reboot(sec);
             else mV40IOIF.Reboot(sec);
             else mV40IOIF.Reboot(sec);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Reboot(int sec)");
             Log.e(TAG, "[Exception] Reboot(int sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -166,9 +228,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns1(dns);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns1(dns);
             else mV40IOIF.NetDns1(dns);
             else mV40IOIF.NetDns1(dns);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] NetDns1(String dns)");
             Log.e(TAG, "[Exception] NetDns1(String dns)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -176,9 +241,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns2(dns);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns2(dns);
             else mV40IOIF.NetDns2(dns);
             else mV40IOIF.NetDns2(dns);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] NetDns2(String dns)");
             Log.e(TAG, "[Exception] NetDns2(String dns)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -186,9 +254,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.sensorread();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.sensorread();
             else return mV40IOIF.sensorread();
             else return mV40IOIF.sensorread();
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] sensorread()");
             Log.e(TAG, "[Exception] sensorread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -197,9 +269,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] setLcdWakeUp()");
             Log.e(TAG, "[Exception] setLcdWakeUp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -209,9 +285,12 @@ public class V40IF {
             Log.i(TAG, "[setDns] DNS1 : " + dns1 + " / DNS2 : " + dns2);
             Log.i(TAG, "[setDns] DNS1 : " + dns1 + " / DNS2 : " + dns2);
             NetDns1(dns1);
             NetDns1(dns1);
             NetDns2(dns2);
             NetDns2(dns2);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] setDns(String dns1, String dns2)");
             Log.e(TAG, "[Exception] setDns(String dns1, String dns2)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -219,9 +298,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setV40Reboot] V40 Device will reboot : " +sec + " second !!!");
             Log.i(TAG, "[setV40Reboot] V40 Device will reboot : " +sec + " second !!!");
             Reboot(sec);
             Reboot(sec);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] setV40Reboot(int sec)");
             Log.e(TAG, "[Exception] setV40Reboot(int sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -229,9 +311,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setMACAddress] strMAC [" + strMAC+ "]");
             Log.i(TAG, "[setMACAddress] strMAC [" + strMAC+ "]");
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -239,9 +324,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
             Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
             IpAddr(strIP);
             IpAddr(strIP);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -249,9 +337,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
             Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
             NetMask(strNetmask);
             NetMask(strNetmask);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -259,9 +350,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             GatewayIp(strGateway);
             GatewayIp(strGateway);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -270,9 +364,12 @@ public class V40IF {
             Log.i(TAG, "[setNetworkInterface] strIP [" + strIP+ "], strNetmask [" + strNetmask+ "], strGateway [" + strGateway+ "], strMAC [" + strMAC+ "]");
             Log.i(TAG, "[setNetworkInterface] strIP [" + strIP+ "], strNetmask [" + strNetmask+ "], strGateway [" + strGateway+ "], strMAC [" + strMAC+ "]");
 
 
             NetAll(strIP, strNetmask, strGateway, strMAC);
             NetAll(strIP, strNetmask, strGateway, strMAC);
-        } catch (Exception e) {
+        }catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }  catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -285,9 +382,12 @@ public class V40IF {
             GatewayIp(strGateway);
             GatewayIp(strGateway);
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

+ 38 - 11
AutoPicture/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface2.java

@@ -2,6 +2,8 @@ package kr.co.icontrols.v40ioctl;
 
 
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 public class V40IOInterface2 {
 public class V40IOInterface2 {
 
 
     private static final String TAG = "V40IOInterface2";
     private static final String TAG = "V40IOInterface2";
@@ -53,10 +55,14 @@ public class V40IOInterface2 {
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
 
 
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			Log.e(TAG, re.toString());
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -66,10 +72,14 @@ public class V40IOInterface2 {
 			Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
 			Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
 			IpAddr(strIP);
 			IpAddr(strIP);
 		}
 		}
-        catch (Exception e)
+		catch (RuntimeException re) {
+			Log.e(TAG, re.toString());
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -79,10 +89,14 @@ public class V40IOInterface2 {
 			Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
 			Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
 			NetMask(strNetmask);
 			NetMask(strNetmask);
 		}
 		}
+		catch (RuntimeException re) {
+			Log.e(TAG, re.toString());
+		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -92,10 +106,14 @@ public class V40IOInterface2 {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
 			GatewayIp(strGateway);
 			GatewayIp(strGateway);
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			Log.e(TAG, re.toString());
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -112,7 +130,8 @@ public class V40IOInterface2 {
         catch (Exception e)
         catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }*/
     }*/
 
 
@@ -133,10 +152,14 @@ public class V40IOInterface2 {
 
 
 			NetAll(strIP, strNetmask, strGateway, strMAC);
 			NetAll(strIP, strNetmask, strGateway, strMAC);
 		}
 		}
+		catch (RuntimeException re) {
+			Log.e(TAG, re.toString());
+		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
 			Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
 			Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-			e.printStackTrace();
+			//e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		}
 	}
 	}
 
 
@@ -162,10 +185,14 @@ public class V40IOInterface2 {
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			Log.e(TAG, re.toString());
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

BIN
ManagerSetting/libs/WallPadAPI.jar


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

@@ -2,15 +2,15 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.artncore.managersetting"
     package="com.artncore.managersetting"
     android:versionCode="23"
     android:versionCode="23"
-    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.CALL_PHONE" />
     <uses-permission android:name="android.permission.CALL_PHONE" />
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.CAMERA"/>
     <uses-permission android:name="android.permission.CAMERA"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

+ 18 - 6
ManagerSetting/src/main/java/com/artncore/deviceinterface/WallPadInterface.java

@@ -13,6 +13,7 @@ import com.artncore.managersetting.ui.fragments.CheckEtcFragment;
 import com.artncore.wallpadapi.IGW300API;
 import com.artncore.wallpadapi.IGW300API;
 import com.artncore.wallpadapi.SmartKeyRfDoorAPI;
 import com.artncore.wallpadapi.SmartKeyRfDoorAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.Version;
@@ -599,14 +600,18 @@ public class WallPadInterface {
         }
         }
         else if (Version.getPlatformType() == Version.PLATFORM_TYPE.A40i) {
         else if (Version.getPlatformType() == Version.PLATFORM_TYPE.A40i) {
             // 스마트현관카메라
             // 스마트현관카메라
-            if (CheckEtcFragment.doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART) {
+            if (CheckEtcFragment.doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART
+                    || CheckEtcFragment.doorCamType == WallpadDeviceSet.DOORTYPE_HYOSUNG_SMART
+                    || CheckEtcFragment.doorCamType == WallpadDeviceSet.DOORTYPE_DAEWOO_SMART) {
                 mWallPadAPI = MainActivity.getWallPadAPI();
                 mWallPadAPI = MainActivity.getWallPadAPI();
                 if (onOff) {
                 if (onOff) {
                     mAPICheckHandler.sendEmptyMessage(0);
                     mAPICheckHandler.sendEmptyMessage(0);
                 }
                 }
                 else {
                 else {
-                    mIGW300API.ControlOutput((byte) 0x18, false);
-                    mIGW300API.ControlOutput((byte) 0x1B, false);
+                    if (mIGW300API != null) {
+                        mIGW300API.ControlOutput((byte) 0x18, false);
+                        mIGW300API.ControlOutput((byte) 0x1B, false);
+                    }
                     ctrlSmartIOTCamStatusMode(false);
                     ctrlSmartIOTCamStatusMode(false);
                     ctrlSmartIOTCamLEDMode(false);
                     ctrlSmartIOTCamLEDMode(false);
                 }
                 }
@@ -786,9 +791,12 @@ public class WallPadInterface {
             Log.d(TAG, "[ctrlSmartIOTCamStatusMode] hMode [" + hMode + "]");
             Log.d(TAG, "[ctrlSmartIOTCamStatusMode] hMode [" + hMode + "]");
             if (mSmartKeyRfDoorAPI != null) mSmartKeyRfDoorAPI.SetCAMERAmode(hMode);
             if (mSmartKeyRfDoorAPI != null) mSmartKeyRfDoorAPI.SetCAMERAmode(hMode);
             else Log.w(TAG, "[ctrlSmartIOTCamStatusMode] mSmartKeyRfDoorAPI is null!");
             else Log.w(TAG, "[ctrlSmartIOTCamStatusMode] mSmartKeyRfDoorAPI is null!");
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSmartIOTCamStatusMode(byte mode)");
             Log.e(TAG, "[Exception] ctrlSmartIOTCamStatusMode(byte mode)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -800,9 +808,12 @@ public class WallPadInterface {
             else hMode = 0x00;
             else hMode = 0x00;
             if (mSmartKeyRfDoorAPI != null) mSmartKeyRfDoorAPI.SetLEDmode(hMode);
             if (mSmartKeyRfDoorAPI != null) mSmartKeyRfDoorAPI.SetLEDmode(hMode);
             else Log.w(TAG, "[ctrlSmartIOTCamLEDMode] mSmartKeyRfDoorAPI is null!");
             else Log.w(TAG, "[ctrlSmartIOTCamLEDMode] mSmartKeyRfDoorAPI is null!");
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSmartIOTCamLEDMode(byte mode)");
             Log.e(TAG, "[Exception] ctrlSmartIOTCamLEDMode(byte mode)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1178,7 +1189,8 @@ public class WallPadInterface {
 
 
             ret = setMonoOutSubPhoneGain(value);
             ret = setMonoOutSubPhoneGain(value);
         } catch (IndexOutOfBoundsException e) {
         } catch (IndexOutOfBoundsException e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         if (DEBUG)  Log.d(TAG, "setMonoOutSubPhoneLevelGain() level : " + level
         if (DEBUG)  Log.d(TAG, "setMonoOutSubPhoneLevelGain() level : " + level

+ 19 - 4
ManagerSetting/src/main/java/com/artncore/managersetting/MainApplication.java

@@ -3,6 +3,8 @@ package com.artncore.managersetting;
 import android.app.Application;
 import android.app.Application;
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 import java.net.Inet4Address;
 import java.net.Inet4Address;
 import java.net.InetAddress;
 import java.net.InetAddress;
 import java.net.InterfaceAddress;
 import java.net.InterfaceAddress;
@@ -77,8 +79,11 @@ public class MainApplication extends Application {
                     }
                     }
                 }
                 }
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception ex) {
         } catch (Exception ex) {
-            ex.printStackTrace();
+            //ex.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ex);
         }
         }
         return null;
         return null;
     }
     }
@@ -105,7 +110,10 @@ public class MainApplication extends Application {
                 }
                 }
                 return res1.toString();
                 return res1.toString();
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception ex) {
         } catch (Exception ex) {
+            LogUtil.errorLogInfo("", TAG, ex);
         }
         }
         return "02:00:00:00:00:00";
         return "02:00:00:00:00:00";
     }
     }
@@ -158,16 +166,23 @@ public class MainApplication extends Application {
 
 
                     }
                     }
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
 
 
             }
             }
 
 
-        }catch (Exception e)
+        }catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
+        } catch (Exception e)
         {
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
     }
     }

+ 161 - 51
ManagerSetting/src/main/java/com/artncore/managersetting/dao/MainDatabaseManager.java

@@ -3,6 +3,7 @@ package com.artncore.managersetting.dao;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
+import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.Version;
 import android.content.Context;
 import android.content.Context;
 import android.os.Handler;
 import android.os.Handler;
@@ -17,6 +18,7 @@ import com.artncore.managersetting.domain.Const;
 import com.artncore.managersetting.util.NetworkUtil;
 import com.artncore.managersetting.util.NetworkUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
+import com.util.LogUtil;
 
 
 public class MainDatabaseManager {
 public class MainDatabaseManager {
 
 
@@ -128,7 +130,7 @@ public class MainDatabaseManager {
     public static final int SETTING_ITEM_SUB_DEVICE_SMARTPOST_USE               = SETTING_ITEM_TYPE_BASE + 179; //스마트우편함
     public static final int SETTING_ITEM_SUB_DEVICE_SMARTPOST_USE               = SETTING_ITEM_TYPE_BASE + 179; //스마트우편함
     public static final int SETTING_ITEM_SUB_DEVICE_SMARTKITCHEN_USE            = SETTING_ITEM_TYPE_BASE + 180; //스마트키친
     public static final int SETTING_ITEM_SUB_DEVICE_SMARTKITCHEN_USE            = SETTING_ITEM_TYPE_BASE + 180; //스마트키친
     public static final int SETTING_ITEM_SUB_DEVICE_EASYMODEUX_USE              = SETTING_ITEM_TYPE_BASE + 181; //간편모드UX지원
     public static final int SETTING_ITEM_SUB_DEVICE_EASYMODEUX_USE              = SETTING_ITEM_TYPE_BASE + 181; //간편모드UX지원
-    public static final int SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV		= SETTING_ITEM_TYPE_BASE + 182; //피난사다리입하수신
+    public static final int SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND		= SETTING_ITEM_TYPE_BASE + 182; //피난사다리전송
     public static final int SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT		= SETTING_ITEM_TYPE_BASE + 183; //거실EM주방등
     public static final int SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT		= SETTING_ITEM_TYPE_BASE + 183; //거실EM주방등
     public static final int SETTING_ITEM_SUB_DEVICE_FACIAL_RECOG_MODULE 		= SETTING_ITEM_TYPE_BASE + 184; //안면인식 모듈
     public static final int SETTING_ITEM_SUB_DEVICE_FACIAL_RECOG_MODULE 		= SETTING_ITEM_TYPE_BASE + 184; //안면인식 모듈
     public static final int SETTING_ITEM_SUB_DEVICE_REMOTECALL_DOOROPEN_USE     = SETTING_ITEM_TYPE_BASE + 185; //방문객원격통화 - 현관문열림
     public static final int SETTING_ITEM_SUB_DEVICE_REMOTECALL_DOOROPEN_USE     = SETTING_ITEM_TYPE_BASE + 185; //방문객원격통화 - 현관문열림
@@ -145,27 +147,32 @@ public class MainDatabaseManager {
     public static final int SETTING_ITEM_SUB_DEVICE_STRANGER_RECORDING_USE      = SETTING_ITEM_TYPE_BASE + 194; //거동수상자녹화
     public static final int SETTING_ITEM_SUB_DEVICE_STRANGER_RECORDING_USE      = SETTING_ITEM_TYPE_BASE + 194; //거동수상자녹화
     public static final int SETTING_ITEM_SUB_DEVICE_EMERGENCY_CONTACT_SWITCH_USE = SETTING_ITEM_TYPE_BASE + 195; //비상접점스위치
     public static final int SETTING_ITEM_SUB_DEVICE_EMERGENCY_CONTACT_SWITCH_USE = SETTING_ITEM_TYPE_BASE + 195; //비상접점스위치
     public static final int SETTING_ITEM_SUB_DEVICE_SENDWEATHER_REVERSRE        = SETTING_ITEM_TYPE_BASE + 196; //서브폰날씨정보역순전송
     public static final int SETTING_ITEM_SUB_DEVICE_SENDWEATHER_REVERSRE        = SETTING_ITEM_TYPE_BASE + 196; //서브폰날씨정보역순전송
-    public static final int SETTING_ITEM_SUB_DEVICE_SYSTEMAIRCON_HEAT_SUPPORT   = SETTING_ITEM_TYPE_BASE + 197; //시스템에어컨난방기능지원
-    public static final int SETTING_ITEM_SUB_DEVICE_SAFESTREETLIGHT_USE         = SETTING_ITEM_TYPE_BASE + 198; //안전가로등
-    public static final int SETTING_ITEM_SUB_DEVICE_BATHSENSOR_USE              = SETTING_ITEM_TYPE_BASE + 199; //욕실센서등
-    public static final int SETTING_ITEM_SUB_DEVICE_FRONT                       = SETTING_ITEM_TYPE_BASE + 200; //현관통화
-    public static final int SETTING_ITEM_SUB_DEVICE_LOBBY                       = SETTING_ITEM_TYPE_BASE + 201; //로비통화
-    public static final int SETTING_ITEM_SUB_DEVICE_GUARD                       = SETTING_ITEM_TYPE_BASE + 202; //경비통화
-    public static final int SETTING_ITEM_SUB_DEVICE_RESIDENCE                   = SETTING_ITEM_TYPE_BASE + 203; //이웃통화
-    public static final int SETTING_ITEM_SUB_DEVICE_PSTN                        = SETTING_ITEM_TYPE_BASE + 204; //국선통화
-    public static final int SETTING_ITEM_SUB_DEVICE_CALLHISTORY                 = SETTING_ITEM_TYPE_BASE + 205; //통화내역
-    public static final int SETTING_ITEM_SUB_DEVICE_VISITORPIC                  = SETTING_ITEM_TYPE_BASE + 206; //방문자사진
-    public static final int SETTING_ITEM_SUB_DEVICE_REMOTECALLSVR_WEBPORT       = SETTING_ITEM_TYPE_BASE + 207; //방문객원격통화WEB포트
-    public static final int SETTING_ITEM_SUB_DEVICE_LCDKEEPER_USE               = SETTING_ITEM_TYPE_BASE + 208; //LCD Keeper
-    public static final int SETTING_ITEM_SUB_DEVICE_VENTI_SERVICE_QR            = SETTING_ITEM_TYPE_BASE + 209; //환기케어서비스QR
-    public static final int SETTING_ITEM_SUB_DEVICE_THEDISABLED_HOME            = SETTING_ITEM_TYPE_BASE + 210; //장애인세대
-    public static final int SETTING_ITEM_SUB_DEVICE_CO2_REDUCTION               = SETTING_ITEM_TYPE_BASE + 211; // 이산화탄소절감률
-    public static final int SETTING_ITEM_SUB_DEVICE_HEATLIGHTROOM_NAMESET       = SETTING_ITEM_TYPE_BASE + 212; //난방조명방명칭설정
-    public static final int SETTING_ITEM_SUB_DEVICE_SMARTSWITCH_ENERGY          = SETTING_ITEM_TYPE_BASE + 213; //스마트스위치에너지종류
-    public static final int SETTING_ITEM_SUB_DEVICE_PURITY                      = SETTING_ITEM_TYPE_BASE + 214; //청정환기
-    public static final int SETTING_ITEM_SUB_DEVICE_LOUVER                      = SETTING_ITEM_TYPE_BASE + 215; //전동루버
-    public static final int SETTING_ITEM_SUB_DEVICE_BIOMETICS                   = SETTING_ITEM_TYPE_BASE + 216; //생체인식
-    public static final int SETTING_ITEM_SUB_DEVICE_POWERCONTROLLER             = SETTING_ITEM_TYPE_BASE + 217; //통합전력제어기
+    public static final int SETTING_ITEM_SUB_DEVICE_SAFESTREETLIGHT_USE         = SETTING_ITEM_TYPE_BASE + 197; //안전가로등
+    public static final int SETTING_ITEM_SUB_DEVICE_BATHSENSOR_USE              = SETTING_ITEM_TYPE_BASE + 198; //욕실센서등
+    public static final int SETTING_ITEM_SUB_DEVICE_FRONT                       = SETTING_ITEM_TYPE_BASE + 199; //현관통화
+    public static final int SETTING_ITEM_SUB_DEVICE_LOBBY                       = SETTING_ITEM_TYPE_BASE + 200; //로비통화
+    public static final int SETTING_ITEM_SUB_DEVICE_GUARD                       = SETTING_ITEM_TYPE_BASE + 201; //경비통화
+    public static final int SETTING_ITEM_SUB_DEVICE_RESIDENCE                   = SETTING_ITEM_TYPE_BASE + 202; //이웃통화
+    public static final int SETTING_ITEM_SUB_DEVICE_PSTN                        = SETTING_ITEM_TYPE_BASE + 203; //국선통화
+    public static final int SETTING_ITEM_SUB_DEVICE_CALLHISTORY                 = SETTING_ITEM_TYPE_BASE + 204; //통화내역
+    public static final int SETTING_ITEM_SUB_DEVICE_VISITORPIC                  = SETTING_ITEM_TYPE_BASE + 205; //방문자사진
+    public static final int SETTING_ITEM_SUB_DEVICE_REMOTECALLSVR_WEBPORT       = SETTING_ITEM_TYPE_BASE + 206; //방문객원격통화WEB포트
+    public static final int SETTING_ITEM_SUB_DEVICE_LCDKEEPER_USE               = SETTING_ITEM_TYPE_BASE + 207; //LCD Keeper
+    public static final int SETTING_ITEM_SUB_DEVICE_VENTI_SERVICE_QR            = SETTING_ITEM_TYPE_BASE + 208; //환기케어서비스QR
+    public static final int SETTING_ITEM_SUB_DEVICE_THEDISABLED_HOME            = SETTING_ITEM_TYPE_BASE + 209; //장애인세대
+    public static final int SETTING_ITEM_SUB_DEVICE_CO2_REDUCTION               = SETTING_ITEM_TYPE_BASE + 210; // 이산화탄소절감률
+    public static final int SETTING_ITEM_SUB_DEVICE_HEATLIGHTROOM_NAMESET       = SETTING_ITEM_TYPE_BASE + 211; //난방조명방명칭설정
+    public static final int SETTING_ITEM_SUB_DEVICE_SMARTSWITCH_ENERGY          = SETTING_ITEM_TYPE_BASE + 212; //스마트스위치에너지종류
+    public static final int SETTING_ITEM_SUB_DEVICE_PURITY                      = SETTING_ITEM_TYPE_BASE + 213; //청정환기
+    public static final int SETTING_ITEM_SUB_DEVICE_LOUVER                      = SETTING_ITEM_TYPE_BASE + 214; //전동루버
+    public static final int SETTING_ITEM_SUB_DEVICE_BIOMETICS                   = SETTING_ITEM_TYPE_BASE + 215; //생체인식
+    public static final int SETTING_ITEM_SUB_DEVICE_POWERCONTROLLER             = SETTING_ITEM_TYPE_BASE + 216; //통합전력제어기
+    public static final int SETTING_ITEM_SUB_DEVICE_LH_GATEWAY                  = SETTING_ITEM_TYPE_BASE + 217; //LH게이트웨이
+    public static final int SETTING_ITEM_SUB_DEVICE_KAKAO_HOME                  = SETTING_ITEM_TYPE_BASE + 218; //카카오홈설정
+    public static final int SETTING_ITEM_SUB_DEVICE_SMARTIOTCAM_FLIP            = SETTING_ITEM_TYPE_BASE + 219; //스마트현관카메라좌우반전
+    public static final int SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC   = SETTING_ITEM_TYPE_BASE + 220; //건설사특화기능
+    public static final int SETTING_ITEM_SUB_DEVICE_MAIN_GUI_CTRL_USE           = SETTING_ITEM_TYPE_BASE + 221; //제어기능
+    public static final int SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION      = SETTING_ITEM_TYPE_BASE + 222; //각실EM제어옵션
 
 
     public static final String[] SUB_DEVICE_ITEM_ID = {
     public static final String[] SUB_DEVICE_ITEM_ID = {
             "가스밸브"
             "가스밸브"
@@ -250,7 +257,7 @@ public class MainDatabaseManager {
             , "스마트우편함"
             , "스마트우편함"
             , "스마트키친"
             , "스마트키친"
             , "간편모드UX지원"
             , "간편모드UX지원"
-            , "피난사다리입하수신"
+            , "피난사다리전송"
             , "거실EM주방등"
             , "거실EM주방등"
             , "안면인식모듈"
             , "안면인식모듈"
             , "방문객원격통화-현관문열림"
             , "방문객원격통화-현관문열림"
@@ -265,7 +272,6 @@ public class MainDatabaseManager {
             , "거동수상자녹화"
             , "거동수상자녹화"
             , "비상접점스위치"
             , "비상접점스위치"
             , "서브폰날씨정보역순전송"
             , "서브폰날씨정보역순전송"
-            , "시스템에어컨난방기능지원"
             , "안전가로등"
             , "안전가로등"
             , "욕실센서등"
             , "욕실센서등"
             , "현관"
             , "현관"
@@ -286,6 +292,12 @@ public class MainDatabaseManager {
             , "전동루버"
             , "전동루버"
             , "생체인식"
             , "생체인식"
             , "통합전력제어기"
             , "통합전력제어기"
+            , "LH게이트웨이"
+            , "카카오홈"
+            , "스마트현관카메라좌우반전"
+            , "건설사특화기능"
+            , "제어기능"
+            , "각실EM제어옵션"
     };
     };
 
 
 
 
@@ -617,13 +629,17 @@ public class MainDatabaseManager {
             if (DEBUG)  Log.d(TAG, " (mContext != null)");
             if (DEBUG)  Log.d(TAG, " (mContext != null)");
 
 
 
 
-        String strName = mContext.getString(R.string.guard_jurisdiction_name);
-        int baseDongIP = NetworkUtil.getDongBaseNumber(mContext);
+        String strName = "";
+        if(mContext!=null)
+            strName = mContext.getString(R.string.guard_jurisdiction_name);
+        int baseDongIP = -1;
+        if(mContext!=null)
+            baseDongIP = NetworkUtil.getDongBaseNumber(mContext);
 
 
         if (baseDongIP > -1) {
         if (baseDongIP > -1) {
             String myIP =  NetworkUtil.getMyIP(mContext);
             String myIP =  NetworkUtil.getMyIP(mContext);
             String[] arrString = StringUtil.split(myIP, ".");
             String[] arrString = StringUtil.split(myIP, ".");
-            if (arrString.length > 3) {
+            if (arrString!=null && arrString.length > 3) {
 
 
                 if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
                 if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 
@@ -691,7 +707,7 @@ public class MainDatabaseManager {
             if ((baseDongIP > -1) && (nDongIP > -1)) {
             if ((baseDongIP > -1) && (nDongIP > -1)) {
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String[] arrString = StringUtil.split(myIP, ".");
                 String[] arrString = StringUtil.split(myIP, ".");
-                if (arrString.length > 3) {
+                if (arrString!=null && arrString.length > 3) {
 
 
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 
@@ -784,7 +800,7 @@ public class MainDatabaseManager {
             if ((baseDongIP > -1) && (nDongIP > -1)) {
             if ((baseDongIP > -1) && (nDongIP > -1)) {
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String[] arrString = StringUtil.split(myIP, ".");
                 String[] arrString = StringUtil.split(myIP, ".");
-                if (arrString.length > 3) {
+                if (arrString!=null && arrString.length > 3) {
 
 
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 
@@ -866,7 +882,7 @@ public class MainDatabaseManager {
             if ((baseDongIP > -1) && (nDongIP > -1) && (nIP_Third > -1) && (nIP_Forth > -1)) {
             if ((baseDongIP > -1) && (nDongIP > -1) && (nIP_Third > -1) && (nIP_Forth > -1)) {
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String[] arrString = StringUtil.split(myIP, ".");
                 String[] arrString = StringUtil.split(myIP, ".");
-                if (arrString.length > 3) {
+                if (arrString!=null && arrString.length > 3) {
 
 
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 
@@ -916,7 +932,7 @@ public class MainDatabaseManager {
             if ((baseDongIP > -1) && (nDongIP > -1) && (nIP_Third > -1) && (nIP_Forth > -1)) {
             if ((baseDongIP > -1) && (nDongIP > -1) && (nIP_Third > -1) && (nIP_Forth > -1)) {
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String myIP =  NetworkUtil.getMyIP(mContext);
                 String[] arrString = StringUtil.split(myIP, ".");
                 String[] arrString = StringUtil.split(myIP, ".");
-                if (arrString.length > 3) {
+                if (arrString!=null && arrString.length > 3) {
 
 
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
                     if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 
@@ -1025,9 +1041,12 @@ public class MainDatabaseManager {
         try {
         try {
             if (wallpadStatusData.GetAlarmStatus() == WallpadStatusData.GUARD_OUT)
             if (wallpadStatusData.GetAlarmStatus() == WallpadStatusData.GUARD_OUT)
                 ret = true;
                 ret = true;
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         }
         }
         catch (Exception e) {
         catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         wallpadStatusData.closeDB();
         wallpadStatusData.closeDB();
@@ -1311,7 +1330,7 @@ public class MainDatabaseManager {
             case SETTING_ITEM_SUB_DEVICE_SMARTPOST_USE:
             case SETTING_ITEM_SUB_DEVICE_SMARTPOST_USE:
             case SETTING_ITEM_SUB_DEVICE_SMARTKITCHEN_USE:
             case SETTING_ITEM_SUB_DEVICE_SMARTKITCHEN_USE:
             case SETTING_ITEM_SUB_DEVICE_EASYMODEUX_USE:
             case SETTING_ITEM_SUB_DEVICE_EASYMODEUX_USE:
-            case SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV:
+            case SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND:
             case SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT:
             case SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT:
             case SETTING_ITEM_SUB_DEVICE_FACIAL_RECOG_MODULE:
             case SETTING_ITEM_SUB_DEVICE_FACIAL_RECOG_MODULE:
             case SETTING_ITEM_SUB_DEVICE_REMOTECALL_DOOROPEN_USE:
             case SETTING_ITEM_SUB_DEVICE_REMOTECALL_DOOROPEN_USE:
@@ -1326,7 +1345,6 @@ public class MainDatabaseManager {
             case SETTING_ITEM_SUB_DEVICE_STRANGER_RECORDING_USE:
             case SETTING_ITEM_SUB_DEVICE_STRANGER_RECORDING_USE:
             case SETTING_ITEM_SUB_DEVICE_EMERGENCY_CONTACT_SWITCH_USE:
             case SETTING_ITEM_SUB_DEVICE_EMERGENCY_CONTACT_SWITCH_USE:
             case SETTING_ITEM_SUB_DEVICE_SENDWEATHER_REVERSRE:
             case SETTING_ITEM_SUB_DEVICE_SENDWEATHER_REVERSRE:
-            case SETTING_ITEM_SUB_DEVICE_SYSTEMAIRCON_HEAT_SUPPORT:
             case SETTING_ITEM_SUB_DEVICE_SAFESTREETLIGHT_USE:
             case SETTING_ITEM_SUB_DEVICE_SAFESTREETLIGHT_USE:
             case SETTING_ITEM_SUB_DEVICE_BATHSENSOR_USE:
             case SETTING_ITEM_SUB_DEVICE_BATHSENSOR_USE:
             case SETTING_ITEM_SUB_DEVICE_FRONT:
             case SETTING_ITEM_SUB_DEVICE_FRONT:
@@ -1347,6 +1365,12 @@ public class MainDatabaseManager {
             case SETTING_ITEM_SUB_DEVICE_LOUVER:
             case SETTING_ITEM_SUB_DEVICE_LOUVER:
             case SETTING_ITEM_SUB_DEVICE_BIOMETICS:
             case SETTING_ITEM_SUB_DEVICE_BIOMETICS:
             case SETTING_ITEM_SUB_DEVICE_POWERCONTROLLER:
             case SETTING_ITEM_SUB_DEVICE_POWERCONTROLLER:
+            case SETTING_ITEM_SUB_DEVICE_LH_GATEWAY:
+            case SETTING_ITEM_SUB_DEVICE_KAKAO_HOME:
+            case SETTING_ITEM_SUB_DEVICE_SMARTIOTCAM_FLIP:
+            case SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC:
+            case SETTING_ITEM_SUB_DEVICE_MAIN_GUI_CTRL_USE:
+            case SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION:
                 result = SUB_DEVICE_ITEM_ID[itemType - SETTING_ITEM_SUB_DEVICE_GAS];
                 result = SUB_DEVICE_ITEM_ID[itemType - SETTING_ITEM_SUB_DEVICE_GAS];
                 break;
                 break;
         }
         }
@@ -1413,9 +1437,12 @@ public class MainDatabaseManager {
                     }
                     }
                 }
                 }
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         }
         }
         catch (Exception e) {
         catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
 
 
@@ -1436,6 +1463,7 @@ public class MainDatabaseManager {
 
 
     // get SettingDataSubDev
     // get SettingDataSubDev
     public List<String> getSettingDataSubDev(int itemType) {
     public List<String> getSettingDataSubDev(int itemType) {
+        //여기서 가지고온 수많은 데이터 중 하나의 정보를 확인하는것
         List<String[]> subDevList = getSettingDataList(SETTING_ITEM_SUB_DEVICE_LIST);
         List<String[]> subDevList = getSettingDataList(SETTING_ITEM_SUB_DEVICE_LIST);
         List<String> result = null;
         List<String> result = null;
         String devInfo = null;
         String devInfo = null;
@@ -1494,6 +1522,10 @@ public class MainDatabaseManager {
                         {
                         {
                             devInfo = "1(5:조명제어기(사용함)종류( 현산향일체형조명일괄소등병합형 ))";
                             devInfo = "1(5:조명제어기(사용함)종류( 현산향일체형조명일괄소등병합형 ))";
                         }
                         }
+                        else if (ModelType == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL)
+                        {
+                            devInfo = "1(5:조명제어기(사용함)종류(현산향일체형조명일괄소등병합형_멀티스위치))";
+                        }
                         else
                         else
                         {
                         {
                             devInfo = "1(6:조명제어기(사용함)종류( 대외기본형 ))";
                             devInfo = "1(6:조명제어기(사용함)종류( 대외기본형 ))";
@@ -1502,11 +1534,14 @@ public class MainDatabaseManager {
                         break;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_VENTILATION:
                     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;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_SYSTEM_AIRCON:
                     case SETTING_ITEM_SUB_DEVICE_SYSTEM_AIRCON:
-                        devInfo = "1(1:시스템에어컨(사용안함))";
+                        devInfo = "1(1:시스템에어컨(사용안함)종류(삼성))";
                         break;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_ELECTRONICALLY_CURTAIN:
                     case SETTING_ITEM_SUB_DEVICE_ELECTRONICALLY_CURTAIN:
@@ -1540,7 +1575,8 @@ public class MainDatabaseManager {
 
 
                     case SETTING_ITEM_SUB_DEVICE_DOOR_CAMERA:
                     case SETTING_ITEM_SUB_DEVICE_DOOR_CAMERA:
                         if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
                         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 == Version.MODEL_TYPE.IHN_D101_I_OCF)
                         {
                         {
                             devInfo = "1(1:현관카메라(사용함)종류(RF현관카메라))";
                             devInfo = "1(1:현관카메라(사용함)종류(RF현관카메라))";
                         }
                         }
@@ -1591,7 +1627,10 @@ public class MainDatabaseManager {
                         break;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_CCTV:
                     case SETTING_ITEM_SUB_DEVICE_CCTV:
-                        devInfo = "1(1:CCTV(사용함)종류( 삼성테크윈 )버튼(IP:10.0.1.80*Camera:1*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터1)버튼(IP:10.0.1.80*Camera:2*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터2)버튼(IP:10.0.1.80*Camera:3*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터3)버튼(IP:10.0.1.40*Camera:4*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터4)버튼(IP:10.0.1.80*Camera:5*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터5))";
+//                        if(Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT)
+//                            devInfo = "1(1:CCTV(사용안함)종류( 삼성테크윈 )버튼(IP:10.0.1.80*Camera:1*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터1)버튼(IP:10.0.1.80*Camera:2*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터2)버튼(IP:10.0.1.80*Camera:3*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터3)버튼(IP:10.0.1.40*Camera:4*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터4)버튼(IP:10.0.1.80*Camera:5*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터5))";
+//                        else
+                            devInfo = "1(1:CCTV(사용함)종류( 삼성테크윈 )버튼(IP:10.0.1.80*Camera:1*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터1)버튼(IP:10.0.1.80*Camera:2*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터2)버튼(IP:10.0.1.80*Camera:3*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터3)버튼(IP:10.0.1.40*Camera:4*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터4)버튼(IP:10.0.1.80*Camera:5*Pass:333*vPort:6801*cPort:6800*Site:admin*Where:놀이터5))";
                         break;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_CARGUEST:
                     case SETTING_ITEM_SUB_DEVICE_CARGUEST:
@@ -1682,8 +1721,10 @@ public class MainDatabaseManager {
                         break;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_ENERGY_DEVICES:
                     case SETTING_ITEM_SUB_DEVICE_ENERGY_DEVICES:
-                        if((ModelType == Version.MODEL_TYPE.IHN_1020GL) || (ModelType == Version.MODEL_TYPE.IHN_D101)
-                            || (ModelType == Version.MODEL_TYPE.IHN_D101K))
+                        if (ModelType == Version.MODEL_TYPE.IHN_1020GL
+                                || 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_D101_I_OCF)
                         {
                         {
                             devInfo = "1(1:에너지제품군(사용함))";
                             devInfo = "1(1:에너지제품군(사용함))";
                         }
                         }
@@ -1869,8 +1910,8 @@ public class MainDatabaseManager {
                         devInfo = "1(1:간편모드UX지원(사용안함))";
                         devInfo = "1(1:간편모드UX지원(사용안함))";
                         break;
                         break;
 
 
-                    case SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV:
-                        devInfo = "1(1:피난사다리입하수신(사용안함))";
+                    case SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND:
+                        devInfo = "1(1:피난사다리전송(사용함)종류(윗집))";
                         break;
                         break;
 
 
                     case SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT:
                     case SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT:
@@ -1929,10 +1970,6 @@ public class MainDatabaseManager {
                         devInfo = "1(1:서브폰날씨정보역순전송(사용안함))";
                         devInfo = "1(1:서브폰날씨정보역순전송(사용안함))";
                         break;
                         break;
 
 
-                    case SETTING_ITEM_SUB_DEVICE_SYSTEMAIRCON_HEAT_SUPPORT:
-                        devInfo = "1(1:시스템에어컨난방기능지원(사용안함))";
-                        break;
-
                     case SETTING_ITEM_SUB_DEVICE_SAFESTREETLIGHT_USE:
                     case SETTING_ITEM_SUB_DEVICE_SAFESTREETLIGHT_USE:
                         devInfo = "1(1:안전가로등(사용안함))";
                         devInfo = "1(1:안전가로등(사용안함))";
                         break;
                         break;
@@ -2007,6 +2044,30 @@ public class MainDatabaseManager {
                     case SETTING_ITEM_SUB_DEVICE_POWERCONTROLLER:
                     case SETTING_ITEM_SUB_DEVICE_POWERCONTROLLER:
                         devInfo = "1(1:통합전력제어기(사용함)종류(기본))";
                         devInfo = "1(1:통합전력제어기(사용함)종류(기본))";
                         break;
                         break;
+
+                    case SETTING_ITEM_SUB_DEVICE_LH_GATEWAY:
+                        devInfo = "1(1:LH게이트웨이(사용안함))";
+                        break;
+
+                    case SETTING_ITEM_SUB_DEVICE_KAKAO_HOME:
+                        devInfo = "1(1:카카오홈(사용안함))";
+                        break;
+
+                    case SETTING_ITEM_SUB_DEVICE_SMARTIOTCAM_FLIP:
+                        devInfo = "1(1:스마트현관카메라좌우반전(사용안함))";
+                        break;
+
+                    case SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC:
+                        devInfo = "1(1:건설사특화기능(사용안함)종류(사용안함))";
+                        break;
+
+                    case SETTING_ITEM_SUB_DEVICE_MAIN_GUI_CTRL_USE:
+                        devInfo = "1(1:제어기능(사용함))";
+                        break;
+
+                    case SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION:
+                        devInfo = "1(1:각실EM제어옵션(사용함)종류(순차제어))";
+                        break;
                 }
                 }
             }
             }
         }
         }
@@ -2022,10 +2083,15 @@ public class MainDatabaseManager {
         boolean bUsed = false;
         boolean bUsed = false;
         if (DEBUG) Log.i(TAG, "[isUsedSettingDataSubDev] itemType = " + itemType);
         if (DEBUG) Log.i(TAG, "[isUsedSettingDataSubDev] itemType = " + itemType);
         List<String> InfoList = getSettingDataSubDev(itemType);
         List<String> InfoList = getSettingDataSubDev(itemType);
-        for (int i = 0; i < InfoList.size(); i++) {
-            Log.i(TAG, "[isUsedSettingDataSubDev] InfoList.get(" + i + ") = " + InfoList.get(i));
+        if(InfoList!=null)
+        {
+            for (int i = 0; i < InfoList.size(); i++) {
+                if(InfoList.get(i)!=null)
+                    Log.i(TAG, "[isUsedSettingDataSubDev] InfoList.get(" + i + ") = " + InfoList.get(i));
+            }
         }
         }
 
 
+
         if ((InfoList != null) && (InfoList.size() > 3)) {
         if ((InfoList != null) && (InfoList.size() > 3)) {
             if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
             if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
                 bUsed = true;
                 bUsed = true;
@@ -2055,7 +2121,7 @@ public class MainDatabaseManager {
 
 
         String deviceName = getSubDevID(itemType);
         String deviceName = getSubDevID(itemType);
         if (deviceName != null) {
         if (deviceName != null) {
-            if (DEBUG)  Log.d(TAG, "deviceName : " + deviceName);
+            if (DEBUG)  Log.d(TAG, "setSettingDataSubDev() deviceName : " + deviceName);
 
 
             WallpadDeviceSet devset = new WallpadDeviceSet(mContext);
             WallpadDeviceSet devset = new WallpadDeviceSet(mContext);
             if (devset != null) {
             if (devset != null) {
@@ -2065,6 +2131,21 @@ public class MainDatabaseManager {
                         , value
                         , value
                 );
                 );
 
 
+                // 스마트현관카메라좌우반전 설정정보일 경우 카메라 설정 필요
+                if (getUseSmartDoorCam()) {
+                    if (itemType == SETTING_ITEM_SUB_DEVICE_SMARTIOTCAM_FLIP) {
+                        Log.d(TAG, "setSettingDataSubDev() itemType: " + itemType + ", value: " + value);
+                        V40IF mV40IF = new V40IF();
+                        if (value.contains(Const.CONTROLLER_SETTING_DO_USED)) {
+                            Log.d(TAG, "setSettingDataSubDev() === WALLPAD_CAM_AHD_FRONT_FLIP ===");
+                            mV40IF.setCameraConfigure(Const.WALLPAD_CAM_AHD_FRONT_FLIP);
+                        } else if (value.contains(Const.CONTROLLER_SETTING_DO_NOT_USED)) {
+                            Log.d(TAG, "setSettingDataSubDev() === WALLPAD_CAM_AHD_FRONT ===");
+                            mV40IF.setCameraConfigure(Const.WALLPAD_CAM_AHD_FRONT);
+                        } else Log.w(TAG, "setSettingDataSubDev() value " + value + "]");
+                    }
+                }
+
                 devset.closeDB();
                 devset.closeDB();
             }
             }
         }
         }
@@ -2180,9 +2261,12 @@ public class MainDatabaseManager {
                 else Log.w(TAG, "[updateSetUsedToSubDeviceSwitchButtonOnOff] InfoList is null or InfoList.size() > 1!!!");
                 else Log.w(TAG, "[updateSetUsedToSubDeviceSwitchButtonOnOff] InfoList is null or InfoList.size() > 1!!!");
             }
             }
             else Log.w(TAG, "[updateSetUsedToSubDeviceSwitchButtonOnOff] controllerName is null!!!");
             else Log.w(TAG, "[updateSetUsedToSubDeviceSwitchButtonOnOff] controllerName is null!!!");
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateSetUsedToSubDeviceSwitchButtonOnOff(int controller, final int position)");
             Log.e(TAG, "[Exception] updateSetUsedToSubDeviceSwitchButtonOnOff(int controller, final int position)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -2248,4 +2332,30 @@ public class MainDatabaseManager {
         return ret;
         return ret;
     }
     }
 
 
+    private boolean getUseSmartDoorCam() {
+        try {
+            WallpadDeviceSet mWallpadDeviceSet = new WallpadDeviceSet(getContext());
+            if(mWallpadDeviceSet!=null)
+            {
+                int[] nFrontCam = mWallpadDeviceSet.Get_RFDoorCAM_Info();
+                mWallpadDeviceSet.closeDB();
+                if(nFrontCam!=null)
+                {
+                    if (nFrontCam[0] == Const.CONTROLLER_SETTING_DO_USED_INDEX) {
+                        if (nFrontCam[1] == WallpadDeviceSet.DOORTYPE_IOT_SMART) {
+                            Log.d(TAG, "[getUseSmartDoorCam] Use SMART_IOT_DOORCAM");
+                            return true;
+                        }
+                    }
+                }
+
+            }
+
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] getUseSmartDoorCam()");
+            e.printStackTrace();
+        }
+        return false;
+    }
+
 }
 }

+ 20 - 4
ManagerSetting/src/main/java/com/artncore/managersetting/domain/Const.java

@@ -75,6 +75,7 @@ public class Const {
     public static final String LIGHT_CONTROLLER_TYPE_ROOMS = "대외각실형";
     public static final String LIGHT_CONTROLLER_TYPE_ROOMS = "대외각실형";
     public static final String LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL = "현산향일체형조명기본형";
     public static final String LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL = "현산향일체형조명기본형";
     public static final String LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT = "현산향일체형조명일괄소등병합형";
     public static final String LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT = "현산향일체형조명일괄소등병합형";
+    public static final String LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT_MULTISWITCH = "현산향일체형조명일괄소등병합형_멀티스위치";
     public static final String LIGHT_CONTROLLER_TYPE_SMART_DISTRIBUTION = "스마트분전반조명";
     public static final String LIGHT_CONTROLLER_TYPE_SMART_DISTRIBUTION = "스마트분전반조명";
 
 
     public static final String CONTROLLER_DISTRIBUTION_KIND_SMART = "스마트분전반";
     public static final String CONTROLLER_DISTRIBUTION_KIND_SMART = "스마트분전반";
@@ -125,6 +126,7 @@ public class Const {
     public static final String DOOR_CAMERA_TYPE_DEFAULT = "기본";
     public static final String DOOR_CAMERA_TYPE_DEFAULT = "기본";
     public static final String DOOR_CAMERA_TYPE_RF_DOOR_CAMERA = "RF현관카메라";
     public static final String DOOR_CAMERA_TYPE_RF_DOOR_CAMERA = "RF현관카메라";
     public static final String DOOR_CAMERA_TYPE_SMART_KEY = "스마트키";
     public static final String DOOR_CAMERA_TYPE_SMART_KEY = "스마트키";
+    public static final String DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL = "대외스마트키현관카메라";
     public static final String DOOR_CAMERA_TYPE_IOT_SMART = "스마트IOT현관카메라";
     public static final String DOOR_CAMERA_TYPE_IOT_SMART = "스마트IOT현관카메라";
     public static final String DOOR_CAMERA_TYPE_HYOSUNG_SMART = "스마트현관카메라-효성";
     public static final String DOOR_CAMERA_TYPE_HYOSUNG_SMART = "스마트현관카메라-효성";
     public static final String DOOR_CAMERA_TYPE_DAEWOO_SMART = "스마트현관카메라-대우";
     public static final String DOOR_CAMERA_TYPE_DAEWOO_SMART = "스마트현관카메라-대우";
@@ -135,8 +137,7 @@ public class Const {
 
 
     public static final String MAIN_GUI_TYPE_DEFAULT = "기본";
     public static final String MAIN_GUI_TYPE_DEFAULT = "기본";
     public static final String MAIN_GUI_TYPE_METRO = "메트로";
     public static final String MAIN_GUI_TYPE_METRO = "메트로";
-    public static final String MAIN_GUI_TYPE_HYOSUNG_CTR_ON = "효성-제어있음";
-    public static final String MAIN_GUI_TYPE_HYOSUNG_CTR_OFF = "효성-제어없음";
+    public static final String MAIN_GUI_TYPE_HYOSUNG = "효성";
     public static final String MAIN_GUI_TYPE_HIMCHAN = "힘찬";
     public static final String MAIN_GUI_TYPE_HIMCHAN = "힘찬";
 
 
 
 
@@ -165,6 +166,8 @@ public class Const {
     public static final String ENERGY_MODULE = "에너지모듈";
     public static final String ENERGY_MODULE = "에너지모듈";
     public static final String ENERGY_SERVER_CONNECT = "에너지관리서버";
     public static final String ENERGY_SERVER_CONNECT = "에너지관리서버";
 
 
+    public static final String ESCAPE_LADDER_DOWN_SEND_UPPER = "윗집";
+    public static final String ESCAPE_LADDER_DOWN_SEND_BELOW = "아랫집";
 
 
     public static final String VOLUME_LEVEL_TYPE = "볼륨";
     public static final String VOLUME_LEVEL_TYPE = "볼륨";
 
 
@@ -172,6 +175,15 @@ public class Const {
     public static final String IP_TYPE = "IP";
     public static final String IP_TYPE = "IP";
 
 
 
 
+    public static final String SYSTEM_AIRCON_TYPE_SAMSUNG_AIR = "삼성냉방";
+    public static final String SYSTEM_AIRCON_TYPE_SAMSUNG_AIR_HEAT = "삼성냉난방";
+    public static final String SYSTEM_AIRCON_TYPE_LG_AIR = "LG냉방";
+    public static final String SYSTEM_AIRCON_TYPE_LG_AIR_HEAT = "LG냉난방";
+    public static final String SYSTEM_AIRCON_TYPE_ETC = "기타APU";
+
+    public static final String CONTROLLER_KITCHEN_EM_CTRL_OPTION_BATCH = "일괄제어";
+    public static final String CONTROLLER_KITCHEN_EM_CTRL_OPTION_IN_ORDER = "순차제어";
+
 
 
     public static final int CONTROLLER_MAX_COUNT = 8;
     public static final int CONTROLLER_MAX_COUNT = 8;
     public static final int CONTROLLER_ONOFF_COUNT = 1;
     public static final int CONTROLLER_ONOFF_COUNT = 1;
@@ -306,7 +318,11 @@ public class Const {
     public static final int CONTROLLER_TYPE_LOUVER = CONTROLLER_TYPE_BASE + 341; // 전동루버
     public static final int CONTROLLER_TYPE_LOUVER = CONTROLLER_TYPE_BASE + 341; // 전동루버
     public static final int CONTROLLER_TYPE_BIOMETICS = CONTROLLER_TYPE_BASE + 342; // 생체인식
     public static final int CONTROLLER_TYPE_BIOMETICS = CONTROLLER_TYPE_BASE + 342; // 생체인식
 
 
-    public static final String CONTENTS_ROOT = "/storage/emulated/0/wallpaddata/";
+    public static final int CONTROLLER_TYPE_LH_GATEWAY = CONTROLLER_TYPE_BASE + 343; // LH게이트웨이
+    public static final int CONTROLLER_TYPE_CTRL_USE = CONTROLLER_TYPE_BASE + 344; // 제어기능
+    public static final int CONTROLLER_TYPE_KITCHEN_EM_CTRL_OPTION = CONTROLLER_TYPE_CTRL_USE + 345; // 각실EM제어옵션
+
+   public static final String CONTENTS_ROOT = "/storage/emulated/0/wallpaddata/";
     //public static final String CONTENTS_ROOT = "/storage/sdcard0/wallpaddata";
     //public static final String CONTENTS_ROOT = "/storage/sdcard0/wallpaddata";
     public static final String BESTIN_CONTENTS_ROOT = "/storage/emulated/0/Bestin/";
     public static final String BESTIN_CONTENTS_ROOT = "/storage/emulated/0/Bestin/";
 
 
@@ -446,6 +462,6 @@ public class Const {
      */
      */
     public static final int WALLPAD_CAM_AHD_FRONT = 0;
     public static final int WALLPAD_CAM_AHD_FRONT = 0;
     public static final int WALLPAD_CAM_NORMAL_FRONT = 1;
     public static final int WALLPAD_CAM_NORMAL_FRONT = 1;
-
+    public static final int WALLPAD_CAM_AHD_FRONT_FLIP = 2;
 }
 }
 
 

+ 19 - 3
ManagerSetting/src/main/java/com/artncore/managersetting/ui/AudioRecordController.java

@@ -9,6 +9,8 @@ import android.media.AudioRecord;
 import android.media.AudioTrack;
 import android.media.AudioTrack;
 import android.media.MediaRecorder;
 import android.media.MediaRecorder;
 
 
+import com.util.LogUtil;
+
 
 
 public class AudioRecordController {
 public class AudioRecordController {
     private static final String TAG = "AudioRecordController";
     private static final String TAG = "AudioRecordController";
@@ -80,7 +82,7 @@ public class AudioRecordController {
 
 
                 mRecordingFile = new File(mRecordingFilePath);
                 mRecordingFile = new File(mRecordingFilePath);
                 if(mRecordingFile.exists()){
                 if(mRecordingFile.exists()){
-                    mRecordingFile.delete();
+                    FileDelete(mRecordingFile);
                 }
                 }
 
 
                 Thread recordStartThread = (new Thread() {
                 Thread recordStartThread = (new Thread() {
@@ -99,7 +101,10 @@ public class AudioRecordController {
 
 
                 mAudioRecord.startRecording();
                 mAudioRecord.startRecording();
                 mAudioTrack.play();
                 mAudioTrack.play();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
     }
     }
@@ -113,7 +118,10 @@ public class AudioRecordController {
 
 
                 mAudioRecord.stop();
                 mAudioRecord.stop();
                 mAudioTrack.pause();
                 mAudioTrack.pause();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
     }
     }
@@ -124,6 +132,14 @@ public class AudioRecordController {
         recordAndPlayStop();
         recordAndPlayStop();
     }
     }
 
 
+    private synchronized void FileDelete(File file)
+    {
+        if(file!=null && file.exists())
+        {
+            file.delete();
+        }
+    }
+
 
 
 
 
 
 

+ 57 - 69
ManagerSetting/src/main/java/com/artncore/managersetting/ui/CameraTestDialog.java

@@ -23,8 +23,11 @@ import com.artncore.managersetting.R;
 import com.artncore.managersetting.domain.Const;
 import com.artncore.managersetting.domain.Const;
 import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.ui.fragments.CheckEtcFragment;
 import com.artncore.managersetting.ui.fragments.CheckEtcFragment;
+import com.util.LogUtil;
 
 
 import java.io.IOException;
 import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import kr.co.icontrols.managersetting.declare.Common;
 import kr.co.icontrols.managersetting.declare.Common;
@@ -206,11 +209,15 @@ public class CameraTestDialog extends Dialog {
             {
             {
                 openCamera(mCameraType);
                 openCamera(mCameraType);
             }
             }
+            catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+            }
             catch(Exception e)
             catch(Exception e)
             {
             {
                 Toast.makeText(getContext(), "카메라를 실행하는데 오류가 생겼습니다.", Toast.LENGTH_SHORT).show();
                 Toast.makeText(getContext(), "카메라를 실행하는데 오류가 생겼습니다.", Toast.LENGTH_SHORT).show();
 
 
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 closeCamera();
                 closeCamera();
             }
             }
 
 
@@ -279,24 +286,18 @@ public class CameraTestDialog extends Dialog {
             if (bAOS7) {
             if (bAOS7) {
                 /**
                 /**
                  * 확인완료 (JEFF, 2020.09.02)
                  * 확인완료 (JEFF, 2020.09.02)
-                 * IHN-1020B-I, IHN-D101-I, IHN-1010(중국)
+                 * IHN-1020B-I, IHN-D101-I, IHN-1010-I
                  */
                  */
                 // AOS 7.1.1
                 // AOS 7.1.1
-                if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010) {
-                    if (nType == Const.CAMERA_TYPE_WALLPAD) {
-                        mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-                    }
-                    else if (nType == Const.CAMERA_TYPE_DOOR) {
-                        mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-                    }
+                if (nType == Const.CAMERA_TYPE_WALLPAD) {
+                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020B_I && !getCompareBSPVersion("2020.09.18")) mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
+                    else if (Version.getModelType() == Version.MODEL_TYPE.IHN_HS101_I && !getCompareBSPVersion("2020.06.11")) mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
+                    else mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
                 }
                 }
-                else {
-                    if (nType == Const.CAMERA_TYPE_WALLPAD) {
-                        mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-                    }
-                    else if (nType == Const.CAMERA_TYPE_DOOR) {
-                        mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-                    }
+                else if (nType == Const.CAMERA_TYPE_DOOR) {
+                    if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020B_I && !getCompareBSPVersion("2020.09.18")) mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
+                    else if (Version.getModelType() == Version.MODEL_TYPE.IHN_HS101_I && !getCompareBSPVersion("2020.06.11")) mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
+                    else mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
                 }
                 }
             }
             }
             else {
             else {
@@ -314,57 +315,6 @@ public class CameraTestDialog extends Dialog {
             }
             }
         }
         }
 
 
-//        if (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_1010_I
-//                || Version.getModelType() == Version.MODEL_TYPE.IHN_T1010 || Version.getModelType() == Version.MODEL_TYPE.IHN_T1010_I
-//                || Version.getModelType() == Version.MODEL_TYPE.IHN_1030_I) {
-//            if (nType == Const.CAMERA_TYPE_WALLPAD) {
-//                mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-//            }
-//            else if (nType == Const.CAMERA_TYPE_DOOR) {
-//                mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-//            }
-//        }
-//        else if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101) {
-//            boolean bAOS7 = false;
-//            if (Build.VERSION.SDK_INT > 23) bAOS7 = true;
-//            Log.d(TAG, "[openCamera] Build.VERSION.SDK_INT [" + Build.VERSION.SDK_INT + "], bAOS7 [" + bAOS7 + "]");
-//            if (bAOS7) {
-//                // AOS 7.1.1
-//                if (nType == Const.CAMERA_TYPE_WALLPAD) {
-//                    mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-//                }
-//                else if (nType == Const.CAMERA_TYPE_DOOR) {
-//                    mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-//                }
-//            }
-//            else {
-//                // AOS 6.0
-//                if (nType == Const.CAMERA_TYPE_WALLPAD) {
-//                    mCamera = Camera.open(1);
-//                }
-//                else if (nType == Const.CAMERA_TYPE_DOOR) {
-//                    Log.d(TAG, "[openCamera] doorCamType [" + CheckEtcFragment.doorCamType + "]");
-//                    if (CheckEtcFragment.doorCamType == WallpadDeviceSet.DOORTYPE_IOT_SMART) mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-//                    else mCamera = Camera.open();
-//                }
-//            }
-//        }
-//        else if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010
-//                || Version.getModelType() == Version.MODEL_TYPE.IHN_1040 || Version.getModelType() == Version.MODEL_TYPE.IHN_1040_I
-//                || Version.getModelType() == Version.MODEL_TYPE.IHN_1050 || Version.getModelType() == Version.MODEL_TYPE.IHN_1050_I
-//                || Version.getModelType() == Version.MODEL_TYPE.IHN_HS101 || Version.getModelType() == Version.MODEL_TYPE.IHN_HS101_I
-//                || Version.getModelType() == Version.MODEL_TYPE.IHN_1050DW_I || Version.getModelType() == Version.MODEL_TYPE.IHN_1020B_I)
-//        {
-//            if (nType == Const.CAMERA_TYPE_WALLPAD) mCamera = Camera.open(0);
-//            else if (nType == Const.CAMERA_TYPE_DOOR) mCamera = Camera.open();
-//            else Log.w(TAG, "[openCamera] Unavailable nType [" + nType + "]");
-//        }
-//        else {
-//            Log.d(TAG, "[openCamera] Unavailable Wallpad model [" + Version.getModelType() + "]");
-//        }
-
         if (mCamera == null) {
         if (mCamera == null) {
             //Toast.makeText(mContext, "Camera is not available!", Toast.LENGTH_SHORT).show();
             //Toast.makeText(mContext, "Camera is not available!", Toast.LENGTH_SHORT).show();
             closeDialog();
             closeDialog();
@@ -435,6 +385,7 @@ public class CameraTestDialog extends Dialog {
                 }
                 }
             }
             }
             catch(NullPointerException ee) {
             catch(NullPointerException ee) {
+                LogUtil.errorLogInfo("", TAG, ee);
             }
             }
         }
         }
 
 
@@ -462,6 +413,7 @@ public class CameraTestDialog extends Dialog {
             }
             }
         }
         }
         catch(NullPointerException e) {
         catch(NullPointerException e) {
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
 
 
@@ -520,7 +472,8 @@ public class CameraTestDialog extends Dialog {
 //            mWallPadInterface.setCameraBrightness(mCameraBrightController.getBrightness()     );
 //            mWallPadInterface.setCameraBrightness(mCameraBrightController.getBrightness()     );
 
 
         } catch (IOException _le) {
         } catch (IOException _le) {
-            _le.printStackTrace();
+            //_le.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, _le);
         }
         }
     }
     }
 
 
@@ -558,10 +511,45 @@ public class CameraTestDialog extends Dialog {
             else {
             else {
                 Log.w(TAG, "[doorCameraClose] mWallPadInterface is null!!");
                 Log.w(TAG, "[doorCameraClose] mWallPadInterface is null!!");
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doorCameraClose()");
             Log.e(TAG, "[Exception] doorCameraClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    /**
+     * 절전모드에서 백라이트를 키는 경우, BSP에서 PowerManager 또는 속성값으로 상태를 구분하는데
+     * BSP 버전에 따라 상이하게 동작하므로 BSP 버전 구분하여 절전모드 판별 필요
+     * @return true: 기준 BSP 이후 버전, false: 기준 BSP 이전 버전
+     */
+    public boolean getCompareBSPVersion(String version) {
+        try {
+            StringBuilder strBSPVersion = new StringBuilder();
+            StringBuffer sysInfoBuffer = new StringBuffer();
+            sysInfoBuffer.append(Build.DISPLAY);
+            strBSPVersion.append(sysInfoBuffer.toString());
+
+            String result = strBSPVersion.toString();
+            Log.i(TAG, "[getCompareBSPVersion] result [" + result + "]");
+
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
+            Date date = simpleDateFormat.parse(result);
+            Date standardDate = simpleDateFormat.parse(version); // 비교 기준 BSP 버전
+            if (date.compareTo(standardDate) >= 0) {
+                Log.i(TAG, "[getCompareBSPVersion] BSP VERSION OVER!");
+                return true;
+            }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] getCompareBSPVersion()");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
+        return false;
     }
     }
 
 
 
 

+ 49 - 14
ManagerSetting/src/main/java/com/artncore/managersetting/ui/RecordTestDialog.java

@@ -23,6 +23,7 @@ import com.artncore.commons.define;
 import com.artncore.deviceinterface.WallPadInterface;
 import com.artncore.deviceinterface.WallPadInterface;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.ui.activities.MainActivity;
+import com.util.LogUtil;
 
 
 import java.io.File;
 import java.io.File;
 import java.io.IOException;
 import java.io.IOException;
@@ -173,13 +174,16 @@ public class RecordTestDialog extends Dialog {
                 File file = new File(VIDEO_TEMP_PATH);
                 File file = new File(VIDEO_TEMP_PATH);
                 if (file.exists()) {
                 if (file.exists()) {
                     Log.w(TAG, "[startVideoRecording] file delete!!");
                     Log.w(TAG, "[startVideoRecording] file delete!!");
-                    file.delete();
+                    FileDelte(file);//file.delete();
                 }
                 }
                 mMediaRecorder = new MediaRecorder();
                 mMediaRecorder = new MediaRecorder();
                 mCameraOpenCheckHandler.sendEmptyMessage(0);
                 mCameraOpenCheckHandler.sendEmptyMessage(0);
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             Log.e(TAG, "[Exception] startVideoRecording()");
             Log.e(TAG, "[Exception] startVideoRecording()");
         }
         }
     }
     }
@@ -201,8 +205,11 @@ public class RecordTestDialog extends Dialog {
 
 
                 closeCamera();
                 closeCamera();
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             Log.e(TAG, "[Exception] stopVideoRecording()");
             Log.e(TAG, "[Exception] stopVideoRecording()");
         }
         }
     }
     }
@@ -236,9 +243,12 @@ public class RecordTestDialog extends Dialog {
                 mVideoView.start();
                 mVideoView.start();
                 Toast.makeText(getContext(), "녹화된 영상을 재생합니다.", Toast.LENGTH_SHORT).show();
                 Toast.makeText(getContext(), "녹화된 영상을 재생합니다.", Toast.LENGTH_SHORT).show();
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startVideoPlay()");
             Log.e(TAG, "[Exception] startVideoPlay()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -318,9 +328,12 @@ public class RecordTestDialog extends Dialog {
             Log.d(TAG, "[mCameraCallback] surfaceCreated() ");
             Log.d(TAG, "[mCameraCallback] surfaceCreated() ");
             try {
             try {
                 openCamera();
                 openCamera();
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
                 Toast.makeText(getContext(), "카메라를 실행하는데 오류가 생겼습니다.", Toast.LENGTH_SHORT).show();
                 Toast.makeText(getContext(), "카메라를 실행하는데 오류가 생겼습니다.", Toast.LENGTH_SHORT).show();
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 closeCamera();
                 closeCamera();
             }
             }
 
 
@@ -413,7 +426,8 @@ public class RecordTestDialog extends Dialog {
                     videoSize = size;
                     videoSize = size;
             }
             }
         } catch (NullPointerException ne) {
         } catch (NullPointerException ne) {
-            ne.printStackTrace();
+            //ne.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ne);
             Log.e(TAG, "[NullPointerException] setCameraParam() (2)");
             Log.e(TAG, "[NullPointerException] setCameraParam() (2)");
         }
         }
 
 
@@ -427,7 +441,8 @@ public class RecordTestDialog extends Dialog {
             String result = "btn_videoInput (" + WallPadInterface.VIDEO_INPUT_TYPE_DOOR + "): " + ret + "\n";
             String result = "btn_videoInput (" + WallPadInterface.VIDEO_INPUT_TYPE_DOOR + "): " + ret + "\n";
             Log.d(TAG, "[setCameraParam] result [" + result + "]");
             Log.d(TAG, "[setCameraParam] result [" + result + "]");
         } catch (IOException ioe) {
         } catch (IOException ioe) {
-            ioe.printStackTrace();
+            //ioe.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ioe);
             Log.e(TAG, "[IOException] setCameraParam()");
             Log.e(TAG, "[IOException] setCameraParam()");
         }
         }
     }
     }
@@ -456,12 +471,15 @@ public class RecordTestDialog extends Dialog {
             File file = new File(VIDEO_TEMP_PATH);
             File file = new File(VIDEO_TEMP_PATH);
             if (file.exists()) {
             if (file.exists()) {
                 Log.w(TAG, "[finishRecordingPopup] file delete!!");
                 Log.w(TAG, "[finishRecordingPopup] file delete!!");
-                file.delete();
+                FileDelte(file);//file.delete();
             }
             }
             closeDialog();
             closeDialog();
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishRecordingPopup()");
             Log.e(TAG, "[Exception] finishRecordingPopup()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -473,9 +491,12 @@ public class RecordTestDialog extends Dialog {
                 mMediaRecorder = null;
                 mMediaRecorder = null;
             }
             }
             finishRecordingPopup(true);
             finishRecordingPopup(true);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetRecorderSetting()");
             Log.e(TAG, "[Exception] resetRecorderSetting()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -505,11 +526,13 @@ public class RecordTestDialog extends Dialog {
                     mMediaRecorder.prepare();
                     mMediaRecorder.prepare();
                 } catch (IllegalStateException e) {
                 } catch (IllegalStateException e) {
                     Log.e(TAG, "[IllegalStateException] mCameraOpenCheckHandler");
                     Log.e(TAG, "[IllegalStateException] mCameraOpenCheckHandler");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                     resetRecorderSetting();
                     resetRecorderSetting();
                 } catch (IOException e) {
                 } catch (IOException e) {
                     Log.e(TAG, "[IOException] mCameraOpenCheckHandler");
                     Log.e(TAG, "[IOException] mCameraOpenCheckHandler");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                     resetRecorderSetting();
                     resetRecorderSetting();
                 }
                 }
 
 
@@ -518,14 +541,26 @@ public class RecordTestDialog extends Dialog {
                     Toast.makeText(getContext(), "영상 녹화를 시작합니다.", Toast.LENGTH_SHORT).show();
                     Toast.makeText(getContext(), "영상 녹화를 시작합니다.", Toast.LENGTH_SHORT).show();
                 } catch (IllegalStateException e) {
                 } catch (IllegalStateException e) {
                     Log.e(TAG, "[IllegalStateException] mCameraOpenCheckHandler.start");
                     Log.e(TAG, "[IllegalStateException] mCameraOpenCheckHandler.start");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                     resetRecorderSetting();
                     resetRecorderSetting();
+                } catch (RuntimeException re) {
+                    Log.e(TAG, re.toString());
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, "[Exception] mCameraOpenCheckHandler.start");
                     Log.e(TAG, "[Exception] mCameraOpenCheckHandler.start");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     resetRecorderSetting();
                     resetRecorderSetting();
                 }
                 }
             }
             }
         }
         }
     };
     };
+
+    private synchronized void FileDelte(File file)
+    {
+        if(file!=null && file.exists())
+        {
+            file.delete();
+        }
+    }
 }
 }

+ 10 - 2
ManagerSetting/src/main/java/com/artncore/managersetting/ui/activities/MainActivity.java

@@ -42,6 +42,7 @@ import com.artncore.managersetting.ui.fragments.AdminSettingFragment;
 import com.artncore.managersetting.ui.fragments.AdminSystemResetFragment;
 import com.artncore.managersetting.ui.fragments.AdminSystemResetFragment;
 import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.Version;
@@ -104,10 +105,13 @@ public class MainActivity extends FragmentActivity implements
         try
         try
         {
         {
             wpapi = new WallPadAPI(this);
             wpapi = new WallPadAPI(this);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         }
         }
         catch (Exception ee)
         catch (Exception ee)
         {
         {
-            ee.printStackTrace();
+            //ee.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ee);
         }
         }
         mWallPadApiCheckHandler.sendEmptyMessage(0);
         mWallPadApiCheckHandler.sendEmptyMessage(0);
 
 
@@ -775,10 +779,14 @@ public class MainActivity extends FragmentActivity implements
             intent.putExtra("keycode",code);
             intent.putExtra("keycode",code);
             getApplicationContext().sendBroadcast(intent);
             getApplicationContext().sendBroadcast(intent);
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch(Exception e)
         catch(Exception e)
         {
         {
             Log.e(TAG, "[setSendEventBR] - [Exception Error] code:" + code);
             Log.e(TAG, "[setSendEventBR] - [Exception Error] code:" + code);
-            e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+            //e.printStackTrace();
             return -100;
             return -100;
         }
         }
         return 0;
         return 0;

+ 196 - 43
ManagerSetting/src/main/java/com/artncore/managersetting/ui/activities/SetAddress.java

@@ -35,6 +35,7 @@ import com.artncore.managersetting.domain.Const;
 import com.artncore.managersetting.ui.SwitchButton;
 import com.artncore.managersetting.ui.SwitchButton;
 import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.util.StringUtil;
+import com.util.LogUtil;
 
 
 import java.io.BufferedWriter;
 import java.io.BufferedWriter;
 import java.io.FileOutputStream;
 import java.io.FileOutputStream;
@@ -79,7 +80,7 @@ public class SetAddress extends Activity
     public final int DETAIL_TYPE_USE_DISTRIBUTION_KIND =                        DETAIL_TYPE_BASE + 27;
     public final int DETAIL_TYPE_USE_DISTRIBUTION_KIND =                        DETAIL_TYPE_BASE + 27;
     public final int DETAIL_TYPE_USE_GATEWAY_MODEL_KIND =               		DETAIL_TYPE_BASE + 28;
     public final int DETAIL_TYPE_USE_GATEWAY_MODEL_KIND =               		DETAIL_TYPE_BASE + 28;
     public final int DETAIL_TYPE_USE_ELECTRIC_RANGE =               		    DETAIL_TYPE_BASE + 29;
     public final int DETAIL_TYPE_USE_ELECTRIC_RANGE =               		    DETAIL_TYPE_BASE + 29;
-    public final int DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_RECV =                  DETAIL_TYPE_BASE + 30;
+    public final int DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_SEND =                  DETAIL_TYPE_BASE + 30;
     public final int DETAIL_TYPE_USE_SUBWPD_USE =                  				DETAIL_TYPE_BASE + 31;
     public final int DETAIL_TYPE_USE_SUBWPD_USE =                  				DETAIL_TYPE_BASE + 31;
 
 
     private MainDatabaseManager mMainDatabaseManager;
     private MainDatabaseManager mMainDatabaseManager;
@@ -129,7 +130,7 @@ public class SetAddress extends Activity
                 else if (ModelType == Version.MODEL_TYPE.IHN_1010 || ModelType == Version.MODEL_TYPE.IHN_1010_I) {
                 else if (ModelType == Version.MODEL_TYPE.IHN_1010 || ModelType == Version.MODEL_TYPE.IHN_1010_I) {
                     setContentView(R.layout.activity_set_address_1010);
                     setContentView(R.layout.activity_set_address_1010);
                 }
                 }
-                else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I) {
+                else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I || ModelType == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                     setContentView(R.layout.activity_set_address_d101);
                     setContentView(R.layout.activity_set_address_d101);
                 }
                 }
                 else if (ModelType == Version.MODEL_TYPE.IHN_D101K || ModelType == Version.MODEL_TYPE.IHN_D101K_I) {
                 else if (ModelType == Version.MODEL_TYPE.IHN_D101K || ModelType == Version.MODEL_TYPE.IHN_D101K_I) {
@@ -227,7 +228,8 @@ public class SetAddress extends Activity
         }
         }
         else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101K || ModelType == Version.MODEL_TYPE.IHN_1010GL
         else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101K || ModelType == Version.MODEL_TYPE.IHN_1010GL
                 || ModelType == Version.MODEL_TYPE.IHN_D101_I || ModelType == Version.MODEL_TYPE.IHN_D101K_I || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
                 || ModelType == Version.MODEL_TYPE.IHN_D101_I || ModelType == Version.MODEL_TYPE.IHN_D101K_I || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
-                || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                || ModelType == Version.MODEL_TYPE.IHN_D101_I_OCF)
         {
         {
             initView_D101();
             initView_D101();
         }
         }
@@ -315,7 +317,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_1010() {
     private void initView_1010() {
@@ -328,7 +330,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
         initSubWallpad();
         initSubWallpad();
     }
     }
 
 
@@ -347,7 +349,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_D101K() {
     private void initView_D101K() {
@@ -365,7 +367,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_1010GL() {
     private void initView_1010GL() {
@@ -381,7 +383,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_1030() {
     private void initView_1030() {
@@ -394,7 +396,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_1040() {
     private void initView_1040() {
@@ -407,7 +409,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_1050() {
     private void initView_1050() {
@@ -420,7 +422,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_T1010() {
     private void initView_T1010() {
@@ -433,7 +435,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_HS101() {
     private void initView_HS101() {
@@ -446,7 +448,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     // init View
     // init View
@@ -469,7 +471,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
     }
     }
 
 
     private void initView_1303() {
     private void initView_1303() {
@@ -482,7 +484,7 @@ public class SetAddress extends Activity
         initUseDanjiConfig();
         initUseDanjiConfig();
         initUseRentHome();
         initUseRentHome();
         initUseDanjiRentHomeUse();
         initUseDanjiRentHomeUse();
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
         initSubWallpad();
         initSubWallpad();
     }
     }
 
 
@@ -628,7 +630,10 @@ public class SetAddress extends Activity
                 String title = "Inspection mode";
                 String title = "Inspection mode";
                 String message = "Set as production inspection?\n";
                 String message = "Set as production inspection?\n";
                 if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
                 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_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_I
+                        || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                        || ModelType == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                     message += "IP: 10.1.1.1\n" +
                     message += "IP: 10.1.1.1\n" +
                             "Door: Smart IoT Cam\n" +
                             "Door: Smart IoT Cam\n" +
                             "Smartkey: BLE Band\n" +
                             "Smartkey: BLE Band\n" +
@@ -733,8 +738,11 @@ public class SetAddress extends Activity
                             openSetDongHoDialog(title, message, 10, secNum, thirdNum, forthNum);
                             openSetDongHoDialog(title, message, 10, secNum, thirdNum, forthNum);
                         }
                         }
                     }
                     }
+                } catch (RuntimeException re) {
+                    Log.e(TAG, re.toString());
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();            
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
             }
             }
             break;
             break;
@@ -863,15 +871,21 @@ public class SetAddress extends Activity
 
 
                 ret = true;
                 ret = true;
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         } finally {
         } finally {
             try {
             try {
                 if (bufferWriter != null) {
                 if (bufferWriter != null) {
                     bufferWriter.close();
                     bufferWriter.close();
                 }
                 }
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
 
 
@@ -1019,7 +1033,8 @@ public class SetAddress extends Activity
             mHo = "101";   // 호정보 입력
             mHo = "101";   // 호정보 입력
 
 
             if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
             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) {
                 mWallpadDeviceSet.Set_DoorCameraType(WallpadDeviceSet.DOORTYPE_IOT_SMART);   // 스마트 IoT 현관카메라
                 mWallpadDeviceSet.Set_DoorCameraType(WallpadDeviceSet.DOORTYPE_IOT_SMART);   // 스마트 IoT 현관카메라
                 mWallpadDeviceSet.Set_BLESmartKeyType(WallpadDeviceSet.BLESMARTKEY_BAND);   // BLE 스마트 밴드
                 mWallpadDeviceSet.Set_BLESmartKeyType(WallpadDeviceSet.BLESMARTKEY_BAND);   // BLE 스마트 밴드
                 mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
                 mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
@@ -1032,6 +1047,14 @@ public class SetAddress extends Activity
 //                mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
 //                mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
 //                mWallpadDeviceSet.Set_RefugeLadderUsage(true);   // 피난사다리 사용
 //                mWallpadDeviceSet.Set_RefugeLadderUsage(true);   // 피난사다리 사용
 //            }
 //            }
+            else if (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) {
+                mWallpadDeviceSet.Set_LightingControllerType(WallpadDeviceSet.LIGHT_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT_MULTISWITCH);   // 현산향일체형조명일괄소등병합형_멀티스위치
+                mWallpadDeviceSet.Set_DoorCameraType(WallpadDeviceSet.DOORTYPE_IOT_SMART);   // 스마트 IoT 현관카메라
+                mWallpadDeviceSet.Set_BLESmartKeyType(WallpadDeviceSet.BLESMARTKEY_BAND);   // BLE 스마트 밴드
+                mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
+                mWallpadDeviceSet.Set_RefugeLadderUsage(true);   // 피난사다리 사용
+            }
             else if (Version.getModelType() == Version.MODEL_TYPE.IHN_1050DW_I) {
             else if (Version.getModelType() == Version.MODEL_TYPE.IHN_1050DW_I) {
                 mWallpadDeviceSet.Set_LightingControllerType(WallpadDeviceSet.LIGHT_TYPE_ROOM);   // 조명(각실)
                 mWallpadDeviceSet.Set_LightingControllerType(WallpadDeviceSet.LIGHT_TYPE_ROOM);   // 조명(각실)
                 mWallpadDeviceSet.Set_IntegratedSwitchUsage(true);   // 통합스위치 사용
                 mWallpadDeviceSet.Set_IntegratedSwitchUsage(true);   // 통합스위치 사용
@@ -1046,9 +1069,12 @@ public class SetAddress extends Activity
                 mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
                 mWallpadDeviceSet.Set_MotionSensorType(true, true, true, false);   // 내부동체 사용, 외부동체 사용, 외부동체를 내부동체로 사용
                 mWallpadDeviceSet.Set_RefugeLadderUsage(true);   // 피난사다리 사용
                 mWallpadDeviceSet.Set_RefugeLadderUsage(true);   // 피난사다리 사용
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setInspectionMode()");
             Log.e(TAG, "[Exception] setInspectionMode()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         mWallpadDeviceSet.closeDB();
         mWallpadDeviceSet.closeDB();
     }
     }
@@ -1519,10 +1545,14 @@ public class SetAddress extends Activity
 
 
             spinner_distModel.setSelection(distKindCurrent);
             spinner_distModel.setSelection(distKindCurrent);
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch(Exception e)
         catch(Exception e)
         {
         {
             Log.e(TAG, "[initDistributionModel] - Exception !!!");
             Log.e(TAG, "[initDistributionModel] - Exception !!!");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1637,10 +1667,14 @@ public class SetAddress extends Activity
 
 
             spinner_gatewayModel.setSelection(gatewayKindCurrent);
             spinner_gatewayModel.setSelection(gatewayKindCurrent);
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch(Exception e)
         catch(Exception e)
         {
         {
             Log.e(TAG, "[initGatewayModel] - Exception !!!");
             Log.e(TAG, "[initGatewayModel] - Exception !!!");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1788,29 +1822,96 @@ public class SetAddress extends Activity
         switchButton_DanjiRentHouse.switchEnabled(initValue);
         switchButton_DanjiRentHouse.switchEnabled(initValue);
     }
     }
 
 
+    Spinner spinner_escapeLadderSend = null;
+    boolean firstEscapeLadderDialog = false;
+    int firstEscapeLadderSelection = 0;
+    private void initEscapeLadderDownSend() {
+        try
+        {
+            int type = DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_SEND;
 
 
-    SwitchButton switchButton_EscapeLadDownRecv = null;
-    private void initEscapeLadderDownRecv() {
-        int type = DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_RECV;
-        String typeName = this.getString(R.string.detail_function_escapeladder_down_recv);
+            final String typeName = this.getString(R.string.detail_function_escapeladder_down_send);
+            int escapeLadderCurrent = 0;
 
 
-        switchButton_EscapeLadDownRecv = (SwitchButton)this.findViewById(R.id.btn_switch_escapeladder_down_recv);
-        if(switchButton_EscapeLadDownRecv == null)
-        {
-            return;
-        }
-        switchButton_EscapeLadDownRecv.setSwitchButtonChangedListener(this, type, typeName);
+            final List<String> itemList = new ArrayList<String>();
+            itemList.add(this.getString(R.string.do_not_used));
+            itemList.add(this.getString(R.string.detail_function_escapeladder_down_send_upper));
+            itemList.add(this.getString(R.string.detail_function_escapeladder_down_send_below));
 
 
+            ArrayAdapter<String> spinnerAdapter;
+            spinnerAdapter = new ArrayAdapter<String>(this.getApplicationContext(), R.layout.spinner_item, itemList);
 
 
-        List<String> listString = new ArrayList<String>();
-        listString.add(this.getString(R.string.set));
-        listString.add(this.getString(R.string.clear));
+            spinner_escapeLadderSend = (Spinner)this.findViewById(R.id.spinner_escapeladdersend_kind);
+            if(spinner_escapeLadderSend == null)
+            {
+                return;
+            }
+            spinner_escapeLadderSend.setAdapter(spinnerAdapter);
+            spinner_escapeLadderSend.setPrompt("피난사다리 전송 방향 선택");
+            spinner_escapeLadderSend.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+                @Override
+                public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                    String nowStr= itemList.get(position);
+
+                    if(firstEscapeLadderDialog)
+                    {
+                        if(firstEscapeLadderSelection != position)
+                        {
+                            DistributionSpinnerChangedDialog(spinner_escapeLadderSend, DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_SEND, position,
+                                    itemList.get(position), typeName);
+                        }
+                    }
+                    firstEscapeLadderDialog = true;
+                }
+
+                @Override
+                public void onNothingSelected(AdapterView<?> parent) {
+
+                }
+            });
 
 
-        switchButton_EscapeLadDownRecv.setText(listString);
+            escapeLadderCurrent = Const.CONTROLLER_SETTING_DO_USED_INDEX;
 
 
-        boolean initValue = mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV);
+            List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND);
+            if ((InfoList != null) && (InfoList.size() > 5)) {
+                if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
+                    String strType = InfoList.get(5);
+
+                    if (Const.CONTROLLER_SETTING_DO_NOT_USED.equals(strType)) {
+                        escapeLadderCurrent = 0;
+                    }
+                    else if (Const.ESCAPE_LADDER_DOWN_SEND_UPPER.equals(strType)) {
+                        escapeLadderCurrent = 1;
+                    }
+                    else if (Const.ESCAPE_LADDER_DOWN_SEND_BELOW.equals(strType)) {
+                        escapeLadderCurrent = 2;
+                    }
+                }
+                else if(Const.CONTROLLER_SETTING_DO_NOT_USED.equals(InfoList.get(3)))
+                {
+                    String strType = InfoList.get(5);
+
+                    if (Const.CONTROLLER_SETTING_DO_NOT_USED.equals(strType)) {
+                        escapeLadderCurrent = 0;
+                    }
+                }
 
 
-        switchButton_EscapeLadDownRecv.switchEnabled(initValue);
+                firstEscapeLadderSelection = escapeLadderCurrent;
+                Log.d(TAG, "[initEscapeLadderDownSend] firstEscapeLadderSelection [" + firstEscapeLadderSelection + "]");
+            }
+
+            Log.d(TAG, "[initEscapeLadderDownSend] escapeLadderCurrent [" + escapeLadderCurrent + "]");
+            spinner_escapeLadderSend.setSelection(escapeLadderCurrent);
+        }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch(Exception e)
+        {
+            Log.e(TAG, "[initEscapeLadderDownSend] - Exception !!!");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
     }
     }
 
 
     SwitchButton switchButton_SubwpdUse = null;
     SwitchButton switchButton_SubwpdUse = null;
@@ -2255,9 +2356,61 @@ public class SetAddress extends Activity
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_DANJI_RENT_HOME_USE, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_DANJI_RENT_HOME_USE, position);
                 break;
                 break;
 
 
-            case DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_RECV:
-                mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV, position);
-                break;
+            case DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_SEND:
+            {
+                final String escapeLadderSend = mMainDatabaseManager.getSubDevID(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND);
+                if (escapeLadderSend != null) {
+                    value = escapeLadderSend;
+                    if (position == 0) {
+                        value += "("
+                                + Const.CONTROLLER_SETTING_DO_NOT_USED
+                                + ")"
+                                + Const.CONTROLLER_SETTING_TYPE
+                                + "("
+                                + Const.CONTROLLER_SETTING_DO_NOT_USED
+                                + ")"
+                        ;
+                    }
+                    else {
+                        String typeName = null;
+
+                        if (itemName.equals(Const.ESCAPE_LADDER_DOWN_SEND_UPPER))
+                            typeName = Const.ESCAPE_LADDER_DOWN_SEND_UPPER;
+                        else if (itemName.equals(Const.ESCAPE_LADDER_DOWN_SEND_BELOW))
+                            typeName = Const.ESCAPE_LADDER_DOWN_SEND_BELOW;
+
+                        value += "("
+                                + Const.CONTROLLER_SETTING_DO_USED
+                                + ")"
+
+                                + Const.CONTROLLER_SETTING_TYPE
+                                + "("
+                                + typeName
+                                + ")"
+                        ;
+                    }
+
+                    List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND);
+                    if ((InfoList != null) && (InfoList.size() > 1)) {
+                        String deviceNo = InfoList.get(0);
+                        String circuitNo = InfoList.get(1);
+
+                        value = deviceNo
+                                + "("
+
+                                + circuitNo
+                                + ":"
+
+                                + value
+
+                                + ")"
+                        ;
+
+                        mMainDatabaseManager.setSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND, 0, value);
+                    }
+                }
+            }
+            break;
 
 
             case DETAIL_TYPE_USE_GATEWAY_MODEL_KIND:
             case DETAIL_TYPE_USE_GATEWAY_MODEL_KIND:
             {
             {
@@ -2393,7 +2546,7 @@ public class SetAddress extends Activity
             case DETAIL_TYPE_USE_DISTRIBUTION_KIND:
             case DETAIL_TYPE_USE_DISTRIBUTION_KIND:
             case DETAIL_TYPE_USE_GATEWAY_MODEL_KIND:
             case DETAIL_TYPE_USE_GATEWAY_MODEL_KIND:
             case DETAIL_TYPE_USE_ELECTRIC_RANGE:
             case DETAIL_TYPE_USE_ELECTRIC_RANGE:
-            case DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_RECV:
+            case DETAIL_TYPE_USE_ESCAPE_LADDER_DOWN_SEND:
             case DETAIL_TYPE_USE_SUBWPD_USE:
             case DETAIL_TYPE_USE_SUBWPD_USE:
                 updateSetUsedToSubDevice(type, position, itemName);
                 updateSetUsedToSubDevice(type, position, itemName);
                 break;
                 break;

+ 10 - 2
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminInRoomSensorSetFragment.java

@@ -33,6 +33,7 @@ import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.wallpadapi.InRoomDetectSensor_API;
 import com.artncore.wallpadapi.InRoomDetectSensor_API;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.Version;
@@ -338,9 +339,13 @@ public class AdminInRoomSensorSetFragment extends Fragment {
                             InRoomDetectSensor_CheckHandler.sendEmptyMessageDelayed(0, 1000);
                             InRoomDetectSensor_CheckHandler.sendEmptyMessageDelayed(0, 1000);
                         }
                         }
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception ex)
                     catch(Exception ex)
                     {
                     {
-                        ex.printStackTrace();
+                        //ex.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, ex);
                     }
                     }
                 }
                 }
 
 
@@ -662,10 +667,13 @@ public class AdminInRoomSensorSetFragment extends Fragment {
 
 
 
 
             ((RelativeLayout) rootView).addView(SetBtnView);
             ((RelativeLayout) rootView).addView(SetBtnView);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         }
         }
         catch (Exception exc)
         catch (Exception exc)
         {
         {
-            exc.printStackTrace();
+            //exc.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, exc);
         }
         }
 
 
 
 

+ 5 - 1
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminMenu.java

@@ -32,6 +32,7 @@ import com.artncore.managersetting.ui.fragments.AdminMenuFragment.Callbacks;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.util.ViewUtil;
 import com.artncore.managersetting.util.ViewUtil;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
+import com.util.LogUtil;
 
 
 /**
 /**
  * Helper class for providing sample content for user interfaces created by
  * Helper class for providing sample content for user interfaces created by
@@ -142,11 +143,14 @@ public class AdminMenu implements OnScrollListener {
             {
             {
                 mMenuCount--; // 재실센서 사용함 아니면 리스트에 넣지 않음.
                 mMenuCount--; // 재실센서 사용함 아니면 리스트에 넣지 않음.
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         }
         }
         catch (Exception exc)
         catch (Exception exc)
         {
         {
 
 
-            exc.printStackTrace();
+            //exc.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, exc);
         }
         }
 
 
 
 

+ 18 - 4
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminPasswordResetFragment.java

@@ -23,6 +23,7 @@ import com.artncore.wallpadapi.SdbAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 
 
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
+import com.util.LogUtil;
 
 
 import kr.co.icontrols.wallpadsupport.Version;
 import kr.co.icontrols.wallpadsupport.Version;
 
 
@@ -85,7 +86,8 @@ public class AdminPasswordResetFragment extends Fragment {
 
 
         sdbMent = (TextView)view.findViewById(R.id.sdb_password_init_ment);
         sdbMent = (TextView)view.findViewById(R.id.sdb_password_init_ment);
         if (Version.getModelType() != Version.MODEL_TYPE.IHN_D101 && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K
         if (Version.getModelType() != Version.MODEL_TYPE.IHN_D101 && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K
-                && Version.getModelType() != Version.MODEL_TYPE.IHN_D101_I && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K_I) {
+                && Version.getModelType() != Version.MODEL_TYPE.IHN_D101_I && Version.getModelType() != Version.MODEL_TYPE.IHN_D101K_I
+                && Version.getModelType() != Version.MODEL_TYPE.IHN_D101_I_OCF) {
             sdbMent.setVisibility(View.INVISIBLE);
             sdbMent.setVisibility(View.INVISIBLE);
         }
         }
     }
     }
@@ -160,7 +162,8 @@ public class AdminPasswordResetFragment extends Fragment {
 
 
                         // 분전반 에너지미터 비밀번호 초기화
                         // 분전반 에너지미터 비밀번호 초기화
                         if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
                         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(sdbMent.getCurrentTextColor() == Color.BLACK)
                             /*if(sdbMent.getCurrentTextColor() == Color.BLACK)
                             {
                             {
                                 sdbMent.setTextColor(Color.GREEN);
                                 sdbMent.setTextColor(Color.GREEN);
@@ -334,7 +337,14 @@ public class AdminPasswordResetFragment extends Fragment {
 
 
                     // 바로 에너지미터 앱 사용안함 보내면 에너지미터에서 변경안되는것 같음
                     // 바로 에너지미터 앱 사용안함 보내면 에너지미터에서 변경안되는것 같음
 					// ---> 딜레이 1.5초 추가
 					// ---> 딜레이 1.5초 추가
-					try {Thread.sleep(1500);}catch (Exception e){e.printStackTrace();}
+					try {Thread.sleep(1500);}
+                    catch (RuntimeException re) {
+                        Log.e(TAG, re.toString());
+                    }
+                    catch (Exception e){
+					    //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
+					}
 
 
                     if(mSdbApi.Set_SmartPhoneLightControl(false) >= 0)
                     if(mSdbApi.Set_SmartPhoneLightControl(false) >= 0)
                     {
                     {
@@ -345,10 +355,14 @@ public class AdminPasswordResetFragment extends Fragment {
                         Log.d(TAG, "[SdbCheckHandler] - Set_SmartPhoneLightControl : FAIL");
                         Log.d(TAG, "[SdbCheckHandler] - Set_SmartPhoneLightControl : FAIL");
                     }
                     }
                 }
                 }
+                catch (RuntimeException re) {
+                    Log.e(TAG, re.toString());
+                }
                 catch (Exception ex)
                 catch (Exception ex)
                 {
                 {
                     Log.e(TAG, "[SdbCheckHandler] - Init Password ERROR !!!");
                     Log.e(TAG, "[SdbCheckHandler] - Init Password ERROR !!!");
-                    ex.printStackTrace();
+                    //ex.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, ex);
                 }
                 }
             }
             }
         }
         }

+ 29 - 10
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminSettingFragment.java

@@ -88,16 +88,33 @@ public class AdminSettingFragment extends Fragment implements AdminSubMenu.SubMe
         String[] inputmenuItem = null;
         String[] inputmenuItem = null;
 
 
         if (Version.getGatewayUsage()) {
         if (Version.getGatewayUsage()) {
-            inputmenuItem = new String[menuItem.length-1];
-            Log.d(TAG, "[onViewCreated] inputmenuItem.length [" + inputmenuItem.length + "]");
+            if (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) {
+                inputmenuItem = new String[menuItem.length-2];
+                Log.d(TAG, "[onViewCreated] inputmenuItem.length [" + inputmenuItem.length + "]");
 
 
-            for (int i = 0; i < menuItem.length-1; i++) {
-                if ( i == (menuItem.length-2) ) {
-                    inputmenuItem[i] = menuItem[i+1]; // 현산월패드인 경우에는 서브월패드 설정 화면 안나오도록 함.
-                    break;
+                for (int i = 0; i < menuItem.length-2; i++) {
+                    if ( i == (menuItem.length-3) ) {
+                        inputmenuItem[i] = menuItem[i+2]; // IHN-1010GL 월패드인 경우에는 거실EM 설정, 서브월패드 설정 화면 안나오도록 함.
+                        break;
+                    }
+                    else {
+                        inputmenuItem[i] = menuItem[i];
+                    }
                 }
                 }
-                else {
-                    inputmenuItem[i] = menuItem[i];
+            }
+            else {
+                inputmenuItem = new String[menuItem.length-1];
+                Log.d(TAG, "[onViewCreated] inputmenuItem.length [" + inputmenuItem.length + "]");
+
+                for (int i = 0; i < menuItem.length-1; i++) {
+                    if ( i == (menuItem.length-2) ) {
+                        inputmenuItem[i] = menuItem[i+1]; // 현산월패드인 경우에는 서브월패드 설정 화면 안나오도록 함.
+                        break;
+                    }
+                    else {
+                        inputmenuItem[i] = menuItem[i];
+                    }
                 }
                 }
             }
             }
         }
         }
@@ -189,7 +206,8 @@ public class AdminSettingFragment extends Fragment implements AdminSubMenu.SubMe
             case SUB_MENU_IDX_LIVEM_CONCENT_REGI_SETTING:
             case SUB_MENU_IDX_LIVEM_CONCENT_REGI_SETTING:
             {
             {
                 if (modelType == Version.MODEL_TYPE.IHN_D101 || modelType == Version.MODEL_TYPE.IHN_D101_I
                 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 == Version.MODEL_TYPE.IHN_D101_I_OCF)
                 {
                 {
                     SettingEMLivingRegiFrag fragment = new SettingEMLivingRegiFrag();
                     SettingEMLivingRegiFrag fragment = new SettingEMLivingRegiFrag();
                     getActivity().getSupportFragmentManager().beginTransaction()
                     getActivity().getSupportFragmentManager().beginTransaction()
@@ -212,7 +230,8 @@ public class AdminSettingFragment extends Fragment implements AdminSubMenu.SubMe
             {
             {
                 if (modelType == Version.MODEL_TYPE.IHN_D101 || modelType == Version.MODEL_TYPE.IHN_D101_I
                 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 == Version.MODEL_TYPE.IHN_1010 || modelType == Version.MODEL_TYPE.IHN_1010_I)
+                        || modelType == Version.MODEL_TYPE.IHN_1010 || modelType == Version.MODEL_TYPE.IHN_1010_I
+                        || modelType == Version.MODEL_TYPE.IHN_D101_I_OCF)
                 {
                 {
                     SettingDebuggingFragment fragment = new SettingDebuggingFragment();
                     SettingDebuggingFragment fragment = new SettingDebuggingFragment();
                     getActivity().getSupportFragmentManager().beginTransaction()
                     getActivity().getSupportFragmentManager().beginTransaction()

+ 9 - 2
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminSubMenu.java

@@ -28,6 +28,7 @@ import android.widget.TextView;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.util.ViewUtil;
 import com.artncore.managersetting.util.ViewUtil;
+import com.util.LogUtil;
 
 
 /**
 /**
  * Helper class for providing sample content for user interfaces created by
  * Helper class for providing sample content for user interfaces created by
@@ -80,9 +81,12 @@ public class AdminSubMenu implements View.OnTouchListener {
             mRootView = inflater.inflate(R.layout.sub_menu, null);
             mRootView = inflater.inflate(R.layout.sub_menu, null);
 
 
             initSubMenu(arrMenu);
             initSubMenu(arrMenu);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] AdminSubMenu(Context context, String[] arrMenu, SubMenuChangedListener listener)");
             Log.e(TAG, "[Exception] AdminSubMenu(Context context, String[] arrMenu, SubMenuChangedListener listener)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -144,9 +148,12 @@ public class AdminSubMenu implements View.OnTouchListener {
                 }
                 }
                 bInit = true;
                 bInit = true;
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initSubMenu(String arrMenu[])");
             Log.e(TAG, "[Exception] initSubMenu(String arrMenu[])");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 

+ 44 - 13
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/AdminSystemResetFragment.java

@@ -34,6 +34,7 @@ import com.artncore.managersetting.util.DialogUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
 import com.artncore.commons.define;
 import com.artncore.commons.define;
+import com.util.LogUtil;
 
 
 /**
 /**
  * A fragment representing a single Item detail screen. This fragment is either
  * A fragment representing a single Item detail screen. This fragment is either
@@ -335,7 +336,14 @@ public class AdminSystemResetFragment extends Fragment {
                 wpd.SetDevStatus(WallpadStatusData.DEV_INIT, "NULL");
                 wpd.SetDevStatus(WallpadStatusData.DEV_INIT, "NULL");
                 wpd.closeDB();
                 wpd.closeDB();
 
 
-                try {Thread.sleep(1000);}catch (Exception e){e.printStackTrace();}
+                try {Thread.sleep(1000);}
+                catch (RuntimeException re) {
+                    Log.e(TAG, re.toString());
+                }
+                catch (Exception e){
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
 
 
                 if (Version.getPlatformType() == Version.PLATFORM_TYPE.A20) {
                 if (Version.getPlatformType() == Version.PLATFORM_TYPE.A20) {
                     //PowerManager pm = (PowerManager)mActivity.getSystemService(Context.POWER_SERVICE);
                     //PowerManager pm = (PowerManager)mActivity.getSystemService(Context.POWER_SERVICE);
@@ -361,9 +369,13 @@ public class AdminSystemResetFragment extends Fragment {
                 }
                 }
             }
             }
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch( Exception e )
         catch( Exception e )
         {
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -428,6 +440,8 @@ public class AdminSystemResetFragment extends Fragment {
 
 
     private boolean CreateLedTxtFile()
     private boolean CreateLedTxtFile()
     {
     {
+        FileOutputStream fos = null;
+        boolean result = false;
         String testStr = "For Led Button Reset";
         String testStr = "For Led Button Reset";
         File savefile = new File(filename);
         File savefile = new File(filename);
         if(savefile.exists())
         if(savefile.exists())
@@ -441,26 +455,43 @@ public class AdminSystemResetFragment extends Fragment {
             if(savefile.exists())
             if(savefile.exists())
             {
             {
                 if (DEBUG)  Log.d(TAG, "try file delete... ");
                 if (DEBUG)  Log.d(TAG, "try file delete... ");
-                savefile.delete();
+                FileDelete(savefile);
             }
             }
 
 
             if (DEBUG)  Log.d(TAG, "try file write... ");
             if (DEBUG)  Log.d(TAG, "try file write... ");
-            FileOutputStream fos = new FileOutputStream(savefile);
+            fos = new FileOutputStream(savefile);
             fos.write(testStr.getBytes());
             fos.write(testStr.getBytes());
-            fos.close();
+            savefile = null;
         }
         }
         catch (IOException e)
         catch (IOException e)
         {
         {
-            return false;
+            result = false;
         }
         }
-
-        if(savefile.exists())
-        {
-            return true;
+        finally {
+            try {
+                fos.close();
+            } catch (IOException e) {
+                LogUtil.errorLogInfo("", TAG, e);
+            }
+            fos = null;
+            if(savefile!=null && savefile.exists())
+            {
+                result = true;
+            }
+            else
+            {
+                result = false;
+            }
+            return result;
         }
         }
-        else
-        {
-            return false;
+
+
+    }
+
+    private synchronized void FileDelete(File file)
+    {
+        if(file!=null && file.exists()) {
+            file.delete();
         }
         }
     }
     }
 
 

+ 41 - 22
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckControllerFragment.java

@@ -46,6 +46,7 @@ import com.artncore.wallpadapi.MultiSwitchAPI;
 import com.artncore.wallpadapi.PhonNRemocon;
 import com.artncore.wallpadapi.PhonNRemocon;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadDevAPI;
 import com.artncore.wallpadapi.WallPadDevAPI;
+import com.util.LogUtil;
 
 
 /**
 /**
  * A list fragment representing a list of Items. This fragment also supports
  * A list fragment representing a list of Items. This fragment also supports
@@ -119,9 +120,13 @@ public class CheckControllerFragment extends Fragment {
             doorType = wds.Get_DoorLock_Info();
             doorType = wds.Get_DoorLock_Info();
             wds.closeDB();
             wds.closeDB();
         }
         }
+        catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
+        }
         catch (Exception e)
         catch (Exception e)
         {
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         getController();
         getController();
@@ -319,7 +324,8 @@ public class CheckControllerFragment extends Fragment {
         addControllerVO(Const.CONTROLLER_TYPE_KICHEN_TV);
         addControllerVO(Const.CONTROLLER_TYPE_KICHEN_TV);
 
 
         if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
         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 == Version.MODEL_TYPE.IHN_D101_I_OCF) {
             addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST);
             addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST);
             addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST_LIVEM);
             addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST_LIVEM);
             addControllerVO(Const.CONTROLLER_TYPE_IGW300);
             addControllerVO(Const.CONTROLLER_TYPE_IGW300);
@@ -368,6 +374,10 @@ public class CheckControllerFragment extends Fragment {
                         lightType = 4;
                         lightType = 4;
                         strType = "조명 - "+Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
                         strType = "조명 - "+Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
                     }
                     }
+                    else if (Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT_MULTISWITCH.equals(strType)) {
+                        lightType = 4;
+                        strType = "조명 - "+Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT_MULTISWITCH;
+                    }
                 }
                 }
             }
             }
 
 
@@ -1060,6 +1070,7 @@ public class CheckControllerFragment extends Fragment {
                     result = title + resultTestCommonController(type, DEFAULT_CONTROLLER_INDEX);
                     result = title + resultTestCommonController(type, DEFAULT_CONTROLLER_INDEX);
                 }
                 }
                 else if (Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY) ||
                 else if (Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY) ||
+                        Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART)
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART)
@@ -1271,6 +1282,7 @@ public class CheckControllerFragment extends Fragment {
                     testAPI = mWallPadAPI.Get_RFDoorCamController();
                     testAPI = mWallPadAPI.Get_RFDoorCamController();
                 }
                 }
                 else if (Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY) ||
                 else if (Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY) ||
+                        Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART) ||
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART)
                         Temp_TYPE_DOOR_CAMERA_CONTROL.equals(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART)
@@ -1390,34 +1402,38 @@ public class CheckControllerFragment extends Fragment {
         StringBuilder result = new StringBuilder();
         StringBuilder result = new StringBuilder();
 
 
         WallPadDevAPI testAPI = mWallPadAPI.Get_LightController();
         WallPadDevAPI testAPI = mWallPadAPI.Get_LightController();
+        if(testAPI!=null)
+        {
+            testAPI.TRInfo.GetTransactionList(idx);
 
 
-        testAPI.TRInfo.GetTransactionList(idx);
-
-        result.append("Total Success : " + testAPI.TRInfo.totalSuccess
-                + " Fail : " + testAPI.TRInfo.totalFail
-                + "Success Rate : " + testAPI.TRInfo.GetSuccessRate(true));
-        result.append("\n");
+            result.append("Total Success : " + testAPI.TRInfo.totalSuccess
+                    + " Fail : " + testAPI.TRInfo.totalFail
+                    + "Success Rate : " + testAPI.TRInfo.GetSuccessRate(true));
+            result.append("\n");
 
 
-        result.append("Recent Success : " + testAPI.TRInfo.RecentSuccess
-                + " Fail : " + testAPI.TRInfo.RecentFail
-                + "Success Rate : " + testAPI.TRInfo.GetSuccessRate(false));
-        result.append("\n");
+            result.append("Recent Success : " + testAPI.TRInfo.RecentSuccess
+                    + " Fail : " + testAPI.TRInfo.RecentFail
+                    + "Success Rate : " + testAPI.TRInfo.GetSuccessRate(false));
+            result.append("\n");
 
 
-        if (testAPI.TRInfo.recentList != null)
-        {
-            String retStr = "result:";
-            for(int i = 0; i< testAPI.TRInfo.recentList.length; i++)
+            if (testAPI.TRInfo.recentList != null)
             {
             {
-                retStr+=("["+i+":"+testAPI.TRInfo.recentList[i]+"]");
-                if (i%10 == 0)
+                String retStr = "result:";
+                for(int i = 0; i< testAPI.TRInfo.recentList.length; i++)
                 {
                 {
-                    result.append(retStr);
-                    retStr = " ";
+                    retStr+=("["+i+":"+testAPI.TRInfo.recentList[i]+"]");
+                    if (i%10 == 0)
+                    {
+                        result.append(retStr);
+                        retStr = " ";
+                    }
                 }
                 }
+                result.append(retStr);
             }
             }
-            result.append(retStr);
         }
         }
 
 
+
+
         return result.toString();
         return result.toString();
     }
     }
 
 
@@ -1613,8 +1629,11 @@ public class CheckControllerFragment extends Fragment {
 
 
                                     if(runner != null)
                                     if(runner != null)
                                         mActivity.runOnUiThread(runner);
                                         mActivity.runOnUiThread(runner);
+                                } catch (RuntimeException re) {
+                                    LogUtil.errorLogInfo("", TAG, re);
                                 } catch(Exception e){
                                 } catch(Exception e){
-                                    e.printStackTrace();
+                                    //e.printStackTrace();
+                                    LogUtil.errorLogInfo("",TAG, e);
                                 }
                                 }
                             }
                             }
                         }
                         }

+ 42 - 12
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckEtcFragment.java

@@ -48,6 +48,7 @@ import com.artncore.managersetting.ui.activities.MainActivity;
 import com.artncore.managersetting.util.StorageUtil;
 import com.artncore.managersetting.util.StorageUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 /**
 /**
  * A list fragment representing a list of Items. This fragment also supports
  * A list fragment representing a list of Items. This fragment also supports
@@ -441,17 +442,25 @@ rootView.setOnKeyListener( new OnKeyListener() {
             {
             {
                 //Log.i(TAG, "EXIST : /storage");
                 //Log.i(TAG, "EXIST : /storage");
                 File[] f1List = f1.listFiles();
                 File[] f1List = f1.listFiles();
-                for(int i = 0; i < f1List.length; i++)
+                if(f1List!=null)
                 {
                 {
-                    String name = f1List[i].getName();
-                    //Log.i(TAG, "f1List["+i+"] = " + name);
-
-                    if(name.contains("udiskh"))
+                    for(int i = 0; i < f1List.length; i++)
                     {
                     {
-                        Uname = name;
-                        //Log.i(TAG, "Uname = " + Uname);
+                        if(f1List[i]!=null)
+                        {
+                            String name = f1List[i].getName();
+                            //Log.i(TAG, "f1List["+i+"] = " + name);
+
+                            if(name.contains("udiskh"))
+                            {
+                                Uname = name;
+                                //Log.i(TAG, "Uname = " + Uname);
+                            }
+                        }
+
                     }
                     }
                 }
                 }
+
             }
             }
             String UsbDir = "/storage/" + Uname;
             String UsbDir = "/storage/" + Uname;
             Log.d(TAG, "UsbDir = " + UsbDir);
             Log.d(TAG, "UsbDir = " + UsbDir);
@@ -459,8 +468,11 @@ rootView.setOnKeyListener( new OnKeyListener() {
             dirUsb = new File(UsbDir);
             dirUsb = new File(UsbDir);
 
 
             printfiles(dirUsb);
             printfiles(dirUsb);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch(Exception e) {
         } catch(Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         if (filesList.size() != 0)
         if (filesList.size() != 0)
@@ -554,10 +566,12 @@ rootView.setOnKeyListener( new OnKeyListener() {
 
 
             try {
             try {
                 File writeFile = new File(writeFilePath);
                 File writeFile = new File(writeFilePath);
-                if (writeFile.exists())
-                    writeFile.delete();
-
+                if (writeFile.exists()) {
+                    FileDelete(writeFile);
+                }
                 result.append("\ndelete exist file : OK");
                 result.append("\ndelete exist file : OK");
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception ex) {
             } catch (Exception ex) {
                 result.append("\ndelete exist file : IOException - " + ex.toString());
                 result.append("\ndelete exist file : IOException - " + ex.toString());
             }
             }
@@ -569,6 +583,8 @@ rootView.setOnKeyListener( new OnKeyListener() {
                 bufferedReader = mActivity.getResources().openRawResource(readResID);
                 bufferedReader = mActivity.getResources().openRawResource(readResID);
 
 
                 result.append("OK");
                 result.append("OK");
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception ex) {
             } catch (Exception ex) {
                 result.append("Exception : " + ex.toString());
                 result.append("Exception : " + ex.toString());
                 //fileInputStream = null;
                 //fileInputStream = null;
@@ -703,9 +719,14 @@ rootView.setOnKeyListener( new OnKeyListener() {
         try {
         try {
             File writeFile = new File(NAND_TEST_WRITE_FILE_PATH);
             File writeFile = new File(NAND_TEST_WRITE_FILE_PATH);
             if (writeFile.exists())
             if (writeFile.exists())
-                writeFile.delete();
+            {
+                FileDelete(writeFile);
+            }
+
 
 
             result.append("OK");
             result.append("OK");
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception ex) {
         } catch (Exception ex) {
             result.append("IOException - " + ex.toString());
             result.append("IOException - " + ex.toString());
         }
         }
@@ -721,6 +742,8 @@ rootView.setOnKeyListener( new OnKeyListener() {
     private void sleepMS(int ms) {
     private void sleepMS(int ms) {
         try {
         try {
             Thread.sleep(ms);
             Thread.sleep(ms);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             String FailMSG = "Read Thread wait catch exception "+e.toString();
             String FailMSG = "Read Thread wait catch exception "+e.toString();
             if (DEBUG) Log.d(TAG, FailMSG);
             if (DEBUG) Log.d(TAG, FailMSG);
@@ -1133,4 +1156,11 @@ rootView.setOnKeyListener( new OnKeyListener() {
 
 
         return result.toString();
         return result.toString();
     }
     }
+
+    private synchronized void FileDelete(File file)
+    {
+        if(file!=null && file.exists()) {
+            file.delete();
+        }
+    }
 }
 }

+ 6 - 2
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckNetworkFragment.java

@@ -37,6 +37,7 @@ import com.artncore.managersetting.util.NetworkUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.managersetting.util.StringUtil;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.RetProci;
+import com.util.LogUtil;
 
 
 import java.io.IOException;
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetAddress;
@@ -352,7 +353,7 @@ public class CheckNetworkFragment extends Fragment {
             nDongIP = nDongIP - baseDongIP;
             nDongIP = nDongIP - baseDongIP;
             String myIP =  NetworkUtil.getMyIP(mActivity);
             String myIP =  NetworkUtil.getMyIP(mActivity);
             String[] arrString = StringUtil.split(myIP, ".");
             String[] arrString = StringUtil.split(myIP, ".");
-            if (arrString.length > 3) {
+            if (arrString!=null && arrString.length > 3) {
 
 
                 strIP = arrString[0] + "."
                 strIP = arrString[0] + "."
                         + nDongIP + "."
                         + nDongIP + "."
@@ -428,8 +429,11 @@ public class CheckNetworkFragment extends Fragment {
                     }
                     }
                 }
                 }
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
 
 
 
 

+ 54 - 26
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/CheckSensorFragment.java

@@ -43,6 +43,7 @@ import com.artncore.wallpadapi.IGW300API;
 import com.artncore.wallpadapi.SmartKeyRfDoorAPI;
 import com.artncore.wallpadapi.SmartKeyRfDoorAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
+import com.util.LogUtil;
 
 
 /**
 /**
  * A list fragment representing a list of Items. This fragment also supports
  * A list fragment representing a list of Items. This fragment also supports
@@ -135,10 +136,14 @@ public class CheckSensorFragment extends Fragment {
                 return null;
                 return null;
             }
             }
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch(Exception e)
         catch(Exception e)
         {
         {
             Log.e(TAG, "[Device_Update] - " + e.toString());
             Log.e(TAG, "[Device_Update] - " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
             return null;
         }
         }
         return iGW200dAPI.data;
         return iGW200dAPI.data;
@@ -161,10 +166,14 @@ public class CheckSensorFragment extends Fragment {
 				return null;
 				return null;
 			}
 			}
 		}
 		}
-		catch(Exception e)
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
+        catch(Exception e)
 		{
 		{
 			Log.e(TAG, "[Device_Update] - " + e.toString());
 			Log.e(TAG, "[Device_Update] - " + e.toString());
-			e.printStackTrace();
+			//e.printStackTrace();
+			LogUtil.errorLogInfo("", TAG, e);
 			return null;
 			return null;
 		}
 		}
 		return iGW300API.data;
 		return iGW300API.data;
@@ -294,9 +303,12 @@ public class CheckSensorFragment extends Fragment {
             else {
             else {
                 Log.w(TAG, "[checkGWSensor] Not supported gateway model -> " + mWallPadAPI.getGatewayType());
                 Log.w(TAG, "[checkGWSensor] Not supported gateway model -> " + mWallPadAPI.getGatewayType());
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkGWSensor()");
             Log.e(TAG, "[Exception] checkGWSensor()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -317,9 +329,12 @@ public class CheckSensorFragment extends Fragment {
                 Log.e(TAG, "[Device_BathEmerAckRelase] - iGW200dAPI.BathEmerAckRelase()  ret = " + ret + " / ErrorCode = " + iGW200dAPI.ErrorCode.ErrStr());
                 Log.e(TAG, "[Device_BathEmerAckRelase] - iGW200dAPI.BathEmerAckRelase()  ret = " + ret + " / ErrorCode = " + iGW200dAPI.ErrorCode.ErrStr());
                 return -2;
                 return -2;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch(Exception e) {
         } catch(Exception e) {
             Log.e(TAG, "[Exception] Device_BathEmerAckRelase()");
             Log.e(TAG, "[Exception] Device_BathEmerAckRelase()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
             return -102;
             return -102;
         }
         }
         return 0;
         return 0;
@@ -448,9 +463,12 @@ public class CheckSensorFragment extends Fragment {
                 }
                 }
                 registerBroadCastReceiver();
                 registerBroadCastReceiver();
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "Smart Dcam Detect Input ERROR !!!");
             Log.e(TAG, "Smart Dcam Detect Input ERROR !!!");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         bRuuning = true;
         bRuuning = true;
     }
     }
@@ -500,7 +518,8 @@ public class CheckSensorFragment extends Fragment {
         initSensorView();
         initSensorView();
 
 
         if ((Version.getModelType() == Version.MODEL_TYPE.IHN_D101) || (Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I)
         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)) {
             closeThread = new CloseThread();
             closeThread = new CloseThread();
             closeThread.setRunning(true);
             closeThread.setRunning(true);
             closeThread.start();
             closeThread.start();
@@ -684,7 +703,7 @@ public class CheckSensorFragment extends Fragment {
         if(smartKeyRfDoorAPI != null)
         if(smartKeyRfDoorAPI != null)
         {
         {
             Log.d(TAG, "[onPause] - smartKeyRfDoorAPI NULL !!!");
             Log.d(TAG, "[onPause] - smartKeyRfDoorAPI NULL !!!");
-            String ret = smartKeyRfDoorAPI.SetSensorConfig((byte) 0x05, (byte)30);
+            String ret = smartKeyRfDoorAPI.SetSensorConfig((byte) 0x05, (byte) 0x05); // 스마트현관카메라 거동수상자 시나리오수정 (민감도: 5 / 감도유지시간: 5초로 고정)
             Log.d(TAG, "[StrangerCreate] - Recover Setting(5,30) result  = " + ret);
             Log.d(TAG, "[StrangerCreate] - Recover Setting(5,30) result  = " + ret);
         }
         }
     }
     }
@@ -694,25 +713,29 @@ public class CheckSensorFragment extends Fragment {
     public void onDetach() {
     public void onDetach() {
         super.onDetach();
         super.onDetach();
 
 
-        if (mWallPadAPI.getGatewayType() == Version.GATEWAY_MODEL.IGW_200) {
-            mActivity.unregisterReceiver(IGW200InterfaceBR);
-        }
-        else if (mWallPadAPI.getGatewayType() == Version.GATEWAY_MODEL.IGW_300) {
-            mActivity.unregisterReceiver(IGW300InterfaceBR);
-            if (closeThread != null) {
-                if (closeThread.isAlive()) {
-                    closeThread.setRunning(false);
-                    closeThread.interrupt();
-                    closeThread = null;
+        if(mWallPadAPI!=null)
+        {
+            if (mWallPadAPI.getGatewayType() == Version.GATEWAY_MODEL.IGW_200) {
+                mActivity.unregisterReceiver(IGW200InterfaceBR);
+            }
+            else if (mWallPadAPI.getGatewayType() == Version.GATEWAY_MODEL.IGW_300) {
+                mActivity.unregisterReceiver(IGW300InterfaceBR);
+                if (closeThread != null) {
+                    if (closeThread.isAlive()) {
+                        closeThread.setRunning(false);
+                        closeThread.interrupt();
+                        closeThread = null;
+                    }
+                }
+                else {
+                    Log.w(TAG, "[onDetach] closeThread is null!!");
                 }
                 }
             }
             }
             else {
             else {
-                Log.w(TAG, "[onDetach] closeThread is null!!");
+                Log.w(TAG, "[onDetach] not supported gateway type -> " + mWallPadAPI.getGatewayType());
             }
             }
         }
         }
-        else {
-            Log.w(TAG, "[onDetach] not supported gateway type -> " + mWallPadAPI.getGatewayType());
-        }
+
 
 
         mWallPadAPI = null;
         mWallPadAPI = null;
         bRuuning = false;
         bRuuning = false;
@@ -727,9 +750,12 @@ public class CheckSensorFragment extends Fragment {
 			else {
 			else {
                 Log.w(TAG, "[unregisterBroadCastReceiver] smartDcamDetectReceiver is null!!");
                 Log.w(TAG, "[unregisterBroadCastReceiver] smartDcamDetectReceiver is null!!");
             }
             }
-		} catch (Exception e) {
+		} catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
+        } catch (Exception e) {
 			Log.e(TAG, "[Exception] unregisterBroadCastReceiver()");
 			Log.e(TAG, "[Exception] unregisterBroadCastReceiver()");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
 		}
 		}
     }
     }
 
 
@@ -997,7 +1023,8 @@ public class CheckSensorFragment extends Fragment {
         if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
         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_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_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 (bSensorDetecting) {
             if (bSensorDetecting) {
                 switch (type) {
                 switch (type) {
@@ -1268,7 +1295,8 @@ public class CheckSensorFragment extends Fragment {
         if (Version.getModelType() == Version.MODEL_TYPE.IHN_D101 || Version.getModelType() == Version.MODEL_TYPE.IHN_D101_I
         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_1010GL || Version.getModelType() == Version.MODEL_TYPE.IHN_1010GL_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)
         {
         {
             switch (detectingType) {
             switch (detectingType) {
                 case SENSOR_TYPE_MAGNETIC_0:
                 case SENSOR_TYPE_MAGNETIC_0:

+ 12 - 2
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/QueryVersionInfoFragment.java

@@ -39,6 +39,7 @@ import com.artncore.managersetting.util.NetworkUtil;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
 import com.artncore.wallpadapi.IGW200dAPI;
 import com.artncore.wallpadapi.IGW200dAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 /**
 /**
  * A list fragment representing a list of Items. This fragment also supports
  * A list fragment representing a list of Items. This fragment also supports
@@ -543,6 +544,7 @@ public class QueryVersionInfoFragment extends Fragment {
                 }
                 }
             }
             }
         } catch (SocketException ex) {
         } catch (SocketException ex) {
+            Log.d(TAG, "SocketException");
         }
         }
 
 
         return result.toString();
         return result.toString();
@@ -727,6 +729,8 @@ public class QueryVersionInfoFragment extends Fragment {
         String strAppVer = null;
         String strAppVer = null;
         try {
         try {
             strAppVer = mMainDatabaseManager.getSettingData(appType);
             strAppVer = mMainDatabaseManager.getSettingData(appType);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             if (DEBUG) Log.d(TAG, "Error : " + e.toString());
             if (DEBUG) Log.d(TAG, "Error : " + e.toString());
         }
         }
@@ -896,9 +900,12 @@ public class QueryVersionInfoFragment extends Fragment {
                 Log.e(TAG, "[Device_Update] - iGW200dAPI.Refresh - ret (" + ret + ")" + iGW200dAPI.ErrorCode.ErrStr());
                 Log.e(TAG, "[Device_Update] - iGW200dAPI.Refresh - ret (" + ret + ")" + iGW200dAPI.ErrorCode.ErrStr());
                 return -2;
                 return -2;
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Device_Update] - [Exception Error] iGW200dAPI.Refresh(" + real + ")");
             Log.e(TAG, "[Device_Update] - [Exception Error] iGW200dAPI.Refresh(" + real + ")");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
             return -100;
         }
         }
 
 
@@ -925,9 +932,12 @@ public class QueryVersionInfoFragment extends Fragment {
 
 
         try {
         try {
             iGW200dAPI = wpapi.Get_IGW200dController();
             iGW200dAPI = wpapi.Get_IGW200dController();
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Device_ApiLoad] - [Exception Error] wpapi.Get_IGW200dController");
             Log.e(TAG, "[Device_ApiLoad] - [Exception Error] wpapi.Get_IGW200dController");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -100;
             return -100;
         }
         }
         if (iGW200dAPI == null) {
         if (iGW200dAPI == null) {

+ 3 - 3
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SetSeverIPFragment.java

@@ -143,7 +143,7 @@ public class SetSeverIPFragment extends Fragment {
 
 
         String serverIP = NetworkUtil.getAptsServerAddr(mActivity).IP;
         String serverIP = NetworkUtil.getAptsServerAddr(mActivity).IP;
         String[] arrServerIPString = StringUtil.split(serverIP, ".");
         String[] arrServerIPString = StringUtil.split(serverIP, ".");
-        if (arrServerIPString.length > 3) {
+        if (arrServerIPString!=null && arrServerIPString.length > 3) {
             if (DEBUG)  Log.d(TAG, "server_ip : "
             if (DEBUG)  Log.d(TAG, "server_ip : "
                     + arrServerIPString[0] + "."
                     + arrServerIPString[0] + "."
                     + arrServerIPString[1] + "."
                     + arrServerIPString[1] + "."
@@ -183,7 +183,7 @@ public class SetSeverIPFragment extends Fragment {
 
 
         String managePCIP = NetworkUtil.getManagePCAddr(mActivity).IP;
         String managePCIP = NetworkUtil.getManagePCAddr(mActivity).IP;
         String[] arrString = StringUtil.split(managePCIP, ".");
         String[] arrString = StringUtil.split(managePCIP, ".");
-        if (arrString.length > 3) {
+        if (arrString!=null && arrString.length > 3) {
             if (DEBUG)  Log.d(TAG, "manage pc ip : "
             if (DEBUG)  Log.d(TAG, "manage pc ip : "
                     + arrString[0] + "."
                     + arrString[0] + "."
                     + arrString[1] + "."
                     + arrString[1] + "."
@@ -226,7 +226,7 @@ public class SetSeverIPFragment extends Fragment {
 
 
         String[] arrFTPIPString = StringUtil.split(FTPServerIP, ".");
         String[] arrFTPIPString = StringUtil.split(FTPServerIP, ".");
 /**/
 /**/
-        if (arrFTPIPString.length > 3) {
+    if (arrFTPIPString!=null && arrFTPIPString.length > 3) {
             if (DEBUG)  Log.d(TAG, "FTP server ip : "
             if (DEBUG)  Log.d(TAG, "FTP server ip : "
                     + arrFTPIPString[0] + "."
                     + arrFTPIPString[0] + "."
                     + arrFTPIPString[1] + "."
                     + arrFTPIPString[1] + "."

+ 2 - 1
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingAdditionalFunctionFragment.java

@@ -190,7 +190,8 @@ public class SettingAdditionalFunctionFragment extends Fragment
             //addControllerVO(ADDITIONAL_TYPE_HANDICAPPED); //장애인모드로써 평상시에는 사용하지 않음. 나중에 기능 추가되면 그떄 주석 해제 예정
             //addControllerVO(ADDITIONAL_TYPE_HANDICAPPED); //장애인모드로써 평상시에는 사용하지 않음. 나중에 기능 추가되면 그떄 주석 해제 예정
             addControllerVO(ADDITIONAL_TYPE_CARGUEST);
             addControllerVO(ADDITIONAL_TYPE_CARGUEST);
             if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
             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 == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 addControllerVO(ADDITIONAL_TYPE_BAND_LOCATION); // 일산3구역현장 - 밴드 위치 알림
                 addControllerVO(ADDITIONAL_TYPE_BAND_LOCATION); // 일산3구역현장 - 밴드 위치 알림
             }
             }
 
 

+ 257 - 16
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingControllerFragment.java

@@ -158,6 +158,8 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
             //addControllerVO(Const.CONTROLLER_TYPE_LIGHT_TYPE);
             //addControllerVO(Const.CONTROLLER_TYPE_LIGHT_TYPE);
             //addControllerVO(Const.CONTROLLER_TYPE_LIGHT_ROOMS);
             //addControllerVO(Const.CONTROLLER_TYPE_LIGHT_ROOMS);
 
 
+            addControllerVO(Const.CONTROLLER_TYPE_CTRL_USE);
+
             if(GetZeroEnergyHouse() == false)
             if(GetZeroEnergyHouse() == false)
             {
             {
                 getLightControllerList();
                 getLightControllerList();
@@ -212,6 +214,10 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
             addControllerVO(Const.CONTROLLER_TYPE_LOUVER);
             addControllerVO(Const.CONTROLLER_TYPE_LOUVER);
 
 
             addControllerVO(Const.CONTROLLER_TYPE_BIOMETICS);
             addControllerVO(Const.CONTROLLER_TYPE_BIOMETICS);
+
+            addControllerVO(Const.CONTROLLER_TYPE_LH_GATEWAY);
+
+            addControllerVO(Const.CONTROLLER_TYPE_KITCHEN_EM_CTRL_OPTION);
         }
         }
     }
     }
 
 
@@ -246,8 +252,7 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                     }
                     }
                     else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
                     else 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 == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
-                            || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                            || ModelType == Version.MODEL_TYPE.IHN_D101_I_OCF)
                     {
                     {
                         if (Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL.equals(strType)) {
                         if (Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL.equals(strType)) {
                             typeCurrent = 1;
                             typeCurrent = 1;
@@ -266,6 +271,18 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                             typeCurrent = 5;
                             typeCurrent = 5;
                         }*/
                         }*/
                     }
                     }
+                    else if (ModelType == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
+                            || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                        if (Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL.equals(strType)) {
+                            typeCurrent = 1;
+                        }
+                        else if (Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT.equals(strType)) {
+                            typeCurrent = 2;
+                        }
+                        else if (Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT_MULTISWITCH.equals(strType)) {
+                            typeCurrent = 3;
+                        }
+                    }
                     else {
                     else {
                         if (Const.LIGHT_CONTROLLER_TYPE_LIVING_ROOM.equals(strType)) {
                         if (Const.LIGHT_CONTROLLER_TYPE_LIVING_ROOM.equals(strType)) {
                             typeCurrent = 1;
                             typeCurrent = 1;
@@ -287,14 +304,19 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
             }
             }
             else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
             else 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 == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
-                    || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                    || ModelType == Version.MODEL_TYPE.IHN_D101_I_OCF)
             {
             {
                 itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_normal));
                 itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_normal));
                 itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_add_batchlight));
                 itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_add_batchlight));
                 //itemList.add(mActivity.getString(R.string.contoller_light_living_room));
                 //itemList.add(mActivity.getString(R.string.contoller_light_living_room));
                 //itemList.add(mActivity.getString(R.string.contoller_light_rooms));
                 //itemList.add(mActivity.getString(R.string.contoller_light_rooms));
             }
             }
+            else if (ModelType == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
+                    || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_normal));
+                itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_add_batchlight));
+                itemList.add(mActivity.getString(R.string.contoller_light_type_hdc_intlight_add_batchlight_multiswitch));
+            }
             else {
             else {
                 itemList.add(mActivity.getString(R.string.contoller_light_living_room));
                 itemList.add(mActivity.getString(R.string.contoller_light_living_room));
                 itemList.add(mActivity.getString(R.string.contoller_light_rooms));
                 itemList.add(mActivity.getString(R.string.contoller_light_rooms));
@@ -354,6 +376,8 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
 
 
                     if (DEBUG)  Log.d(TAG, "lightCurrentCount : " + lightCurrentCount);
                     if (DEBUG)  Log.d(TAG, "lightCurrentCount : " + lightCurrentCount);
 
 
+                    itemList = new ArrayList<String>();
+
                     lightTotalCount--;
                     lightTotalCount--;
                     lightCurrentCount--;
                     lightCurrentCount--;
 
 
@@ -371,6 +395,40 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                             , itemList
                             , itemList
                     );
                     );
 
 
+                    mControllerList.add(lightControllerVO);
+                }
+            }
+            else if (typeCurrent == 3) {
+                if (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) {
+                    int lightTotalCount = Const.CONTROLLER_LIGHT_MAX_COUNT-1;
+
+                    if (DEBUG)  Log.d(TAG, "lightCurrentCount : " + lightCurrentCount);
+
+                    itemList = new ArrayList<String>();
+
+                    if (Version.getGatewayUsage()) {
+                        lightTotalCount--;
+                        lightCurrentCount--;
+                    }
+                    else {
+                        itemList.add("1");
+                    }
+
+                    itemList.add("2");
+                    itemList.add("3");
+                    itemList.add("4");
+                    itemList.add("5");
+
+                    String lightControllerName = mActivity.getString(R.string.contoller_light_living_room);
+                    ControllerVO lightControllerVO
+                            = new ControllerVO(Const.CONTROLLER_TYPE_LIGHT_LIVING_ROOM
+                            , lightControllerName
+                            , lightTotalCount
+                            , lightCurrentCount
+                            , itemList
+                    );
+
                     mControllerList.add(lightControllerVO);
                     mControllerList.add(lightControllerVO);
                 }
                 }
             }
             }
@@ -586,24 +644,45 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
             case Const.CONTROLLER_TYPE_SYSTEM_AIRCON:
             case Const.CONTROLLER_TYPE_SYSTEM_AIRCON:
             {
             {
                 int systemAirconCount = Const.CONTROLLER_MAX_COUNT;
                 int systemAirconCount = Const.CONTROLLER_MAX_COUNT;
-                int systemAirconCurrent = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX; //mWallpadStatusData.GetHeatingCNT();
+                int systemAirconCurrent = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX;
 
 
                 List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SYSTEM_AIRCON);
                 List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SYSTEM_AIRCON);
-                if ((InfoList != null) && (InfoList.size() > 3)) {
+                if ((InfoList != null) && (InfoList.size() > 5)) {
                     if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
                     if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
+                        String strType = InfoList.get(5);
 
 
-                        int circuitNo = StringUtil.getInt(InfoList.get(1), false);
-                        if ((circuitNo > -1) && (circuitNo <= Const.CONTROLLER_MAX_COUNT + 1))
-                            systemAirconCurrent = circuitNo;
-
+                        if (Const.SYSTEM_AIRCON_TYPE_SAMSUNG_AIR.equals(strType)) {
+                            systemAirconCurrent = 1;
+                        }
+                        else if (Const.SYSTEM_AIRCON_TYPE_SAMSUNG_AIR_HEAT.equals(strType)) {
+                            systemAirconCurrent = 2;
+                        }
+                        else if (Const.SYSTEM_AIRCON_TYPE_LG_AIR.equals(strType)) {
+                            systemAirconCurrent = 3;
+                        }
+                        else if (Const.SYSTEM_AIRCON_TYPE_LG_AIR_HEAT.equals(strType)) {
+                            systemAirconCurrent = 4;
+                        }
+                        else if (Const.SYSTEM_AIRCON_TYPE_ETC.equals(strType)) {
+                            systemAirconCurrent = 5;
+                        }
                     }
                     }
                 }
                 }
 
 
+                List<String> itemList = new ArrayList<String>();
+                itemList.add(mActivity.getString(R.string.do_not_used));
+                itemList.add(mActivity.getString(R.string.contoller_systemaircon_samsung_air));
+                itemList.add(mActivity.getString(R.string.contoller_systemaircon_samsung_air_heat));
+                itemList.add(mActivity.getString(R.string.contoller_systemaircon_lg_air));
+                itemList.add(mActivity.getString(R.string.contoller_systemaircon_lg_air_heat));
+                itemList.add(mActivity.getString(R.string.contoller_systemaircon_etc));
+
                 String controllerName = mActivity.getString(R.string.contoller_system_aircon);
                 String controllerName = mActivity.getString(R.string.contoller_system_aircon);
                 controllerVO = new ControllerVO(type
                 controllerVO = new ControllerVO(type
                         , controllerName
                         , controllerName
                         , systemAirconCount
                         , systemAirconCount
                         , systemAirconCurrent
                         , systemAirconCurrent
+                        , itemList
                 );
                 );
             }
             }
             break;
             break;
@@ -1058,6 +1137,74 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
             }
             }
             break;
             break;
 
 
+            case Const.CONTROLLER_TYPE_LH_GATEWAY:
+            {
+                int Count = Const.CONTROLLER_ONOFF_COUNT;
+                int Current = Const.CONTROLLER_SETTING_DO_USED_INDEX;
+                if (mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_LH_GATEWAY) == false)
+                    Current = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX;
+
+                String controllerName = mActivity.getString(R.string.contoller_lh_gateway);
+                controllerVO = new ControllerVO(type
+                        , controllerName
+                        , Count
+                        , Current
+                        , null
+                );
+            }
+            break;
+
+            case Const.CONTROLLER_TYPE_CTRL_USE:
+            {
+                int Count = Const.CONTROLLER_ONOFF_COUNT;
+                int Current = Const.CONTROLLER_SETTING_DO_USED_INDEX;
+                if (mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_MAIN_GUI_CTRL_USE) == false)
+                    Current = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX;
+
+                String controllerName = mActivity.getString(R.string.contoller_main_gui_ctrl_use);
+                controllerVO = new ControllerVO(type
+                        , controllerName
+                        , Count
+                        , Current
+                        , null
+                );
+            }
+            break;
+
+            case Const.CONTROLLER_TYPE_KITCHEN_EM_CTRL_OPTION:
+            {
+                int ctrlOptKindCount = Const.CONTROLLER_ONOFF_COUNT;
+                int ctrlOptKindCurrent = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX;
+
+                List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION);
+                if ((InfoList != null) && (InfoList.size() > 5)) {
+                    if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
+                        String strType = InfoList.get(5);
+                        if (Const.CONTROLLER_KITCHEN_EM_CTRL_OPTION_BATCH.equals(strType)) {
+                            ctrlOptKindCurrent = 0;
+                        }
+                        else if (Const.CONTROLLER_KITCHEN_EM_CTRL_OPTION_IN_ORDER.equals(strType)) {
+                            ctrlOptKindCurrent = 1;
+                        }
+                    }
+                }
+                Log.d(TAG, "[addControllerVO] ctrlOptKindCurrent [" + ctrlOptKindCurrent + "]");
+
+                List<String> itemList = new ArrayList<String>();
+                itemList.add(mActivity.getString(R.string.contoller_kitchen_em_ctrl_option_batch));
+                itemList.add(mActivity.getString(R.string.contoller_kitchen_em_ctrl_option_in_order));
+                itemList.add(mActivity.getString(R.string.contoller_kitchen_em_ctrl_option_in_order_and_reset));
+
+                String controllerName = mActivity.getString(R.string.contoller_kitchen_em_option);
+                controllerVO = new ControllerVO(Const.CONTROLLER_TYPE_KITCHEN_EM_CTRL_OPTION
+                        , controllerName
+                        , ctrlOptKindCount
+                        , ctrlOptKindCurrent
+                        , itemList
+                );
+
+            }
+            break;
         }
         }
 
 
         if (controllerVO != null)
         if (controllerVO != null)
@@ -1094,16 +1241,15 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                     else {
                     else {
                         String typeName = null;
                         String typeName = null;
 
 
-                        if (ModelType == Version.MODEL_TYPE.IHN_1020GL
-                                || ModelType == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
-                                || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                        if (ModelType == Version.MODEL_TYPE.IHN_1020GL)
                         {
                         {
                             if (itemName.equals("현산향일체형조명기본형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL;
                             if (itemName.equals("현산향일체형조명기본형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL;
                             else if (itemName.equals("현산향일체형조명일괄소등병합형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
                             else if (itemName.equals("현산향일체형조명일괄소등병합형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
                             else if (itemName.equals("스마트분전반조명")) typeName = Const.LIGHT_CONTROLLER_TYPE_SMART_DISTRIBUTION;
                             else if (itemName.equals("스마트분전반조명")) typeName = Const.LIGHT_CONTROLLER_TYPE_SMART_DISTRIBUTION;
                         }
                         }
                         else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
                         else 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 == Version.MODEL_TYPE.IHN_D101_I_OCF)
                         {
                         {
                             if (itemName.equals("현산향일체형조명기본형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL;
                             if (itemName.equals("현산향일체형조명기본형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL;
                             else if (itemName.equals("현산향일체형조명일괄소등병합형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
                             else if (itemName.equals("현산향일체형조명일괄소등병합형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
@@ -1111,6 +1257,13 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                             else if (itemName.equals("조명(거실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_LIVING_ROOM;
                             else if (itemName.equals("조명(거실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_LIVING_ROOM;
                             else if (itemName.equals("조명(각실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_ROOMS;
                             else if (itemName.equals("조명(각실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_ROOMS;
                         }
                         }
+                        else if (ModelType == Version.MODEL_TYPE.IHN_1010GL || ModelType == Version.MODEL_TYPE.IHN_1010GL_I
+                                || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || ModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT)
+                        {
+                            if (itemName.equals("현산향일체형조명기본형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_NORMAL;
+                            else if (itemName.equals("현산향일체형조명일괄소등병합형")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT;
+                            else if (itemName.equals("현산향일체형조명일괄소등병합형_멀티스위치")) typeName = Const.LIGHT_CONTROLLER_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT_MULTISWITCH;
+                        }
                         else {
                         else {
                             if (itemName.equals("조명(거실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_LIVING_ROOM;
                             if (itemName.equals("조명(거실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_LIVING_ROOM;
                             else if (itemName.equals("조명(각실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_ROOMS;
                             else if (itemName.equals("조명(각실)")) typeName = Const.LIGHT_CONTROLLER_TYPE_ROOMS;
@@ -1364,6 +1517,18 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                 mMainDatabaseManager.updateSetUsedToSubDeviceOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_WIRELESS_DOORLOCK_OPENDELAY, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_WIRELESS_DOORLOCK_OPENDELAY, position);
             }
             }
             break;
             break;
+
+            case Const.CONTROLLER_TYPE_LH_GATEWAY:
+            {
+                mMainDatabaseManager.updateSetUsedToSubDeviceOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_LH_GATEWAY, position);
+            }
+            break;
+
+            case Const.CONTROLLER_TYPE_CTRL_USE:
+            {
+                mMainDatabaseManager.updateSetUsedToSubDeviceOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_MAIN_GUI_CTRL_USE, position);
+            }
+            break;
 /*
 /*
             case Const.CONTROLLER_TYPE_DOOR_LOCK_WIRED:
             case Const.CONTROLLER_TYPE_DOOR_LOCK_WIRED:
                 // TO DO
                 // TO DO
@@ -1495,12 +1660,36 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                         value += "("
                         value += "("
                                 + Const.CONTROLLER_SETTING_DO_NOT_USED
                                 + Const.CONTROLLER_SETTING_DO_NOT_USED
                                 + ")"
                                 + ")"
+                                + Const.CONTROLLER_SETTING_TYPE
+                                + "("
+                                + Const.CONTROLLER_SETTING_DO_NOT_USED
+                                + ")"
                         ;
                         ;
                     }
                     }
                     else {
                     else {
+                        String typeName = null;
+
+                        if (itemName.equals(Const.CONTROLLER_SETTING_DO_NOT_USED))
+                            typeName = Const.CONTROLLER_SETTING_DO_NOT_USED;
+                        else if (itemName.equals(Const.SYSTEM_AIRCON_TYPE_SAMSUNG_AIR))
+                            typeName = Const.SYSTEM_AIRCON_TYPE_SAMSUNG_AIR;
+                        else if (itemName.equals(Const.SYSTEM_AIRCON_TYPE_SAMSUNG_AIR_HEAT))
+                            typeName = Const.SYSTEM_AIRCON_TYPE_SAMSUNG_AIR_HEAT;
+                        else if (itemName.equals(Const.SYSTEM_AIRCON_TYPE_LG_AIR))
+                            typeName = Const.SYSTEM_AIRCON_TYPE_LG_AIR;
+                        else if (itemName.equals(Const.SYSTEM_AIRCON_TYPE_LG_AIR_HEAT))
+                            typeName = Const.SYSTEM_AIRCON_TYPE_LG_AIR_HEAT;
+                        else if (itemName.equals(Const.SYSTEM_AIRCON_TYPE_ETC))
+                            typeName = Const.SYSTEM_AIRCON_TYPE_ETC;
+
                         value += "("
                         value += "("
                                 + Const.CONTROLLER_SETTING_DO_USED
                                 + Const.CONTROLLER_SETTING_DO_USED
                                 + ")"
                                 + ")"
+
+                                + Const.CONTROLLER_SETTING_TYPE
+                                + "("
+                                + typeName
+                                + ")"
                         ;
                         ;
                     }
                     }
 
 
@@ -1509,8 +1698,6 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                     if ((InfoList != null) && (InfoList.size() > 1)) {
                     if ((InfoList != null) && (InfoList.size() > 1)) {
                         String deviceNo = InfoList.get(0);
                         String deviceNo = InfoList.get(0);
                         String circuitNo = InfoList.get(1);
                         String circuitNo = InfoList.get(1);
-                        if (position > 0)
-                            circuitNo = "" + position;
 
 
                         value = deviceNo
                         value = deviceNo
                                 + "("
                                 + "("
@@ -1783,6 +1970,48 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
             }
             }
             break;
             break;
 
 
+            case Const.CONTROLLER_TYPE_KITCHEN_EM_CTRL_OPTION:
+            {
+                final String controllerName = mMainDatabaseManager.getSubDevID(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION);
+                if (controllerName != null) {
+                    value = controllerName;
+                    String typeName = null;
+                    if (itemName.equals(Const.CONTROLLER_KITCHEN_EM_CTRL_OPTION_BATCH))
+                        typeName = Const.CONTROLLER_KITCHEN_EM_CTRL_OPTION_BATCH;
+                    else if (itemName.equals(Const.CONTROLLER_KITCHEN_EM_CTRL_OPTION_IN_ORDER))
+                        typeName = Const.CONTROLLER_KITCHEN_EM_CTRL_OPTION_IN_ORDER;
+
+                    value += "("
+                            + Const.CONTROLLER_SETTING_DO_USED
+                            + ")"
+                            + Const.CONTROLLER_SETTING_TYPE
+                            + "("
+                            + typeName
+                            + ")"
+                    ;
+
+                    List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION);
+                    if ((InfoList != null) && (InfoList.size() > 1)) {
+                        String deviceNo = InfoList.get(0);
+                        String circuitNo = InfoList.get(1);
+
+                        value = deviceNo
+                                + "("
+
+                                + circuitNo
+                                + ":"
+
+                                + value
+
+                                + ")"
+                        ;
+
+                        mMainDatabaseManager.setSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_KITCHEN_EM_CTRL_OPTION, 0, value);
+                    }
+                }
+            }
+            break;
+
             case Const.CONTROLLER_TYPE_PURITY:
             case Const.CONTROLLER_TYPE_PURITY:
             {
             {
                 mMainDatabaseManager.updateSetUsedToSubDeviceOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_PURITY, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_PURITY, position);
@@ -1959,6 +2188,18 @@ public class SettingControllerFragment extends Fragment implements ControllerLis
                 updateSetUsedToSubDevice(type, position, itemName);
                 updateSetUsedToSubDevice(type, position, itemName);
                 break;
                 break;
 
 
+            case Const.CONTROLLER_TYPE_LH_GATEWAY:
+                updateSetUsedToSubDevice(type, position, itemName);
+                break;
+
+            case Const.CONTROLLER_TYPE_CTRL_USE:
+                updateSetUsedToSubDevice(type, position, itemName);
+                break;
+
+            case Const.CONTROLLER_TYPE_KITCHEN_EM_CTRL_OPTION:
+                updateSetUsedToSubDevice(type, position, itemName);
+                break;
+
             default:
             default:
                 break;
                 break;
         }
         }

+ 237 - 49
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingDebuggingFragment.java

@@ -61,6 +61,7 @@ import com.artncore.wallpadapi.VentiAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadDevAPI;
 import com.artncore.wallpadapi.WallPadDevAPI;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
+import com.util.LogUtil;
 
 
 /**
 /**
  * A list fragment representing a list of Items. This fragment also supports
  * A list fragment representing a list of Items. This fragment also supports
@@ -273,7 +274,8 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
             addControllerVO(Const.CONTROLLER_TYPE_CALLAPP_TIMEOUT_ONOFF);
             addControllerVO(Const.CONTROLLER_TYPE_CALLAPP_TIMEOUT_ONOFF);
 
 
             if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
             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 == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST);
                 addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST);
                 addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST_LIVEM);
                 addControllerVO(Const.CONTROLLER_TYPE_SMART_DIST_LIVEM);
             }
             }
@@ -300,10 +302,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         GasAPI gasApi = mWallPadAPI.Get_GasController();          // 가스제어기 API
                         GasAPI gasApi = mWallPadAPI.Get_GasController();          // 가스제어기 API
                         deviceAPI = gasApi;
                         deviceAPI = gasApi;
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                         return;
                         return;
                     }
                     }
 
 
@@ -356,10 +362,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             tempHeatingKind = "V2";
                             tempHeatingKind = "V2";
                         }
                         }
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                         return;
                         return;
                     }
                     }
                     if(deviceAPI == null){return;}
                     if(deviceAPI == null){return;}
@@ -408,10 +418,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             VentiAPI ventiAPI = mWallPadAPI.Get_VentiController();
                             VentiAPI ventiAPI = mWallPadAPI.Get_VentiController();
                             deviceAPI = ventiAPI;
                             deviceAPI = ventiAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                             return;
                             return;
                         }
                         }
                         if(deviceAPI == null){return;}
                         if(deviceAPI == null){return;}
@@ -458,10 +472,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             DLockAPI dLockAPI = mWallPadAPI.Get_DLockController();
                             DLockAPI dLockAPI = mWallPadAPI.Get_DLockController();
                             deviceAPI = dLockAPI;
                             deviceAPI = dLockAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                             return;
                             return;
                         }
                         }
                         if(deviceAPI == null){return;}
                         if(deviceAPI == null){return;}
@@ -500,10 +518,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         RealTimeMeterAPI realTimeMeterAPI = mWallPadAPI.Get_RealTimeMeterController();
                         RealTimeMeterAPI realTimeMeterAPI = mWallPadAPI.Get_RealTimeMeterController();
                         deviceAPI = realTimeMeterAPI;
                         deviceAPI = realTimeMeterAPI;
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                         return;
                         return;
                     }
                     }
                     if(deviceAPI == null){return;}
                     if(deviceAPI == null){return;}
@@ -549,10 +571,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = smartSwitchPolAPI;
                                 deviceAPI = smartSwitchPolAPI;
                                 AllLightSwitchType = 1;
                                 AllLightSwitchType = 1;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -564,10 +590,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = allLightAPI;
                                 deviceAPI = allLightAPI;
                                 AllLightSwitchType = 2;
                                 AllLightSwitchType = 2;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -579,10 +609,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = smartSwitchEvtAPI;
                                 deviceAPI = smartSwitchEvtAPI;
                                 AllLightSwitchType = 4;
                                 AllLightSwitchType = 4;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -594,10 +628,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = smartSwitchPolAPI;
                                 deviceAPI = smartSwitchPolAPI;
                                 AllLightSwitchType = 1;
                                 AllLightSwitchType = 1;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -661,10 +699,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = lightAPI;
                                 deviceAPI = lightAPI;
                                 LightSwitchType = 1;
                                 LightSwitchType = 1;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("",TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -676,10 +718,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = multiSwitchAPI;
                                 deviceAPI = multiSwitchAPI;
                                 LightSwitchType = 2;
                                 LightSwitchType = 2;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -692,10 +738,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 LightSwitchType = 3;
                                 LightSwitchType = 3;
                                 addControllerVO(Const.CONTROLLER_TYPE_HDC_ALLLIGHT);
                                 addControllerVO(Const.CONTROLLER_TYPE_HDC_ALLLIGHT);
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -707,10 +757,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = intLightAPI;
                                 deviceAPI = intLightAPI;
                                 LightSwitchType = 3;
                                 LightSwitchType = 3;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -764,14 +818,18 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = rfDoorCamAPI;
                                 deviceAPI = rfDoorCamAPI;
                                 DoorCamType = 1;
                                 DoorCamType = 1;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
-                        else if (strType.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY) || strType.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART) ||
+                        else if (strType.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY) || strType.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL) || strType.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART) ||
                                  strType.equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART) || strType.equals(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART)
                                  strType.equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART) || strType.equals(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART)
                                 )
                                 )
                         {
                         {
@@ -781,10 +839,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                                 deviceAPI = smartKeyRfDoorAPI;
                                 deviceAPI = smartKeyRfDoorAPI;
                                 DoorCamType = 2;
                                 DoorCamType = 2;
                             }
                             }
+                            catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                            }
                             catch(Exception e)
                             catch(Exception e)
                             {
                             {
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                                 Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("",TAG, e);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -856,10 +918,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     IGW200dAPI iGW200dAPI = mWallPadAPI.Get_IGW200dController();
                     IGW200dAPI iGW200dAPI = mWallPadAPI.Get_IGW200dController();
                     deviceAPI = iGW200dAPI;
                     deviceAPI = iGW200dAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                     return;
                     return;
                 }
                 }
 
 
@@ -897,10 +963,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     AllLightHDCAPI allLightHDCAPI = mWallPadAPI.Get_AllLightHDCController();
                     AllLightHDCAPI allLightHDCAPI = mWallPadAPI.Get_AllLightHDCController();
                     deviceAPI = allLightHDCAPI;
                     deviceAPI = allLightHDCAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return;
                     return;
                 }
                 }
 
 
@@ -938,10 +1008,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         EnergyMeterAPI energyMeterAPI = mWallPadAPI.Get_EnergyMeterController();
                         EnergyMeterAPI energyMeterAPI = mWallPadAPI.Get_EnergyMeterController();
                         deviceAPI = energyMeterAPI;
                         deviceAPI = energyMeterAPI;
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                         return;
                         return;
                     }
                     }
                     if(deviceAPI == null){return;}
                     if(deviceAPI == null){return;}
@@ -980,10 +1054,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         CutOffConcentAPI cutOffConcentAPI = mWallPadAPI.Get_CutOffConcentController();
                         CutOffConcentAPI cutOffConcentAPI = mWallPadAPI.Get_CutOffConcentController();
                         deviceAPI = cutOffConcentAPI;
                         deviceAPI = cutOffConcentAPI;
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                         return;
                         return;
                     }
                     }
                     if(deviceAPI == null){return;}
                     if(deviceAPI == null){return;}
@@ -1022,10 +1100,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         EnergyModuleAPI energyModuleAPI = mWallPadAPI.Get_EnergyModuleController();
                         EnergyModuleAPI energyModuleAPI = mWallPadAPI.Get_EnergyModuleController();
                         deviceAPI = energyModuleAPI;
                         deviceAPI = energyModuleAPI;
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                         Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                         return;
                         return;
                     }
                     }
                     if(deviceAPI == null){return;}
                     if(deviceAPI == null){return;}
@@ -1111,10 +1193,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     SdbAPI sdbAPI = mWallPadAPI.Get_SdbController();
                     SdbAPI sdbAPI = mWallPadAPI.Get_SdbController();
                     deviceAPI = sdbAPI;
                     deviceAPI = sdbAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                     return;
                     return;
                 }
                 }
 
 
@@ -1153,10 +1239,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     Sdb_LivingRoomLightAPI sdb_livingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
                     Sdb_LivingRoomLightAPI sdb_livingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
                     deviceAPI = sdb_livingRoomLightAPI;
                     deviceAPI = sdb_livingRoomLightAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return;
                     return;
                 }
                 }
 
 
@@ -1195,10 +1285,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     ElectricRange_API electricRange_api = mWallPadAPI.Get_ElectricRange_API();
                     ElectricRange_API electricRange_api = mWallPadAPI.Get_ElectricRange_API();
                     deviceAPI = electricRange_api;
                     deviceAPI = electricRange_api;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                     return;
                     return;
                 }
                 }
 
 
@@ -1434,9 +1528,13 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         intent.setComponent(cn);
                         intent.setComponent(cn);
                         startActivity(intent);
                         startActivity(intent);
                     }
                     }
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
                     catch(Exception e)
                     catch(Exception e)
                     {
                     {
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                     }
                     }
 
 
                 }
                 }
@@ -1525,10 +1623,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     GasAPI gasApi = mWallPadAPI.Get_GasController();          // 가스제어기 API
                     GasAPI gasApi = mWallPadAPI.Get_GasController();          // 가스제어기 API
                     deviceAPI = gasApi;
                     deviceAPI = gasApi;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1541,10 +1643,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     ElectricRange_API electricRange_api = mWallPadAPI.Get_ElectricRange_API();      // 전기레인지 API
                     ElectricRange_API electricRange_api = mWallPadAPI.Get_ElectricRange_API();      // 전기레인지 API
                     deviceAPI = electricRange_api;
                     deviceAPI = electricRange_api;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1557,10 +1663,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     VentiAPI ventiAPI = mWallPadAPI.Get_VentiController();
                     VentiAPI ventiAPI = mWallPadAPI.Get_VentiController();
                     deviceAPI = ventiAPI;
                     deviceAPI = ventiAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1586,10 +1696,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                         return;
                         return;
                     }
                     }
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1602,10 +1716,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     DLockAPI dLockAPI = mWallPadAPI.Get_DLockController();
                     DLockAPI dLockAPI = mWallPadAPI.Get_DLockController();
                     deviceAPI = dLockAPI;
                     deviceAPI = dLockAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1618,10 +1736,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     RealTimeMeterAPI realTimeMeterAPI = mWallPadAPI.Get_RealTimeMeterController();
                     RealTimeMeterAPI realTimeMeterAPI = mWallPadAPI.Get_RealTimeMeterController();
                     deviceAPI = realTimeMeterAPI;
                     deviceAPI = realTimeMeterAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1638,10 +1760,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             deviceAPI = smartSwitchPolAPI;
                             deviceAPI = smartSwitchPolAPI;
                             DebugLogOutput("Get_SmartSwitchPolController");
                             DebugLogOutput("Get_SmartSwitchPolController");
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("",TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1653,10 +1779,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             deviceAPI = allLightAPI;
                             deviceAPI = allLightAPI;
                             DebugLogOutput("Get_AllLightController");
                             DebugLogOutput("Get_AllLightController");
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1672,10 +1802,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             deviceAPI = smartSwitchEvtAPI;
                             deviceAPI = smartSwitchEvtAPI;
                             DebugLogOutput("Get_SmartSwitchEvtController");
                             DebugLogOutput("Get_SmartSwitchEvtController");
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1696,10 +1830,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             LightAPI lightAPI = mWallPadAPI.Get_LightController();
                             LightAPI lightAPI = mWallPadAPI.Get_LightController();
                             deviceAPI = lightAPI;
                             deviceAPI = lightAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1710,10 +1848,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             MultiSwitchAPI multiSwitchAPI = mWallPadAPI.Get_MultiSwitchController();
                             MultiSwitchAPI multiSwitchAPI = mWallPadAPI.Get_MultiSwitchController();
                             deviceAPI = multiSwitchAPI;
                             deviceAPI = multiSwitchAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("",TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1724,10 +1866,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             IntLightAPI intLightAPI = mWallPadAPI.Get_IntLightController();
                             IntLightAPI intLightAPI = mWallPadAPI.Get_IntLightController();
                             deviceAPI = intLightAPI;
                             deviceAPI = intLightAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("",TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1748,10 +1894,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             RFDoorCamAPI rfDoorCamAPI = mWallPadAPI.Get_RFDoorCamController();
                             RFDoorCamAPI rfDoorCamAPI = mWallPadAPI.Get_RFDoorCamController();
                             deviceAPI = rfDoorCamAPI;
                             deviceAPI = rfDoorCamAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1762,10 +1912,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                             SmartKeyRfDoorAPI smartKeyRfDoorAPI = mWallPadAPI.Get_SmartKeyRfDoorController();
                             SmartKeyRfDoorAPI smartKeyRfDoorAPI = mWallPadAPI.Get_SmartKeyRfDoorController();
                             deviceAPI = smartKeyRfDoorAPI;
                             deviceAPI = smartKeyRfDoorAPI;
                         }
                         }
+                        catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                        }
                         catch(Exception e)
                         catch(Exception e)
                         {
                         {
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                             Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                         }
                         DeviceSetLogOnOff(deviceAPI, position);
                         DeviceSetLogOnOff(deviceAPI, position);
                         break;
                         break;
@@ -1798,10 +1952,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     IGW200dAPI iGW200dAPI = mWallPadAPI.Get_IGW200dController();
                     IGW200dAPI iGW200dAPI = mWallPadAPI.Get_IGW200dController();
                     deviceAPI = iGW200dAPI;
                     deviceAPI = iGW200dAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1814,10 +1972,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     SdbAPI sdbAPI = mWallPadAPI.Get_SdbController();
                     SdbAPI sdbAPI = mWallPadAPI.Get_SdbController();
                     deviceAPI = sdbAPI;
                     deviceAPI = sdbAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1831,10 +1993,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     Sdb_LivingRoomLightAPI sdb_livingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
                     Sdb_LivingRoomLightAPI sdb_livingRoomLightAPI = mWallPadAPI.Get_Sdb_LivingRoomLightAPI();
                     deviceAPI = sdb_livingRoomLightAPI;
                     deviceAPI = sdb_livingRoomLightAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1847,10 +2013,13 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     AllLightHDCAPI allLightHDCAPI = mWallPadAPI.Get_AllLightHDCController();
                     AllLightHDCAPI allLightHDCAPI = mWallPadAPI.Get_AllLightHDCController();
                     deviceAPI = allLightHDCAPI;
                     deviceAPI = allLightHDCAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1863,10 +2032,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     EnergyMeterAPI energyMeterAPI = mWallPadAPI.Get_EnergyMeterController();
                     EnergyMeterAPI energyMeterAPI = mWallPadAPI.Get_EnergyMeterController();
                     deviceAPI = energyMeterAPI;
                     deviceAPI = energyMeterAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("",TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1879,10 +2052,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     CutOffConcentAPI cutOffConcentAPI = mWallPadAPI.Get_CutOffConcentController();
                     CutOffConcentAPI cutOffConcentAPI = mWallPadAPI.Get_CutOffConcentController();
                     deviceAPI = cutOffConcentAPI;
                     deviceAPI = cutOffConcentAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1895,10 +2072,14 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     EnergyModuleAPI energyModuleAPI = mWallPadAPI.Get_EnergyModuleController();
                     EnergyModuleAPI energyModuleAPI = mWallPadAPI.Get_EnergyModuleController();
                     deviceAPI = energyModuleAPI;
                     deviceAPI = energyModuleAPI;
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
                     Log.e(TAG, "[Device_ApiLoad] - " + e.toString());
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
                 DeviceSetLogOnOff(deviceAPI, position);
                 DeviceSetLogOnOff(deviceAPI, position);
             }
             }
@@ -1922,9 +2103,13 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
                     }
                     }
                     devset.closeDB();
                     devset.closeDB();
                 }
                 }
+                catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                }
                 catch(Exception e)
                 catch(Exception e)
                 {
                 {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 }
             }
             }
             break;
             break;
@@ -1954,9 +2139,12 @@ public class SettingDebuggingFragment extends Fragment implements SwitchButton.S
             else {
             else {
                 Log.w(TAG, "[DeviceSetLogOnOff] position is not available!! -> position : " + position);
                 Log.w(TAG, "[DeviceSetLogOnOff] position is not available!! -> position : " + position);
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DeviceSetLogOnOff(WallPadDevAPI DeviceAPI, int position)");
             Log.e(TAG, "[Exception] DeviceSetLogOnOff(WallPadDevAPI DeviceAPI, int position)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 }
 }

+ 350 - 79
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingDetailFunctionFragment.java

@@ -57,6 +57,8 @@ import com.artncore.wallpadapi.IntLightAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.managersetting.MainApplication;
 import com.artncore.managersetting.MainApplication;
 import com.artncore.managersetting.R;
 import com.artncore.managersetting.R;
+import com.artncore.wallpadapi.WallPadDevAPI;
+import com.util.LogUtil;
 
 
 
 
 /**
 /**
@@ -131,7 +133,7 @@ public class SettingDetailFunctionFragment extends Fragment
     public final int DETAIL_TYPE_SMARTKITCHEN_USE =                             DETAIL_TYPE_BASE + 44;
     public final int DETAIL_TYPE_SMARTKITCHEN_USE =                             DETAIL_TYPE_BASE + 44;
 
 
     public final int DETAIL_TYPE_EASYMODEUX_USE =                               DETAIL_TYPE_BASE + 45;
     public final int DETAIL_TYPE_EASYMODEUX_USE =                               DETAIL_TYPE_BASE + 45;
-    public final int DETAIL_TYPE_ESCAPELADDER_DOWN_RECV =						DETAIL_TYPE_BASE + 46;
+    public final int DETAIL_TYPE_ESCAPELADDER_DOWN_SEND =						DETAIL_TYPE_BASE + 46;
 
 
     public final int DETAIL_TYPE_SEND_BATHPHONE_VOLUMESET =                     DETAIL_TYPE_BASE + 47;
     public final int DETAIL_TYPE_SEND_BATHPHONE_VOLUMESET =                     DETAIL_TYPE_BASE + 47;
     public final int DETAIL_TYPE_SEND_KITCHENTV_VOLUMESET =                     DETAIL_TYPE_BASE + 48;
     public final int DETAIL_TYPE_SEND_KITCHENTV_VOLUMESET =                     DETAIL_TYPE_BASE + 48;
@@ -143,15 +145,18 @@ public class SettingDetailFunctionFragment extends Fragment
     public final int DETAIL_TYPE_STRANGER_RECORD_USE =                          DETAIL_TYPE_BASE + 52;
     public final int DETAIL_TYPE_STRANGER_RECORD_USE =                          DETAIL_TYPE_BASE + 52;
     public final int DETAIL_TYPE_EMERGENCY_CONTACT_SWITCH_USE =                 DETAIL_TYPE_BASE + 53;
     public final int DETAIL_TYPE_EMERGENCY_CONTACT_SWITCH_USE =                 DETAIL_TYPE_BASE + 53;
     public final int DETAIL_TYPE_SENDWEATHER_REVERSE =                          DETAIL_TYPE_BASE + 54;
     public final int DETAIL_TYPE_SENDWEATHER_REVERSE =                          DETAIL_TYPE_BASE + 54;
-    public final int DETAIL_TYPE_SYSTEMAIRCON_HEAT_SUPPORT =                    DETAIL_TYPE_BASE + 55;
-    public final int DETAIL_TYPE_BATHSENSOR_USE =                               DETAIL_TYPE_BASE + 56;
+    public final int DETAIL_TYPE_BATHSENSOR_USE =                               DETAIL_TYPE_BASE + 55;
 
 
-    public final int DETAIL_TYPE_REMOTECALLSVR_WEBPORT =                          DETAIL_TYPE_BASE + 57;
-    public final int DETAIL_TYPE_LCDKEEPER_USE =                                  DETAIL_TYPE_BASE + 58;
-    public final int DETAIL_TYPE_VENTI_SERVICE_QR_USE =                           DETAIL_TYPE_BASE + 59;
-    public final int DETAIL_TYPE_THEDISABLED_HOME_SET =                           DETAIL_TYPE_BASE + 60;
-    public final int DETAIL_TYPE_CO2_REDUCTION_SET =                              DETAIL_TYPE_BASE + 61;
-    public final int DETAIL_TYPE_HEATLIGHTROOM_NAMESET =                          DETAIL_TYPE_BASE + 62;
+    public final int DETAIL_TYPE_REMOTECALLSVR_WEBPORT =                          DETAIL_TYPE_BASE + 56;
+    public final int DETAIL_TYPE_LCDKEEPER_USE =                                  DETAIL_TYPE_BASE + 57;
+    public final int DETAIL_TYPE_VENTI_SERVICE_QR_USE =                           DETAIL_TYPE_BASE + 58;
+    public final int DETAIL_TYPE_THEDISABLED_HOME_SET =                           DETAIL_TYPE_BASE + 59;
+    public final int DETAIL_TYPE_CO2_REDUCTION_SET =                              DETAIL_TYPE_BASE + 60;
+    public final int DETAIL_TYPE_HEATLIGHTROOM_NAMESET =                          DETAIL_TYPE_BASE + 61;
+
+    public final int DETAIL_TYPE_KAKAO_HOME =                                     DETAIL_TYPE_BASE + 62;
+    public final int DETAIL_TYPE_SMARTIOTCAM_FLIP =                               DETAIL_TYPE_BASE + 63;
+    public final int DETAIL_TYPE_CONSTRUCTION_SPECIAL_FUNC =                      DETAIL_TYPE_BASE + 64;
 
 
     private Activity mActivity;
     private Activity mActivity;
     private WallPadAPI mWallPadAPI;
     private WallPadAPI mWallPadAPI;
@@ -319,10 +324,14 @@ public class SettingDetailFunctionFragment extends Fragment
             iniHdcLivLight_Make_P1();
             iniHdcLivLight_Make_P1();
             iniHdcLivLight_Make_P2();
             iniHdcLivLight_Make_P2();
         }
         }
+        catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
+        }
         catch (Exception hdcLightEx)
         catch (Exception hdcLightEx)
         {
         {
             Log.e(TAG, "Add (LIGHT_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT) EXCEPTION !!!");
             Log.e(TAG, "Add (LIGHT_TYPE_HDC_INTLIGHT_ADD_BATCHLIGHT) EXCEPTION !!!");
-            hdcLightEx.printStackTrace();
+            //hdcLightEx.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, hdcLightEx);
         }
         }
 
 
         initRegistrationWirelessDoorLock();
         initRegistrationWirelessDoorLock();
@@ -392,7 +401,7 @@ public class SettingDetailFunctionFragment extends Fragment
 
 
         init_EasyModeUXUse();
         init_EasyModeUXUse();
 
 
-        initEscapeLadderDownRecv();
+        initEscapeLadderDownSend();
 
 
         initBathPhoneVolumeSetSend();
         initBathPhoneVolumeSetSend();
 
 
@@ -412,8 +421,6 @@ public class SettingDetailFunctionFragment extends Fragment
 
 
         initSendWeatherReverseUse();
         initSendWeatherReverseUse();
 
 
-        initSystemAirconHeatSupport();
-
         init_BathSensorUse();
         init_BathSensorUse();
 
 
         init_LCDKeeperUse();
         init_LCDKeeperUse();
@@ -425,25 +432,61 @@ public class SettingDetailFunctionFragment extends Fragment
         init_CO2ReductionSet();
         init_CO2ReductionSet();
 
 
         init_HeatLightRoom_NameSet();
         init_HeatLightRoom_NameSet();
+
+        //카카오홈
+        initKakaoHome();
+
+        init_SmartIOTCam_Flip();
+        
+        init_Construction_SpecialFunc();
     }
     }
 
 
-    private void initEscapeLadderDownRecv()
+    private void initEscapeLadderDownSend()
     {
     {
-        int type = DETAIL_TYPE_ESCAPELADDER_DOWN_RECV;
-        String typeName = mActivity.getString(R.string.detail_function_escapeladder_down_recv);
+        int type = DETAIL_TYPE_ESCAPELADDER_DOWN_SEND;
+        String typeName = mActivity.getString(R.string.detail_function_escapeladder_down_send);
 
 
-        SwitchButton switchButton = (SwitchButton)mRootView.findViewById(R.id.btn_switch_escapeladder_down_recv);
-        switchButton.setSwitchButtonChangedListener(this, type, typeName);
+        Spinner spinner = (Spinner)mRootView.findViewById(R.id.escapeladder_spinner);
 
 
         List<String> listString = new ArrayList<String>();
         List<String> listString = new ArrayList<String>();
-        listString.add(mActivity.getString(R.string.do_used));
-        listString.add(mActivity.getString(R.string.do_not_used));
+        listString.add("사용안함");
+        listString.add("윗집");
+        listString.add("아랫집");
 
 
-        switchButton.setText(listString);
+        ArrayAdapter arrayAdapter = new ArrayAdapter(mActivity
+                , android.R.layout.simple_spinner_item
+                , listString);
 
 
-        boolean initValue = mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV);
-        Log.d(TAG, "[SettingDetail] Init Escape Ladder Down Recv : " + initValue);
-        switchButton.switchEnabled(initValue);
+        arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        spinner.setAdapter(arrayAdapter);
+        spinner.setPrompt("select escapeladder type");
+
+        SpinnerItemSelectedListener itemSelectedListener = new SpinnerItemSelectedListener(type, typeName);
+        spinner.setOnItemSelectedListener(itemSelectedListener);
+
+        int escapeLadderInitIdx = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX;
+
+        List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND);
+        if ((InfoList != null)) {
+            Log.d(TAG, "[initEscapeLadderDownSend] InfoList.size() = " + InfoList.size())            ;
+            if (InfoList.size() > 5) {
+                if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
+
+                    int value = 0;
+                    if(InfoList.get(5).equals("윗집"))
+                    {
+                        value = 1;
+                    }
+                    else if(InfoList.get(5).equals("아랫집"))
+                    {
+                        value = 2;
+                    }
+                    escapeLadderInitIdx = value;
+                }
+            }
+        }
+
+        spinner.setSelection(escapeLadderInitIdx);
     }
     }
 
 
     private void init_LivingEm_Kitchen_Light()
     private void init_LivingEm_Kitchen_Light()
@@ -522,9 +565,13 @@ public class SettingDetailFunctionFragment extends Fragment
 						Log.i(TAG, "[mIntLightCheckHandler] - HdcLivLight_Program_Num = " + HdcLivLight_Program_Num);
 						Log.i(TAG, "[mIntLightCheckHandler] - HdcLivLight_Program_Num = " + HdcLivLight_Program_Num);
 						m_IntLightCtrl.LightProgramSave(HdcLivLight_Program_Num);
 						m_IntLightCtrl.LightProgramSave(HdcLivLight_Program_Num);
 					}
 					}
-					catch(Exception ex)
+                    catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }
+                    catch(Exception ex)
 					{
 					{
-						ex.printStackTrace();
+						//ex.printStackTrace();
+						LogUtil.errorLogInfo("", TAG, ex);
 					}
 					}
 				}
 				}
             }
             }
@@ -790,6 +837,27 @@ public class SettingDetailFunctionFragment extends Fragment
     }
     }
 
 
 
 
+    // init KakaoHome View(카카오홈)
+    private void initKakaoHome() {
+        int type = DETAIL_TYPE_KAKAO_HOME;
+        String typeName = mActivity.getString(R.string.detail_function_kakao_home_set);
+
+        SwitchButton switchButton = (SwitchButton)mRootView.findViewById(R.id.btn_switch_kakao_home_set);
+        switchButton.setSwitchButtonChangedListener(this, type, typeName);
+
+
+        List<String> listString = new ArrayList<String>();
+        listString.add(mActivity.getString(R.string.do_used));
+        listString.add(mActivity.getString(R.string.do_not_used));
+
+        switchButton.setText(listString);
+
+        WallpadDeviceSet devset = new WallpadDeviceSet(getContext());
+
+        boolean initValue = mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_KAKAO_HOME);
+        switchButton.switchEnabled(initValue);
+    }
+
     // init RFDoorCamera View
     // init RFDoorCamera View
     private void initRFDoorCamera() {
     private void initRFDoorCamera() {
         int type = DETAIL_TYPE_RF_DOOR_CAMERA;
         int type = DETAIL_TYPE_RF_DOOR_CAMERA;
@@ -818,7 +886,7 @@ public class SettingDetailFunctionFragment extends Fragment
             listString.add(Const.DOOR_CAMERA_TYPE_SMART_KEY_DOOR_CAMERA);
             listString.add(Const.DOOR_CAMERA_TYPE_SMART_KEY_DOOR_CAMERA);
             listString.add(Const.DOOR_CAMERA_TYPE_RF_DOOR_CAMERA);
             listString.add(Const.DOOR_CAMERA_TYPE_RF_DOOR_CAMERA);
             listString.add(Const.DOOR_CAMERA_TYPE_UKS);
             listString.add(Const.DOOR_CAMERA_TYPE_UKS);
-            listString.add(Const.DOOR_CAMERA_TYPE_IOT_SMART);
+            listString.add(Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL);
             listString.add(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART);
             listString.add(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART);
             listString.add(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART);
             listString.add(Const.DOOR_CAMERA_TYPE_DAEWOO_SMART);
         }
         }
@@ -872,7 +940,7 @@ public class SettingDetailFunctionFragment extends Fragment
                         else if (InfoList.get(5).equals(Const.DOOR_CAMERA_TYPE_UKS)) {
                         else if (InfoList.get(5).equals(Const.DOOR_CAMERA_TYPE_UKS)) {
                             DoorCameraInitIdx = 3;
                             DoorCameraInitIdx = 3;
                         }
                         }
-                        else if (InfoList.get(5).equals(Const.DOOR_CAMERA_TYPE_IOT_SMART)) {
+                        else if (InfoList.get(5).equals(Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL)) {
                             DoorCameraInitIdx = 4;
                             DoorCameraInitIdx = 4;
                         }
                         }
                         else if (InfoList.get(5).equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART)) {
                         else if (InfoList.get(5).equals(Const.DOOR_CAMERA_TYPE_HYOSUNG_SMART)) {
@@ -1749,8 +1817,7 @@ public class SettingDetailFunctionFragment extends Fragment
         List<String> listString = new ArrayList<String>();
         List<String> listString = new ArrayList<String>();
         listString.add("기본");
         listString.add("기본");
         listString.add("메트로");
         listString.add("메트로");
-        listString.add("효성-제어있음");
-        listString.add("효성-제어없음");
+        listString.add("효성");
         listString.add("힘찬");
         listString.add("힘찬");
 
 
         ArrayAdapter arrayAdapter = new ArrayAdapter(mActivity
         ArrayAdapter arrayAdapter = new ArrayAdapter(mActivity
@@ -1775,17 +1842,13 @@ public class SettingDetailFunctionFragment extends Fragment
                 {
                 {
                     value = 1;
                     value = 1;
                 }
                 }
-                else if(InfoList.get(5).equals("효성-제어있음"))
+                else if(InfoList.get(5).equals("효성"))
                 {
                 {
                     value = 2;
                     value = 2;
                 }
                 }
-                else if(InfoList.get(5).equals("효성-제어없음"))
-                {
-                    value = 3;
-                }
                 else if(InfoList.get(5).equals("힘찬"))
                 else if(InfoList.get(5).equals("힘찬"))
                 {
                 {
-                    value = 4;
+                    value = 3;
                 }
                 }
 
 
                 mainGuiIdx = value;
                 mainGuiIdx = value;
@@ -1987,23 +2050,6 @@ public class SettingDetailFunctionFragment extends Fragment
         switchButton.switchEnabled(initValue);
         switchButton.switchEnabled(initValue);
     }
     }
 
 
-    private void initSystemAirconHeatSupport() {
-        int type = DETAIL_TYPE_SYSTEMAIRCON_HEAT_SUPPORT;
-        String typeName = mActivity.getString(R.string.detail_function_systemaircon_heat_support);
-
-        SwitchButton switchButton = (SwitchButton)mRootView.findViewById(R.id.btn_switch_systemaircon_heat_support);
-        switchButton.setSwitchButtonChangedListener(this, type, typeName);
-
-        List<String> listString = new ArrayList<String>();
-        listString.add(mActivity.getString(R.string.do_used));
-        listString.add(mActivity.getString(R.string.do_not_used));
-
-        switchButton.setText(listString);
-
-        boolean initValue = mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SYSTEMAIRCON_HEAT_SUPPORT);
-        switchButton.switchEnabled(initValue);
-    }
-
     private void init_BathSensorUse() {
     private void init_BathSensorUse() {
         int type = DETAIL_TYPE_BATHSENSOR_USE;
         int type = DETAIL_TYPE_BATHSENSOR_USE;
         String typeName = mActivity.getString(R.string.detail_function_bathsensor_use);
         String typeName = mActivity.getString(R.string.detail_function_bathsensor_use);
@@ -2146,6 +2192,68 @@ public class SettingDetailFunctionFragment extends Fragment
         switchButton.switchEnabled(initValue);
         switchButton.switchEnabled(initValue);
     }
     }
 
 
+    private void init_SmartIOTCam_Flip() {
+        int type = DETAIL_TYPE_SMARTIOTCAM_FLIP;
+        String typeName = mActivity.getString(R.string.detail_function_smartiotcam_flip);
+
+        SwitchButton switchButton = (SwitchButton)mRootView.findViewById(R.id.btn_switch_smartiotcam_flip_set);
+        switchButton.setSwitchButtonChangedListener(this, type, typeName);
+
+        List<String> listString = new ArrayList<String>();
+        listString.add(mActivity.getString(R.string.do_used));
+        listString.add(mActivity.getString(R.string.do_not_used));
+
+        switchButton.setText(listString);
+
+        boolean initValue = mMainDatabaseManager.isUsedSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SMARTIOTCAM_FLIP);
+        switchButton.switchEnabled(initValue);
+    }
+
+    private void init_Construction_SpecialFunc() {
+        int type = DETAIL_TYPE_CONSTRUCTION_SPECIAL_FUNC;
+        String typeName = mActivity.getString(R.string.detail_function_construction_special_function);
+
+        Spinner spinner = (Spinner)mRootView.findViewById(R.id.construction_special_func_spinner);
+
+        List<String> listString = new ArrayList<String>();
+        listString.add("사용안함");
+        listString.add("SK건설");
+        listString.add("대우건설");
+
+
+        ArrayAdapter arrayAdapter = new ArrayAdapter(mActivity
+                , android.R.layout.simple_spinner_item
+                , listString);
+
+        arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        spinner.setAdapter(arrayAdapter);
+        spinner.setPrompt("select construction firm type");
+
+        SpinnerItemSelectedListener itemSelectedListener = new SpinnerItemSelectedListener(type, typeName);
+        spinner.setOnItemSelectedListener(itemSelectedListener);
+
+        int typeInitIdx = Const.CONTROLLER_SETTING_DO_NOT_USED_INDEX;
+
+        List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC);
+        if ((InfoList != null) && (InfoList.size() > 5)) {
+            int value = 0;
+            if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(3))) {
+                if(InfoList.get(5).equals("SK건설"))
+                {
+                    value = 1;
+                }
+                else if(InfoList.get(5).equals("대우건설"))
+                {
+                    value = 2;
+                }
+
+                typeInitIdx = value;
+            }
+        }
+
+        spinner.setSelection(typeInitIdx);
+    }
+
     // reload View
     // reload View
     public void reloadView(int type) {
     public void reloadView(int type) {
         if (DEBUG)  Log.d(TAG, "reloadView() type : " + type);
         if (DEBUG)  Log.d(TAG, "reloadView() type : " + type);
@@ -2211,7 +2319,7 @@ public class SettingDetailFunctionFragment extends Fragment
             case DETAIL_TYPE_SMARTPOST_USE:
             case DETAIL_TYPE_SMARTPOST_USE:
             case DETAIL_TYPE_SMARTKITCHEN_USE:
             case DETAIL_TYPE_SMARTKITCHEN_USE:
             case DETAIL_TYPE_EASYMODEUX_USE:
             case DETAIL_TYPE_EASYMODEUX_USE:
-            case DETAIL_TYPE_ESCAPELADDER_DOWN_RECV:
+            case DETAIL_TYPE_ESCAPELADDER_DOWN_SEND:
             case DETAIL_TYPE_SEND_BATHPHONE_VOLUMESET:
             case DETAIL_TYPE_SEND_BATHPHONE_VOLUMESET:
             case DETAIL_TYPE_SEND_KITCHENTV_VOLUMESET:
             case DETAIL_TYPE_SEND_KITCHENTV_VOLUMESET:
             case DETAIL_TYPE_SEND_LIVINGEM_KITCHEN_LIGHT:
             case DETAIL_TYPE_SEND_LIVINGEM_KITCHEN_LIGHT:
@@ -2220,7 +2328,6 @@ public class SettingDetailFunctionFragment extends Fragment
             case DETAIL_TYPE_STRANGER_RECORD_USE:
             case DETAIL_TYPE_STRANGER_RECORD_USE:
             case DETAIL_TYPE_EMERGENCY_CONTACT_SWITCH_USE:
             case DETAIL_TYPE_EMERGENCY_CONTACT_SWITCH_USE:
             case DETAIL_TYPE_SENDWEATHER_REVERSE:
             case DETAIL_TYPE_SENDWEATHER_REVERSE:
-            case DETAIL_TYPE_SYSTEMAIRCON_HEAT_SUPPORT:
             case DETAIL_TYPE_BATHSENSOR_USE:
             case DETAIL_TYPE_BATHSENSOR_USE:
             case DETAIL_TYPE_REMOTECALLSVR_WEBPORT:
             case DETAIL_TYPE_REMOTECALLSVR_WEBPORT:
             case DETAIL_TYPE_LCDKEEPER_USE:
             case DETAIL_TYPE_LCDKEEPER_USE:
@@ -2228,6 +2335,9 @@ public class SettingDetailFunctionFragment extends Fragment
             case DETAIL_TYPE_THEDISABLED_HOME_SET:
             case DETAIL_TYPE_THEDISABLED_HOME_SET:
             case DETAIL_TYPE_CO2_REDUCTION_SET:
             case DETAIL_TYPE_CO2_REDUCTION_SET:
             case DETAIL_TYPE_HEATLIGHTROOM_NAMESET:
             case DETAIL_TYPE_HEATLIGHTROOM_NAMESET:
+            case DETAIL_TYPE_KAKAO_HOME:
+            case DETAIL_TYPE_SMARTIOTCAM_FLIP:
+            case DETAIL_TYPE_CONSTRUCTION_SPECIAL_FUNC:
                 break;
                 break;
 
 
             default:
             default:
@@ -2350,9 +2460,12 @@ public class SettingDetailFunctionFragment extends Fragment
            IntentFilter filter = new IntentFilter();
            IntentFilter filter = new IntentFilter();
            filter.addAction(BR_EVENT_SEND_SUBDEVICE_VOLUMESET);
            filter.addAction(BR_EVENT_SEND_SUBDEVICE_VOLUMESET);
            getContext().registerReceiver(mBRReceiver, filter, null, null);
            getContext().registerReceiver(mBRReceiver, filter, null, null);
+       } catch (RuntimeException re) {
+           Log.e(TAG, re.toString());
        } catch (Exception e) {
        } catch (Exception e) {
            Log.e(TAG, "[Exception] registerBRReceiver()");
            Log.e(TAG, "[Exception] registerBRReceiver()");
-           e.printStackTrace();
+           //e.printStackTrace();
+           LogUtil.errorLogInfo("", TAG, e);
        }
        }
     }
     }
 
 
@@ -2361,9 +2474,12 @@ public class SettingDetailFunctionFragment extends Fragment
             if (mBRReceiver != null) {
             if (mBRReceiver != null) {
                 getContext().unregisterReceiver(mBRReceiver);
                 getContext().unregisterReceiver(mBRReceiver);
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unRegisterBRReceiver()");
             Log.e(TAG, "[Exception] unRegisterBRReceiver()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 
@@ -2385,9 +2501,12 @@ public class SettingDetailFunctionFragment extends Fragment
                         Toast.makeText(getContext(), strCallOwner + " 통화 음량값 전송 " + strResult + "!!", Toast.LENGTH_SHORT).show();
                         Toast.makeText(getContext(), strCallOwner + " 통화 음량값 전송 " + strResult + "!!", Toast.LENGTH_SHORT).show();
                     }
                     }
                 }
                 }
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] BRReceiver.onReceive()");
                 Log.e(TAG, "[Exception] BRReceiver.onReceive()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
     }
     }
@@ -2529,10 +2648,14 @@ public class SettingDetailFunctionFragment extends Fragment
                         mIntent.putExtra("EVENT", BR_EVENT_ModemReset);
                         mIntent.putExtra("EVENT", BR_EVENT_ModemReset);
                         mActivity.sendBroadcast(mIntent);
                         mActivity.sendBroadcast(mIntent);
                     }
                     }
+                    catch (RuntimeException re) {
+                        Log.e(TAG, re.toString());
+                    }
                     catch (Exception e)
                     catch (Exception e)
                     {
                     {
                         Log.e(TAG, "[Exception] sendPSTNModemInit()");
                         Log.e(TAG, "[Exception] sendPSTNModemInit()");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                     }
                     }
                 }
                 }
                 break;
                 break;
@@ -2547,9 +2670,12 @@ public class SettingDetailFunctionFragment extends Fragment
                         mIntent.setAction(BR_SubDeviceVolume);
                         mIntent.setAction(BR_SubDeviceVolume);
                         mIntent.putExtra("EVENT", BR_EVENT_Bathphone_VolumeSetSend);
                         mIntent.putExtra("EVENT", BR_EVENT_Bathphone_VolumeSetSend);
                         mActivity.sendBroadcast(mIntent);
                         mActivity.sendBroadcast(mIntent);
+                    } catch (RuntimeException re) {
+                        Log.e(TAG, re.toString());
                     } catch (Exception e) {
                     } catch (Exception e) {
                         Log.e(TAG, "[Exception] sendBathPhoneVolumeSet");
                         Log.e(TAG, "[Exception] sendBathPhoneVolumeSet");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                     }
                 }
                 }
                 break;
                 break;
@@ -2564,9 +2690,12 @@ public class SettingDetailFunctionFragment extends Fragment
                         mIntent.setAction(BR_SubDeviceVolume);
                         mIntent.setAction(BR_SubDeviceVolume);
                         mIntent.putExtra("EVENT", BR_EVENT_KitchenTV_VolumeSetSend);
                         mIntent.putExtra("EVENT", BR_EVENT_KitchenTV_VolumeSetSend);
                         mActivity.sendBroadcast(mIntent);
                         mActivity.sendBroadcast(mIntent);
+                    } catch (RuntimeException re) {
+                        Log.e(TAG, re.toString());
                     } catch (Exception e) {
                     } catch (Exception e) {
                         Log.e(TAG, "[Exception] sendKitchenTVVolumeSet");
                         Log.e(TAG, "[Exception] sendKitchenTVVolumeSet");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("",TAG, e);
                     }
                     }
                 }
                 }
                 break;
                 break;
@@ -2775,9 +2904,68 @@ public class SettingDetailFunctionFragment extends Fragment
             return;
             return;
 
 
         switch (type) {
         switch (type) {
-            case DETAIL_TYPE_ESCAPELADDER_DOWN_RECV:
-                mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_RECV, position);
-                break;
+            case DETAIL_TYPE_ESCAPELADDER_DOWN_SEND:
+            {
+                int i = 4;
+
+                final String controllerName = mMainDatabaseManager.getSubDevID(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND);
+                if (controllerName != null) {
+                    value = controllerName;
+
+                    value += "("
+                            + Const.CONTROLLER_SETTING_DO_USED
+                            + ")"
+                    ;
+
+                    String escapeladder = "사용안함";
+                    if(position == 1)
+                    {
+                        escapeladder = "윗집";
+                    }
+                    else if (position == 2)
+                    {
+                        escapeladder = "아랫집";
+                    }
+
+                    if (position <= 3) {
+                        value += Const.CONTROLLER_SETTING_TYPE
+                                + "("
+                                + escapeladder
+                                + ")"
+                        ;
+
+                        i += 2;
+                    }
+
+                    List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND);
+                    if ((InfoList != null) && (InfoList.size() > 1)) {
+                        String deviceNo = InfoList.get(0);
+                        String circuitNo = InfoList.get(1);
+
+                        value = deviceNo
+                                + "("
+
+                                + circuitNo
+                                + ":"
+
+                                + value
+                        ;
+
+                        for (; i + 1 <InfoList.size(); i=i+2) {
+                            value += InfoList.get(i)
+                                    + "("
+                                    + InfoList.get(i+1)
+                                    + ")";
+                        }
+
+                        value += ")";
+
+                        Log.d(TAG, "[updateSetUsedToSubDevice] escapeladder value: " + value);
+                        mMainDatabaseManager.setSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_ESCAPELADDER_DOWN_SEND, 0, value);
+                    }
+                }
+            }
+            break;
 
 
             case DETAIL_TYPE_SEND_LIVINGEM_KITCHEN_LIGHT:
             case DETAIL_TYPE_SEND_LIVINGEM_KITCHEN_LIGHT:
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_LIVINGEM_KITCHEN_LIGHT, position);
@@ -2915,6 +3103,10 @@ public class SettingDetailFunctionFragment extends Fragment
                     {
                     {
                         typeName =  Const.DOOR_CAMERA_TYPE_SMART_KEY;
                         typeName =  Const.DOOR_CAMERA_TYPE_SMART_KEY;
                     }
                     }
+                    else if(itemName.equals(Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL))
+                    {
+                        typeName = Const.DOOR_CAMERA_TYPE_SMART_KEY_EXTERNAL;
+                    }
                     else if(itemName.equals(Const.DOOR_CAMERA_TYPE_UKS))
                     else if(itemName.equals(Const.DOOR_CAMERA_TYPE_UKS))
                     {
                     {
                         typeName =  Const.DOOR_CAMERA_TYPE_UKS;
                         typeName =  Const.DOOR_CAMERA_TYPE_UKS;
@@ -2965,8 +3157,16 @@ public class SettingDetailFunctionFragment extends Fragment
                     if (Build.VERSION.SDK_INT > 23) {
                     if (Build.VERSION.SDK_INT > 23) {
                         if (typeName.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART)) {
                         if (typeName.equals(Const.DOOR_CAMERA_TYPE_IOT_SMART)) {
                             Log.i(TAG, "[updateSetUsedToSubDevice] Wallpad camera setting: AHD door cam + wallpad cam!!");
                             Log.i(TAG, "[updateSetUsedToSubDevice] Wallpad camera setting: AHD door cam + wallpad cam!!");
-                            V40IF mV40IF = new V40IF();
-                            mV40IF.setCameraConfigure(Const.WALLPAD_CAM_AHD_FRONT);
+                            WallpadDeviceSet deviceSet = new WallpadDeviceSet(getContext());
+                            if(deviceSet!=null)
+                            {
+                                boolean bFlip = deviceSet.Get_SmartIOTCamFlipUse();
+                                deviceSet.closeDB();
+                                Log.i(TAG, "[updateSetUsedToSubDevice] Wallpad camera setting: AHD door cam + wallpad cam!! bFlip [" + bFlip + "]");
+                                V40IF mV40IF = new V40IF();
+                                if (bFlip) mV40IF.setCameraConfigure(Const.WALLPAD_CAM_AHD_FRONT_FLIP);
+                                else mV40IF.setCameraConfigure(Const.WALLPAD_CAM_AHD_FRONT);
+                            }
                         }
                         }
                         else {
                         else {
                             Log.i(TAG, "[updateSetUsedToSubDevice] Wallpad camera setting: normal door cam + wallpad cam!!");
                             Log.i(TAG, "[updateSetUsedToSubDevice] Wallpad camera setting: normal door cam + wallpad cam!!");
@@ -3706,18 +3906,14 @@ public class SettingDetailFunctionFragment extends Fragment
                     }
                     }
                     else if (position == 2)
                     else if (position == 2)
                     {
                     {
-                        selectValue = Const.MAIN_GUI_TYPE_HYOSUNG_CTR_ON;
+                        selectValue = Const.MAIN_GUI_TYPE_HYOSUNG;
                     }
                     }
                     else if (position == 3)
                     else if (position == 3)
-                    {
-                        selectValue = Const.MAIN_GUI_TYPE_HYOSUNG_CTR_OFF;
-                    }
-                    else if (position == 4)
                     {
                     {
                         selectValue = Const.MAIN_GUI_TYPE_HIMCHAN;
                         selectValue = Const.MAIN_GUI_TYPE_HIMCHAN;
                     }
                     }
 
 
-                    if (position <= 4) {
+                    if (position <= 3) {
                         value += Const.CONTROLLER_SETTING_TYPE
                         value += Const.CONTROLLER_SETTING_TYPE
                                 + "("
                                 + "("
                                 + selectValue
                                 + selectValue
@@ -3892,6 +4088,71 @@ public class SettingDetailFunctionFragment extends Fragment
             }
             }
             break;
             break;
 
 
+            case DETAIL_TYPE_CONSTRUCTION_SPECIAL_FUNC:
+            {
+                int i = 4;
+
+                final String controllerName = mMainDatabaseManager.getSubDevID(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC);
+                if (controllerName != null) {
+                    value = controllerName;
+
+                    value += "("
+                            + Const.CONTROLLER_SETTING_DO_USED
+                            + ")"
+                    ;
+
+                    String firm = "사용안함";
+                    if(position == 1)
+                    {
+                        firm = "SK건설";
+                    }
+                    else if (position == 2)
+                    {
+                        firm = "대우건설";
+                    }
+
+                    if (position <= 2) {
+                        value += Const.CONTROLLER_SETTING_TYPE
+                                + "("
+                                + firm
+                                + ")"
+                        ;
+
+                        i += 2;
+
+                    }
+
+
+                    List<String> InfoList = mMainDatabaseManager.getSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC);
+                    if ((InfoList != null) && (InfoList.size() > 1)) {
+                        String deviceNo = InfoList.get(0);
+                        String circuitNo = InfoList.get(1);
+
+                        value = deviceNo
+                                + "("
+
+                                + circuitNo
+                                + ":"
+
+                                + value
+                        ;
+
+                        for (; i + 1 <InfoList.size(); i=i+2) {
+                            value += InfoList.get(i)
+                                    + "("
+                                    + InfoList.get(i+1)
+                                    + ")";
+                        }
+
+                        value += ")";
+
+                        Log.d(TAG, "[updateSetUsedToSubDevice] value: " + value);
+                        mMainDatabaseManager.setSettingDataSubDev(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_CONSTRUCTION_SPECIAL_FUNC, 0, value);
+                    }
+                }
+            }
+            break;
+
             case DETAIL_TYPE_MOBILE_APP_AUTH:
             case DETAIL_TYPE_MOBILE_APP_AUTH:
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_MOBILE_APP_USER_AUTH, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_MOBILE_APP_USER_AUTH, position);
                 break;
                 break;
@@ -3932,10 +4193,6 @@ public class SettingDetailFunctionFragment extends Fragment
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SENDWEATHER_REVERSRE, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SENDWEATHER_REVERSRE, position);
                 break;
                 break;
 
 
-            case DETAIL_TYPE_SYSTEMAIRCON_HEAT_SUPPORT:
-                mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SYSTEMAIRCON_HEAT_SUPPORT, position);
-                break;
-
             case DETAIL_TYPE_BATHSENSOR_USE:
             case DETAIL_TYPE_BATHSENSOR_USE:
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_BATHSENSOR_USE, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_BATHSENSOR_USE, position);
                 break;
                 break;
@@ -3956,11 +4213,23 @@ public class SettingDetailFunctionFragment extends Fragment
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_HEATLIGHTROOM_NAMESET, position);
                 mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_HEATLIGHTROOM_NAMESET, position);
                 break;
                 break;
 
 
+            case DETAIL_TYPE_SMARTIOTCAM_FLIP:
+                mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_SMARTIOTCAM_FLIP, position);
+                break;
+
             case DETAIL_TYPE_REGISTRATION_WIRELESS_DOOR_LOCK:
             case DETAIL_TYPE_REGISTRATION_WIRELESS_DOOR_LOCK:
             case DETAIL_TYPE_SEND_HEART_BEAT:
             case DETAIL_TYPE_SEND_HEART_BEAT:
             case DETAIL_TYPE_TOUCH_CALIBRATION:
             case DETAIL_TYPE_TOUCH_CALIBRATION:
                 break;
                 break;
 
 
+            //카카오홈
+            case DETAIL_TYPE_KAKAO_HOME:
+                mMainDatabaseManager.updateSetUsedToSubDeviceSwitchButtonOnOff(MainDatabaseManager.SETTING_ITEM_SUB_DEVICE_KAKAO_HOME, position);
+                WallpadDeviceSet wdst = new WallpadDeviceSet(this.getContext());
+                wdst.Set_KakaoShow(true);
+                wdst.closeDB();
+                break;
+
             default:
             default:
                 break;
                 break;
         }
         }
@@ -3994,7 +4263,7 @@ public class SettingDetailFunctionFragment extends Fragment
             case DETAIL_TYPE_NON_INTERNET_SUPPORT:
             case DETAIL_TYPE_NON_INTERNET_SUPPORT:
             case DETAIL_TYPE_SMARTPOST_USE:
             case DETAIL_TYPE_SMARTPOST_USE:
             case DETAIL_TYPE_SMARTKITCHEN_USE:
             case DETAIL_TYPE_SMARTKITCHEN_USE:
-            case DETAIL_TYPE_ESCAPELADDER_DOWN_RECV:
+            case DETAIL_TYPE_ESCAPELADDER_DOWN_SEND:
             case DETAIL_TYPE_SEND_LIVINGEM_KITCHEN_LIGHT:
             case DETAIL_TYPE_SEND_LIVINGEM_KITCHEN_LIGHT:
             case DETAIL_TYPE_EASYMODEUX_USE:
             case DETAIL_TYPE_EASYMODEUX_USE:
             case DETAIL_TYPE_REMOTECALL_DOOROPEN_USE:
             case DETAIL_TYPE_REMOTECALL_DOOROPEN_USE:
@@ -4005,12 +4274,15 @@ public class SettingDetailFunctionFragment extends Fragment
             case DETAIL_TYPE_BATHSENSOR_USE:
             case DETAIL_TYPE_BATHSENSOR_USE:
             case DETAIL_TYPE_LCDKEEPER_USE:
             case DETAIL_TYPE_LCDKEEPER_USE:
             case DETAIL_TYPE_VENTI_SERVICE_QR_USE:
             case DETAIL_TYPE_VENTI_SERVICE_QR_USE:
+            case DETAIL_TYPE_KAKAO_HOME://카카오홈
+            case DETAIL_TYPE_SMARTIOTCAM_FLIP:
+            case DETAIL_TYPE_CONSTRUCTION_SPECIAL_FUNC:
+            case DETAIL_TYPE_ELEVATOR:
                 updateSetUsedToSubDevice(type, position, itemName);
                 updateSetUsedToSubDevice(type, position, itemName);
 
 
                 MainApplication.getApplication().setReboot();
                 MainApplication.getApplication().setReboot();
                 break;
                 break;
 
 
-            case DETAIL_TYPE_ELEVATOR:
             case DETAIL_TYPE_FIELD_TYPE:
             case DETAIL_TYPE_FIELD_TYPE:
             case DETAIL_TYPE_TIME_SETTING:
             case DETAIL_TYPE_TIME_SETTING:
             case DETAIL_TYPE_CUSTOMER_SERVICE_GUARD:
             case DETAIL_TYPE_CUSTOMER_SERVICE_GUARD:
@@ -4027,7 +4299,6 @@ public class SettingDetailFunctionFragment extends Fragment
             case DETAIL_TYPE_SECURITY_INDOORMODE_SENSOR_USE:
             case DETAIL_TYPE_SECURITY_INDOORMODE_SENSOR_USE:
             case DETAIL_TYPE_LOCATION_CONFIRM:
             case DETAIL_TYPE_LOCATION_CONFIRM:
             case DETAIL_TYPE_RELIEF_CALL:
             case DETAIL_TYPE_RELIEF_CALL:
-            case DETAIL_TYPE_SYSTEMAIRCON_HEAT_SUPPORT:
             case DETAIL_TYPE_REMOTECALLSVR_WEBPORT:
             case DETAIL_TYPE_REMOTECALLSVR_WEBPORT:
             case DETAIL_TYPE_THEDISABLED_HOME_SET:
             case DETAIL_TYPE_THEDISABLED_HOME_SET:
             case DETAIL_TYPE_CO2_REDUCTION_SET:
             case DETAIL_TYPE_CO2_REDUCTION_SET:

+ 58 - 16
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingEMLivingRegiFrag.java

@@ -44,6 +44,7 @@ import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI;
 import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI.CONCENT_REG_MODE;
 import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI.CONCENT_REG_MODE;
 import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI.LIGHT_REG_MODE;
 import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI.LIGHT_REG_MODE;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -153,7 +154,8 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
 
 
         if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
         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 == Version.MODEL_TYPE.IHN_D101_I_OCF) {
             mRootView= (View) inflater.inflate(R.layout.setting_em_livingroom_regi_container, container, false);
             mRootView= (View) inflater.inflate(R.layout.setting_em_livingroom_regi_container, container, false);
         }
         }
 
 
@@ -168,7 +170,8 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
 
 
         ScrollView mScrollView = null;
         ScrollView mScrollView = null;
         if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
         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 == Version.MODEL_TYPE.IHN_D101_I_OCF) {
             mScrollView = (ScrollView) view.findViewById(R.id.sv_em_livingroom_regi);
             mScrollView = (ScrollView) view.findViewById(R.id.sv_em_livingroom_regi);
         }
         }
         else {
         else {
@@ -277,9 +280,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             init_outlet_regi_text();
             init_outlet_regi_text();
 
 
             if (SDBLivingEMCheckHandler != null) SDBLivingEMCheckHandler.sendEmptyMessageDelayed(HANDLERMSG.CHECK_API_CONNECTION, 10);
             if (SDBLivingEMCheckHandler != null) SDBLivingEMCheckHandler.sendEmptyMessageDelayed(HANDLERMSG.CHECK_API_CONNECTION, 10);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initView()");
             Log.e(TAG, "[Exception] initView()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         //initRegistrationWirelessDoorLock();
         //initRegistrationWirelessDoorLock();
@@ -491,9 +497,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
                 else {
                 else {
                     Log.w(TAG, "[SDBLivingEMCtrlHandler] msg.what is not defined -> " + msg.what);
                     Log.w(TAG, "[SDBLivingEMCtrlHandler] msg.what is not defined -> " + msg.what);
                 }
                 }
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
+        } catch (Exception e) {
                 Log.e(TAG, "[Exception] SDBLivingEMRegiStatusCheckHandler");
                 Log.e(TAG, "[Exception] SDBLivingEMRegiStatusCheckHandler");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
     };
     };
@@ -586,9 +595,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
 //                Log.i(TAG, "[SDBLivingEMCtrlHandler] mLivingEMData.Data.LedLight[" + i + "].Info.ToString [" + mLivingEMData.Data.LedLight[i].Info.ToString((byte) 0, (byte) i) + "]");
 //                Log.i(TAG, "[SDBLivingEMCtrlHandler] mLivingEMData.Data.LedLight[" + i + "].Info.ToString [" + mLivingEMData.Data.LedLight[i].Info.ToString((byte) 0, (byte) i) + "]");
 //                Log.i(TAG, "[SDBLivingEMCtrlHandler] mLivingEMData.Data.LedLight[" + i + "].Data.ToString [" + mLivingEMData.Data.LedLight[i].Data.ToString((byte) 0, (byte) i) + "]");
 //                Log.i(TAG, "[SDBLivingEMCtrlHandler] mLivingEMData.Data.LedLight[" + i + "].Data.ToString [" + mLivingEMData.Data.LedLight[i].Data.ToString((byte) 0, (byte) i) + "]");
 //            }
 //            }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateScreenObjects()");
             Log.e(TAG, "[Exception] updateScreenObjects()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -604,9 +616,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             BTN_LIGHT_REGI_START.setOnClickListener(mButtonClicks);
             BTN_LIGHT_REGI_START.setOnClickListener(mButtonClicks);
 
 
             BTN_LIGHT_REGI_START.setEnabled(false);
             BTN_LIGHT_REGI_START.setEnabled(false);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_light_regi_start()");
             Log.e(TAG, "[Exception] init_light_regi_start()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 
@@ -619,9 +634,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             BTN_LIGHT_REGI_EXTENDTIME.setOnClickListener(mButtonClicks);
             BTN_LIGHT_REGI_EXTENDTIME.setOnClickListener(mButtonClicks);
 
 
             BTN_LIGHT_REGI_EXTENDTIME.setEnabled(false);
             BTN_LIGHT_REGI_EXTENDTIME.setEnabled(false);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_light_regi_extendtime()");
             Log.e(TAG, "[Exception] init_light_regi_extendtime()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 
@@ -634,9 +652,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             BTN_LIGHT_REGI_END.setOnClickListener(mButtonClicks);
             BTN_LIGHT_REGI_END.setOnClickListener(mButtonClicks);
 
 
             BTN_LIGHT_REGI_END.setEnabled(false);
             BTN_LIGHT_REGI_END.setEnabled(false);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_light_regi_end()");
             Log.e(TAG, "[Exception] init_light_regi_end()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -647,9 +668,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             PGBAR_LIGHT_REGISTERING.setProgress(0);
             PGBAR_LIGHT_REGISTERING.setProgress(0);
             //pgbar_concent_registering.setEnabled(false);
             //pgbar_concent_registering.setEnabled(false);
             PGBAR_LIGHT_REGISTERING.setVisibility(View.INVISIBLE);
             PGBAR_LIGHT_REGISTERING.setVisibility(View.INVISIBLE);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_light_regi_pgbar()");
             Log.e(TAG, "[Exception] init_light_regi_pgbar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 
@@ -659,9 +683,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
         try {
         try {
             TXT_LIGHT_CNT = (TextView)mRootView.findViewById(R.id.tv_em_livingroom_light_regi_count);
             TXT_LIGHT_CNT = (TextView)mRootView.findViewById(R.id.tv_em_livingroom_light_regi_count);
             TXT_LIGHT_CNT.setText(strLightRegiCnt);
             TXT_LIGHT_CNT.setText(strLightRegiCnt);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_outlet_regi_text()");
             Log.e(TAG, "[Exception] init_outlet_regi_text()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -679,9 +706,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             BTN_OUTLET_REGI_START.setOnClickListener(mButtonClicks);
             BTN_OUTLET_REGI_START.setOnClickListener(mButtonClicks);
 
 
             BTN_OUTLET_REGI_START.setEnabled(false);
             BTN_OUTLET_REGI_START.setEnabled(false);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
 	        Log.e(TAG, "[Exception] init_outlet_regi_start()");
 	        Log.e(TAG, "[Exception] init_outlet_regi_start()");
-	        e.printStackTrace();
+	        //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 	}
 	}
 
 
@@ -694,9 +724,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             BTN_OUTLET_REGI_EXTENDTIME.setOnClickListener(mButtonClicks);
             BTN_OUTLET_REGI_EXTENDTIME.setOnClickListener(mButtonClicks);
 
 
             BTN_OUTLET_REGI_EXTENDTIME.setEnabled(false);
             BTN_OUTLET_REGI_EXTENDTIME.setEnabled(false);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_outlet_regi_extendtime()");
             Log.e(TAG, "[Exception] init_outlet_regi_extendtime()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 
@@ -709,9 +742,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             BTN_OUTLET_REGI_END.setOnClickListener(mButtonClicks);
             BTN_OUTLET_REGI_END.setOnClickListener(mButtonClicks);
 
 
             BTN_OUTLET_REGI_END.setEnabled(false);
             BTN_OUTLET_REGI_END.setEnabled(false);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_outlet_regi_end()");
             Log.e(TAG, "[Exception] init_outlet_regi_end()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 	}
 	}
 
 
@@ -722,9 +758,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
             PGBAR_OUTLET_REGISTERING.setProgress(0);
             PGBAR_OUTLET_REGISTERING.setProgress(0);
             //pgbar_concent_registering.setEnabled(false);
             //pgbar_concent_registering.setEnabled(false);
             PGBAR_OUTLET_REGISTERING.setVisibility(View.INVISIBLE);
             PGBAR_OUTLET_REGISTERING.setVisibility(View.INVISIBLE);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_outlet_regi_pgbar()");
             Log.e(TAG, "[Exception] init_outlet_regi_pgbar()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -734,9 +773,12 @@ public class SettingEMLivingRegiFrag extends Fragment implements SwitchButton.Sw
         try {
         try {
             TXT_OUTLET_CNT = (TextView)mRootView.findViewById(R.id.tv_em_livingroom_outlet_regi_count);
             TXT_OUTLET_CNT = (TextView)mRootView.findViewById(R.id.tv_em_livingroom_outlet_regi_count);
             TXT_OUTLET_CNT.setText(strOutletRegiCnt);
             TXT_OUTLET_CNT.setText(strOutletRegiCnt);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] init_outlet_regi_text()");
             Log.e(TAG, "[Exception] init_outlet_regi_text()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("",TAG, e);
         }
         }
     }
     }
 
 

+ 21 - 12
ManagerSetting/src/main/java/com/artncore/managersetting/ui/fragments/SettingEnergyManagementFragment.java

@@ -180,7 +180,8 @@ public class SettingEnergyManagementFragment extends Fragment
                 addControllerVO(ENERGY_TYPE_ENERGY_MODULE); //에너지 모듈
                 addControllerVO(ENERGY_TYPE_ENERGY_MODULE); //에너지 모듈
             }
             }
             else if (ModelType == Version.MODEL_TYPE.IHN_D101 || ModelType == Version.MODEL_TYPE.IHN_D101_I
             else 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 == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 addControllerVO(ENERGY_TYPE_DISTRIBUTION_BOARD); // 분전반
                 addControllerVO(ENERGY_TYPE_DISTRIBUTION_BOARD); // 분전반
             }
             }
             addControllerVO(ENERGY_TYPE_REALTIME_MESURING_METER);
             addControllerVO(ENERGY_TYPE_REALTIME_MESURING_METER);
@@ -414,8 +415,12 @@ public class SettingEnergyManagementFragment extends Fragment
 
 
                 mControllerList.add(controllerVO);
                 mControllerList.add(controllerVO);
 
 
-                if (DEBUG) Log.d(TAG, "InfoList.get(4) : " + InfoList.get(4)); // EMS
-                if (DEBUG) Log.d(TAG, "InfoList.get(5) : " + InfoList.get(5)); // 사용함
+                if(InfoList!=null)
+                {
+                    if (DEBUG) Log.d(TAG, "InfoList.get(4) : " + InfoList.get(4)); // EMS
+                    if (DEBUG) Log.d(TAG, "InfoList.get(5) : " + InfoList.get(5)); // 사용함
+                }
+
                 // or
                 // or
                 // 사용안함
                 // 사용안함
 
 
@@ -423,19 +428,23 @@ public class SettingEnergyManagementFragment extends Fragment
                 // TO DO
                 // TO DO
                 int emsSupportCurrent = 0;
                 int emsSupportCurrent = 0;
 
 
-                if (Const.REMOTE_METERING_EMS.equals(InfoList.get(4)))
+                if(InfoList!=null)
                 {
                 {
-                    if (Const.CONTROLLER_SETTING_DO_NOT_USED.equals(InfoList.get(5)))
+                    if (Const.REMOTE_METERING_EMS.equals(InfoList.get(4)))
                     {
                     {
-                        emsSupportCurrent = 0;
-                    }
-                    else if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(5)))
-                    {
-                        emsSupportCurrent = 1;
-                    }
+                        if (Const.CONTROLLER_SETTING_DO_NOT_USED.equals(InfoList.get(5)))
+                        {
+                            emsSupportCurrent = 0;
+                        }
+                        else if (Const.CONTROLLER_SETTING_DO_USED.equals(InfoList.get(5)))
+                        {
+                            emsSupportCurrent = 1;
+                        }
 
 
+                    }
                 }
                 }
 
 
+
                 if (DEBUG) Log.d(TAG, "ENERGY_TYPE_EMS_SUPPORT : " + emsSupportCurrent);
                 if (DEBUG) Log.d(TAG, "ENERGY_TYPE_EMS_SUPPORT : " + emsSupportCurrent);
 
 
                 controllerName = mActivity.getString(R.string.setting_energy_ems_support);
                 controllerName = mActivity.getString(R.string.setting_energy_ems_support);
@@ -449,7 +458,7 @@ public class SettingEnergyManagementFragment extends Fragment
                 int costSupportCount = Const.CONTROLLER_ONOFF_COUNT;
                 int costSupportCount = Const.CONTROLLER_ONOFF_COUNT;
                 int costSupportCurrent = 0;
                 int costSupportCurrent = 0;
 
 
-                if(InfoList.size() > 6)
+                if(InfoList!=null && InfoList.size() > 6)
                 {
                 {
                     if (Const.REMOTE_METERING_COST_TABLE.equals(InfoList.get(6)))
                     if (Const.REMOTE_METERING_COST_TABLE.equals(InfoList.get(6)))
                     {
                     {

+ 2 - 2
ManagerSetting/src/main/java/com/artncore/managersetting/util/NetworkUtil.java

@@ -98,7 +98,7 @@ public class NetworkUtil {
         if (DEBUG)  Log.d(TAG, " IP : " + myIP);
         if (DEBUG)  Log.d(TAG, " IP : " + myIP);
 
 
         String[] arrString = StringUtil.split(myIP, ".");
         String[] arrString = StringUtil.split(myIP, ".");
-        if (arrString.length > 3) {
+        if (arrString!=null && arrString.length > 3) {
 
 
             if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
             if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 
@@ -160,7 +160,7 @@ public class NetworkUtil {
         if (DEBUG)  Log.d(TAG, " IP : " + myIP);
         if (DEBUG)  Log.d(TAG, " IP : " + myIP);
 
 
         String[] arrString = StringUtil.split(myIP, ".");
         String[] arrString = StringUtil.split(myIP, ".");
-        if (arrString.length > 3) {
+        if (arrString!=null && arrString.length > 3) {
 
 
             if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
             if (DEBUG)  Log.d(TAG, " arrString.length : " + arrString.length);
 
 

+ 39 - 6
ManagerSetting/src/main/java/com/artncore/managersetting/util/StorageUtil.java

@@ -18,6 +18,8 @@ import android.os.Environment;
 import android.os.StatFs;
 import android.os.StatFs;
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 
 
 public class StorageUtil {
 public class StorageUtil {
     private static final String TAG = "StorageUtil";
     private static final String TAG = "StorageUtil";
@@ -113,9 +115,11 @@ public class StorageUtil {
             }
             }
 
 
         } catch (FileNotFoundException ex) {
         } catch (FileNotFoundException ex) {
-            ex.printStackTrace();
+            //ex.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ex);
         } catch (IOException ex) {
         } catch (IOException ex) {
-            ex.printStackTrace();
+            //ex.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ex);
         } finally {
         } finally {
             if (buf_reader != null) {
             if (buf_reader != null) {
                 try {
                 try {
@@ -227,8 +231,11 @@ public class StorageUtil {
             }
             }
 
 
             ret = true;
             ret = true;
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         return ret;
         return ret;
@@ -245,9 +252,11 @@ public class StorageUtil {
         );
         );
 
 
         if(file !=null && file.exists()) {
         if(file !=null && file.exists()) {
+            FileInputStream fis = null;
+            FileOutputStream newfos = null;
             try {
             try {
-                FileInputStream fis = new FileInputStream(file);
-                FileOutputStream newfos = new FileOutputStream(save_file);
+                fis = new FileInputStream(file);
+                newfos = new FileOutputStream(save_file);
                 int readcount=0;
                 int readcount=0;
                 byte[] buffer = new byte[1024];
                 byte[] buffer = new byte[1024];
                 while((readcount = fis.read(buffer,0,1024))!= -1){
                 while((readcount = fis.read(buffer,0,1024))!= -1){
@@ -255,8 +264,32 @@ public class StorageUtil {
                 }
                 }
                 newfos.close();
                 newfos.close();
                 fis.close();
                 fis.close();
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
+            }
+            finally {
+                if(fis!=null) {
+                    try {
+                        fis.close();
+                    } catch (IOException e) {
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
+                    }
+                }
+                fis= null;
+
+                if(newfos!=null) {
+                    try {
+                        newfos.close();
+                    } catch (IOException e) {
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
+                    }
+                }
+                newfos = null;
             }
             }
             result = true;
             result = true;
         }
         }

+ 4 - 0
ManagerSetting/src/main/java/com/artncore/managersetting/util/StringUtil.java

@@ -4,6 +4,7 @@ import java.util.ArrayList;
 import java.util.StringTokenizer;
 import java.util.StringTokenizer;
 
 
 import com.artncore.managersetting.domain.Const;
 import com.artncore.managersetting.domain.Const;
+import com.util.LogUtil;
 
 
 import android.content.Context;
 import android.content.Context;
 import android.util.Log;
 import android.util.Log;
@@ -60,7 +61,10 @@ public class StringUtil {
         } else {
         } else {
             try {
             try {
                 result = Integer.parseInt(str);
                 result = Integer.parseInt(str);
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
         return result;
         return result;

+ 24 - 13
ManagerSetting/src/main/java/kr/co/icontrols/managersetting/imap/iMAP_ctrl_config_read.java

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

+ 24 - 14
ManagerSetting/src/main/java/kr/co/icontrols/managersetting/imap/iMAP_hn_config_read.java

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

+ 128 - 32
ManagerSetting/src/main/java/kr/co/icontrols/v40ioctl/V40IF.java

@@ -8,6 +8,7 @@ import com.artncore.deviceinterface.WallPadInterface;
 import com.artncore.wallpadapi.IGW200dAPI;
 import com.artncore.wallpadapi.IGW200dAPI;
 import com.artncore.wallpadapi.IGW300API;
 import com.artncore.wallpadapi.IGW300API;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import android.os.Build;
 import android.os.Build;
 import android.os.Handler;
 import android.os.Handler;
@@ -44,9 +45,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT = new V40IOInterface2();
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT = new V40IOInterface2();
             else mV40IOIF = new V40IOInterface();
             else mV40IOIF = new V40IOInterface();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] V40IF()");
             Log.e(TAG, "[Exception] V40IF()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -54,9 +58,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceOpen();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceOpen();
             else return mV40IOIF.WpdInterfaceOpen();
             else return mV40IOIF.WpdInterfaceOpen();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceOpen()");
             Log.e(TAG, "[Exception] WpdInterfaceOpen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -65,9 +73,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceClose();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceClose();
             else return mV40IOIF.WpdInterfaceClose();
             else return mV40IOIF.WpdInterfaceClose();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceClose()");
             Log.e(TAG, "[Exception] WpdInterfaceClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -76,9 +88,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceControl(cmd, arg);
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceControl(cmd, arg);
             else return mV40IOIF.WpdInterfaceControl(cmd, arg);
             else return mV40IOIF.WpdInterfaceControl(cmd, arg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceControl(int cmd, int arg)");
             Log.e(TAG, "[Exception] WpdInterfaceControl(int cmd, int arg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -87,9 +103,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.SetMacAddr(mac);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.SetMacAddr(mac);
             else mV40IOIF.SetMacAddr(mac);
             else mV40IOIF.SetMacAddr(mac);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SetMacAddr(String mac)");
             Log.e(TAG, "[Exception] SetMacAddr(String mac)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -97,9 +116,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.IpAddr(ip);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.IpAddr(ip);
             else mV40IOIF.IpAddr(ip);
             else mV40IOIF.IpAddr(ip);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] IpAddr(String ip)");
             Log.e(TAG, "[Exception] IpAddr(String ip)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -107,9 +129,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.GatewayIp(gw);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.GatewayIp(gw);
             else mV40IOIF.GatewayIp(gw);
             else mV40IOIF.GatewayIp(gw);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] GatewayIp(String gw)");
             Log.e(TAG, "[Exception] GatewayIp(String gw)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -117,9 +142,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetMask(mask);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetMask(mask);
             else mV40IOIF.NetMask(mask);
             else mV40IOIF.NetMask(mask);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NetMask(String mask)");
             Log.e(TAG, "[Exception] NetMask(String mask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -127,9 +155,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetAll(ip, mask, gw, mac);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetAll(ip, mask, gw, mac);
             else mV40IOIF.NetAll(ip, mask, gw, mac);
             else mV40IOIF.NetAll(ip, mask, gw, mac);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NetAll(String ip, String mask, String gw, String mac)");
             Log.e(TAG, "[Exception] NetAll(String ip, String mask, String gw, String mac)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -137,9 +168,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.LiveUpdate();
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.LiveUpdate();
             else mV40IOIF.LiveUpdate();
             else mV40IOIF.LiveUpdate();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] LiveUpdate()");
             Log.e(TAG, "[Exception] LiveUpdate()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -147,9 +181,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.UsbUpdate();
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.UsbUpdate();
             else mV40IOIF.UsbUpdate();
             else mV40IOIF.UsbUpdate();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] UsbUpdate()");
             Log.e(TAG, "[Exception] UsbUpdate()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -157,9 +194,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] LcdWakeUp()");
             Log.e(TAG, "[Exception] LcdWakeUp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -168,9 +209,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.Reboot(sec);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.Reboot(sec);
             else mV40IOIF.Reboot(sec);
             else mV40IOIF.Reboot(sec);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Reboot(int sec)");
             Log.e(TAG, "[Exception] Reboot(int sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -178,9 +222,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns1(dns);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns1(dns);
             else mV40IOIF.NetDns1(dns);
             else mV40IOIF.NetDns1(dns);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NetDns1(String dns)");
             Log.e(TAG, "[Exception] NetDns1(String dns)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -188,9 +235,12 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns2(dns);
             if (Build.VERSION.SDK_INT > 23) mV40IOIF_NOUGAT.NetDns2(dns);
             else mV40IOIF.NetDns2(dns);
             else mV40IOIF.NetDns2(dns);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NetDns2(String dns)");
             Log.e(TAG, "[Exception] NetDns2(String dns)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -198,9 +248,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.sensorread();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.sensorread();
             else return mV40IOIF.sensorread();
             else return mV40IOIF.sensorread();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sensorread()");
             Log.e(TAG, "[Exception] sensorread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -209,9 +263,13 @@ public class V40IF {
         try {
         try {
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             if (Build.VERSION.SDK_INT > 23) return mV40IOIF_NOUGAT.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
             else return mV40IOIF.LcdWakeUp();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setLcdWakeUp()");
             Log.e(TAG, "[Exception] setLcdWakeUp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -221,9 +279,12 @@ public class V40IF {
             Log.i(TAG, "[setDns] DNS1 : " + dns1 + " / DNS2 : " + dns2);
             Log.i(TAG, "[setDns] DNS1 : " + dns1 + " / DNS2 : " + dns2);
             NetDns1(dns1);
             NetDns1(dns1);
             NetDns2(dns2);
             NetDns2(dns2);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDns(String dns1, String dns2)");
             Log.e(TAG, "[Exception] setDns(String dns1, String dns2)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -231,9 +292,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setV40Reboot] V40 Device will reboot : " +sec + " second !!!");
             Log.i(TAG, "[setV40Reboot] V40 Device will reboot : " +sec + " second !!!");
             Reboot(sec);
             Reboot(sec);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setV40Reboot(int sec)");
             Log.e(TAG, "[Exception] setV40Reboot(int sec)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -241,9 +305,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setMACAddress] strMAC [" + strMAC+ "]");
             Log.i(TAG, "[setMACAddress] strMAC [" + strMAC+ "]");
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -251,9 +318,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
             Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
             IpAddr(strIP);
             IpAddr(strIP);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -261,9 +331,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
             Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
             NetMask(strNetmask);
             NetMask(strNetmask);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -271,9 +344,12 @@ public class V40IF {
         try {
         try {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             GatewayIp(strGateway);
             GatewayIp(strGateway);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -282,9 +358,12 @@ public class V40IF {
             Log.i(TAG, "[setNetworkInterface] strIP [" + strIP+ "], strNetmask [" + strNetmask+ "], strGateway [" + strGateway+ "], strMAC [" + strMAC+ "]");
             Log.i(TAG, "[setNetworkInterface] strIP [" + strIP+ "], strNetmask [" + strNetmask+ "], strGateway [" + strGateway+ "], strMAC [" + strMAC+ "]");
 
 
             NetAll(strIP, strNetmask, strGateway, strMAC);
             NetAll(strIP, strNetmask, strGateway, strMAC);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -297,30 +376,47 @@ public class V40IF {
             GatewayIp(strGateway);
             GatewayIp(strGateway);
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
     public boolean setCameraConfigure(int nValue) {
     public boolean setCameraConfigure(int nValue) {
         try {
         try {
             Log.i(TAG, "[setCameraConfigure] nValue [" + nValue+ "]");
             Log.i(TAG, "[setCameraConfigure] nValue [" + nValue+ "]");
-            if (Build.VERSION.SDK_INT > 23) {
-                if (mV40IOIF_NOUGAT == null) {
-                    Log.i(TAG, "[setCameraConfigure] mV40IOIF_NOUGAT is null!!");
+            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() == 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 (Build.VERSION.SDK_INT > 23) {
+                    if (mV40IOIF_NOUGAT == null) {
+                        Log.i(TAG, "[setCameraConfigure] mV40IOIF_NOUGAT is null!!");
+                        return false;
+                    }
+                    mV40IOIF_NOUGAT.CameraSet(nValue);
+                    return true;
+                }
+                else {
+                    Log.w(TAG, "[setCameraConfigure] Not supported Version !!! AOS Ver. [" + Build.VERSION.SDK_INT+ "]");
                     return false;
                     return false;
                 }
                 }
-                mV40IOIF_NOUGAT.CameraSet(nValue);
-                return true;
             }
             }
             else {
             else {
-                Log.w(TAG, "[setCameraConfigure] Not supported AOS Version !!! AOS Ver. [" + Build.VERSION.SDK_INT+ "]");
+                Log.w(TAG, "[setCameraConfigure] Not supported Model !!! MODEL [" + Version.getModelType() + "]");
                 return false;
                 return false;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCameraConfigure(int nValue)");
             Log.e(TAG, "[Exception] setCameraConfigure(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
             return false;
         }
         }
     }
     }

+ 41 - 11
ManagerSetting/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.v40ioctl;
 import android.os.Build;
 import android.os.Build;
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 public class V40IOInterface {
 public class V40IOInterface {
 
 
     private static final String TAG = "V40IOInterface";
     private static final String TAG = "V40IOInterface";
@@ -51,10 +53,14 @@ public class V40IOInterface {
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
 
 
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -64,10 +70,14 @@ public class V40IOInterface {
 			Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
 			Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
 			IpAddr(strIP);
 			IpAddr(strIP);
 		}
 		}
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -77,10 +87,14 @@ public class V40IOInterface {
 			Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
 			Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
 			NetMask(strNetmask);
 			NetMask(strNetmask);
 		}
 		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -90,10 +104,14 @@ public class V40IOInterface {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
 			GatewayIp(strGateway);
 			GatewayIp(strGateway);
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -107,10 +125,14 @@ public class V40IOInterface {
             GatewayIp(strGateway);
             GatewayIp(strGateway);
 			Reboot(5);
 			Reboot(5);
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch (Exception e)
         catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }*/
     }*/
 
 
@@ -131,10 +153,14 @@ public class V40IOInterface {
 
 
 			NetAll(strIP, strNetmask, strGateway, strMAC);
 			NetAll(strIP, strNetmask, strGateway, strMAC);
 		}
 		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
 			Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
 			Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		}
 	}
 	}
 
 
@@ -160,10 +186,14 @@ public class V40IOInterface {
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

+ 41 - 11
ManagerSetting/src/main/java/kr/co/icontrols/v40ioctl/V40IOInterface2.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.v40ioctl;
 import android.os.Build;
 import android.os.Build;
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 public class V40IOInterface2 {
 public class V40IOInterface2 {
 
 
     private static final String TAG = "V40IOInterface2";
     private static final String TAG = "V40IOInterface2";
@@ -57,10 +59,14 @@ public class V40IOInterface2 {
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
 
 
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
             Log.e(TAG, "[Exception] setMACAddress(String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -70,10 +76,14 @@ public class V40IOInterface2 {
 			Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
 			Log.i(TAG, "[setIPAddress] strIP [" + strIP + "]");
 			IpAddr(strIP);
 			IpAddr(strIP);
 		}
 		}
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
             Log.e(TAG, "[Exception] setIPAddress(String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -83,10 +93,14 @@ public class V40IOInterface2 {
 			Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
 			Log.i(TAG, "[setNetmaskAddress] strNetmask [" + strNetmask + "]");
 			NetMask(strNetmask);
 			NetMask(strNetmask);
 		}
 		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
             Log.e(TAG, "[Exception] setNetmaskAddress(String strNetmask)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -96,10 +110,14 @@ public class V40IOInterface2 {
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
             Log.i(TAG, "[setGatewayAddress] strGateway [" + strGateway+ "]");
 			GatewayIp(strGateway);
 			GatewayIp(strGateway);
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
             Log.e(TAG, "[Exception] setGatewayAddress(String strGateway)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -113,10 +131,14 @@ public class V40IOInterface2 {
             GatewayIp(strGateway);
             GatewayIp(strGateway);
 			Reboot(5);
 			Reboot(5);
         }
         }
+        catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        }
         catch (Exception e)
         catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }*/
     }*/
 
 
@@ -137,10 +159,14 @@ public class V40IOInterface2 {
 
 
 			NetAll(strIP, strNetmask, strGateway, strMAC);
 			NetAll(strIP, strNetmask, strGateway, strMAC);
 		}
 		}
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
 		catch (Exception e)
 		catch (Exception e)
 		{
 		{
 			Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
 			Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-			e.printStackTrace();
+			//e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 		}
 		}
 	}
 	}
 
 
@@ -166,10 +192,14 @@ public class V40IOInterface2 {
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             // DNS 설정 JNI method는 아직 없음(2018.02.26)
             SetMacAddr(strMAC);
             SetMacAddr(strMAC);
         }
         }
-        catch (Exception e)
+		catch (RuntimeException re) {
+			LogUtil.errorLogInfo("", TAG, re);
+		}
+		catch (Exception e)
 		{
 		{
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
             Log.e(TAG, "[Exception] setNetworkInterface(String strIP, String strNetmask, String strGateway, String strDNS, String strMAC)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

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


BIN
ManagerSetting/src/main/jniLibs/armeabi/libwpd_v40interface2-jni.so


+ 12 - 8
ManagerSetting/src/main/res/layout/activity_set_address_1010.xml

@@ -225,27 +225,31 @@
                     android:layout_below="@+id/tv_use_double_danji" />
                     android:layout_below="@+id/tv_use_double_danji" />
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_escapeladder_down_recv"
+                    android:id="@+id/tv_escapeladder_down_send"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
-                    android:layout_height="70dp"
+                    android:layout_height="55px"
                     android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:textSize="30sp"
                     android:textSize="30sp"
-                    android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                    android:text="@string/admin_dongho_use_escapeladder_down_send"
                     />
                     />
 
 
-                <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_escapeladder_down_recv"
+                <Spinner
+                    android:id="@+id/spinner_escapeladdersend_kind"
+                    android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
+                    android:drawSelectorOnTop="true"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
                     />
                     />
 
 
                 <TextView
                 <TextView
                     android:id="@+id/tv_subwallpad"
                     android:id="@+id/tv_subwallpad"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="70dp"
                     android:layout_height="70dp"
-                    android:layout_below="@+id/tv_escapeladder_down_recv"
+                    android:layout_below="@+id/tv_escapeladder_down_send"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:text="@string/admin_dongho_use_subwallpad"
                     android:text="@string/admin_dongho_use_subwallpad"
                     />
                     />
@@ -254,7 +258,7 @@
                     android:id="@+id/btn_switch_dongho_subwpd"
                     android:id="@+id/btn_switch_dongho_subwpd"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@+id/tv_escapeladder_down_recv"
+                    android:layout_below="@+id/tv_escapeladder_down_send"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
                     />
                     />
 
 

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_1020b_i.xml

@@ -225,20 +225,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_1030.xml

@@ -225,20 +225,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_1040.xml

@@ -225,20 +225,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_1050.xml

@@ -225,20 +225,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 12 - 8
ManagerSetting/src/main/res/layout/activity_set_address_1303.xml

@@ -225,27 +225,31 @@
                     android:layout_below="@+id/tv_use_double_danji" />
                     android:layout_below="@+id/tv_use_double_danji" />
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_escapeladder_down_recv"
+                    android:id="@+id/tv_escapeladder_down_send"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
-                    android:layout_height="70dp"
+                    android:layout_height="55px"
                     android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:textSize="30sp"
                     android:textSize="30sp"
-                    android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                    android:text="@string/admin_dongho_use_escapeladder_down_send"
                     />
                     />
 
 
-                <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_escapeladder_down_recv"
+                <Spinner
+                    android:id="@+id/spinner_escapeladdersend_kind"
+                    android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
+                    android:drawSelectorOnTop="true"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
                     />
                     />
 
 
                 <TextView
                 <TextView
                     android:id="@+id/tv_subwallpad"
                     android:id="@+id/tv_subwallpad"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="70dp"
                     android:layout_height="70dp"
-                    android:layout_below="@+id/tv_escapeladder_down_recv"
+                    android:layout_below="@+id/tv_escapeladder_down_send"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:text="@string/admin_dongho_use_subwallpad"
                     android:text="@string/admin_dongho_use_subwallpad"
                     />
                     />
@@ -254,7 +258,7 @@
                     android:id="@+id/btn_switch_dongho_subwpd"
                     android:id="@+id/btn_switch_dongho_subwpd"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@+id/tv_escapeladder_down_recv"
+                    android:layout_below="@+id/tv_escapeladder_down_send"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
                     />
                     />
 
 

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_d101.xml

@@ -299,20 +299,24 @@
                     android:layout_below="@+id/tv_use_rent_home" />
                     android:layout_below="@+id/tv_use_rent_home" />
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_escapeladder_down_recv"
+                    android:id="@+id/tv_escapeladder_send"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
-                    android:layout_height="70dp"
+                    android:layout_height="55px"
                     android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:textSize="30sp"
                     android:textSize="30sp"
-                    android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                    android:text="@string/admin_dongho_use_escapeladder_down_send"
                     />
                     />
 
 
-                <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_escapeladder_down_recv"
+                <Spinner
+                    android:id="@+id/spinner_escapeladdersend_kind"
+                    android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@+id/tv_use_danji_set_rent_use"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
+                    android:drawSelectorOnTop="true"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
                     />
                     />
 
 
             </RelativeLayout>
             </RelativeLayout>

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_d101k.xml

@@ -247,20 +247,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_hs101.xml

@@ -225,20 +225,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 10 - 6
ManagerSetting/src/main/res/layout/activity_set_address_t1010.xml

@@ -225,20 +225,24 @@
                         android:layout_below="@+id/tv_use_double_danji" />
                         android:layout_below="@+id/tv_use_double_danji" />
 
 
                     <TextView
                     <TextView
-                        android:id="@+id/tv_escapeladder_down_recv"
+                        android:id="@+id/tv_escapeladder_send"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
-                        android:layout_height="70dp"
+                        android:layout_height="55px"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:textSize="30sp"
                         android:textSize="30sp"
-                        android:text="@string/admin_dongho_use_escapeladder_down_recv"
+                        android:text="@string/admin_dongho_use_escapeladder_down_send"
                         />
                         />
 
 
-                    <com.artncore.managersetting.ui.SwitchButton
-                        android:id="@+id/btn_switch_escapeladder_down_recv"
+                    <Spinner
+                        android:id="@+id/spinner_escapeladdersend_kind"
+                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_width="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/tv_use_danji_set_rent_use"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentRight="true"
+                        android:drawSelectorOnTop="true"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:textSize="24sp"
                         />
                         />
 
 
                 </RelativeLayout>
                 </RelativeLayout>

+ 103 - 41
ManagerSetting/src/main/res/layout/setting_detail_container_gle.xml

@@ -700,7 +700,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_escapeladder_down_recv"
+                    android:id="@+id/escape_ladder_down_send"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -710,19 +710,21 @@ android:background="#EFEFEE"
 
 
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_escapeladder_down_recv"
+                    android:text="@string/detail_function_escapeladder_down_send"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
-                <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_escapeladder_down_recv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="100dp"
+                <Spinner
+                    android:id="@+id/escapeladder_spinner"
+                    android:layout_width="200dp"
+                    android:layout_height="80dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
-                    android:layout_marginRight="20dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
 
 
+                    android:layout_gravity="center"
                     android:gravity="center"
                     android:gravity="center"
-
+                    android:textSize="24sp"
                     />
                     />
 
 
             </RelativeLayout>
             </RelativeLayout>
@@ -1786,7 +1788,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_systemaircon_heat_support"
+                    android:id="@+id/tv_bathsensor_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1794,12 +1796,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_systemaircon_heat_support"
+                    android:text="@string/detail_function_bathsensor_use"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_systemaircon_heat_support"
+                    android:id="@+id/btn_switch_bathsensor_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -1808,11 +1810,37 @@ android:background="#EFEFEE"
                     />
                     />
             </RelativeLayout>
             </RelativeLayout>
 
 
-            <ImageView
+            <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="#DDDDDD"
-                />
+                android:layout_height="wrap_content"
+                >
+
+                <TextView
+                    android:id="@+id/tv_lcdkeeper_use"
+                    android:layout_width="wrap_content"
+                    android:layout_height="100dp"
+                    android:layout_alignParentTop="true"
+                    android:layout_marginLeft="10dp"
+                    android:gravity="center|left"
+                    android:textSize="30sp"
+                    android:textColor="#000000"
+                    android:text="@string/detail_function_lcdkeeper_use"
+                    android:maxLines="1"
+                    />
+
+                <Spinner
+                    android:id="@+id/lcdkeeper_spinner"
+                    android:layout_width="200dp"
+                    android:layout_height="80dp"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
+                    />
+
+            </RelativeLayout>
 
 
             <RelativeLayout
             <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
@@ -1820,7 +1848,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_bathsensor_use"
+                    android:id="@+id/tv_venti_service_qr_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1828,12 +1856,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_bathsensor_use"
+                    android:text="@string/detail_function_venti_service_qr_use"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_bathsensor_use"
+                    android:id="@+id/btn_switch_venti_service_qr_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -1848,7 +1876,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_lcdkeeper_use"
+                    android:id="@+id/tv_thedisabled_home_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1856,22 +1884,18 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_lcdkeeper_use"
+                    android:text="@string/detail_function_thedisabled_home_set"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
-                <Spinner
-                    android:id="@+id/lcdkeeper_spinner"
-                    android:layout_width="200dp"
-                    android:layout_height="80dp"
+                <com.artncore.managersetting.ui.SwitchButton
+                    android:id="@+id/btn_switch_thedisabled_home_set"
+                    android:layout_width="wrap_content"
+                    android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="10dp"
-                    android:layout_gravity="center"
+                    android:layout_marginRight="20dp"
                     android:gravity="center"
                     android:gravity="center"
-                    android:textSize="24sp"
                     />
                     />
-
             </RelativeLayout>
             </RelativeLayout>
 
 
             <RelativeLayout
             <RelativeLayout
@@ -1880,7 +1904,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_venti_service_qr_use"
+                    android:id="@+id/tv_co2_reduction_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1888,12 +1912,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_venti_service_qr_use"
+                    android:text="@string/detail_function_co2_reduction_set"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_venti_service_qr_use"
+                    android:id="@+id/btn_switch_co2_reduction_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -1908,7 +1932,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_thedisabled_home_set"
+                    android:id="@+id/tv_heatlightroom_nameset"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1916,12 +1940,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_thedisabled_home_set"
+                    android:text="@string/detail_function_heatlightroom_nameset"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_thedisabled_home_set"
+                    android:id="@+id/btn_switch_heatlightroom_nameset"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -1930,13 +1954,14 @@ android:background="#EFEFEE"
                     />
                     />
             </RelativeLayout>
             </RelativeLayout>
 
 
+            <!-- KakaoI 추가 -->
             <RelativeLayout
             <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_co2_reduction_set"
+                    android:id="@+id/tv_kakao_home_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1944,12 +1969,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_co2_reduction_set"
+                    android:text="@string/detail_function_kakao_home_set"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_co2_reduction_set"
+                    android:id="@+id/btn_switch_kakao_home_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -1964,7 +1989,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_heatlightroom_nameset"
+                    android:id="@+id/tv_smartiotcam_flip_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1972,12 +1997,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_heatlightroom_nameset"
+                    android:text="@string/detail_function_smartiotcam_flip"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_heatlightroom_nameset"
+                    android:id="@+id/btn_switch_smartiotcam_flip_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -1986,6 +2011,43 @@ android:background="#EFEFEE"
                     />
                     />
             </RelativeLayout>
             </RelativeLayout>
 
 
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_height="1px"
+                android:background="#DDDDDD" />
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                >
+
+                <TextView
+                    android:id="@+id/construction_special_func"
+                    android:layout_width="wrap_content"
+                    android:layout_height="100dp"
+                    android:layout_alignParentTop="true"
+                    android:layout_marginLeft="10dp"
+                    android:gravity="center|left"
+                    android:textSize="30sp"
+                    android:textColor="#000000"
+                    android:text="@string/detail_function_construction_special_function"
+                    android:maxLines="1"
+                    />
+
+                <Spinner
+                    android:id="@+id/construction_special_func_spinner"
+                    android:layout_width="200dp"
+                    android:layout_height="80dp"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
+                    />
+
+            </RelativeLayout>
+
         </LinearLayout>
         </LinearLayout>
     </ScrollView>
     </ScrollView>
 
 

+ 103 - 41
ManagerSetting/src/main/res/layout/setting_detail_container_sa.xml

@@ -1095,7 +1095,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_escapeladder_down_recv"
+                    android:id="@+id/escape_ladder_down_send"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -1105,19 +1105,21 @@ android:background="#EFEFEE"
 
 
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_escapeladder_down_recv"
+                    android:text="@string/detail_function_escapeladder_down_send"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
-                <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_escapeladder_down_recv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="100dp"
+                <Spinner
+                    android:id="@+id/escapeladder_spinner"
+                    android:layout_width="200dp"
+                    android:layout_height="80dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
-                    android:layout_marginRight="20dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
 
 
+                    android:layout_gravity="center"
                     android:gravity="center"
                     android:gravity="center"
-
+                    android:textSize="24sp"
                     />
                     />
 
 
             </RelativeLayout>
             </RelativeLayout>
@@ -2184,7 +2186,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_systemaircon_heat_support"
+                    android:id="@+id/tv_bathsensor_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2192,12 +2194,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_systemaircon_heat_support"
+                    android:text="@string/detail_function_bathsensor_use"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_systemaircon_heat_support"
+                    android:id="@+id/btn_switch_bathsensor_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -2206,11 +2208,37 @@ android:background="#EFEFEE"
                     />
                     />
             </RelativeLayout>
             </RelativeLayout>
 
 
-            <ImageView
+            <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="#DDDDDD"
-                />
+                android:layout_height="wrap_content"
+                >
+
+                <TextView
+                    android:id="@+id/tv_lcdkeeper_use"
+                    android:layout_width="wrap_content"
+                    android:layout_height="100dp"
+                    android:layout_alignParentTop="true"
+                    android:layout_marginLeft="10dp"
+                    android:gravity="center|left"
+                    android:textSize="30sp"
+                    android:textColor="#000000"
+                    android:text="@string/detail_function_lcdkeeper_use"
+                    android:maxLines="1"
+                    />
+
+                <Spinner
+                    android:id="@+id/lcdkeeper_spinner"
+                    android:layout_width="200dp"
+                    android:layout_height="80dp"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
+                    />
+
+            </RelativeLayout>
 
 
             <RelativeLayout
             <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
@@ -2218,7 +2246,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_bathsensor_use"
+                    android:id="@+id/tv_venti_service_qr_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2226,12 +2254,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_bathsensor_use"
+                    android:text="@string/detail_function_venti_service_qr_use"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_bathsensor_use"
+                    android:id="@+id/btn_switch_venti_service_qr_use"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -2246,7 +2274,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_lcdkeeper_use"
+                    android:id="@+id/tv_thedisabled_home_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2254,22 +2282,18 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_lcdkeeper_use"
+                    android:text="@string/detail_function_thedisabled_home_set"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
-                <Spinner
-                    android:id="@+id/lcdkeeper_spinner"
-                    android:layout_width="200dp"
-                    android:layout_height="80dp"
+                <com.artncore.managersetting.ui.SwitchButton
+                    android:id="@+id/btn_switch_thedisabled_home_set"
+                    android:layout_width="wrap_content"
+                    android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="10dp"
-                    android:layout_gravity="center"
+                    android:layout_marginRight="20dp"
                     android:gravity="center"
                     android:gravity="center"
-                    android:textSize="24sp"
                     />
                     />
-
             </RelativeLayout>
             </RelativeLayout>
 
 
             <RelativeLayout
             <RelativeLayout
@@ -2278,7 +2302,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_venti_service_qr_use"
+                    android:id="@+id/tv_co2_reduction_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2286,12 +2310,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_venti_service_qr_use"
+                    android:text="@string/detail_function_co2_reduction_set"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_venti_service_qr_use"
+                    android:id="@+id/btn_switch_co2_reduction_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -2306,7 +2330,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_thedisabled_home_set"
+                    android:id="@+id/tv_heatlightroom_nameset"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2314,12 +2338,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_thedisabled_home_set"
+                    android:text="@string/detail_function_heatlightroom_nameset"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_thedisabled_home_set"
+                    android:id="@+id/btn_switch_heatlightroom_nameset"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -2328,13 +2352,14 @@ android:background="#EFEFEE"
                     />
                     />
             </RelativeLayout>
             </RelativeLayout>
 
 
+            <!-- KakaoI 추가 -->
             <RelativeLayout
             <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_co2_reduction_set"
+                    android:id="@+id/tv_kakao_home_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2342,12 +2367,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_co2_reduction_set"
+                    android:text="@string/detail_function_kakao_home_set"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_co2_reduction_set"
+                    android:id="@+id/btn_switch_kakao_home_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -2362,7 +2387,7 @@ android:background="#EFEFEE"
                 >
                 >
 
 
                 <TextView
                 <TextView
-                    android:id="@+id/tv_heatlightroom_nameset"
+                    android:id="@+id/tv_smartiotcam_flip_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentTop="true"
                     android:layout_alignParentTop="true"
@@ -2370,12 +2395,12 @@ android:background="#EFEFEE"
                     android:gravity="center|left"
                     android:gravity="center|left"
                     android:textSize="30sp"
                     android:textSize="30sp"
                     android:textColor="#000000"
                     android:textColor="#000000"
-                    android:text="@string/detail_function_heatlightroom_nameset"
+                    android:text="@string/detail_function_smartiotcam_flip"
                     android:maxLines="1"
                     android:maxLines="1"
                     />
                     />
 
 
                 <com.artncore.managersetting.ui.SwitchButton
                 <com.artncore.managersetting.ui.SwitchButton
-                    android:id="@+id/btn_switch_heatlightroom_nameset"
+                    android:id="@+id/btn_switch_smartiotcam_flip_set"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="100dp"
                     android:layout_height="100dp"
                     android:layout_alignParentRight="true"
                     android:layout_alignParentRight="true"
@@ -2384,6 +2409,43 @@ android:background="#EFEFEE"
                     />
                     />
             </RelativeLayout>
             </RelativeLayout>
 
 
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_height="1px"
+                android:background="#DDDDDD" />
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                >
+
+                <TextView
+                    android:id="@+id/construction_special_func"
+                    android:layout_width="wrap_content"
+                    android:layout_height="100dp"
+                    android:layout_alignParentTop="true"
+                    android:layout_marginLeft="10dp"
+                    android:gravity="center|left"
+                    android:textSize="30sp"
+                    android:textColor="#000000"
+                    android:text="@string/detail_function_construction_special_function"
+                    android:maxLines="1"
+                    />
+
+                <Spinner
+                    android:id="@+id/construction_special_func_spinner"
+                    android:layout_width="200dp"
+                    android:layout_height="80dp"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_gravity="center"
+                    android:gravity="center"
+                    android:textSize="24sp"
+                    />
+
+            </RelativeLayout>
+
         </LinearLayout>
         </LinearLayout>
     </ScrollView>
     </ScrollView>
 
 

+ 33 - 16
ManagerSetting/src/main/res/values/strings.xml

@@ -30,17 +30,16 @@
     <string name="hours">시</string>
     <string name="hours">시</string>
     <string name="minutes">분</string>
     <string name="minutes">분</string>
     <string name="seconds">초</string>
     <string name="seconds">초</string>
-    
-    <string name="neighborhood">이웃세대</string>
-    <string name="event_received">수신됨</string>
-    
-    <string name="do_not_used">사용안함</string>
-    <string name="do_used">사용</string>
 
 
     <string name="danji_1">1.0</string>
     <string name="danji_1">1.0</string>
     <string name="danji_2">2.0</string>
     <string name="danji_2">2.0</string>
     <string name="danji_3">기축</string>
     <string name="danji_3">기축</string>
 
 
+    <string name="neighborhood">이웃세대</string>
+    <string name="event_received">수신됨</string>
+    
+    <string name="do_not_used">사용안함</string>
+    <string name="do_used">사용</string>
     
     
     <string name="reset">사용자 초기화</string>
     <string name="reset">사용자 초기화</string>
     <string name="webctr_reset">웹제어 초기화</string>
     <string name="webctr_reset">웹제어 초기화</string>
@@ -131,8 +130,7 @@
 
 
     <string name="admin_dongho_use_smartpost_use">스마트우편함</string>
     <string name="admin_dongho_use_smartpost_use">스마트우편함</string>
     <string name="admin_dongho_use_smartkitchen_use">스마트키친</string>
     <string name="admin_dongho_use_smartkitchen_use">스마트키친</string>
-    <string name="admin_dongho_use_escapeladder_down_recv">피난사다리입하수신</string>
-
+    <string name="admin_dongho_use_escapeladder_down_send">피난사다리 전송방향</string>
 
 
     <string name="version_info_ip">IP : </string>
     <string name="version_info_ip">IP : </string>
     <string name="version_info_subnet_mask">SM : </string>
     <string name="version_info_subnet_mask">SM : </string>
@@ -225,6 +223,7 @@
 -->
 -->
     <string name="contoller_light_type_hdc_intlight_normal">현산향일체형조명기본형</string>
     <string name="contoller_light_type_hdc_intlight_normal">현산향일체형조명기본형</string>
     <string name="contoller_light_type_hdc_intlight_add_batchlight">현산향일체형조명일괄소등병합형</string>
     <string name="contoller_light_type_hdc_intlight_add_batchlight">현산향일체형조명일괄소등병합형</string>
+    <string name="contoller_light_type_hdc_intlight_add_batchlight_multiswitch">현산향일체형조명일괄소등병합형_멀티스위치</string>
     <string name="contoller_light_type_smart_distribution">스마트분전반조명</string>
     <string name="contoller_light_type_smart_distribution">스마트분전반조명</string>
 
 
     
     
@@ -265,6 +264,10 @@
     <string name="contoller_energy_smartswitch_energy_kind_item_realtime">실시간검침기</string>
     <string name="contoller_energy_smartswitch_energy_kind_item_realtime">실시간검침기</string>
     <string name="contoller_energy_smartswitch_energy_kind_item_remote">원격검침기</string>
     <string name="contoller_energy_smartswitch_energy_kind_item_remote">원격검침기</string>
     <string name="contoller_energy_powercontroller">통합전력제어기</string>
     <string name="contoller_energy_powercontroller">통합전력제어기</string>
+    <string name="contoller_lh_gateway">LH게이트웨이</string>
+    <string name="contoller_kitchen_em_option">각실EM 제어 옵션</string>
+
+    <string name="contoller_main_gui_ctrl_use">제어기능</string>
 
 
     <string name="contoller_purity">청정환기</string>
     <string name="contoller_purity">청정환기</string>
     <string name="contoller_louver">전동루버</string>
     <string name="contoller_louver">전동루버</string>
@@ -300,11 +303,17 @@
     <string name="contoller_realtime_masuring_meter_item_4">4종</string>
     <string name="contoller_realtime_masuring_meter_item_4">4종</string>
     <string name="contoller_realtime_masuring_meter_item_5">5종</string>
     <string name="contoller_realtime_masuring_meter_item_5">5종</string>
     <string name="contoller_realtime_masuring_meter_item_6">6종</string>
     <string name="contoller_realtime_masuring_meter_item_6">6종</string>
-    
-    
-    
-    
-    
+
+    <string name="contoller_systemaircon_samsung_air">삼성냉방</string>
+    <string name="contoller_systemaircon_samsung_air_heat">삼성냉난방</string>
+    <string name="contoller_systemaircon_lg_air">LG냉방</string>
+    <string name="contoller_systemaircon_lg_air_heat">LG냉난방</string>
+    <string name="contoller_systemaircon_etc">기타APU</string>
+
+
+    <string name="contoller_kitchen_em_ctrl_option_batch">일괄제어</string>
+    <string name="contoller_kitchen_em_ctrl_option_in_order">순차제어</string>
+    <string name="contoller_kitchen_em_ctrl_option_in_order_and_reset">순차제어초기화</string>
     
     
     
     
     
     
@@ -488,7 +497,9 @@
     <string name="sales_sample_light_show_mainscreen">메인화면 조명 표시</string>
     <string name="sales_sample_light_show_mainscreen">메인화면 조명 표시</string>
     <string name="sales_sample_logo_show_option">메인화면 로고 옵션</string>
     <string name="sales_sample_logo_show_option">메인화면 로고 옵션</string>
 
 
-    <string name="detail_function_escapeladder_down_recv">피난사다리입하수신</string>
+    <string name="detail_function_escapeladder_down_send">피난사다리전송</string>
+    <string name="detail_function_escapeladder_down_send_upper">윗집</string>
+    <string name="detail_function_escapeladder_down_send_below">아랫집</string>
     <string name="detail_function_main_gui_select">메인GUI선택</string>
     <string name="detail_function_main_gui_select">메인GUI선택</string>
     <string name="detail_function_subphone_baudrate">서브폰 통신속도</string>
     <string name="detail_function_subphone_baudrate">서브폰 통신속도</string>
     <string name="detail_function_gas_detect_5time">가스감지5회알람</string>
     <string name="detail_function_gas_detect_5time">가스감지5회알람</string>
@@ -571,7 +582,6 @@
     <string name="detail_function_stranger_record_use">거동수상자 녹화 사용</string>
     <string name="detail_function_stranger_record_use">거동수상자 녹화 사용</string>
     <string name="detail_function_emergency_contact_switch_use">비상접점 스위치 사용</string>
     <string name="detail_function_emergency_contact_switch_use">비상접점 스위치 사용</string>
     <string name="detail_function_sendweather_reverse">서브폰 날씨정보 역순 전송</string>
     <string name="detail_function_sendweather_reverse">서브폰 날씨정보 역순 전송</string>
-    <string name="detail_function_systemaircon_heat_support">시스템에어컨 난방기능 지원</string>
     <string name="detail_function_bathsensor_use">욕실센서등 사용</string>
     <string name="detail_function_bathsensor_use">욕실센서등 사용</string>
     <string name="detail_function_lcdkeeper_use">LCD Keeper 사용</string>
     <string name="detail_function_lcdkeeper_use">LCD Keeper 사용</string>
     <string name="detail_function_venti_service_qr_use">환기케어서비스QR 사용</string>
     <string name="detail_function_venti_service_qr_use">환기케어서비스QR 사용</string>
@@ -582,7 +592,10 @@
     <string name="detail_function_send_bathphone_volume_setting">욕실폰 통화 음량값 전송</string>
     <string name="detail_function_send_bathphone_volume_setting">욕실폰 통화 음량값 전송</string>
     <string name="detail_function_send_kitchentv_volume_setting">주방TV 통화 음량값 전송</string>
     <string name="detail_function_send_kitchentv_volume_setting">주방TV 통화 음량값 전송</string>
     <string name="detail_function_send_subdevice_volume_setting_btn">전송</string>
     <string name="detail_function_send_subdevice_volume_setting_btn">전송</string>
-    
+
+    <string name="detail_function_smartiotcam_flip">스마트현관카메라 좌우반전</string>
+    <string name="detail_function_construction_special_function">건설사 특화기능</string>
+
     <string name="show_elevator_default">기본</string>
     <string name="show_elevator_default">기본</string>
     <string name="show_elevator_stairs">층표시</string>
     <string name="show_elevator_stairs">층표시</string>
     
     
@@ -636,6 +649,10 @@
     <string name="guard_management_office_name">방재실</string>
     <string name="guard_management_office_name">방재실</string>
 -->
 -->
 
 
+    <string name="detail_function_kakao_home_set">카카오홈</string>
+    <!--
+    <string name="detail_function_kakao_set">카카오홈 설정</string>
+    -->
     
     
 
 
 </resources>
 </resources>

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

@@ -1,11 +1,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadaddservice"
     package="kr.co.icontrols.wallpadaddservice"
     android:versionCode="17"
     android:versionCode="17"
-    android:versionName="2021.05.28.01">
+    android:versionName="2021.05.29.01">
 
 
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.RECORD_AUDIO" />

+ 14 - 3
WallPadAddService/src/main/java/co/kr/cctv/sohoCctv.java

@@ -8,6 +8,8 @@ import android.content.Context;
 import android.util.Log;
 import android.util.Log;
 import android.widget.Toast;
 import android.widget.Toast;
 
 
+import com.util.LogUtil;
+
 public class sohoCctv implements CctvPlayerEventListener {
 public class sohoCctv implements CctvPlayerEventListener {
 
 
     public static final String LogTag = "CctvPlayer";
     public static final String LogTag = "CctvPlayer";
@@ -29,8 +31,11 @@ public class sohoCctv implements CctvPlayerEventListener {
             if (cctvPlayer == null) {
             if (cctvPlayer == null) {
                 Log.d(TAG, "new CctvPlayer == null ");
                 Log.d(TAG, "new CctvPlayer == null ");
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -45,8 +50,11 @@ public class sohoCctv implements CctvPlayerEventListener {
                 cctvPlayer.play(url);
                 cctvPlayer.play(url);
                 m_PlayState = true;
                 m_PlayState = true;
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -59,8 +67,11 @@ public class sohoCctv implements CctvPlayerEventListener {
                     m_PlayState = false;
                     m_PlayState = false;
                 }
                 }
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

+ 71 - 14
WallPadAddService/src/main/java/com/honeywell/icontrols/HoneyWellCtrl.java

@@ -7,6 +7,8 @@ import android.os.AsyncTask;
 import android.util.Log;
 import android.util.Log;
 import android.widget.ImageView;
 import android.widget.ImageView;
 
 
+import com.util.LogUtil;
+
 import org.w3c.dom.Document;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.NodeList;
@@ -58,9 +60,12 @@ public class HoneyWellCtrl {
                 imageThread.interrupt();
                 imageThread.interrupt();
                 imageThread = null;
                 imageThread = null;
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finish()");
             Log.e(TAG, "[Exception] finish()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -96,16 +101,20 @@ public class HoneyWellCtrl {
                             mHttpCCTVConnect.execute(url);
                             mHttpCCTVConnect.execute(url);
                             Thread.sleep(200);
                             Thread.sleep(200);
                         } catch (InterruptedException e) {
                         } catch (InterruptedException e) {
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                         }
                     }
                     }
                 }
                 }
             });
             });
             imageThread.start();
             imageThread.start();
 
 
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] play(String urlStr) -> e");
             Log.e(TAG, "[Exception] play(String urlStr) -> e");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -118,9 +127,12 @@ public class HoneyWellCtrl {
                 imageThread = null;
                 imageThread = null;
             }
             }
             Log.i(TAG, "[stop] flag : " + flag);
             Log.i(TAG, "[stop] flag : " + flag);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stop()");
             Log.e(TAG, "[Exception] stop()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -133,14 +145,16 @@ public class HoneyWellCtrl {
         try {
         try {
             replyXML = new TCPConnect().execute(address, requestXML).get();
             replyXML = new TCPConnect().execute(address, requestXML).get();
         } catch (InterruptedException e) {
         } catch (InterruptedException e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         } catch (ExecutionException e) {
         } catch (ExecutionException e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         ArrayList<String> channel_infoUrlList = new ArrayList<String>();
         ArrayList<String> channel_infoUrlList = new ArrayList<String>();
         String result = replyResult(replyXML);
         String result = replyResult(replyXML);
         channel_infoUrlList.add(result);
         channel_infoUrlList.add(result);
-        if (result.equals("ok")) {
+        if (result!=null && result.equals("ok")) {
             channel_infoUrlList = null;
             channel_infoUrlList = null;
             channel_infoUrlList = replyMsgXMLParsing(replyXML);
             channel_infoUrlList = replyMsgXMLParsing(replyXML);
             channel_infoUrlList.add(0, result);
             channel_infoUrlList.add(0, result);
@@ -171,8 +185,11 @@ public class HoneyWellCtrl {
                 element = (Element) nodeList.item(i);
                 element = (Element) nodeList.item(i);
                 result = element.getAttribute("result");
                 result = element.getAttribute("result");
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return result;
         return result;
     }
     }
@@ -198,8 +215,11 @@ public class HoneyWellCtrl {
                 element = (Element) nodeList.item(i);
                 element = (Element) nodeList.item(i);
                 channel_infoUrlList.add(element.getAttribute("url"));
                 channel_infoUrlList.add(element.getAttribute("url"));
             }
             }
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return channel_infoUrlList;
         return channel_infoUrlList;
     }
     }
@@ -217,9 +237,11 @@ public class HoneyWellCtrl {
 //                Log.e(TAG, "[HttpCCTVConnect] mBitmap Height : " + mBitmap.getHeight() + ", Width : " + mBitmap.getWidth());
 //                Log.e(TAG, "[HttpCCTVConnect] mBitmap Height : " + mBitmap.getHeight() + ", Width : " + mBitmap.getWidth());
                 is.close();
                 is.close();
             } catch (MalformedURLException e) {
             } catch (MalformedURLException e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             } catch (IOException e) {
             } catch (IOException e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
             return mBitmap;
             return mBitmap;
         }
         }
@@ -230,8 +252,11 @@ public class HoneyWellCtrl {
             try {
             try {
 //            	Log.e(TAG, "[onPostExecute] mImageView Height : " + mImageView.getHeight() + ", Width : " + mImageView.getWidth());
 //            	Log.e(TAG, "[onPostExecute] mImageView Height : " + mImageView.getHeight() + ", Width : " + mImageView.getWidth());
                 mImageView.setImageBitmap(bitmap);
                 mImageView.setImageBitmap(bitmap);
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
     }
     }
@@ -263,9 +288,41 @@ public class HoneyWellCtrl {
                 response = new String(in, 0, in.length);
                 response = new String(in, 0, in.length);
 
 
                 System.out.println(response);
                 System.out.println(response);
-                mSocket.close();
+                //mSocket.close();
+            } catch (RuntimeException re) {
+                Log.e(TAG, re.toString());
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+            }
+            finally {
+               if(mObjOStream!=null) {
+                   try {
+                       mObjOStream.close();
+                   } catch (IOException e) {
+                       //e.printStackTrace();
+                       LogUtil.errorLogInfo("", TAG, e);
+                   }
+               }
+                mObjOStream = null;
+
+                if(mObjIStream!=null) {
+                    try {
+                        mObjIStream.close();
+                    } catch (IOException e) {
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
+                    }
+                }
+                mObjIStream = null;
+
+                try {
+                    if(mSocket!=null)
+                        mSocket.close();
+                } catch (IOException e) {
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
+                mSocket = null;
             }
             }
             return response;
             return response;
         }
         }

+ 18 - 4
WallPadAddService/src/main/java/com/nexpa/ControlLib.java

@@ -1,5 +1,7 @@
 package com.nexpa;
 package com.nexpa;
 
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadaddservice.MainActivity;
 import kr.co.icontrols.wallpadaddservice.MainActivity;
 
 
 public class ControlLib {
 public class ControlLib {
@@ -10,8 +12,11 @@ public class ControlLib {
         try {
         try {
             m_mainActivity = mainActivity;
             m_mainActivity = mainActivity;
             m_functionClass = new FunctionClass(this, nID);
             m_functionClass = new FunctionClass(this, nID);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
     }
     }
 
 
@@ -22,24 +27,33 @@ public class ControlLib {
     public void Play(String strIP) {
     public void Play(String strIP) {
         try {
         try {
             m_functionClass.ChangePlay(strIP);
             m_functionClass.ChangePlay(strIP);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
     }
     }
 
 
     public void STOP() {
     public void STOP() {
         try {
         try {
             m_functionClass.PlayStop();
             m_functionClass.PlayStop();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
     }
     }
 
 
     public void DisplayImageCam(byte[] pData, int offset, int length, int nID) {
     public void DisplayImageCam(byte[] pData, int offset, int length, int nID) {
         try {
         try {
             if (m_mainActivity != null) m_mainActivity.DisplayImageCam(pData, offset, length, nID);
             if (m_mainActivity != null) m_mainActivity.DisplayImageCam(pData, offset, length, nID);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
     }
     }
 
 

+ 5 - 1
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractController.java

@@ -8,6 +8,7 @@ import com.samsung.techwin.ipolis.information.NWCameraInfo.StreamUriInfo.StreamT
 import com.samsung.techwin.ipolis.information.NWCameraInfo.StreamUriInfo.TransportProtocol;
 import com.samsung.techwin.ipolis.information.NWCameraInfo.StreamUriInfo.TransportProtocol;
 import com.samsung.techwin.ipolis.information.NWCameraInfo.TimeLineInfo.Type;
 import com.samsung.techwin.ipolis.information.NWCameraInfo.TimeLineInfo.Type;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.information.ResultData;
+import com.util.LogUtil;
 
 
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
@@ -467,8 +468,11 @@ abstract class AbstractController {
                 stringTime += dstEndfix;
                 stringTime += dstEndfix;
             }
             }
 
 
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.getStackTrace();
+            //e.getStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         return stringTime;
         return stringTime;

+ 13 - 1
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractHttpController.java

@@ -54,6 +54,7 @@ import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.config.HttpConnectionConfig;
 import com.samsung.techwin.ipolis.config.HttpConnectionConfig;
 import com.samsung.techwin.ipolis.control.DeviceController.onRedirectLocationListener;
 import com.samsung.techwin.ipolis.control.DeviceController.onRedirectLocationListener;
 import com.samsung.techwin.ipolis.util.ErrorCode;
 import com.samsung.techwin.ipolis.util.ErrorCode;
+import com.util.LogUtil;
 
 
 /**
 /**
  * AbstractHttpController <br>
  * AbstractHttpController <br>
@@ -150,6 +151,8 @@ abstract class AbstractHttpController {
             registry.register(new Scheme("https", sf, 443));
             registry.register(new Scheme("https", sf, 443));
 
 
             connectionManager = new SingleClientConnManager(params, registry);
             connectionManager = new SingleClientConnManager(params, registry);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -212,6 +215,8 @@ abstract class AbstractHttpController {
 
 
                     if (mRedirectLocationListener != null)
                     if (mRedirectLocationListener != null)
                         mRedirectLocationListener.onRedirectLocation(uri.toURL());
                         mRedirectLocationListener.onRedirectLocation(uri.toURL());
+                } catch (RuntimeException re) {
+                    Log.e(TAG, re.toString());
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                 }
                 }
@@ -359,6 +364,8 @@ abstract class AbstractHttpController {
 
 
             mHttpConfig.setHost(url.getHost());
             mHttpConfig.setHost(url.getHost());
             mHttpConfig.setPort(iPort);
             mHttpConfig.setPort(iPort);
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -387,6 +394,8 @@ abstract class AbstractHttpController {
             r = null;
             r = null;
             temp = null;
             temp = null;
 
 
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -409,8 +418,11 @@ abstract class AbstractHttpController {
             }
             }
 
 
             return ret;
             return ret;
+        } catch (RuntimeException re) {
+            Log.e(TAG, re.toString());
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         return ret;
         return ret;

+ 58 - 17
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractMultiCameraController.java

@@ -7,6 +7,7 @@ import java.util.Hashtable;
 
 
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.util.ErrorCode;
 import com.samsung.techwin.ipolis.util.ErrorCode;
+import com.util.LogUtil;
 
 
 abstract class AbstractMultiCameraController extends AbstractController {
 abstract class AbstractMultiCameraController extends AbstractController {
     // ------------------------------------------------------------------------
     // ------------------------------------------------------------------------
@@ -57,10 +58,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
-                } catch (Exception e)
-
-                {
-                    e.printStackTrace();
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
+                } catch (Exception e) {
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -86,8 +88,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
 
 
                     int errorCode = res.getStatusCode();
                     int errorCode = res.getStatusCode();
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, null);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -130,8 +135,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
 
 
@@ -160,8 +168,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -189,8 +200,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -234,8 +248,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -264,8 +281,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -295,8 +315,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -327,8 +350,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -360,8 +386,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
 
 
                     }
                     }
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -402,8 +431,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
 
 
@@ -445,8 +477,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -501,8 +536,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -572,8 +610,11 @@ abstract class AbstractMultiCameraController extends AbstractController {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     resultData = null;
                     resultData = null;
                     result = null;
                     result = null;
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }

+ 79 - 16
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/AbstractSingleCameraController.java

@@ -7,6 +7,7 @@ import com.samsung.techwin.ipolis.information.NWCameraInfo.StreamUriInfo.Transpo
 import com.samsung.techwin.ipolis.information.NWCameraInfo.TimeLineInfo.Type;
 import com.samsung.techwin.ipolis.information.NWCameraInfo.TimeLineInfo.Type;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.util.ErrorCode;
 import com.samsung.techwin.ipolis.util.ErrorCode;
+import com.util.LogUtil;
 
 
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Calendar;
@@ -70,6 +71,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                         }
                         }
                     }
                     }
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -120,8 +123,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -176,8 +182,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -220,6 +229,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -266,6 +277,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -299,8 +312,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -330,8 +346,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -363,8 +382,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -415,8 +437,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -451,8 +476,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -486,8 +514,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -632,8 +663,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -669,8 +703,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -756,8 +793,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -792,8 +832,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -827,8 +870,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -864,8 +910,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -904,8 +953,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }
@@ -946,6 +998,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -978,6 +1032,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -1010,6 +1066,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -1042,6 +1100,8 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -1075,8 +1135,11 @@ abstract class AbstractSingleCameraController extends AbstractController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }

+ 49 - 12
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/DvrInfoParser.java

@@ -5,6 +5,7 @@ import java.util.Hashtable;
 
 
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.information.DvrInfo;
 import com.samsung.techwin.ipolis.information.DvrInfo;
+import com.util.LogUtil;
 
 
 class DvrInfoParser implements IMultiCameraInfoParser {
 class DvrInfoParser implements IMultiCameraInfoParser {
     private DvrInfo dvrInfo;
     private DvrInfo dvrInfo;
@@ -25,8 +26,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.ModelInfo info = dvrInfo.new ModelInfo();
             DvrInfo.ModelInfo info = dvrInfo.new ModelInfo();
 
 
             return (DvrInfo.ModelInfo) tool.parseModelInfo(info, response);
             return (DvrInfo.ModelInfo) tool.parseModelInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -38,8 +42,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.ProfileInfo info = dvrInfo.new ProfileInfo();
             DvrInfo.ProfileInfo info = dvrInfo.new ProfileInfo();
 
 
             return (DvrInfo.ProfileInfo) tool.parseProfileInfo(info, response);
             return (DvrInfo.ProfileInfo) tool.parseProfileInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         return null;
         return null;
@@ -51,8 +58,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.CameraInfo info = dvrInfo.new CameraInfo();
             DvrInfo.CameraInfo info = dvrInfo.new CameraInfo();
 
 
             return (DvrInfo.CameraInfo) tool.parseCameraInfo(info, response);
             return (DvrInfo.CameraInfo) tool.parseCameraInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -63,8 +73,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.AccessInfo info = dvrInfo.new AccessInfo();
             DvrInfo.AccessInfo info = dvrInfo.new AccessInfo();
 
 
             return (DvrInfo.AccessInfo) tool.parseAccessInfo(info, response);
             return (DvrInfo.AccessInfo) tool.parseAccessInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -75,8 +88,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.AdminInfo info = dvrInfo.new AdminInfo();
             DvrInfo.AdminInfo info = dvrInfo.new AdminInfo();
 
 
             return (DvrInfo.AdminInfo) tool.parseAdminInfo(info, response);
             return (DvrInfo.AdminInfo) tool.parseAdminInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -87,8 +103,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.UserInfo info = dvrInfo.new UserInfo();
             DvrInfo.UserInfo info = dvrInfo.new UserInfo();
 
 
             return (DvrInfo.UserInfo) tool.parseUserInfo(info, response);
             return (DvrInfo.UserInfo) tool.parseUserInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -99,8 +118,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.GroupInfo info = dvrInfo.new GroupInfo();
             DvrInfo.GroupInfo info = dvrInfo.new GroupInfo();
 
 
             return (DvrInfo.GroupInfo) tool.parseGroupInfo(info, response);
             return (DvrInfo.GroupInfo) tool.parseGroupInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -111,8 +133,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.OverlapInfo info = dvrInfo.new OverlapInfo();
             DvrInfo.OverlapInfo info = dvrInfo.new OverlapInfo();
 
 
             return (DvrInfo.OverlapInfo) tool.parseOverlapInfo(info, response);
             return (DvrInfo.OverlapInfo) tool.parseOverlapInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -123,8 +148,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.CalendarInfo info = dvrInfo.new CalendarInfo();
             DvrInfo.CalendarInfo info = dvrInfo.new CalendarInfo();
 
 
             return (DvrInfo.CalendarInfo) tool.parseCalendarInfo(info, response);
             return (DvrInfo.CalendarInfo) tool.parseCalendarInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -135,8 +163,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.SessionInfo info = dvrInfo.new SessionInfo();
             DvrInfo.SessionInfo info = dvrInfo.new SessionInfo();
 
 
             return (DvrInfo.SessionInfo) tool.parseSessionInfo(info, response);
             return (DvrInfo.SessionInfo) tool.parseSessionInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -147,8 +178,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
             DvrInfo.TimeLineInfo info = dvrInfo.new TimeLineInfo();
             DvrInfo.TimeLineInfo info = dvrInfo.new TimeLineInfo();
 
 
             return (DvrInfo.TimeLineInfo) tool.parseTimeLineInfo(info, response);
             return (DvrInfo.TimeLineInfo) tool.parseTimeLineInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -163,8 +197,11 @@ class DvrInfoParser implements IMultiCameraInfoParser {
 
 
             return (DvrInfo.TimeLineInfo) tool.parseParsedTimeLineInfo(info, response, startTime, endTime,
             return (DvrInfo.TimeLineInfo) tool.parseParsedTimeLineInfo(info, response, startTime, endTime,
                     dstStartTime, dstEndTime);
                     dstStartTime, dstEndTime);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }

+ 5 - 1
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/EncoderController.java

@@ -5,6 +5,7 @@ import java.util.Hashtable;
 import com.samsung.techwin.ipolis.information.EncoderInfo;
 import com.samsung.techwin.ipolis.information.EncoderInfo;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.util.ErrorCode;
 import com.samsung.techwin.ipolis.util.ErrorCode;
+import com.util.LogUtil;
 
 
 class EncoderController extends AbstractSingleCameraController {
 class EncoderController extends AbstractSingleCameraController {
     // ------------------------------------------------------------------------
     // ------------------------------------------------------------------------
@@ -39,8 +40,11 @@ class EncoderController extends AbstractSingleCameraController {
                     }
                     }
 
 
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, errorCode, resultData);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", "", e);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                     sendMessage(DeviceController.HANDLER_HTTP_RESULT, requestId, ErrorCode.UNDEFINED, null);
                 }
                 }
             }
             }

+ 33 - 8
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/EncoderInfoParser.java

@@ -4,6 +4,7 @@ import android.text.TextUtils;
 
 
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.information.EncoderInfo;
 import com.samsung.techwin.ipolis.information.EncoderInfo;
+import com.util.LogUtil;
 
 
 import java.util.Hashtable;
 import java.util.Hashtable;
 
 
@@ -26,8 +27,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.CapabilityInfo info = encoderInfo.new CapabilityInfo();
             EncoderInfo.CapabilityInfo info = encoderInfo.new CapabilityInfo();
 
 
             return (EncoderInfo.CapabilityInfo) tool.parseCapabilityInfo(info, response);
             return (EncoderInfo.CapabilityInfo) tool.parseCapabilityInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -38,8 +42,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.ProfileInfo info = encoderInfo.new ProfileInfo();
             EncoderInfo.ProfileInfo info = encoderInfo.new ProfileInfo();
 
 
             return (EncoderInfo.ProfileInfo) tool.parseProfileInfo(info, response);
             return (EncoderInfo.ProfileInfo) tool.parseProfileInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -66,8 +73,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.UserInfo info = encoderInfo.new UserInfo();
             EncoderInfo.UserInfo info = encoderInfo.new UserInfo();
 
 
             return (EncoderInfo.UserInfo) tool.parseUserInfo(info, response);
             return (EncoderInfo.UserInfo) tool.parseUserInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -78,8 +88,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.UserInfo info = encoderInfo.new UserInfo();
             EncoderInfo.UserInfo info = encoderInfo.new UserInfo();
 
 
             return (EncoderInfo.UserInfo) tool.parseUserDetailInfo(info, response, userIndex);
             return (EncoderInfo.UserInfo) tool.parseUserDetailInfo(info, response, userIndex);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -90,8 +103,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.CurrentPTZInfo info = encoderInfo.new CurrentPTZInfo();
             EncoderInfo.CurrentPTZInfo info = encoderInfo.new CurrentPTZInfo();
 
 
             return (EncoderInfo.CurrentPTZInfo) tool.parseCurrentPTZInfo(info, response, isZoomOnly);
             return (EncoderInfo.CurrentPTZInfo) tool.parseCurrentPTZInfo(info, response, isZoomOnly);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -119,8 +135,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             info.setActive(isActive);
             info.setActive(isActive);
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -221,8 +240,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.NetworkInfo info = encoderInfo.new NetworkInfo();
             EncoderInfo.NetworkInfo info = encoderInfo.new NetworkInfo();
 
 
             return (EncoderInfo.NetworkInfo) tool.parseNetworkInfo1(info, response);
             return (EncoderInfo.NetworkInfo) tool.parseNetworkInfo1(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -233,8 +255,11 @@ class EncoderInfoParser implements ISingleCameraInfoParser {
             EncoderInfo.NetworkInfo info = encoderInfo.new NetworkInfo();
             EncoderInfo.NetworkInfo info = encoderInfo.new NetworkInfo();
 
 
             return (EncoderInfo.NetworkInfo) tool.parseNetworkInfo2(info, response);
             return (EncoderInfo.NetworkInfo) tool.parseNetworkInfo2(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }

+ 59 - 14
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/MultiParsingTool.java

@@ -15,6 +15,7 @@ import com.samsung.techwin.ipolis.information.DvrInfo.MultiProfileInfo;
 import com.samsung.techwin.ipolis.information.NvrInfo;
 import com.samsung.techwin.ipolis.information.NvrInfo;
 import com.samsung.techwin.ipolis.information.Timeline;
 import com.samsung.techwin.ipolis.information.Timeline;
 import com.samsung.techwin.ipolis.information.Timeline.EventType;
 import com.samsung.techwin.ipolis.information.Timeline.EventType;
+import com.util.LogUtil;
 
 
 class MultiParsingTool {
 class MultiParsingTool {
     private int modelType = -1;
     private int modelType = -1;
@@ -119,8 +120,11 @@ class MultiParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -275,8 +279,11 @@ class MultiParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
 
 
         return null;
         return null;
@@ -335,8 +342,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -367,8 +377,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -388,8 +401,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -411,8 +427,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -448,8 +467,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -482,8 +504,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -511,8 +536,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -557,8 +585,11 @@ class MultiParsingTool {
                     timeLineList[i].setEndTimeType(Timeline
                     timeLineList[i].setEndTimeType(Timeline
                             .getTimeType(endTimeType));
                             .getTimeType(endTimeType));
                 }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", "", re);
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", "", e);
             } finally {
             } finally {
                 for (int i = 0; i < response.size(); i++) {
                 for (int i = 0; i < response.size(); i++) {
                     int channel = timeLineList[i].getChannel();
                     int channel = timeLineList[i].getChannel();
@@ -581,8 +612,11 @@ class MultiParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -629,8 +663,11 @@ class MultiParsingTool {
                     timeLineList[i].setEndTimeType(Timeline
                     timeLineList[i].setEndTimeType(Timeline
                             .getTimeType(endTimeType));
                             .getTimeType(endTimeType));
                 }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", "", re);
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", "", e);
             } finally {
             } finally {
                 for (int i = 0; i < response.size(); i++) {
                 for (int i = 0; i < response.size(); i++) {
                     int channel = timeLineList[i].getChannel();
                     int channel = timeLineList[i].getChannel();
@@ -659,8 +696,11 @@ class MultiParsingTool {
             timeLineList = null;
             timeLineList = null;
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -744,10 +784,13 @@ class MultiParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e)
         } catch (Exception e)
 
 
         {
         {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -758,6 +801,8 @@ class MultiParsingTool {
             for (int i = 0; i < sarray.length; i++) {
             for (int i = 0; i < sarray.length; i++) {
                 try {
                 try {
                     intarray[i] = Integer.parseInt(sarray[i]);
                     intarray[i] = Integer.parseInt(sarray[i]);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     intarray[i] = -1;
                     intarray[i] = -1;
                 }
                 }

+ 89 - 22
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/NWCameraInfoParser.java

@@ -2,6 +2,7 @@ package com.samsung.techwin.ipolis.control;
 
 
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.information.NWCameraInfo;
 import com.samsung.techwin.ipolis.information.NWCameraInfo;
+import com.util.LogUtil;
 
 
 import java.util.Hashtable;
 import java.util.Hashtable;
 
 
@@ -24,8 +25,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.CapabilityInfo info = nwCameraInfo.new CapabilityInfo();
             NWCameraInfo.CapabilityInfo info = nwCameraInfo.new CapabilityInfo();
 
 
             return (NWCameraInfo.CapabilityInfo) tool.parseCapabilityInfo(info, response);
             return (NWCameraInfo.CapabilityInfo) tool.parseCapabilityInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -36,8 +40,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.ProfileInfo info = nwCameraInfo.new ProfileInfo();
             NWCameraInfo.ProfileInfo info = nwCameraInfo.new ProfileInfo();
 
 
             return (NWCameraInfo.ProfileInfo) tool.parseProfileInfo(info, response);
             return (NWCameraInfo.ProfileInfo) tool.parseProfileInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -64,8 +71,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.UserInfo info = nwCameraInfo.new UserInfo();
             NWCameraInfo.UserInfo info = nwCameraInfo.new UserInfo();
 
 
             return (NWCameraInfo.UserInfo) tool.parseUserInfo(info, response);
             return (NWCameraInfo.UserInfo) tool.parseUserInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -76,8 +86,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.UserInfo info = nwCameraInfo.new UserInfo();
             NWCameraInfo.UserInfo info = nwCameraInfo.new UserInfo();
 
 
             return (NWCameraInfo.UserInfo) tool.parseUserDetailInfo(info, response, userIndex);
             return (NWCameraInfo.UserInfo) tool.parseUserDetailInfo(info, response, userIndex);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -88,8 +101,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.CurrentPTZInfo info = nwCameraInfo.new CurrentPTZInfo();
             NWCameraInfo.CurrentPTZInfo info = nwCameraInfo.new CurrentPTZInfo();
 
 
             return (NWCameraInfo.CurrentPTZInfo) tool.parseCurrentPTZInfo(info, response, isZoomOnly);
             return (NWCameraInfo.CurrentPTZInfo) tool.parseCurrentPTZInfo(info, response, isZoomOnly);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -105,8 +121,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.DeviceInfo info = nwCameraInfo.new DeviceInfo();
             NWCameraInfo.DeviceInfo info = nwCameraInfo.new DeviceInfo();
 
 
             return (NWCameraInfo.DeviceInfo) tool.parseDeviceInfo(info, response);
             return (NWCameraInfo.DeviceInfo) tool.parseDeviceInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -117,8 +136,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.ProfileInfo info = nwCameraInfo.new ProfileInfo();
             NWCameraInfo.ProfileInfo info = nwCameraInfo.new ProfileInfo();
 
 
             return (NWCameraInfo.ProfileInfo) tool.parseVideoProfileInfo(info, response);
             return (NWCameraInfo.ProfileInfo) tool.parseVideoProfileInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -129,8 +151,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.VideoProfilePolicyInfo info = nwCameraInfo.new VideoProfilePolicyInfo();
             NWCameraInfo.VideoProfilePolicyInfo info = nwCameraInfo.new VideoProfilePolicyInfo();
 
 
             return (NWCameraInfo.VideoProfilePolicyInfo) tool.parseVideoProfilePolicyInfo(info, response);
             return (NWCameraInfo.VideoProfilePolicyInfo) tool.parseVideoProfilePolicyInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -141,8 +166,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.UserInfo info = nwCameraInfo.new UserInfo();
             NWCameraInfo.UserInfo info = nwCameraInfo.new UserInfo();
 
 
             return (NWCameraInfo.UserInfo) tool.parseCameraUsersInfo(info, response);
             return (NWCameraInfo.UserInfo) tool.parseCameraUsersInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -153,8 +181,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.AttributeInfo info = nwCameraInfo.new AttributeInfo();
             NWCameraInfo.AttributeInfo info = nwCameraInfo.new AttributeInfo();
 
 
             return (NWCameraInfo.AttributeInfo) tool.parseAttributeInfo(info, rawString);
             return (NWCameraInfo.AttributeInfo) tool.parseAttributeInfo(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -165,8 +196,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.PresetInfo info = nwCameraInfo.new PresetInfo();
             NWCameraInfo.PresetInfo info = nwCameraInfo.new PresetInfo();
 
 
             return (NWCameraInfo.PresetInfo) tool.parsePresetInfo1(info, rawString);
             return (NWCameraInfo.PresetInfo) tool.parsePresetInfo1(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -177,8 +211,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.PresetInfo info = nwCameraInfo.new PresetInfo();
             NWCameraInfo.PresetInfo info = nwCameraInfo.new PresetInfo();
 
 
             return (NWCameraInfo.PresetInfo) tool.parsePresetInfo2(info, rawString);
             return (NWCameraInfo.PresetInfo) tool.parsePresetInfo2(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -189,8 +226,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.TimeLineInfo info = new NWCameraInfo.TimeLineInfo();
             NWCameraInfo.TimeLineInfo info = new NWCameraInfo.TimeLineInfo();
 
 
             return (NWCameraInfo.TimeLineInfo) tool.parseTimeLineInfo1(info, rawString);
             return (NWCameraInfo.TimeLineInfo) tool.parseTimeLineInfo1(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -201,8 +241,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.TimeLineInfo info = new NWCameraInfo.TimeLineInfo();
             NWCameraInfo.TimeLineInfo info = new NWCameraInfo.TimeLineInfo();
 
 
             return (NWCameraInfo.TimeLineInfo) tool.parseTimeLineInfo2(info, rawString);
             return (NWCameraInfo.TimeLineInfo) tool.parseTimeLineInfo2(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -213,8 +256,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.CurrentPTZInfo info = nwCameraInfo.new CurrentPTZInfo();
             NWCameraInfo.CurrentPTZInfo info = nwCameraInfo.new CurrentPTZInfo();
 
 
             return (NWCameraInfo.CurrentPTZInfo) tool.parseCurrentPTZInfo(info, response);
             return (NWCameraInfo.CurrentPTZInfo) tool.parseCurrentPTZInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -225,8 +271,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.OverlapInfo info = new NWCameraInfo.OverlapInfo();
             NWCameraInfo.OverlapInfo info = new NWCameraInfo.OverlapInfo();
 
 
             return (NWCameraInfo.OverlapInfo) tool.parseOverlapInfo(info, rawString);
             return (NWCameraInfo.OverlapInfo) tool.parseOverlapInfo(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -237,8 +286,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.CalendarInfo info = nwCameraInfo.new CalendarInfo();
             NWCameraInfo.CalendarInfo info = nwCameraInfo.new CalendarInfo();
 
 
             return (NWCameraInfo.CalendarInfo) tool.parseCalendarInfo(info, rawString);
             return (NWCameraInfo.CalendarInfo) tool.parseCalendarInfo(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -249,8 +301,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.CalendarInfo info = nwCameraInfo.new CalendarInfo();
             NWCameraInfo.CalendarInfo info = nwCameraInfo.new CalendarInfo();
 
 
             return (NWCameraInfo.CalendarInfo) tool.parseCalendarInfo(info, rawString);
             return (NWCameraInfo.CalendarInfo) tool.parseCalendarInfo(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -261,8 +316,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.StreamUriInfo info = new NWCameraInfo.StreamUriInfo();
             NWCameraInfo.StreamUriInfo info = new NWCameraInfo.StreamUriInfo();
 
 
             return (NWCameraInfo.StreamUriInfo) tool.parseStreamUriInfo(info, response);
             return (NWCameraInfo.StreamUriInfo) tool.parseStreamUriInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -273,8 +331,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.DateInfo info = new NWCameraInfo.DateInfo();
             NWCameraInfo.DateInfo info = new NWCameraInfo.DateInfo();
 
 
             return (NWCameraInfo.DateInfo) tool.parseDateInfo(info, response);
             return (NWCameraInfo.DateInfo) tool.parseDateInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -285,8 +346,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.NetworkInfo info = nwCameraInfo.new NetworkInfo();
             NWCameraInfo.NetworkInfo info = nwCameraInfo.new NetworkInfo();
 
 
             return (NWCameraInfo.NetworkInfo) tool.parseNetworkInfo1(info, response);
             return (NWCameraInfo.NetworkInfo) tool.parseNetworkInfo1(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -297,8 +361,11 @@ class NWCameraInfoParser implements ISingleCameraInfoParser {
             NWCameraInfo.NetworkInfo info = nwCameraInfo.new NetworkInfo();
             NWCameraInfo.NetworkInfo info = nwCameraInfo.new NetworkInfo();
 
 
             return (NWCameraInfo.NetworkInfo) tool.parseNetworkInfo2(info, response);
             return (NWCameraInfo.NetworkInfo) tool.parseNetworkInfo2(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }

+ 49 - 12
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/NvrInfoParser.java

@@ -2,6 +2,7 @@ package com.samsung.techwin.ipolis.control;
 
 
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.information.NvrInfo;
 import com.samsung.techwin.ipolis.information.NvrInfo;
+import com.util.LogUtil;
 
 
 import java.util.GregorianCalendar;
 import java.util.GregorianCalendar;
 import java.util.Hashtable;
 import java.util.Hashtable;
@@ -25,8 +26,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.ModelInfo info = nvrInfo.new ModelInfo();
             NvrInfo.ModelInfo info = nvrInfo.new ModelInfo();
 
 
             return (NvrInfo.ModelInfo) tool.parseModelInfo(info, response);
             return (NvrInfo.ModelInfo) tool.parseModelInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -38,8 +42,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.ProfileInfo info = nvrInfo.new ProfileInfo();
             NvrInfo.ProfileInfo info = nvrInfo.new ProfileInfo();
 
 
             return (NvrInfo.ProfileInfo) tool.parseProfileInfo(info, response);
             return (NvrInfo.ProfileInfo) tool.parseProfileInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
 
 
         return null;
         return null;
@@ -51,8 +58,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.CameraInfo info = nvrInfo.new CameraInfo();
             NvrInfo.CameraInfo info = nvrInfo.new CameraInfo();
 
 
             return (NvrInfo.CameraInfo) tool.parseCameraInfo(info, response);
             return (NvrInfo.CameraInfo) tool.parseCameraInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -63,8 +73,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.AccessInfo info = nvrInfo.new AccessInfo();
             NvrInfo.AccessInfo info = nvrInfo.new AccessInfo();
 
 
             return (NvrInfo.AccessInfo) tool.parseAccessInfo(info, response);
             return (NvrInfo.AccessInfo) tool.parseAccessInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -75,8 +88,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.AdminInfo info = nvrInfo.new AdminInfo();
             NvrInfo.AdminInfo info = nvrInfo.new AdminInfo();
 
 
             return (NvrInfo.AdminInfo) tool.parseAdminInfo(info, response);
             return (NvrInfo.AdminInfo) tool.parseAdminInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -87,8 +103,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.UserInfo info = nvrInfo.new UserInfo();
             NvrInfo.UserInfo info = nvrInfo.new UserInfo();
 
 
             return (NvrInfo.UserInfo) tool.parseUserInfo(info, response);
             return (NvrInfo.UserInfo) tool.parseUserInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -99,8 +118,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.GroupInfo info = nvrInfo.new GroupInfo();
             NvrInfo.GroupInfo info = nvrInfo.new GroupInfo();
 
 
             return (NvrInfo.GroupInfo) tool.parseGroupInfo(info, response);
             return (NvrInfo.GroupInfo) tool.parseGroupInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -111,8 +133,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.OverlapInfo info = nvrInfo.new OverlapInfo();
             NvrInfo.OverlapInfo info = nvrInfo.new OverlapInfo();
 
 
             return (NvrInfo.OverlapInfo) tool.parseOverlapInfo(info, response);
             return (NvrInfo.OverlapInfo) tool.parseOverlapInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -123,8 +148,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.CalendarInfo info = nvrInfo.new CalendarInfo();
             NvrInfo.CalendarInfo info = nvrInfo.new CalendarInfo();
 
 
             return (NvrInfo.CalendarInfo) tool.parseCalendarInfo(info, response);
             return (NvrInfo.CalendarInfo) tool.parseCalendarInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -135,8 +163,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.TimeLineInfo info = nvrInfo.new TimelineInfo();
             NvrInfo.TimeLineInfo info = nvrInfo.new TimelineInfo();
 
 
             return (NvrInfo.TimeLineInfo) tool.parseTimeLineInfo(info, response);
             return (NvrInfo.TimeLineInfo) tool.parseTimeLineInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -147,8 +178,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
             NvrInfo.SessionInfo info = nvrInfo.new SessionInfo();
             NvrInfo.SessionInfo info = nvrInfo.new SessionInfo();
 
 
             return (NvrInfo.SessionInfo) tool.parseSessionInfo(info, response);
             return (NvrInfo.SessionInfo) tool.parseSessionInfo(info, response);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }
@@ -162,8 +196,11 @@ class NvrInfoParser implements IMultiCameraInfoParser {
 
 
             return (NvrInfo.TimeLineInfo) tool.parseParsedTimeLineInfo(info, response, startTime, endTime,
             return (NvrInfo.TimeLineInfo) tool.parseParsedTimeLineInfo(info, response, startTime, endTime,
                     dstStartTime, dstEndTime);
                     dstStartTime, dstEndTime);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         return null;
         return null;
     }
     }

+ 12 - 7
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/Redirection.java

@@ -222,7 +222,7 @@ public class Redirection {
 
 
             String request;
             String request;
             String response;
             String response;
-            String message[];
+            String message[] = null;
 
 
             request = String.format(DIRGETSVRINFO, mId);
             request = String.format(DIRGETSVRINFO, mId);
             Log.d(TAG, "[Redirection] Request : " + request.replaceAll("\r\n", ""));
             Log.d(TAG, "[Redirection] Request : " + request.replaceAll("\r\n", ""));
@@ -234,11 +234,14 @@ public class Redirection {
             while ("".equals(response = mBufferedreader.readLine()) == false) {
             while ("".equals(response = mBufferedreader.readLine()) == false) {
                 sb.append(response);
                 sb.append(response);
 
 
-                message = response.split(": ");
+                if(response!=null)
+                {
+                    message = response.split(": ");
+                }
                 if (!success) {
                 if (!success) {
-                    if (message[0].endsWith("OK")) {
+                    if (message!=null && message[0].endsWith("OK")) {
                         success = true;
                         success = true;
-                    } else if (message[0].endsWith("No ID Exist")) {
+                    } else if (message!=null && message[0].endsWith("No ID Exist")) {
                         mStatus = NOT_EXIST;
                         mStatus = NOT_EXIST;
                         break;
                         break;
                     } else {
                     } else {
@@ -248,9 +251,9 @@ public class Redirection {
                 }
                 }
 
 
                 if (success) {
                 if (success) {
-                    if (message[0].equals("IP")) {
+                    if (message!=null && message[0].equals("IP")) {
                         mRedirectionHost = message[1];
                         mRedirectionHost = message[1];
-                    } else if (message[0].equals("WEB_PORT")) {
+                    } else if (message!=null && message[0].equals("WEB_PORT")) {
                         mRedirectionPort = Integer.valueOf(message[1]);
                         mRedirectionPort = Integer.valueOf(message[1]);
                     }
                     }
                 }
                 }
@@ -286,7 +289,9 @@ public class Redirection {
                 mBufferedreader.close();
                 mBufferedreader.close();
                 mBufferedwriter.close();
                 mBufferedwriter.close();
                 mSocket.close();
                 mSocket.close();
-            } catch (Exception e) {
+            } catch (RuntimeException re) {
+                Log.e(TAG, Log.getStackTraceString(re));
+            } catch (Exception  e) {
                 Log.e(TAG, Log.getStackTraceString(e));
                 Log.e(TAG, Log.getStackTraceString(e));
             }
             }
         }
         }

+ 2 - 1
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/ResponseData.java

@@ -21,7 +21,8 @@ final class ResponseData {
     }
     }
 
 
     String[] getResult() {
     String[] getResult() {
-        return result;
+        String[] temp_result = result;
+        return temp_result;
     }
     }
 
 
     void setData(int statusCode, String[] result) {
     void setData(int statusCode, String[] result) {

+ 85 - 21
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/SingleParsingTool.java

@@ -6,6 +6,7 @@ import com.samsung.techwin.ipolis.information.NWCameraInfo;
 import com.samsung.techwin.ipolis.information.ProfileData;
 import com.samsung.techwin.ipolis.information.ProfileData;
 import com.samsung.techwin.ipolis.information.Timeline;
 import com.samsung.techwin.ipolis.information.Timeline;
 import com.samsung.techwin.ipolis.information.Timeline.TimeType;
 import com.samsung.techwin.ipolis.information.Timeline.TimeType;
+import com.util.LogUtil;
 
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlPullParserException;
@@ -90,8 +91,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -258,8 +262,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -296,8 +303,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -329,8 +339,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -379,8 +392,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -404,8 +420,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -488,8 +507,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -510,8 +532,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -553,8 +578,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -562,8 +590,11 @@ class SingleParsingTool {
     public Object parseAttributeInfo(Object info, final String rawString) {
     public Object parseAttributeInfo(Object info, final String rawString) {
         try {
         try {
             return parseAttributeData(info, rawString);
             return parseAttributeData(info, rawString);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -669,8 +700,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -704,8 +738,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -734,8 +771,11 @@ class SingleParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -761,8 +801,11 @@ class SingleParsingTool {
                     break;
                     break;
             }
             }
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -817,8 +860,11 @@ class SingleParsingTool {
             // }
             // }
             //
             //
             // return info;
             // return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -901,8 +947,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -929,8 +978,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -951,8 +1003,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -1019,8 +1074,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -1044,8 +1102,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -1069,8 +1130,11 @@ class SingleParsingTool {
             }
             }
 
 
             return info;
             return info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return null;
         return null;
     }
     }

+ 9 - 2
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/control/TimeLineDstCalc.java

@@ -3,6 +3,7 @@ package com.samsung.techwin.ipolis.control;
 import com.samsung.techwin.ipolis.information.Timeline;
 import com.samsung.techwin.ipolis.information.Timeline;
 import com.samsung.techwin.ipolis.information.Timeline.EventType;
 import com.samsung.techwin.ipolis.information.Timeline.EventType;
 import com.samsung.techwin.ipolis.information.Timeline.TimeType;
 import com.samsung.techwin.ipolis.information.Timeline.TimeType;
+import com.util.LogUtil;
 
 
 import android.util.Log;
 import android.util.Log;
 
 
@@ -79,8 +80,11 @@ public class TimeLineDstCalc {
             Timeline[] resultData = getOrderList(result);
             Timeline[] resultData = getOrderList(result);
 
 
             return resultData;
             return resultData;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.getStackTrace();
+            //e.getStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
 
 
         return null;
         return null;
@@ -220,8 +224,11 @@ public class TimeLineDstCalc {
             // }
             // }
             // System.out.println("--------------------------");
             // System.out.println("--------------------------");
             return result;
             return result;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.getStackTrace();
+            //e.getStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
 
 
         return null;
         return null;

+ 117 - 41
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/DvrInfo.java

@@ -1,5 +1,6 @@
 package com.samsung.techwin.ipolis.information;
 package com.samsung.techwin.ipolis.information;
 
 
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.GregorianCalendar;
 import java.util.Locale;
 import java.util.Locale;
@@ -7,6 +8,7 @@ import java.util.Locale;
 import android.util.SparseArray;
 import android.util.SparseArray;
 
 
 import com.samsung.techwin.ipolis.config.CommonConfig;
 import com.samsung.techwin.ipolis.config.CommonConfig;
+import com.util.LogUtil;
 
 
 /**
 /**
  * Dvr Http 정보 클래스<br>
  * Dvr Http 정보 클래스<br>
@@ -68,7 +70,8 @@ public class DvrInfo {
          * @return the speed
          * @return the speed
          */
          */
         public int[] getSpeed() {
         public int[] getSpeed() {
-            return speed;
+            int[] temp_speed = speed;
+            return temp_speed;
         }
         }
 
 
         /**
         /**
@@ -134,7 +137,10 @@ public class DvrInfo {
          * @param speed the speed to set
          * @param speed the speed to set
          */
          */
         public void setSpeed(int[] speed) {
         public void setSpeed(int[] speed) {
-            this.speed = speed;
+            if(speed!=null)
+                this.speed = java.util.Arrays.copyOf(speed, speed.length);
+            else
+                this.speed = null;
         }
         }
 
 
         /**
         /**
@@ -170,7 +176,8 @@ public class DvrInfo {
          * @return MacAddress
          * @return MacAddress
          */
          */
         public String[] getMacAddress() {
         public String[] getMacAddress() {
-            return macAddress;
+            String[] temp_macAddress = macAddress;
+            return temp_macAddress;
         }
         }
 
 
         /**
         /**
@@ -179,7 +186,10 @@ public class DvrInfo {
          * @param macAddress MacAddress
          * @param macAddress MacAddress
          */
          */
         public void setMacAddress(String[] macAddress) {
         public void setMacAddress(String[] macAddress) {
-            this.macAddress = macAddress;
+            if(macAddress!=null)
+                this.macAddress = java.util.Arrays.copyOf(macAddress, macAddress.length);
+            else
+                this.macAddress = null;
         }
         }
 
 
         /**
         /**
@@ -188,7 +198,8 @@ public class DvrInfo {
          * @return 장비사양 리스트
          * @return 장비사양 리스트
          */
          */
         public String[] getCapabilities() {
         public String[] getCapabilities() {
-            return capabilities;
+            String[] temp_capabilities = capabilities;
+            return temp_capabilities;
         }
         }
 
 
         /**
         /**
@@ -197,7 +208,10 @@ public class DvrInfo {
          * @param capabilities 장비사양 리스트
          * @param capabilities 장비사양 리스트
          */
          */
         public void setCapabilities(String[] capabilities) {
         public void setCapabilities(String[] capabilities) {
-            this.capabilities = capabilities;
+            if(capabilities!=null)
+                this.capabilities = java.util.Arrays.copyOf(capabilities, capabilities.length);
+            else
+                this.capabilities = null;
         }
         }
 
 
         /**
         /**
@@ -272,8 +286,12 @@ public class DvrInfo {
                 calendar.set(Calendar.SECOND, 0);
                 calendar.set(Calendar.SECOND, 0);
                 calendar.set(Calendar.MILLISECOND, 0);
                 calendar.set(Calendar.MILLISECOND, 0);
                 return calendar;
                 return calendar;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", "", re);
+                return null;
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", "", e);
                 return null;
                 return null;
             }
             }
 
 
@@ -336,7 +354,8 @@ public class DvrInfo {
          * @return the codec
          * @return the codec
          */
          */
         public int[] getCodec() {
         public int[] getCodec() {
-            return codec;
+            int[] temp_codec = codec;
+            return temp_codec;
         }
         }
 
 
         /**
         /**
@@ -345,7 +364,8 @@ public class DvrInfo {
          * @return the resolution
          * @return the resolution
          */
          */
         public String[] getResolution() {
         public String[] getResolution() {
-            return resolution;
+            String[] temp_resolution = resolution;
+            return temp_resolution;
         }
         }
 
 
         /**
         /**
@@ -354,7 +374,8 @@ public class DvrInfo {
          * @return the quailty
          * @return the quailty
          */
          */
         public String[] getQuality() {
         public String[] getQuality() {
-            return quality;
+            String[] temp_quality = quality;
+            return temp_quality;
         }
         }
 
 
         /**
         /**
@@ -363,7 +384,8 @@ public class DvrInfo {
          * @return the ptz
          * @return the ptz
          */
          */
         public boolean[] getAvailablePtz() {
         public boolean[] getAvailablePtz() {
-            return ptz;
+            boolean[] temp_ptz = ptz;
+            return temp_ptz;
         }
         }
 
 
         /**
         /**
@@ -372,7 +394,8 @@ public class DvrInfo {
          * @return the ptz
          * @return the ptz
          */
          */
         public int[] getframeRate() {
         public int[] getframeRate() {
-            return frameRate;
+            int[] temp_frameRate = frameRate;
+            return temp_frameRate;
         }
         }
 
 
         /**
         /**
@@ -381,7 +404,8 @@ public class DvrInfo {
          * @return the ptz
          * @return the ptz
          */
          */
         public int[] getbitRate() {
         public int[] getbitRate() {
-            return bitRate;
+            int[] temp_bitRate = bitRate;
+            return temp_bitRate;
         }
         }
 
 
         /**
         /**
@@ -390,7 +414,10 @@ public class DvrInfo {
          * @param codec the codec to set
          * @param codec the codec to set
          */
          */
         public void setCodec(int[] codec) {
         public void setCodec(int[] codec) {
-            this.codec = codec;
+            if(codec!=null)
+                this.codec = java.util.Arrays.copyOf(codec, codec.length);
+            else
+                this.codec = null;
         }
         }
 
 
         /**
         /**
@@ -399,7 +426,10 @@ public class DvrInfo {
          * @param resolution the resolution to set
          * @param resolution the resolution to set
          */
          */
         public void setResolution(String[] resolution) {
         public void setResolution(String[] resolution) {
-            this.resolution = resolution;
+            if(resolution!=null)
+                this.resolution = java.util.Arrays.copyOf(resolution, resolution.length);
+            else
+                this.resolution = null;
         }
         }
 
 
         /**
         /**
@@ -408,7 +438,10 @@ public class DvrInfo {
          * @param quality the quality to set
          * @param quality the quality to set
          */
          */
         public void setQuailty(String[] quality) {
         public void setQuailty(String[] quality) {
-            this.quality = quality;
+            if(quality!=null)
+                this.quality = java.util.Arrays.copyOf(quality, quality.length);
+            else
+                this.quality = null;
         }
         }
 
 
         /**
         /**
@@ -417,7 +450,10 @@ public class DvrInfo {
          * @param ptz the ptz to set
          * @param ptz the ptz to set
          */
          */
         public void setAvailablePtz(boolean[] ptz) {
         public void setAvailablePtz(boolean[] ptz) {
-            this.ptz = ptz;
+            if(ptz!=null)
+                this.ptz = java.util.Arrays.copyOf(ptz, ptz.length);
+            else
+                ptz = null;
         }
         }
 
 
         /**
         /**
@@ -426,7 +462,9 @@ public class DvrInfo {
          * @param frameRate the frameRate to set
          * @param frameRate the frameRate to set
          */
          */
         public void setFrameRate(int[] frameRate) {
         public void setFrameRate(int[] frameRate) {
-            this.frameRate = frameRate;
+            int[] temp_frameRate = frameRate;
+            if(temp_frameRate!=null)
+                this.frameRate = java.util.Arrays.copyOf(temp_frameRate, temp_frameRate.length);
         }
         }
 
 
         /**
         /**
@@ -435,7 +473,9 @@ public class DvrInfo {
          * @param bitRate the bitRate to set
          * @param bitRate the bitRate to set
          */
          */
         public void setBitrate(int[] bitRate) {
         public void setBitrate(int[] bitRate) {
-            this.bitRate = bitRate;
+            int[] temp_bitRate = bitRate;
+            if(temp_bitRate!=null)
+                this.bitRate = java.util.Arrays.copyOf(temp_bitRate, temp_bitRate.length);
         }
         }
 
 
         /**
         /**
@@ -509,7 +549,8 @@ public class DvrInfo {
          * @return 해상도
          * @return 해상도
          */
          */
         public String[] getResolution() {
         public String[] getResolution() {
-            return resolution;
+            String[] temp_resolution = resolution;
+            return temp_resolution;
         }
         }
 
 
         /**
         /**
@@ -518,7 +559,9 @@ public class DvrInfo {
          * @param resolution 해상도
          * @param resolution 해상도
          */
          */
         public void setResolution(String[] resolution) {
         public void setResolution(String[] resolution) {
-            this.resolution = resolution;
+            String[] temp_resolution = resolution;
+            if(temp_resolution!=null)
+                this.resolution = java.util.Arrays.copyOf(temp_resolution, temp_resolution.length);
         }
         }
 
 
         /**
         /**
@@ -527,7 +570,8 @@ public class DvrInfo {
          * @return 프레임레이트
          * @return 프레임레이트
          */
          */
         public int[] getFrameRate() {
         public int[] getFrameRate() {
-            return frameRate;
+            int[] temp_frameRate = frameRate;
+            return temp_frameRate;
         }
         }
 
 
         /**
         /**
@@ -536,7 +580,9 @@ public class DvrInfo {
          * @param frameRate 프레임레이트
          * @param frameRate 프레임레이트
          */
          */
         public void setFrameRate(int[] frameRate) {
         public void setFrameRate(int[] frameRate) {
-            this.frameRate = frameRate;
+            int[] temp_frameRate = frameRate;
+            if(temp_frameRate!=null)
+                this.frameRate = java.util.Arrays.copyOf(temp_frameRate, temp_frameRate.length);
         }
         }
 
 
         /**
         /**
@@ -545,7 +591,8 @@ public class DvrInfo {
          * @return 전송화질
          * @return 전송화질
          */
          */
         public int[] getQuality() {
         public int[] getQuality() {
-            return quality;
+            int[] temp_quality = quality;
+            return temp_quality;
         }
         }
 
 
         /**
         /**
@@ -554,7 +601,11 @@ public class DvrInfo {
          * @param quality 전송화질
          * @param quality 전송화질
          */
          */
         public void setQuality(int[] quality) {
         public void setQuality(int[] quality) {
-            this.quality = quality;
+            int[] temp_quality = quality;
+            if(temp_quality !=null )
+            {
+                this.quality = java.util.Arrays.copyOf(temp_quality, temp_quality.length);
+            }
         }
         }
     }
     }
 
 
@@ -609,7 +660,8 @@ public class DvrInfo {
          * @return the channelName
          * @return the channelName
          */
          */
         public String[] getChannelName() {
         public String[] getChannelName() {
-            return channelName;
+            String[] temp_channelName = channelName;
+            return temp_channelName;
         }
         }
 
 
         /**
         /**
@@ -618,7 +670,8 @@ public class DvrInfo {
          * @return the videoState
          * @return the videoState
          */
          */
         public int[] getVideoState() {
         public int[] getVideoState() {
-            return videoState;
+            int[] temp_videoState = videoState;
+            return temp_videoState;
         }
         }
 
 
         /**
         /**
@@ -636,7 +689,11 @@ public class DvrInfo {
          * @param name the name to set
          * @param name the name to set
          */
          */
         public void setChanelName(String[] name) {
         public void setChanelName(String[] name) {
-            this.channelName = name;
+            String[] temp_name = name;
+            if(temp_name!=null)
+            {
+                this.channelName = java.util.Arrays.copyOf(temp_name, temp_name.length);
+            }
         }
         }
 
 
         /**
         /**
@@ -645,7 +702,9 @@ public class DvrInfo {
          * @param video the video to set
          * @param video the video to set
          */
          */
         public void setVideoState(int[] video) {
         public void setVideoState(int[] video) {
-            this.videoState = video;
+            int[] temp_video = video;
+            if(temp_video!=null)
+                this.videoState = java.util.Arrays.copyOf(temp_video, temp_video.length);
         }
         }
 
 
     }
     }
@@ -800,7 +859,8 @@ public class DvrInfo {
          * @return the SearchChPermissionList
          * @return the SearchChPermissionList
          */
          */
         public boolean[] getSearchChPermission() {
         public boolean[] getSearchChPermission() {
-            return SearchChPermissionList;
+            boolean[] temp_SearchChPermissionList = SearchChPermissionList;
+            return temp_SearchChPermissionList;
         }
         }
 
 
         /**
         /**
@@ -818,7 +878,9 @@ public class DvrInfo {
          * @param SearchChPermissionList the SearchChPermissionList to set
          * @param SearchChPermissionList the SearchChPermissionList to set
          */
          */
         public void setSearchChPermission(boolean[] SearchChPermissionList) {
         public void setSearchChPermission(boolean[] SearchChPermissionList) {
-            this.SearchChPermissionList = SearchChPermissionList;
+            boolean[] temp_SearchChPermissionList = SearchChPermissionList;
+            if(temp_SearchChPermissionList!=null)
+                this.SearchChPermissionList = java.util.Arrays.copyOf(temp_SearchChPermissionList, temp_SearchChPermissionList.length);
         }
         }
 
 
     }
     }
@@ -838,7 +900,8 @@ public class DvrInfo {
          * @return the overlapIndex
          * @return the overlapIndex
          */
          */
         public int[] getOverlapIndex() {
         public int[] getOverlapIndex() {
-            return overlapIndex;
+            int[] temp_overlapIndex = overlapIndex;
+            return temp_overlapIndex;
         }
         }
 
 
         /**
         /**
@@ -847,7 +910,9 @@ public class DvrInfo {
          * @param overlapIndex the overlapIndex to set
          * @param overlapIndex the overlapIndex to set
          */
          */
         public void setOverlapIndex(int[] overlapIndex) {
         public void setOverlapIndex(int[] overlapIndex) {
-            this.overlapIndex = overlapIndex;
+            int[] temp_overlapIndex = overlapIndex;
+            if(temp_overlapIndex!=null)
+                this.overlapIndex = java.util.Arrays.copyOf(temp_overlapIndex, temp_overlapIndex.length);
         }
         }
 
 
     }
     }
@@ -915,7 +980,8 @@ public class DvrInfo {
                 }
                 }
             }
             }
 
 
-            return timeLineDataList;
+            TimeLineData[] temp_timeLineDataList = timeLineDataList;
+            return temp_timeLineDataList;
         }
         }
 
 
         /**
         /**
@@ -925,17 +991,22 @@ public class DvrInfo {
          */
          */
         @SuppressWarnings("deprecation")
         @SuppressWarnings("deprecation")
         public void setTimeLineList(TimeLineData[] timeLineList) {
         public void setTimeLineList(TimeLineData[] timeLineList) {
-            this.timeLineDataList = timeLineList;
+            TimeLineData[] temp_timeLineList = timeLineList;
+            if(temp_timeLineList!=null)
+                this.timeLineDataList = java.util.Arrays.copyOf(temp_timeLineList, temp_timeLineList.length);
         }
         }
 
 
         private Timeline[] timeLine;
         private Timeline[] timeLine;
 
 
         public Timeline[] getTimeLine() {
         public Timeline[] getTimeLine() {
-            return timeLine;
+            Timeline[] temp_timeLine = timeLine;
+            return temp_timeLine;
         }
         }
 
 
         public void setTimeLine(Timeline[] timeLine) {
         public void setTimeLine(Timeline[] timeLine) {
-            this.timeLine = timeLine;
+            Timeline[] temp_timeLine = timeLine;
+            if(temp_timeLine!=null)
+                this.timeLine = java.util.Arrays.copyOf(temp_timeLine, temp_timeLine.length);
         }
         }
     }
     }
 
 
@@ -1025,7 +1096,8 @@ public class DvrInfo {
          * @return the liveAuthList
          * @return the liveAuthList
          */
          */
         public boolean[] getLiveAuthList() {
         public boolean[] getLiveAuthList() {
-            return liveAuthList;
+            boolean[] temp_liveAuthList = liveAuthList;
+            return temp_liveAuthList;
         }
         }
 
 
         /**
         /**
@@ -1034,7 +1106,8 @@ public class DvrInfo {
          * @return the searchAuthList
          * @return the searchAuthList
          */
          */
         public boolean[] getSearchAuthList() {
         public boolean[] getSearchAuthList() {
-            return searchAuthList;
+            boolean[] temp_searchAuthList = searchAuthList;
+            return temp_searchAuthList;
         }
         }
 
 
         /**
         /**
@@ -1091,7 +1164,9 @@ public class DvrInfo {
          * @param liveAuthList the liveAuthList to set
          * @param liveAuthList the liveAuthList to set
          */
          */
         public void setLiveAuthList(boolean[] liveAuthList) {
         public void setLiveAuthList(boolean[] liveAuthList) {
-            this.liveAuthList = liveAuthList;
+            boolean[] temp_liveAuthList = liveAuthList;
+            if(temp_liveAuthList!=null)
+                this.liveAuthList = java.util.Arrays.copyOf(temp_liveAuthList, temp_liveAuthList.length);
         }
         }
 
 
         /**
         /**
@@ -1100,7 +1175,8 @@ public class DvrInfo {
          * @param searchAuthList the searchAuthList to set
          * @param searchAuthList the searchAuthList to set
          */
          */
         public void setSearchAuthList(boolean[] searchAuthList) {
         public void setSearchAuthList(boolean[] searchAuthList) {
-            this.searchAuthList = searchAuthList;
+            boolean[] temp_searchAuthList = searchAuthList;
+            if(temp_searchAuthList!=null) this.searchAuthList = java.util.Arrays.copyOf(temp_searchAuthList, temp_searchAuthList.length);
         }
         }
 
 
         /**
         /**

+ 14 - 7
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/NWCameraInfo.java

@@ -46,7 +46,8 @@ public class NWCameraInfo {
          * @return 해상도 리스트
          * @return 해상도 리스트
          */
          */
         public String[] getVideoResolution() {
         public String[] getVideoResolution() {
-            return videoResolution;
+            String[] temp_videoResolution = videoResolution;
+            return temp_videoResolution;
         }
         }
 
 
         /**
         /**
@@ -100,7 +101,8 @@ public class NWCameraInfo {
          * @param videoResolution 해상도 리스트
          * @param videoResolution 해상도 리스트
          */
          */
         public void setVideoResolution(String[] videoResolution) {
         public void setVideoResolution(String[] videoResolution) {
-            this.videoResolution = videoResolution;
+            String[] temp_videoResolution =videoResolution;
+            if(temp_videoResolution!=null)this.videoResolution = java.util.Arrays.copyOf(temp_videoResolution, temp_videoResolution.length);
         }
         }
 
 
         /**
         /**
@@ -163,7 +165,8 @@ public class NWCameraInfo {
          * @return 프로파일 리스트
          * @return 프로파일 리스트
          */
          */
         public ProfileData[] getProfileList() {
         public ProfileData[] getProfileList() {
-            return profileList;
+            ProfileData[] temp_profileList = profileList;
+            return temp_profileList;
         }
         }
 
 
         /**
         /**
@@ -172,7 +175,8 @@ public class NWCameraInfo {
          * @param profileList 프로파일 리스트
          * @param profileList 프로파일 리스트
          */
          */
         public void setProfileList(ProfileData[] profileList) {
         public void setProfileList(ProfileData[] profileList) {
-            this.profileList = profileList;
+            ProfileData[] temp_profileList = profileList;
+            if(temp_profileList!=null) this.profileList = java.util.Arrays.copyOf(temp_profileList, temp_profileList.length);
         }
         }
 
 
     }
     }
@@ -424,11 +428,13 @@ public class NWCameraInfo {
         }
         }
 
 
         public int[] getPlaybackSpeed() {
         public int[] getPlaybackSpeed() {
-            return playbackSpeed;
+            int[] temp_playbackSpeed = playbackSpeed;
+            return temp_playbackSpeed;
         }
         }
 
 
         public void setPlaybackSpeed(int[] playbackSpeed) {
         public void setPlaybackSpeed(int[] playbackSpeed) {
-            this.playbackSpeed = playbackSpeed;
+            int[] temp_playbackSpeed = playbackSpeed;
+            if(temp_playbackSpeed!=null) this.playbackSpeed = java.util.Arrays.copyOf(temp_playbackSpeed, temp_playbackSpeed.length);
         }
         }
 
 
         public boolean isRecording() {
         public boolean isRecording() {
@@ -511,7 +517,8 @@ public class NWCameraInfo {
         }
         }
 
 
         public Timeline[] getTimeline() {
         public Timeline[] getTimeline() {
-            return timelineList;
+            Timeline[] temp_timelineList = timelineList;
+            return temp_timelineList;
         }
         }
 
 
         public void setChannel(int index, int channel) {
         public void setChannel(int index, int channel) {

+ 6 - 2
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/ResultData.java

@@ -191,7 +191,8 @@ public final class ResultData {
      * @return the rawDataResult
      * @return the rawDataResult
      */
      */
     public String[] getRawData() {
     public String[] getRawData() {
-        return rawDataResult;
+        String[] temp_rawDataResult = rawDataResult;
+        return temp_rawDataResult;
     }
     }
 
 
     /**
     /**
@@ -227,7 +228,10 @@ public final class ResultData {
      * @param noParsingResult the noParsingResult to set
      * @param noParsingResult the noParsingResult to set
      */
      */
     public void setNoParsingResult(String[] noParsingResult) {
     public void setNoParsingResult(String[] noParsingResult) {
-        this.rawDataResult = noParsingResult;
+        if(noParsingResult!=null)
+            this.rawDataResult = java.util.Arrays.copyOf(noParsingResult, noParsingResult.length);
+        else
+            this.rawDataResult = null;
     }
     }
 
 
 }
 }

+ 2 - 0
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/information/Timeline.java

@@ -306,6 +306,8 @@ public class Timeline implements Parcelable {
         if (!TextUtils.isEmpty(eventName)) {
         if (!TextUtils.isEmpty(eventName)) {
             try {
             try {
                 return EventType.valueOf(eventName);
                 return EventType.valueOf(eventName);
+            } catch (RuntimeException re) {
+                return EventType.Normal;
             } catch (Exception e) {
             } catch (Exception e) {
                 return EventType.Normal;
                 return EventType.Normal;
             }
             }

+ 38 - 4
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/MediaStream.java

@@ -5,6 +5,7 @@ import com.samsung.techwin.ipolis.config.RtspConnectionConfig;
 import com.samsung.techwin.ipolis.config.StreamConfig;
 import com.samsung.techwin.ipolis.config.StreamConfig;
 import com.samsung.techwin.ipolis.control.Redirection;
 import com.samsung.techwin.ipolis.control.Redirection;
 import com.samsung.techwin.ipolis.util.ErrorCode;
 import com.samsung.techwin.ipolis.util.ErrorCode;
+import com.util.LogUtil;
 
 
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
@@ -109,6 +110,8 @@ public final class MediaStream {
             mCNBStream.setCallback(CALLBACK_TYPE_VIDEO, mStreamCallback);
             mCNBStream.setCallback(CALLBACK_TYPE_VIDEO, mStreamCallback);
             mCNBStream.setCallback(CALLBACK_TYPE_AUDIO, mStreamCallback);
             mCNBStream.setCallback(CALLBACK_TYPE_AUDIO, mStreamCallback);
             mCNBStream.setCallback(CALLBACK_TYPE_EVENT, mStreamCallback);
             mCNBStream.setCallback(CALLBACK_TYPE_EVENT, mStreamCallback);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -117,9 +120,12 @@ public final class MediaStream {
     public void destroy() {
     public void destroy() {
         try {
         try {
             mStreamHandleManager.destroy();
             mStreamHandleManager.destroy();
-            mCNBStream.destroy();
+            if(mCNBStream!=null)
+                mCNBStream.destroy();
             mCNBStream = null;
             mCNBStream = null;
             System.gc();
             System.gc();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -129,6 +135,8 @@ public final class MediaStream {
         try {
         try {
             int channel = mStreamHandleManager.getChannel(streamHandle);
             int channel = mStreamHandleManager.getChannel(streamHandle);
             mCNBStream.setModelType(channel, modelType);
             mCNBStream.setModelType(channel, modelType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -176,6 +184,8 @@ public final class MediaStream {
                     }
                     }
 
 
                     sendMessage(HANDLER_OPEN_RESULT, streamHandle, errorCode, null);
                     sendMessage(HANDLER_OPEN_RESULT, streamHandle, errorCode, null);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     mStreamHandleManager.openFailHandle(streamHandle);
                     mStreamHandleManager.openFailHandle(streamHandle);
                     sendMessage(HANDLER_OPEN_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_OPEN_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -217,6 +227,8 @@ public final class MediaStream {
                     }
                     }
 
 
                     sendMessage(HANDLER_CLOSE_RESULT, streamHandle, errorCode, null);
                     sendMessage(HANDLER_CLOSE_RESULT, streamHandle, errorCode, null);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     mStreamHandleManager.setStatus(streamHandle, prevStatus);
                     mStreamHandleManager.setStatus(streamHandle, prevStatus);
                     sendMessage(HANDLER_CLOSE_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_CLOSE_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -236,6 +248,8 @@ public final class MediaStream {
                     int errorCode = mCNBStream.play(channel);
                     int errorCode = mCNBStream.play(channel);
 
 
                     setPlayResult(streamHandle, errorCode);
                     setPlayResult(streamHandle, errorCode);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -258,6 +272,8 @@ public final class MediaStream {
                     int errorCode = mCNBStream.play(channel, timeStamp);
                     int errorCode = mCNBStream.play(channel, timeStamp);
 
 
                     setPlayResult(streamHandle, errorCode);
                     setPlayResult(streamHandle, errorCode);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -277,6 +293,8 @@ public final class MediaStream {
                     int errorCode = mCNBStream.play(channel, timeStamp, speed);
                     int errorCode = mCNBStream.play(channel, timeStamp, speed);
 
 
                     setPlayResult(streamHandle, errorCode);
                     setPlayResult(streamHandle, errorCode);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -298,6 +316,8 @@ public final class MediaStream {
                     int errorCode = mCNBStream.play(channel, time);
                     int errorCode = mCNBStream.play(channel, time);
 
 
                     setPlayResult(streamHandle, errorCode);
                     setPlayResult(streamHandle, errorCode);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -318,6 +338,8 @@ public final class MediaStream {
                     int errorCode = mCNBStream.play(channel, time, speed);
                     int errorCode = mCNBStream.play(channel, time, speed);
 
 
                     setPlayResult(streamHandle, errorCode);
                     setPlayResult(streamHandle, errorCode);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -336,6 +358,8 @@ public final class MediaStream {
                     int errorCode = mCNBStream.play(rtspUrl, channel, timeStamp, speed);
                     int errorCode = mCNBStream.play(rtspUrl, channel, timeStamp, speed);
 
 
                     setPlayResult(streamHandle, errorCode);
                     setPlayResult(streamHandle, errorCode);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
                 } catch (Exception e) {
                 } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PLAY_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
@@ -367,9 +391,9 @@ public final class MediaStream {
                     // pause ��native�먯꽌 callback���щ씪��
                     // pause ��native�먯꽌 callback���щ씪��
                     // sendMessage(HANDLER_PAUSE_RESULT, streamHandle, errorCode, null);
                     // sendMessage(HANDLER_PAUSE_RESULT, streamHandle, errorCode, null);
 
 
-                } catch (Exception e)
-
-                {
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", "", re);
+                } catch (Exception e) {
                     Log.e(TAG, Log.getStackTraceString(e));
                     Log.e(TAG, Log.getStackTraceString(e));
                     sendMessage(HANDLER_PAUSE_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                     sendMessage(HANDLER_PAUSE_RESULT, streamHandle, ErrorCode.UNDEFINED, null);
                 }
                 }
@@ -383,6 +407,8 @@ public final class MediaStream {
         try {
         try {
             int channel = mStreamHandleManager.getChannel(streamHandle);
             int channel = mStreamHandleManager.getChannel(streamHandle);
             mCNBStream.setMaxBufferSize(channel, type, size);
             mCNBStream.setMaxBufferSize(channel, type, size);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -392,6 +418,8 @@ public final class MediaStream {
         try {
         try {
             int channel = mStreamHandleManager.getChannel(streamHandle);
             int channel = mStreamHandleManager.getChannel(streamHandle);
             mCNBStream.setDisplaySize(channel, displayWidth, displayHeight);
             mCNBStream.setDisplaySize(channel, displayWidth, displayHeight);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -403,6 +431,8 @@ public final class MediaStream {
         try {
         try {
             int channel = mStreamHandleManager.getChannel(streamHandle);
             int channel = mStreamHandleManager.getChannel(streamHandle);
             frameRate = mCNBStream.getVideoFrameRate(channel);
             frameRate = mCNBStream.getVideoFrameRate(channel);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -413,6 +443,8 @@ public final class MediaStream {
     public String getStatusMessage(final int channelID) {
     public String getStatusMessage(final int channelID) {
         try {
         try {
             return mCNBStream.getStatusMessage(channelID);
             return mCNBStream.getStatusMessage(channelID);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -630,6 +662,8 @@ public final class MediaStream {
 
 
             stringTime = (isUseDstOverlap) ? stringTime + dstEndfix : stringTime;
             stringTime = (isUseDstOverlap) ? stringTime + dstEndfix : stringTime;
 
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }

+ 18 - 9
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/MediaStreamCallback.java

@@ -1,6 +1,7 @@
 package com.samsung.techwin.ipolis.stream;
 package com.samsung.techwin.ipolis.stream;
 
 
 import com.samsung.techwin.ipolis.stream.MediaStream.OnMediaListener;
 import com.samsung.techwin.ipolis.stream.MediaStream.OnMediaListener;
+import com.util.LogUtil;
 
 
 import android.util.Log;
 import android.util.Log;
 
 
@@ -64,18 +65,24 @@ class MediaStreamCallback extends CNBCallback {
             if (videoInfo != null && videoInfo.getSize() == 0)
             if (videoInfo != null && videoInfo.getSize() == 0)
                 return;
                 return;
 
 
-            int chID = videoInfo.getChannelID();
-            int chMaxIndex = chID * CHANNEL_MEDIA + (CHANNEL_MEDIA - 1);
+            if(videoInfo!=null)
+            {
+                int chID = videoInfo.getChannelID();
+                int chMaxIndex = chID * CHANNEL_MEDIA + (CHANNEL_MEDIA - 1);
 
 
-            Log.i(TAG, "[MediaStreamCallback] chID=" + chID + ", arrInx=" + arrVideoIndex[chID] + ", maxArrInx="
-                    + chMaxIndex);
+                Log.i(TAG, "[MediaStreamCallback] chID=" + chID + ", arrInx=" + arrVideoIndex[chID] + ", maxArrInx="
+                        + chMaxIndex);
 
 
-            arrVideo[arrVideoIndex[chID]].setVideo(videoInfo);
-            mListener.onVideo(arrVideo[arrVideoIndex[chID]], mHandleManager.getUserCtx(videoInfo.getHandle()));
+                arrVideo[arrVideoIndex[chID]].setVideo(videoInfo);
+                mListener.onVideo(arrVideo[arrVideoIndex[chID]], mHandleManager.getUserCtx(videoInfo.getHandle()));
 
 
-            arrVideoIndex[chID]++;
-            if (arrVideoIndex[chID] > chMaxIndex)
-                arrVideoIndex[chID] = chID * CHANNEL_MEDIA;
+                arrVideoIndex[chID]++;
+	            if (arrVideoIndex[chID] > chMaxIndex)
+	                arrVideoIndex[chID] = chID * CHANNEL_MEDIA;
+            }
+
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
@@ -103,6 +110,8 @@ class MediaStreamCallback extends CNBCallback {
                 }
                 }
             }
             }
 
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }

+ 24 - 0
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/StreamHandleManager.java

@@ -2,6 +2,8 @@ package com.samsung.techwin.ipolis.stream;
 
 
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 import java.util.Hashtable;
 import java.util.Hashtable;
 
 
 class StreamHandleManager {
 class StreamHandleManager {
@@ -55,6 +57,8 @@ class StreamHandleManager {
             mStatusTable.put(streamHandle, MediaStream.STREAM_STATUS_NOT_OPEN);
             mStatusTable.put(streamHandle, MediaStream.STREAM_STATUS_NOT_OPEN);
             mUserContext[channel] = userCtx;
             mUserContext[channel] = userCtx;
             mIsPlayback[channel] = isPlaybackMode;
             mIsPlayback[channel] = isPlaybackMode;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.d(TAG, "[StreamHandleManager] open data error");
             Log.d(TAG, "[StreamHandleManager] open data error");
         }
         }
@@ -69,6 +73,8 @@ class StreamHandleManager {
             int channel = mStreamHandleTable.get(streamHandle);
             int channel = mStreamHandleTable.get(streamHandle);
             mStatusTable.put(streamHandle, MediaStream.STREAM_STATUS_NOT_OPEN);
             mStatusTable.put(streamHandle, MediaStream.STREAM_STATUS_NOT_OPEN);
             mIsOpend[channel] = false;
             mIsOpend[channel] = false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed : " + streamHandle);
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed : " + streamHandle);
         }
         }
@@ -85,6 +91,8 @@ class StreamHandleManager {
             // mUserContext[channel] = null;
             // mUserContext[channel] = null;
             mStreamHandleTable.remove(streamHandle);
             mStreamHandleTable.remove(streamHandle);
             mStatusTable.remove(streamHandle);
             mStatusTable.remove(streamHandle);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed : " + streamHandle);
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed : " + streamHandle);
         }
         }
@@ -101,6 +109,8 @@ class StreamHandleManager {
         int result = MediaStream.STREAM_STATUS_NOT_OPEN;
         int result = MediaStream.STREAM_STATUS_NOT_OPEN;
         try {
         try {
             result = mStatusTable.get(streamHandle);
             result = mStatusTable.get(streamHandle);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed : " + streamHandle);
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed : " + streamHandle);
         }
         }
@@ -113,6 +123,8 @@ class StreamHandleManager {
 
 
         try {
         try {
             mIsOpend[channel] = isOpend;
             mIsOpend[channel] = isOpend;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed");
             Log.d(TAG, "[StreamHandleManager] Stream is Not open or closed");
         }
         }
@@ -122,6 +134,9 @@ class StreamHandleManager {
     public boolean isOpened(final int channel) {
     public boolean isOpened(final int channel) {
         try {
         try {
             return mIsOpend[channel];
             return mIsOpend[channel];
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return false;
         } catch (Exception e) {
         } catch (Exception e) {
             e.getStackTrace();
             e.getStackTrace();
             return false;
             return false;
@@ -131,6 +146,9 @@ class StreamHandleManager {
     public int getChannel(final int streamHandle) {
     public int getChannel(final int streamHandle) {
         try {
         try {
             return mStreamHandleTable.get(streamHandle);
             return mStreamHandleTable.get(streamHandle);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -1;
         } catch (Exception e) {
         } catch (Exception e) {
             return -1;
             return -1;
         }
         }
@@ -139,6 +157,9 @@ class StreamHandleManager {
     public Object getUserCtx(final int streamHandle) {
     public Object getUserCtx(final int streamHandle) {
         try {
         try {
             return mUserContext[getChannel(streamHandle)];
             return mUserContext[getChannel(streamHandle)];
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return null;
         } catch (Exception e) {
         } catch (Exception e) {
             return null;
             return null;
         }
         }
@@ -147,6 +168,9 @@ class StreamHandleManager {
     public boolean isPlayback(final int streamHandle) {
     public boolean isPlayback(final int streamHandle) {
         try {
         try {
             return mIsPlayback[getChannel(streamHandle)];
             return mIsPlayback[getChannel(streamHandle)];
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return false;
         } catch (Exception e) {
         } catch (Exception e) {
             return false;
             return false;
         }
         }

+ 2 - 1
WallPadAddService/src/main/java/com/samsung/techwin/ipolis/stream/VideoInfo.java

@@ -108,6 +108,7 @@ public class VideoInfo {
             Log.e(TAG, Log.getStackTraceString(e));
             Log.e(TAG, Log.getStackTraceString(e));
         }
         }
 
 
-        return videoData;
+        byte[] temp_videoData = videoData;
+        return temp_videoData;
     }
     }
 }
 }

+ 15 - 5
WallPadAddService/src/main/java/com/techwin/neighbor/ipolis/PlayerSurfaceView.java

@@ -6,6 +6,7 @@ import com.samsung.techwin.ipolis.stream.EventInfo;
 import com.samsung.techwin.ipolis.stream.MediaStream;
 import com.samsung.techwin.ipolis.stream.MediaStream;
 import com.samsung.techwin.ipolis.stream.MediaStream.OnMediaListener;
 import com.samsung.techwin.ipolis.stream.MediaStream.OnMediaListener;
 import com.samsung.techwin.ipolis.stream.VideoInfo;
 import com.samsung.techwin.ipolis.stream.VideoInfo;
+import com.util.LogUtil;
 
 
 import android.content.Context;
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap;
@@ -76,7 +77,8 @@ public class PlayerSurfaceView extends SurfaceView implements Callback, OnMediaL
         if (mHolder == null)
         if (mHolder == null)
             Log.d("yskim", "PlayerSurfaceView Error -------- > mHolder == null");
             Log.d("yskim", "PlayerSurfaceView Error -------- > mHolder == null");
 
 
-        mHolder.addCallback(this);
+        if(mHolder!=null)
+            mHolder.addCallback(this);
     }
     }
 
 
     public void initialize(int streamCount, DeviceData deviceData, Handler handler) {
     public void initialize(int streamCount, DeviceData deviceData, Handler handler) {
@@ -157,7 +159,8 @@ public class PlayerSurfaceView extends SurfaceView implements Callback, OnMediaL
             return;
             return;
         }
         }
 
 
-        mMediaStream.close(mStreamHandle);
+        if(mMediaStream!=null)
+            mMediaStream.close(mStreamHandle);
     }
     }
 
 
     public void destory() {
     public void destory() {
@@ -165,7 +168,10 @@ public class PlayerSurfaceView extends SurfaceView implements Callback, OnMediaL
         close();
         close();
         try {
         try {
             Thread.sleep(100);
             Thread.sleep(100);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
+            LogUtil.errorLogInfo("", "", e);
         }
         }
 
 
         if (mMediaStream != null) {
         if (mMediaStream != null) {
@@ -181,7 +187,8 @@ public class PlayerSurfaceView extends SurfaceView implements Callback, OnMediaL
             if (mHolder == null)
             if (mHolder == null)
                 Log.d("yskim", " Error -------- > mHolder == null");
                 Log.d("yskim", " Error -------- > mHolder == null");
 
 
-            canvas = mHolder.lockCanvas(); // lock���섎㈃ canvas瑜��뚮젮以�
+            if(mHolder!=null)
+                canvas = mHolder.lockCanvas(); // lock���섎㈃ canvas瑜��뚮젮以�
 
 
 
 
             if (canvas == null) {
             if (canvas == null) {
@@ -216,10 +223,13 @@ public class PlayerSurfaceView extends SurfaceView implements Callback, OnMediaL
             // �붾㈃��肉뚮┝
             // �붾㈃��肉뚮┝
             Rect dst = new Rect(0, 0, getWidth(), getHeight());
             Rect dst = new Rect(0, 0, getWidth(), getHeight());
             canvas.drawBitmap(mLastBitmap, null, dst, null);
             canvas.drawBitmap(mLastBitmap, null, dst, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         } finally {
         } finally {
-            if (canvas != null) {
+            if (canvas != null && mHolder!=null) {
                 mHolder.unlockCanvasAndPost(canvas); // canvas瑜��ъ슜�덉쑝硫��뚮젮以�떎.
                 mHolder.unlockCanvasAndPost(canvas); // canvas瑜��ъ슜�덉쑝硫��뚮젮以�떎.
             }
             }
         }
         }

+ 19 - 5
WallPadAddService/src/main/java/com/techwin/neighbor/ipolis/techwinControl.java

@@ -20,6 +20,7 @@ import com.samsung.techwin.ipolis.control.DeviceController.OnQueryListener;
 import com.samsung.techwin.ipolis.information.DvrInfo;
 import com.samsung.techwin.ipolis.information.DvrInfo;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.information.ResultData;
 import com.samsung.techwin.ipolis.util.ErrorCode;
 import com.samsung.techwin.ipolis.util.ErrorCode;
+import com.util.LogUtil;
 
 
 public class techwinControl implements OnQueryListener, OnPTZListener {
 public class techwinControl implements OnQueryListener, OnPTZListener {
 
 
@@ -54,8 +55,11 @@ public class techwinControl implements OnQueryListener, OnPTZListener {
             m_Context = context;
             m_Context = context;
             m_CctvViewResource = ResourceID;
             m_CctvViewResource = ResourceID;
             m_DeviceData = data;
             m_DeviceData = data;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         ChannelChange();
         ChannelChange();
     }
     }
@@ -65,8 +69,11 @@ public class techwinControl implements OnQueryListener, OnPTZListener {
             mExit = false;
             mExit = false;
             setConfig();
             setConfig();
             initMenu(m_CctvViewResource);
             initMenu(m_CctvViewResource);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -95,8 +102,11 @@ public class techwinControl implements OnQueryListener, OnPTZListener {
             Log.d(TAG, "mController.setPTZChannel channel : " + m_DeviceData.channel);
             Log.d(TAG, "mController.setPTZChannel channel : " + m_DeviceData.channel);
             mAddSessionHandle = mController.requestAddSession();
             mAddSessionHandle = mController.requestAddSession();
 
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -110,9 +120,13 @@ public class techwinControl implements OnQueryListener, OnPTZListener {
 
 
             if (mPlayerView == null) Log.d(TAG, "mPlayerView null !!!!!!!!!! ");
             if (mPlayerView == null) Log.d(TAG, "mPlayerView null !!!!!!!!!! ");
 
 
-            mPlayerView.initialize(1, m_DeviceData, mHandler);
+            if(mPlayerView!=null)
+                mPlayerView.initialize(1, m_DeviceData, mHandler);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

+ 23 - 3
WallPadAddService/src/main/java/com/wgi/libwebeyetest/WebGateControl.java

@@ -16,6 +16,8 @@ import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Paint;
 import android.graphics.Rect;
 import android.graphics.Rect;
+import android.os.Build;
+import android.os.StrictMode;
 import android.util.Log;
 import android.util.Log;
 import android.view.SurfaceHolder;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.SurfaceView;
@@ -26,6 +28,7 @@ import android.widget.RelativeLayout;
 import android.widget.Toast;
 import android.widget.Toast;
 
 
 import com.artncore.commons.define;
 import com.artncore.commons.define;
+import com.util.LogUtil;
 import com.wgi.libwebeye.DVRPlayer;
 import com.wgi.libwebeye.DVRPlayer;
 
 
 public class WebGateControl implements SurfaceHolder.Callback {
 public class WebGateControl implements SurfaceHolder.Callback {
@@ -59,6 +62,10 @@ public class WebGateControl implements SurfaceHolder.Callback {
             //activity = context;
             //activity = context;
             m_Context = context;
             m_Context = context;
 
 
+            if (Build.VERSION.SDK_INT > 9) {
+                StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
+                StrictMode.setThreadPolicy(policy);
+            }
             arrayConnect = new ArrayList<cctvData>();
             arrayConnect = new ArrayList<cctvData>();
             imageView = webSurface;
             imageView = webSurface;
             holder = imageView.getHolder();
             holder = imageView.getHolder();
@@ -69,8 +76,11 @@ public class WebGateControl implements SurfaceHolder.Callback {
                 dvrPlayer.setOnErrorCodeCb(errorCodeCB);
                 dvrPlayer.setOnErrorCodeCb(errorCodeCB);
                 dvrPlayer.setOnChannelInfoCb(channelInfoCB);
                 dvrPlayer.setOnChannelInfoCb(channelInfoCB);
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -161,8 +171,11 @@ public class WebGateControl implements SurfaceHolder.Callback {
                     intent.setAction(Common.BR_CCTV_INFO_BR);
                     intent.setAction(Common.BR_CCTV_INFO_BR);
                     m_Context.sendBroadcast(intent);
                     m_Context.sendBroadcast(intent);
                 }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", "", re);
             } catch (Exception e) {
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
     };
     };
@@ -203,8 +216,11 @@ public class WebGateControl implements SurfaceHolder.Callback {
 
 
                 eventType = parser.next();
                 eventType = parser.next();
             }//end while
             }//end while
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -249,6 +265,8 @@ public class WebGateControl implements SurfaceHolder.Callback {
 
 
         try {
         try {
             canvas.drawBitmap(img, rcSrc, rcDst, null);
             canvas.drawBitmap(img, rcSrc, rcDst, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "creating bitmap image failed", e);
             Log.e(TAG, "creating bitmap image failed", e);
         }
         }
@@ -276,6 +294,8 @@ public class WebGateControl implements SurfaceHolder.Callback {
 
 
 
 
     public void requestChennelInfo(String strIP, int strPort, int Dong, int Ho) {
     public void requestChennelInfo(String strIP, int strPort, int Dong, int Ho) {
+        if(strIP == null) return;
+
         if (bImageUpdate) {
         if (bImageUpdate) {
             Toast.makeText(m_Context, "비디오 재생중에는 요청할 수 없습니다.", Toast.LENGTH_LONG).show();
             Toast.makeText(m_Context, "비디오 재생중에는 요청할 수 없습니다.", Toast.LENGTH_LONG).show();
             return;
             return;

+ 40 - 8
WallPadAddService/src/main/java/kr/co/icontrols/v40ioctl/V40IF.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.v40ioctl;
 import android.os.Build;
 import android.os.Build;
 import android.util.Log;
 import android.util.Log;
 
 
+import com.util.LogUtil;
+
 public class V40IF {
 public class V40IF {
 
 
     private final static String TAG = "V40IF";
     private final static String TAG = "V40IF";
@@ -25,9 +27,12 @@ public class V40IF {
 
 
             if (SDK_INT > 23) mV40IOIF_NOUGAT = new V40IOInterface2();
             if (SDK_INT > 23) mV40IOIF_NOUGAT = new V40IOInterface2();
             else mV40IOIF = new V40IOInterface();
             else mV40IOIF = new V40IOInterface();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] V40IF()");
             Log.e(TAG, "[Exception] V40IF()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -35,9 +40,13 @@ public class V40IF {
         try {
         try {
             if (SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceOpen();
             if (SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceOpen();
             else return mV40IOIF.WpdInterfaceOpen();
             else return mV40IOIF.WpdInterfaceOpen();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceOpen()");
             Log.e(TAG, "[Exception] WpdInterfaceOpen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -46,9 +55,13 @@ public class V40IF {
         try {
         try {
             if (SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceClose();
             if (SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceClose();
             else return mV40IOIF.WpdInterfaceClose();
             else return mV40IOIF.WpdInterfaceClose();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceClose()");
             Log.e(TAG, "[Exception] WpdInterfaceClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -57,9 +70,13 @@ public class V40IF {
         try {
         try {
             if (SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceControl(cmd, arg);
             if (SDK_INT > 23) return mV40IOIF_NOUGAT.WpdInterfaceControl(cmd, arg);
             else return mV40IOIF.WpdInterfaceControl(cmd, arg);
             else return mV40IOIF.WpdInterfaceControl(cmd, arg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -99;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] WpdInterfaceControl(int cmd, int arg)");
             Log.e(TAG, "[Exception] WpdInterfaceControl(int cmd, int arg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
             return -99;
         }
         }
     }
     }
@@ -74,9 +91,13 @@ public class V40IF {
             else nResult = WpdInterfaceControl(IOCTL_WALLPADCAM_POWERONOFF, 0);
             else nResult = WpdInterfaceControl(IOCTL_WALLPADCAM_POWERONOFF, 0);
             WpdInterfaceClose();
             WpdInterfaceClose();
             return nResult;
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -1;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlWallPadCamPower(boolean bOn)");
             Log.e(TAG, "[Exception] ctrlWallPadCamPower(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
             return -1;
         }
         }
     }
     }
@@ -97,9 +118,13 @@ public class V40IF {
                 WpdInterfaceClose();
                 WpdInterfaceClose();
             }
             }
             return nResult;
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -1;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setMICGain(int nValue)");
             Log.e(TAG, "[Exception] setMICGain(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
             return -1;
         }
         }
     }
     }
@@ -112,9 +137,13 @@ public class V40IF {
                 WpdInterfaceClose();
                 WpdInterfaceClose();
             }
             }
             return nResult;
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
+            return -1;
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getMICGain()");
             Log.e(TAG, "[Exception] getMICGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
             return -1;
         }
         }
     }
     }
@@ -129,9 +158,12 @@ public class V40IF {
             else {
             else {
                 mV40IOIF.volumectl(sValue);
                 mV40IOIF.volumectl(sValue);
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setWallPadVolume_V40");
             Log.e(TAG, "[Exception] setWallPadVolume_V40");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

+ 155 - 57
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/MainActivity.java

@@ -42,9 +42,12 @@ import com.artncore.commons.define;
 import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI;
 import com.artncore.wallpadapi.Sdb_LivingRoomLightAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.techwin.neighbor.ipolis.PlayerSurfaceView;
 import com.techwin.neighbor.ipolis.PlayerSurfaceView;
+import com.util.LogUtil;
 
 
 import java.io.IOException;
 import java.io.IOException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Date;
 
 
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.v40ioctl.V40IF;
 import kr.co.icontrols.wallpadaddservice.declare.Common;
 import kr.co.icontrols.wallpadaddservice.declare.Common;
@@ -156,6 +159,7 @@ public class MainActivity extends WpadActivity {
     private static int mCurrentManualScreenId = -1;
     private static int mCurrentManualScreenId = -1;
 
 
     private static final int REQUEST_EXTERNAL_STORAGE = 100;
     private static final int REQUEST_EXTERNAL_STORAGE = 100;
+    private static final int REQUEST_ACCESS_COARSE_LOCATION = 101;
 
 
     public int nCardNum = 0; // 밴드위치인식 카드번호
     public int nCardNum = 0; // 밴드위치인식 카드번호
 
 
@@ -221,6 +225,8 @@ public class MainActivity extends WpadActivity {
             Log.d(TAG, "OperationMode = MODE_NORMAL");
             Log.d(TAG, "OperationMode = MODE_NORMAL");
             try {
             try {
                 wpapi = new WallPadAPI(this);
                 wpapi = new WallPadAPI(this);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] - new WallPadAPI : " + e);
                 Log.e(TAG, "[Exception] - new WallPadAPI : " + e);
             }
             }
@@ -230,6 +236,8 @@ public class MainActivity extends WpadActivity {
 
 
         try {
         try {
             wdb = new WallpadStatusData(this);
             wdb = new WallpadStatusData(this);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e);
             Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e);
         }
         }
@@ -370,7 +378,8 @@ public class MainActivity extends WpadActivity {
         if (mTempCurrentScreenId == API_Menu.SubMenuAddService.Memo) {
         if (mTempCurrentScreenId == API_Menu.SubMenuAddService.Memo) {
             int nModelType = Version.getModelType();
             int nModelType = Version.getModelType();
             if (nModelType == Version.MODEL_TYPE.IHN_D101 || nModelType == Version.MODEL_TYPE.IHN_D101_I
             if (nModelType == Version.MODEL_TYPE.IHN_D101 || nModelType == Version.MODEL_TYPE.IHN_D101_I
-                    || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I) {
+                    || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I
+                    || nModelType == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 // IHN-D101 메모화면일 경우 스마트폰 조명제어 사용여부 설정 제어하기 위함 (거실에너지미터 BT-Wifi 모듈이 마이크에 무선 노이즈를 발생시키므로 - 영상/음성 메모)
                 // IHN-D101 메모화면일 경우 스마트폰 조명제어 사용여부 설정 제어하기 위함 (거실에너지미터 BT-Wifi 모듈이 마이크에 무선 노이즈를 발생시키므로 - 영상/음성 메모)
                 mWallPadApiCheckHandler.sendEmptyMessage(0);
                 mWallPadApiCheckHandler.sendEmptyMessage(0);
             }
             }
@@ -380,7 +389,7 @@ public class MainActivity extends WpadActivity {
         } else {
         } else {
             if (mTempCurrentScreenId == API_Menu.SubMenuAddService.BandLocation) {
             if (mTempCurrentScreenId == API_Menu.SubMenuAddService.BandLocation) {
                 Intent intent = getIntent();
                 Intent intent = getIntent();
-                nCardNum = intent.getIntExtra("MENU_DETAIL_INFO", 0);
+                nCardNum = intent.getIntExtra("CARD_NUM", 0);
                 Log.d(TAG, "[onCreate] nCardNum [" + nCardNum + "]");
                 Log.d(TAG, "[onCreate] nCardNum [" + nCardNum + "]");
             }
             }
             setChangeScreen(mTempCurrentScreenId, false);
             setChangeScreen(mTempCurrentScreenId, false);
@@ -404,6 +413,21 @@ public class MainActivity extends WpadActivity {
                     REQUEST_EXTERNAL_STORAGE);
                     REQUEST_EXTERNAL_STORAGE);
         }
         }
 
 
+        //퍼미션 추가
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
+            hasPermission = (ContextCompat.checkSelfPermission(this,
+                    Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED);
+            Log.d(TAG, "[onCreate] hasPermission: " + hasPermission);
+            if (!hasPermission) {
+                ActivityCompat.requestPermissions(this,
+                        new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},
+                        REQUEST_ACCESS_COARSE_LOCATION);
+            }
+        }
+
+
+
+
         reg_Receiver();
         reg_Receiver();
 
 
         // 폰트 TEST
         // 폰트 TEST
@@ -486,6 +510,15 @@ public class MainActivity extends WpadActivity {
                 }
                 }
                 return;
                 return;
             }
             }
+
+            case REQUEST_ACCESS_COARSE_LOCATION: {
+                if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                    Log.d(TAG, "[onRequestPermissionsResult] PERMISSION_GRANTED");
+                } else {
+                    Log.d(TAG, "[onRequestPermissionsResult] PERMISSION_NOT_GRANTED");
+                }
+                return;
+            }
         }
         }
     }
     }
 
 
@@ -533,7 +566,7 @@ public class MainActivity extends WpadActivity {
         if (MoveEvent == MotionEvent.ACTION_UP) {
         if (MoveEvent == MotionEvent.ACTION_UP) {
             if (TargetId == ID.top.button.HOME) {
             if (TargetId == ID.top.button.HOME) {
                 DebugLogOutput("onTouchEvent [HOME] BUTTON !!!");
                 DebugLogOutput("onTouchEvent [HOME] BUTTON !!!");
-                mSound.Play(SND.effect.TOUCH_LATCHED);
+                Sound().Play(SND.effect.TOUCH_LATCHED);
                 Intent intent = new Intent();
                 Intent intent = new Intent();
                 intent.putExtra("Finish_Kind", "HomeButton");
                 intent.putExtra("Finish_Kind", "HomeButton");
                 setResult(RESULT_OK, intent);
                 setResult(RESULT_OK, intent);
@@ -645,9 +678,12 @@ public class MainActivity extends WpadActivity {
         try {
         try {
             if (TopTitle != null)
             if (TopTitle != null)
                 TopTitle.setText(strText);
                 TopTitle.setText(strText);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setTopTitleText(String strText)");
             Log.e(TAG, "[Exception] setTopTitleText(String strText)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -659,9 +695,12 @@ public class MainActivity extends WpadActivity {
                     TopHomeBtn.setButtonEventOffEnable(R.drawable.topbar_icon_home_disabled);
                     TopHomeBtn.setButtonEventOffEnable(R.drawable.topbar_icon_home_disabled);
                 else TopHomeBtn.setButtonEventOffDisable();
                 else TopHomeBtn.setButtonEventOffDisable();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setTopHomeBtnStatus(boolean bEnable)");
             Log.e(TAG, "[Exception] setTopHomeBtnStatus(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -673,9 +712,12 @@ public class MainActivity extends WpadActivity {
                     TopBackBtn.setButtonEventOffEnable(R.drawable.topbar_icon_back_disabled);
                     TopBackBtn.setButtonEventOffEnable(R.drawable.topbar_icon_back_disabled);
                 else TopBackBtn.setButtonEventOffDisable();
                 else TopBackBtn.setButtonEventOffDisable();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setTopBackBtnStatus(boolean bEnable)");
             Log.e(TAG, "[Exception] setTopBackBtnStatus(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -686,9 +728,12 @@ public class MainActivity extends WpadActivity {
                     TopMenuBtn.setButtonEventOffEnable(R.drawable.topbar_icon_menu_disabled);
                     TopMenuBtn.setButtonEventOffEnable(R.drawable.topbar_icon_menu_disabled);
                 else TopMenuBtn.setButtonEventOffDisable();
                 else TopMenuBtn.setButtonEventOffDisable();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setTopMenuBtnStatus(boolean bEnable)");
             Log.e(TAG, "[Exception] setTopMenuBtnStatus(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -699,9 +744,12 @@ public class MainActivity extends WpadActivity {
                     TopManualBtn.setButtonEventOffEnable(R.drawable.topbar_icon_manual_disabled);
                     TopManualBtn.setButtonEventOffEnable(R.drawable.topbar_icon_manual_disabled);
                 else TopManualBtn.setButtonEventOffDisable();
                 else TopManualBtn.setButtonEventOffDisable();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setTopManualBtnStatus(boolean bEnable)");
             Log.e(TAG, "[Exception] setTopManualBtnStatus(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -799,18 +847,24 @@ public class MainActivity extends WpadActivity {
             else TopManualBtn.setVisibility(View.INVISIBLE);
             else TopManualBtn.setVisibility(View.INVISIBLE);
             TopLayout.removeView(TopManualBtn);
             TopLayout.removeView(TopManualBtn);
             ViewRegistration(TopLayout, TopManualBtn, marginLeft, 0);
             ViewRegistration(TopLayout, TopManualBtn, marginLeft, 0);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setManualBtnVisible(boolean bEnable)");
             Log.e(TAG, "[Exception] setManualBtnVisible(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
     public static void resetCurrentManualScreenID() {
     public static void resetCurrentManualScreenID() {
         try {
         try {
             mCurrentManualScreenId = -1;
             mCurrentManualScreenId = -1;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetCurrentManualScreenID()");
             Log.e(TAG, "[Exception] resetCurrentManualScreenID()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -823,9 +877,12 @@ public class MainActivity extends WpadActivity {
                 if (mCurrentManualScreenId != screenId) return;
                 if (mCurrentManualScreenId != screenId) return;
                 FinishManualActivity();
                 FinishManualActivity();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishManual(int screenId)");
             Log.e(TAG, "[Exception] finishManual(int screenId)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -836,9 +893,12 @@ public class MainActivity extends WpadActivity {
                 mCurrentManualScreenId = -1;
                 mCurrentManualScreenId = -1;
                 mManualActivity.finish();
                 mManualActivity.finish();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] FinishManualActivity()");
             Log.e(TAG, "[Exception] FinishManualActivity()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1014,9 +1074,12 @@ public class MainActivity extends WpadActivity {
                     mCurrentScreenId = -1;
                     mCurrentScreenId = -1;
                     return false;
                     return false;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - setChangeScreen->Screen Create : " + e);
             Log.e(TAG, "[ExceptionError] - setChangeScreen->Screen Create : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
             return false;
         }
         }
 
 
@@ -1067,9 +1130,12 @@ public class MainActivity extends WpadActivity {
 
 
             mMenu.StartId = API_Menu.SubMenuAddService.Notice;
             mMenu.StartId = API_Menu.SubMenuAddService.Notice;
             mMenu.Opiton = -1;
             mMenu.Opiton = -1;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DefaultMenuSetting()");
             Log.e(TAG, "[Exception] DefaultMenuSetting()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1328,9 +1394,12 @@ public class MainActivity extends WpadActivity {
             filter.addAction(define.NOTIFY_DAIL);
             filter.addAction(define.NOTIFY_DAIL);
             filter.addAction("WALLPAD_DIAL_GLOBALSCREEN_TOUCH");
             filter.addAction("WALLPAD_DIAL_GLOBALSCREEN_TOUCH");
             registerReceiver(mWallPadJogBR, filter);
             registerReceiver(mWallPadJogBR, filter);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] reg_Receiver");
             Log.e(TAG, "[Exception] reg_Receiver");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1432,9 +1501,12 @@ public class MainActivity extends WpadActivity {
 
 
             surface.getHolder().addCallback(wpVideoCallback);
             surface.getHolder().addCallback(wpVideoCallback);
             surface.setZOrderOnTop(true);
             surface.setZOrderOnTop(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] mediaSurface()");
             Log.e(TAG, "[Exception] mediaSurface()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1464,15 +1536,12 @@ public class MainActivity extends WpadActivity {
                     if (bAOS7) {
                     if (bAOS7) {
                         /**
                         /**
                          * 확인완료 (JEFF, 2020.09.02)
                          * 확인완료 (JEFF, 2020.09.02)
-                         * IHN-1020B-I, IHN-D101-I, IHN-1010(중국)
+                         * IHN-1020B-I, IHN-D101-I, IHN-1010-I, IHN-HS101-I
                          */
                          */
                         // AOS 7.1.1
                         // AOS 7.1.1
-                        if (Version.getModelType() == Version.MODEL_TYPE.IHN_1010) {
-                            wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-                        }
-                        else {
-                            wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-                        }
+                        if (Version.getModelType() == Version.MODEL_TYPE.IHN_1020B_I && !getCompareBSPVersion("2020.09.08")) wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
+                        else if (Version.getModelType() == Version.MODEL_TYPE.IHN_HS101_I && !getCompareBSPVersion("2020.06.11")) wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
+                        else wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
                     }
                     }
                     else {
                     else {
                         /**
                         /**
@@ -1484,38 +1553,16 @@ public class MainActivity extends WpadActivity {
                     }
                     }
                 }
                 }
 
 
-//                if (nModelType == Version.MODEL_TYPE.IHN_D101) {
-//                    wpCamera = Camera.open(1);
-//                }
-//                else if (nModelType == Version.MODEL_TYPE.IHN_D101_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I) {
-//                    wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-//                }
-//                else if (nModelType == Version.MODEL_TYPE.IHN_1010_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_1030_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_1040 || nModelType == Version.MODEL_TYPE.IHN_1040_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_1050 || nModelType == Version.MODEL_TYPE.IHN_1050_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_T1010 || nModelType == Version.MODEL_TYPE.IHN_T1010_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_1050DW_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_1303_I) {
-//                    wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
-//                }
-//                else if (nModelType == Version.MODEL_TYPE.IHN_1010
-//                        || nModelType == Version.MODEL_TYPE.IHN_HS101 || nModelType == Version.MODEL_TYPE.IHN_HS101_I
-//                        || nModelType == Version.MODEL_TYPE.IHN_1020B_I) {
-//                    wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-//                }
-//                else {
-//                    wpCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
-//                }
-
                 Camera.Parameters params = wpCamera.getParameters();
                 Camera.Parameters params = wpCamera.getParameters();
                 params.setPictureSize(640, 480);
                 params.setPictureSize(640, 480);
                 wpCamera.setParameters(params);
                 wpCamera.setParameters(params);
                 wpCamera.setPreviewDisplay(holder);
                 wpCamera.setPreviewDisplay(holder);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] wpVideoCallback.surfaceCreated()");
                 Log.e(TAG, "[Exception] wpVideoCallback.surfaceCreated()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
             }
         }
         }
 
 
@@ -1558,9 +1605,12 @@ public class MainActivity extends WpadActivity {
             else {
             else {
                 Log.w(TAG, "[getSmartIoTCameraUsage] mWallpadDeviceSet is null!!");
                 Log.w(TAG, "[getSmartIoTCameraUsage] mWallpadDeviceSet is null!!");
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getSmartIoTCameraUsage()");
             Log.e(TAG, "[Exception] getSmartIoTCameraUsage()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         mWallpadDeviceSet.closeDB();
         mWallpadDeviceSet.closeDB();
         return false;
         return false;
@@ -1573,12 +1623,16 @@ public class MainActivity extends WpadActivity {
             if (nModelType == Version.MODEL_TYPE.IHN_D101 || nModelType == Version.MODEL_TYPE.IHN_D101_I
             if (nModelType == Version.MODEL_TYPE.IHN_D101 || nModelType == Version.MODEL_TYPE.IHN_D101_I
                     || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I
                     || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I
                     || nModelType == Version.MODEL_TYPE.IHN_1010GL || nModelType == Version.MODEL_TYPE.IHN_1010GL_I
                     || nModelType == Version.MODEL_TYPE.IHN_1010GL || nModelType == Version.MODEL_TYPE.IHN_1010GL_I
-                    || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                    || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || nModelType == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 if (mV40IF != null) Log.d(TAG, "[getV40MicGain] getMICGain() [" + mV40IF.getMICGain() + "]");
                 if (mV40IF != null) Log.d(TAG, "[getV40MicGain] getMICGain() [" + mV40IF.getMICGain() + "]");
             } else Log.w(TAG, "[getV40MicGain] Not Supported MODEL!! MODEL_TYPE [" + nModelType + "]");
             } else Log.w(TAG, "[getV40MicGain] Not Supported MODEL!! MODEL_TYPE [" + nModelType + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getV40MicGain()");
             Log.e(TAG, "[Exception] getV40MicGain()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1589,12 +1643,16 @@ public class MainActivity extends WpadActivity {
             if (nModelType == Version.MODEL_TYPE.IHN_D101 || nModelType == Version.MODEL_TYPE.IHN_D101_I
             if (nModelType == Version.MODEL_TYPE.IHN_D101 || nModelType == Version.MODEL_TYPE.IHN_D101_I
                     || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I
                     || nModelType == Version.MODEL_TYPE.IHN_D101K || nModelType == Version.MODEL_TYPE.IHN_D101K_I
                     || nModelType == Version.MODEL_TYPE.IHN_1010GL || nModelType == Version.MODEL_TYPE.IHN_1010GL_I
                     || nModelType == Version.MODEL_TYPE.IHN_1010GL || nModelType == Version.MODEL_TYPE.IHN_1010GL_I
-                    || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT) {
+                    || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_2443ALT || nModelType == Version.MODEL_TYPE.IHN_1010GL_I_6410ALT
+                    || nModelType == Version.MODEL_TYPE.IHN_D101_I_OCF) {
                 if (mV40IF != null) mV40IF.setMICGain(nValue);
                 if (mV40IF != null) mV40IF.setMICGain(nValue);
             } else Log.w(TAG, "[setV40MicGain] Not Supported MODEL!! MODEL_TYPE [" + nModelType + "]");
             } else Log.w(TAG, "[setV40MicGain] Not Supported MODEL!! MODEL_TYPE [" + nModelType + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setV40MicGain(int nValue)");
             Log.e(TAG, "[Exception] setV40MicGain(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 
@@ -1612,8 +1670,11 @@ public class MainActivity extends WpadActivity {
 
 
             Log.d(TAG, "[mediaStartRecording] ====== setAudioSource =====");
             Log.d(TAG, "[mediaStartRecording] ====== setAudioSource =====");
             mCameraOpenCheckHandler.sendEmptyMessage(0);
             mCameraOpenCheckHandler.sendEmptyMessage(0);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Throwable t) {
         } catch (Throwable t) {
-            t.printStackTrace();
+            //t.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, t);
             Log.w("printStackTrace : ", t);
             Log.w("printStackTrace : ", t);
         }
         }
 
 
@@ -1722,9 +1783,12 @@ public class MainActivity extends WpadActivity {
                 if (DBinfo[1].indexOf("사용함") > 0) bResult = true;
                 if (DBinfo[1].indexOf("사용함") > 0) bResult = true;
                 else bResult = false;
                 else bResult = false;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e("Common", "[Exception] getAsSubWallPad()");
             Log.e("Common", "[Exception] getAsSubWallPad()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
         Log.i(TAG, "[GetWallPadType] bResult [" + bResult + "]");
         Log.i(TAG, "[GetWallPadType] bResult [" + bResult + "]");
         return bResult;
         return bResult;
@@ -1735,10 +1799,44 @@ public class MainActivity extends WpadActivity {
             Log.d(TAG, "[setAudioMemoPlayVol] bMemoPlay [" + bMemoPlay + "]");
             Log.d(TAG, "[setAudioMemoPlayVol] bMemoPlay [" + bMemoPlay + "]");
             if (bMemoPlay) MainActivity.mV40IF.setWallPadVolume_V40("0x0A00");   // FM8802 음량 올림
             if (bMemoPlay) MainActivity.mV40IF.setWallPadVolume_V40("0x0A00");   // FM8802 음량 올림
             MainActivity.mV40IF.setWallPadVolume_V40("0x0100");
             MainActivity.mV40IF.setWallPadVolume_V40("0x0100");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(int what, int arg1, int arg2, long delay");
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(int what, int arg1, int arg2, long delay");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    /**
+     * 절전모드에서 백라이트를 키는 경우, BSP에서 PowerManager 또는 속성값으로 상태를 구분하는데
+     * BSP 버전에 따라 상이하게 동작하므로 BSP 버전 구분하여 절전모드 판별 필요
+     * @return true: 기준 BSP 이후 버전, false: 기준 BSP 이전 버전
+     */
+    public static boolean getCompareBSPVersion(String version) {
+        try {
+            StringBuilder strBSPVersion = new StringBuilder();
+            StringBuffer sysInfoBuffer = new StringBuffer();
+            sysInfoBuffer.append(Build.DISPLAY);
+            strBSPVersion.append(sysInfoBuffer.toString());
+
+            String result = strBSPVersion.toString();
+            Log.d(TAG, "[getCompareBSPVersion] result [" + result + "]");
+
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
+            Date date = simpleDateFormat.parse(result);
+            Date standardDate = simpleDateFormat.parse(version); // 비교 기준 BSP 버전
+            if (date.compareTo(standardDate) >= 0) {
+                Log.d(TAG, "[getCompareBSPVersion] BSP VERSION OVER!");
+                return true;
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG,re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] getCompareBSPVersion");
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
+        return false;
     }
     }
 
 
 }
 }

+ 7 - 1
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/ManualActivity.java

@@ -14,6 +14,7 @@ import android.widget.RelativeLayout;
 
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import kr.co.icontrols.wallpadaddservice.declare.Common;
 import kr.co.icontrols.wallpadaddservice.declare.Common;
 import kr.co.icontrols.wallpadaddservice.declare.ID;
 import kr.co.icontrols.wallpadaddservice.declare.ID;
@@ -112,6 +113,8 @@ public class ManualActivity extends WpadActivity {
 
 
         try {
         try {
             wdb = new WallpadStatusData(this);
             wdb = new WallpadStatusData(this);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Error] - WallpadStatusData Create : " + e);
             Log.e(TAG, "[Error] - WallpadStatusData Create : " + e);
         }
         }
@@ -315,9 +318,12 @@ public class ManualActivity extends WpadActivity {
                 default:
                 default:
                     break;
                     break;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] - setChangeScreen->Screen Create: " + e.toString());
             Log.e(TAG, "[Exception] - setChangeScreen->Screen Create: " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             mCurrentScreenId = -1;
             mCurrentScreenId = -1;
             return false;
             return false;
         }
         }

+ 24 - 0
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/PopupActivity.java

@@ -14,6 +14,7 @@ import android.widget.RelativeLayout;
 
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.wallpadapi.WallPadAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 
 import kr.co.icontrols.wallpadaddservice.declare.Common;
 import kr.co.icontrols.wallpadaddservice.declare.Common;
 import kr.co.icontrols.wallpadaddservice.declare.ID;
 import kr.co.icontrols.wallpadaddservice.declare.ID;
@@ -171,6 +172,8 @@ public class PopupActivity extends WpadActivity {
             Log.d(TAG, "OperationMode = MODE_NORMAL");
             Log.d(TAG, "OperationMode = MODE_NORMAL");
             try {
             try {
                 wpapi = new WallPadAPI(this);
                 wpapi = new WallPadAPI(this);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
             } catch (Exception e) {
                 Log.e(TAG, "[ExceptionError] - new WallPadAPI : " + e);
                 Log.e(TAG, "[ExceptionError] - new WallPadAPI : " + e);
             }
             }
@@ -256,6 +259,7 @@ public class PopupActivity extends WpadActivity {
     @Override
     @Override
     protected void onPause() {
     protected void onPause() {
         Log.d(TAG, "[onPause]");
         Log.d(TAG, "[onPause]");
+        setAudioMemoPlayVol(false);
         super.onPause();
         super.onPause();
         if (wpapi != null) wpapi.Pause();
         if (wpapi != null) wpapi.Pause();
         if (mCurrentScreenId == ID.screen.PreviewPicPopupScreen) {
         if (mCurrentScreenId == ID.screen.PreviewPicPopupScreen) {
@@ -400,6 +404,8 @@ public class PopupActivity extends WpadActivity {
                     Log.e(TAG, "[Error] setChangeLayout - OnlyRemove Input ID Not found!!!");
                     Log.e(TAG, "[Error] setChangeLayout - OnlyRemove Input ID Not found!!!");
                     return false;
                     return false;
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - setChangeScreen->Screen Create : " + e);
             Log.e(TAG, "[ExceptionError] - setChangeScreen->Screen Create : " + e);
             mCurrentScreenId = -1;
             mCurrentScreenId = -1;
@@ -436,4 +442,22 @@ public class PopupActivity extends WpadActivity {
         mCurrentScreenId = nScreenId;
         mCurrentScreenId = nScreenId;
         return true;
         return true;
     }
     }
+
+    private void setAudioMemoPlayVol(boolean bMemoPlay) {
+        try {
+            Log.d(TAG, "[setAudioMemoPlayVol] bMemoPlay [" + bMemoPlay + "]");
+            if (bMemoPlay) {
+                MainActivity.mV40IF.setWallPadVolume_V40("0x0700");   // FM8802 음량 올림
+            }
+            else {
+                MainActivity.mV40IF.setWallPadVolume_V40("0x0100");
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] sendHandlerMsgDelayed(int what, int arg1, int arg2, long delay");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
 }
 }

+ 12 - 2
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/declare/Common.java

@@ -8,6 +8,7 @@ import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
 import com.artncore.WallPadDataMgr.WallpadSalesSampleData;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.define;
 import com.artncore.commons.define;
+import com.util.LogUtil;
 
 
 import java.io.File;
 import java.io.File;
 import java.io.Serializable;
 import java.io.Serializable;
@@ -90,6 +91,8 @@ public final class Common {
 
 
             if (logLevel <= level)
             if (logLevel <= level)
                 Log.e("[AddService]", "[" + fname + "]" + "[" + manager + "]" + txt);
                 Log.e("[AddService]", "[" + fname + "]" + "[" + manager + "]" + txt);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e("[Exception]", "[" + fname + "]" + "[" + manager + "]" + txt);
             Log.e("[Exception]", "[" + fname + "]" + "[" + manager + "]" + txt);
         }
         }
@@ -217,6 +220,7 @@ public final class Common {
         if (!folderCheck.exists() || !folderCheck.mkdirs()) folderCheck.mkdirs();
         if (!folderCheck.exists() || !folderCheck.mkdirs()) folderCheck.mkdirs();
         if (folderCheck.isDirectory()) {
         if (folderCheck.isDirectory()) {
             File[] arrFile = folderCheck.listFiles();
             File[] arrFile = folderCheck.listFiles();
+            if(arrFile == null) return false;
             Log.d("[Common]", "[CheckSaveCapacityMemo] arrFile.length: " + arrFile.length);
             Log.d("[Common]", "[CheckSaveCapacityMemo] arrFile.length: " + arrFile.length);
             if (arrFile.length >= MEMO_MAX_COUNT) return false;
             if (arrFile.length >= MEMO_MAX_COUNT) return false;
             else return true;
             else return true;
@@ -233,9 +237,12 @@ public final class Common {
             wssd.closeDB();
             wssd.closeDB();
             Log.d("Common", "[GetSampleMode] mode = " + mode);
             Log.d("Common", "[GetSampleMode] mode = " + mode);
             if (mode == 1) return true;
             if (mode == 1) return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e("Common", "[ExceptionError] - new WallpadStatusData : " + e);
             Log.e("Common", "[ExceptionError] - new WallpadStatusData : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
 
 
         return false;
         return false;
@@ -251,9 +258,12 @@ public final class Common {
             data.closeDB();
             data.closeDB();
             Log.d("Common", "[GetEasyModeUXUse] bSupport [" + bSupport + "], bUse [" + bUse + "]");
             Log.d("Common", "[GetEasyModeUXUse] bSupport [" + bSupport + "], bUse [" + bUse + "]");
             return bSupport & bUse;
             return bSupport & bUse;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e("Common", "[GetEasyModeUXUse] - new WallpadStatusData : " + e);
             Log.e("Common", "[GetEasyModeUXUse] - new WallpadStatusData : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", "", e);
         }
         }
         return false;
         return false;
     }
     }

+ 7 - 3
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPBandLocationInfo.java

@@ -77,10 +77,14 @@ public class iMAPBandLocationInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if ((result.equalsIgnoreCase("ok")) || (result.equalsIgnoreCase("none"))) {
                 if ((result.equalsIgnoreCase("ok")) || (result.equalsIgnoreCase("none"))) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_smartkey_location_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("get_smartkey_location_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         if (SetItem("home_info") == 1) {
                         if (SetItem("home_info") == 1) {
                             Log.d(TAG, "[ProcComplite] myDong [" + myDong + "], myHo [" + myHo + "]");
                             Log.d(TAG, "[ProcComplite] myDong [" + myDong + "], myHo [" + myHo + "]");
-                            if ((GetAttributeVal(0, "dong").equalsIgnoreCase(myDong)) && (GetAttributeVal(0, "ho").equalsIgnoreCase(myHo))) {
+                            String dong = GetAttributeVal(0, "dong");
+                            String ho = GetAttributeVal(0, "ho");
+                            if ((dong!=null && dong.equalsIgnoreCase(myDong)) && (ho!=null && ho.equalsIgnoreCase(myHo))) {
                                 Proc.ProcSuccess();
                                 Proc.ProcSuccess();
                                 return;
                                 return;
                             }
                             }
@@ -91,7 +95,7 @@ public class iMAPBandLocationInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 

+ 65 - 36
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPCarGuestInfo.java

@@ -187,7 +187,9 @@ public class iMAPCarGuestInfo extends WallPadiMAPClient {
             if (result != null) {
             if (result != null) {
                 Log.i(TAG, "[ProcComplite] result [" + result + "]");
                 Log.i(TAG, "[ProcComplite] result [" + result + "]");
                 if ((result.equalsIgnoreCase("ok")) || (result.equalsIgnoreCase("none"))) {
                 if ((result.equalsIgnoreCase("ok")) || (result.equalsIgnoreCase("none"))) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("car_guest_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("car_guest_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         if (SetItem("policy") == 1) {
                         if (SetItem("policy") == 1) {
                             Log.i(TAG, "[ProcComplite] ======== New Version!! ========");
                             Log.i(TAG, "[ProcComplite] ======== New Version!! ========");
                             Common.bNewVisitorVehicleRegi = true;
                             Common.bNewVisitorVehicleRegi = true;
@@ -204,17 +206,24 @@ public class iMAPCarGuestInfo extends WallPadiMAPClient {
                         Log.d(TAG, "[ProcComplite] bCarGuestAddNewVer [" + Common.bNewVisitorVehicleRegi + "]");
                         Log.d(TAG, "[ProcComplite] bCarGuestAddNewVer [" + Common.bNewVisitorVehicleRegi + "]");
 
 
                         if (SetItem("request_info") == 1) {
                         if (SetItem("request_info") == 1) {
-                            if ((GetAttributeVal(0, "name").equalsIgnoreCase("homedev"))) {
-                                if ((GetAttributeVal(0, "id_high").equalsIgnoreCase(myDong)) && (GetAttributeVal(0, "id_low").equalsIgnoreCase(myHo))) {
+                            String requset_name = GetAttributeVal(0, "name");
+                            if ((requset_name!=null && requset_name.equalsIgnoreCase("homedev"))) {
+                                String id_high = GetAttributeVal(0, "id_high");
+                                String id_low = GetAttributeVal(0, "id_low");
+                                if ((id_high!=null && id_high.equalsIgnoreCase(myDong)) && (id_low!=null && id_low.equalsIgnoreCase(myHo))) {
                                     if (RequestType == QUERY) {
                                     if (RequestType == QUERY) {
                                         if (SetItem("action") == 1) {
                                         if (SetItem("action") == 1) {
-                                            if ((GetItemVal(0).equalsIgnoreCase(STR_QUERY))) {
-                                                Proc.ProcSuccess();
-                                                return;
-                                            }
-                                            else {
-                                                Toast.makeText(ctx, "[ERROR] Request type wrong -> request: query, reply: " + GetItemVal(0), Toast.LENGTH_SHORT).show();
-                                                Log.i(TAG, "[ProcComplite] error 1");
+                                            String item_0 = GetItemVal(0);
+                                            if(item_0!=null)
+                                            {
+                                                if ((item_0.equalsIgnoreCase(STR_QUERY))) {
+                                                    Proc.ProcSuccess();
+                                                    return;
+                                                }
+                                                else {
+                                                    Toast.makeText(ctx, "[ERROR] Request type wrong -> request: query, reply: " + GetItemVal(0), Toast.LENGTH_SHORT).show();
+                                                    Log.i(TAG, "[ProcComplite] error 1");
+                                                }
                                             }
                                             }
                                         }
                                         }
                                         else {
                                         else {
@@ -224,14 +233,19 @@ public class iMAPCarGuestInfo extends WallPadiMAPClient {
                                     }
                                     }
                                     else if (RequestType == REGISTRATION) {
                                     else if (RequestType == REGISTRATION) {
                                         if (SetItem("action") == 1) {
                                         if (SetItem("action") == 1) {
-                                            if ((GetItemVal(0).equalsIgnoreCase(STR_REGISTRATION))) {
-                                                Proc.ProcSuccess();
-                                                return;
-                                            }
-                                            else {
-                                                Toast.makeText(ctx, "[ERROR] Request type wrong -> request: query, reply: " + GetItemVal(0), Toast.LENGTH_SHORT).show();
-                                                Log.i(TAG, "[ProcComplite] error 3");
+                                            String item_0 = GetItemVal(0);
+                                            if(item_0!=null)
+                                            {
+                                                if ((item_0.equalsIgnoreCase(STR_REGISTRATION))) {
+                                                    Proc.ProcSuccess();
+                                                    return;
+                                                }
+                                                else {
+                                                    Toast.makeText(ctx, "[ERROR] Request type wrong -> request: query, reply: " + item_0, Toast.LENGTH_SHORT).show();
+                                                    Log.i(TAG, "[ProcComplite] error 3");
+                                                }
                                             }
                                             }
+
                                         }
                                         }
                                         else {
                                         else {
                                             Toast.makeText(ctx, "[ERROR] no action ", Toast.LENGTH_SHORT).show();
                                             Toast.makeText(ctx, "[ERROR] no action ", Toast.LENGTH_SHORT).show();
@@ -240,14 +254,19 @@ public class iMAPCarGuestInfo extends WallPadiMAPClient {
                                     }
                                     }
                                     else if (RequestType == DELETE) {
                                     else if (RequestType == DELETE) {
                                         if (SetItem("action") == 1) {
                                         if (SetItem("action") == 1) {
-                                            if ((GetItemVal(0).equalsIgnoreCase(STR_DELETE))) {
-                                                Proc.ProcSuccess();
-                                                return;
-                                            }
-                                            else {
-                                                Toast.makeText(ctx, "[ERROR] Request type wrong -> request: query, reply: " + GetItemVal(0), Toast.LENGTH_SHORT).show();
-                                                Log.i(TAG, "[ProcComplite] error 5");
+                                            String item_0 = GetItemVal(0);
+                                            if(item_0!=null)
+                                            {
+                                                if ((item_0.equalsIgnoreCase(STR_DELETE))) {
+                                                    Proc.ProcSuccess();
+                                                    return;
+                                                }
+                                                else {
+                                                    Toast.makeText(ctx, "[ERROR] Request type wrong -> request: query, reply: " + item_0, Toast.LENGTH_SHORT).show();
+                                                    Log.i(TAG, "[ProcComplite] error 5");
+                                                }
                                             }
                                             }
+
                                         }
                                         }
                                         else {
                                         else {
                                             Toast.makeText(ctx, "[ERROR] no action ", Toast.LENGTH_SHORT).show();
                                             Toast.makeText(ctx, "[ERROR] no action ", Toast.LENGTH_SHORT).show();
@@ -280,20 +299,30 @@ public class iMAPCarGuestInfo extends WallPadiMAPClient {
                     }
                     }
                 }
                 }
                 else if (result.equalsIgnoreCase("deny")) {
                 else if (result.equalsIgnoreCase("deny")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("car_guest_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("car_guest_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         if (SetItem("request_info") == 1) {
                         if (SetItem("request_info") == 1) {
-                            if ((GetAttributeVal(0, "name").equalsIgnoreCase("homedev"))) {
-                                if ((GetAttributeVal(0, "id_high").equalsIgnoreCase(myDong)) && (GetAttributeVal(0, "id_low").equalsIgnoreCase(myHo))) {
+                            String homedev = GetAttributeVal(0, "name");
+                            if ((homedev!=null && homedev.equalsIgnoreCase("homedev"))) {
+                                String id_high =GetAttributeVal(0, "id_high");
+                                String id_low = GetAttributeVal(0, "id_low");
+                                if ((id_high!=null && id_high.equalsIgnoreCase(myDong)) && (id_low!=null && id_low.equalsIgnoreCase(myHo))) {
                                     if (SetItem("reason") == 1) {
                                     if (SetItem("reason") == 1) {
                                         // 차량등록 요청 거정 사유
                                         // 차량등록 요청 거정 사유
-                                        Log.i(TAG, "[ProcComplite] 1 reason [" + GetItemVal(0) +"]");
-                                        if ((GetItemVal(0).equalsIgnoreCase(STR_REGISTERED))) mDenyReason = DENY.REGISTERED;
-                                        else if ((GetItemVal(0).equalsIgnoreCase(STR_RESIDENT))) mDenyReason = DENY.RESIDENT;
-                                        else if ((GetItemVal(0).equalsIgnoreCase(STR_LIMIT_CAR))) mDenyReason = DENY.LIMIT_CAR;
-                                        else if ((GetItemVal(0).equalsIgnoreCase(STR_LIMIT_TIME))) mDenyReason = DENY.LIMIT_TIME;
-                                        else if ((GetItemVal(0).equalsIgnoreCase(STR_LIMIT_DURATION))) mDenyReason = DENY.LIMIT_DURATION;
-                                        else if ((GetItemVal(0).equalsIgnoreCase(STR_UNKNOWN))) mDenyReason = DENY.UNKNOWN;
-                                        else Toast.makeText(ctx, "Undefined deny -> " + GetItemVal(0), Toast.LENGTH_SHORT).show();
+                                        String item_0 = GetItemVal(0);
+                                        if(item_0!=null)
+                                        {
+                                            Log.i(TAG, "[ProcComplite] 1 reason [" + GetItemVal(0) +"]");
+                                            if ((item_0.equalsIgnoreCase(STR_REGISTERED))) mDenyReason = DENY.REGISTERED;
+                                            else if ((item_0.equalsIgnoreCase(STR_RESIDENT))) mDenyReason = DENY.RESIDENT;
+                                            else if ((item_0.equalsIgnoreCase(STR_LIMIT_CAR))) mDenyReason = DENY.LIMIT_CAR;
+                                            else if ((item_0.equalsIgnoreCase(STR_LIMIT_TIME))) mDenyReason = DENY.LIMIT_TIME;
+                                            else if ((item_0.equalsIgnoreCase(STR_LIMIT_DURATION))) mDenyReason = DENY.LIMIT_DURATION;
+                                            else if ((item_0.equalsIgnoreCase(STR_UNKNOWN))) mDenyReason = DENY.UNKNOWN;
+                                            else Toast.makeText(ctx, "Undefined deny -> " + item_0, Toast.LENGTH_SHORT).show();
+                                        }
+
                                     }
                                     }
                                     else {
                                     else {
                                         Toast.makeText(ctx, "[ERROR] reason ", Toast.LENGTH_SHORT).show();
                                         Toast.makeText(ctx, "[ERROR] reason ", Toast.LENGTH_SHORT).show();
@@ -330,7 +359,7 @@ public class iMAPCarGuestInfo extends WallPadiMAPClient {
                 Log.i(TAG, "[ProcComplite] error 18");
                 Log.i(TAG, "[ProcComplite] error 18");
             }
             }
         }
         }
-        Proc.ProcError();
+        if(Proc!=null) Proc.ProcError();
     }
     }
 
 
     @Override
     @Override

+ 9 - 3
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPCctvInfo.java

@@ -7,6 +7,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 public class iMAPCctvInfo extends WallPadiMAPClient {
 public class iMAPCctvInfo extends WallPadiMAPClient {
 
 
@@ -79,7 +80,9 @@ public class iMAPCctvInfo extends WallPadiMAPClient {
                 String result = GetAttributeVal(0, "result");
                 String result = GetAttributeVal(0, "result");
                 if (result != null) {
                 if (result != null) {
                     if (result.equalsIgnoreCase("ok") || result.equalsIgnoreCase("none") || result.equalsIgnoreCase("over") || result.equalsIgnoreCase("fail")) {
                     if (result.equalsIgnoreCase("ok") || result.equalsIgnoreCase("none") || result.equalsIgnoreCase("over") || result.equalsIgnoreCase("fail")) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_cctv_viewerinfo")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                        String name = GetAttributeVal(0, "name");
+                        String type = GetAttributeVal(0, "type");
+                        if ((name!=null && name.equalsIgnoreCase("get_cctv_viewerinfo")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                             {
                             {
                                 Proc.ProcSuccess();
                                 Proc.ProcSuccess();
                                 return;
                                 return;
@@ -90,10 +93,13 @@ public class iMAPCctvInfo extends WallPadiMAPClient {
                 }
                 }
                 Proc.ProcError();
                 Proc.ProcError();
             } else {
             } else {
-                Proc.ProcError();
+                if(Proc!=null) Proc.ProcError();
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 
 

+ 9 - 4
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPCostInfo.java

@@ -109,11 +109,16 @@ public class iMAPCostInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_cost_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("get_cost_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         SetItem("guidemap");
                         SetItem("guidemap");
 
 
-                        if ((GetAttributeVal(0, "dong").equalsIgnoreCase(myDong)) &&
-                                (GetAttributeVal(0, "ho").equalsIgnoreCase(myHo)) && (GetAttributeVal(0, "count").equalsIgnoreCase(String.valueOf(RequestCount)))) {
+                        String dong = GetAttributeVal(0, "dong");
+                        String ho = GetAttributeVal(0, "ho");
+                        String count = GetAttributeVal(0, "count");
+                        if ((dong!=null && dong.equalsIgnoreCase(myDong)) &&
+                                (ho!=null && ho.equalsIgnoreCase(myHo)) && (count!=null && count.equalsIgnoreCase(String.valueOf(RequestCount)))) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                             return;
                             return;
                         }
                         }
@@ -123,7 +128,7 @@ public class iMAPCostInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+           if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 

+ 15 - 7
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPElecCarChargerInfo.java

@@ -8,6 +8,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 public class iMAPElecCarChargerInfo extends WallPadiMAPClient {
 public class iMAPElecCarChargerInfo extends WallPadiMAPClient {
 
 
@@ -77,12 +78,16 @@ public class iMAPElecCarChargerInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("elec_car_charger_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("elec_car_charger_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         SetItem("destination");
                         SetItem("destination");
-
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("homedev") == true) &&
-                                (GetAttributeVal(0, "id_high").equalsIgnoreCase(myDong) == true) &&
-                                (GetAttributeVal(0, "id_low").equalsIgnoreCase(myHo) == true)) {
+                        String homedev = GetAttributeVal(0, "name");
+                        String id_high = GetAttributeVal(0, "id_high");
+                        String id_low = GetAttributeVal(0, "id_low");
+                        if ((homedev!=null && homedev.equalsIgnoreCase("homedev") == true) &&
+                                (id_high!=null && id_high.equalsIgnoreCase(myDong) == true) &&
+                                (id_low!=null && id_low.equalsIgnoreCase(myHo) == true)) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                             return;
                             return;
                         }
                         }
@@ -91,7 +96,7 @@ public class iMAPElecCarChargerInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 
@@ -133,9 +138,12 @@ public class iMAPElecCarChargerInfo extends WallPadiMAPClient {
                 SvrPort = Integer.parseInt(AddInfo[6]);
                 SvrPort = Integer.parseInt(AddInfo[6]);
                 Log.d(TAG, "ServerIP [" + ServerIP + "], SvrPort [" + SvrPort + "]");
                 Log.d(TAG, "ServerIP [" + ServerIP + "], SvrPort [" + SvrPort + "]");
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Get_DBInfo_ElecCarServerIp(Context context)");
             Log.e(TAG, "[Exception] Get_DBInfo_ElecCarServerIp(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 }
 }

+ 15 - 6
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPElecCarChargingInfo.java

@@ -8,6 +8,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 public class iMAPElecCarChargingInfo extends WallPadiMAPClient {
 public class iMAPElecCarChargingInfo extends WallPadiMAPClient {
 
 
@@ -76,12 +77,17 @@ public class iMAPElecCarChargingInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("elec_car_charging_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("elec_car_charging_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         SetItem("destination");
                         SetItem("destination");
 
 
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("homedev") == true) &&
-                                (GetAttributeVal(0, "id_high").equalsIgnoreCase(myDong) == true) &&
-                                (GetAttributeVal(0, "id_low").equalsIgnoreCase(myHo) == true)) {
+                        String homedev = GetAttributeVal(0, "name");
+                        String id_high = GetAttributeVal(0, "id_high");
+                        String id_low = GetAttributeVal(0, "id_low");
+                        if ((homedev!=null && homedev.equalsIgnoreCase("homedev") == true) &&
+                                (id_high!=null && id_high.equalsIgnoreCase(myDong) == true) &&
+                                (id_low!=null && id_low.equalsIgnoreCase(myHo) == true)) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                             return;
                             return;
                         }
                         }
@@ -90,7 +96,7 @@ public class iMAPElecCarChargingInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 
@@ -125,9 +131,12 @@ public class iMAPElecCarChargingInfo extends WallPadiMAPClient {
                 SvrPort = Integer.parseInt(AddInfo[6]);
                 SvrPort = Integer.parseInt(AddInfo[6]);
                 Log.d(TAG, "ServerIP [" + ServerIP + "], SvrPort [" + SvrPort + "]");
                 Log.d(TAG, "ServerIP [" + ServerIP + "], SvrPort [" + SvrPort + "]");
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Get_DBInfo_ElecCarServerIp(Context context)");
             Log.e(TAG, "[Exception] Get_DBInfo_ElecCarServerIp(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 }
 }

+ 15 - 7
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPElecCarHistoryInfo.java

@@ -8,6 +8,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 
 public class iMAPElecCarHistoryInfo extends WallPadiMAPClient {
 public class iMAPElecCarHistoryInfo extends WallPadiMAPClient {
 
 
@@ -78,12 +79,16 @@ public class iMAPElecCarHistoryInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("elec_car_charging_history")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("elec_car_charging_history")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         SetItem("destination");
                         SetItem("destination");
-
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("homedev") == true) &&
-                                (GetAttributeVal(0, "id_high").equalsIgnoreCase(myDong) == true) &&
-                                (GetAttributeVal(0, "id_low").equalsIgnoreCase(myHo) == true)) {
+                        String homedev = GetAttributeVal(0, "name");
+                        String id_high = GetAttributeVal(0, "id_high");
+                        String id_low = GetAttributeVal(0, "id_low");
+                        if ((homedev!=null && homedev.equalsIgnoreCase("homedev") == true) &&
+                                (id_high!=null && id_high.equalsIgnoreCase(myDong) == true) &&
+                                (id_low!=null && id_low.equalsIgnoreCase(myHo) == true)) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                             return;
                             return;
                         }
                         }
@@ -92,7 +97,7 @@ public class iMAPElecCarHistoryInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 
@@ -133,9 +138,12 @@ public class iMAPElecCarHistoryInfo extends WallPadiMAPClient {
                 SvrPort = Integer.parseInt(AddInfo[6]);
                 SvrPort = Integer.parseInt(AddInfo[6]);
                 Log.d(TAG, "ServerIP [" + ServerIP + "], SvrPort [" + SvrPort + "]");
                 Log.d(TAG, "ServerIP [" + ServerIP + "], SvrPort [" + SvrPort + "]");
             }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", "", re);
         } catch (Exception e) {
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Get_DBInfo_ElecCarServerIp(Context context)");
             Log.e(TAG, "[Exception] Get_DBInfo_ElecCarServerIp(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         }
     }
     }
 }
 }

+ 6 - 4
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPLocalInfo.java

@@ -198,10 +198,12 @@ public class iMAPLocalInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
-                    if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_localinfo_list")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
+                    if ((name!=null && name.equalsIgnoreCase("get_localinfo_list")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                         SetItem("guidemap");
                         SetItem("guidemap");
-
-                        if ((GetAttributeVal(0, "distinguish").equalsIgnoreCase(distinguish))) {
+                        String distinguish_attr = GetAttributeVal(0, "distinguish");
+                        if ((distinguish_attr!=null && distinguish_attr.equalsIgnoreCase(distinguish))) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                             return;
                             return;
                         }
                         }
@@ -211,7 +213,7 @@ public class iMAPLocalInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 

+ 7 - 4
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPNotice.java

@@ -169,15 +169,18 @@ public class iMAPNotice extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
                     if (RequestWork == 1) {
                     if (RequestWork == 1) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_news_list")) &&
-                                (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+
+                        if ((name!=null && name.equalsIgnoreCase("get_news_list")) &&
+                                (type!=null && type.equalsIgnoreCase("reply"))) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                         }
                         }
 
 
                     } else if (RequestWork == 2) {
                     } else if (RequestWork == 2) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_news_contents")) &&
-                                (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                        if ((name!=null && name.equalsIgnoreCase("get_news_contents")) &&
+                                (type!=null && type.equalsIgnoreCase("reply"))) {
                             Proc.ProcSuccess();
                             Proc.ProcSuccess();
                         }
                         }
                     }
                     }

+ 25 - 14
WallPadAddService/src/main/java/kr/co/icontrols/wallpadaddservice/imap/iMAPRepairInfo.java

@@ -201,35 +201,46 @@ public class iMAPRepairInfo extends WallPadiMAPClient {
             String result = GetAttributeVal(0, "result");
             String result = GetAttributeVal(0, "result");
             if (result != null) {
             if (result != null) {
                 if (result.equalsIgnoreCase("ok")) {
                 if (result.equalsIgnoreCase("ok")) {
+                    String name = GetAttributeVal(0, "name");
+                    String type = GetAttributeVal(0, "type");
                     switch (RequestType) {
                     switch (RequestType) {
                         case GET_REPAIR_LIST:
                         case GET_REPAIR_LIST:
-                            if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_repair_list")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                            if ((name!=null && name.equalsIgnoreCase("get_repair_list")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                                 SetItem("guidemap");
                                 SetItem("guidemap");
-                                int count = Integer.parseInt((GetAttributeVal(0, "num")));
-
-                                if (count == SetItem("article")) {
-                                    Proc.ProcSuccess();
-                                    return;
+                                String num = GetAttributeVal(0, "num");
+                                if(num!=null)
+                                {
+                                    int count = Integer.parseInt((num));
+
+                                    if (count == SetItem("article")) {
+                                        Proc.ProcSuccess();
+                                        return;
+                                    }
                                 }
                                 }
                             }
                             }
                             break;
                             break;
 
 
                         case GET_REPAIR_CONTENT:
                         case GET_REPAIR_CONTENT:
-                            if ((GetAttributeVal(0, "name").equalsIgnoreCase("get_repair_contents")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                            if ((name!=null && name.equalsIgnoreCase("get_repair_contents")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                                 Proc.ProcSuccess();
                                 Proc.ProcSuccess();
                                 return;
                                 return;
                             }
                             }
                             break;
                             break;
 
 
                         case SET_REPAIR_INFO:
                         case SET_REPAIR_INFO:
-                            if ((GetAttributeVal(0, "name").equalsIgnoreCase("set_repair_info")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                            if ((name!=null && name.equalsIgnoreCase("set_repair_info")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                                 SetItem("guidemap");
                                 SetItem("guidemap");
-                                int count = Integer.parseInt((GetAttributeVal(0, "num")));
-
-                                if (count == SetItem("article")) {
-                                    Proc.ProcSuccess();
-                                    return;
+                                String num = GetAttributeVal(0, "num");
+                                if(num!= null)
+                                {
+                                    int count = Integer.parseInt((num));
+
+                                    if (count == SetItem("article")) {
+                                        Proc.ProcSuccess();
+                                        return;
+                                    }
                                 }
                                 }
+
                             }
                             }
                             break;
                             break;
 
 
@@ -243,7 +254,7 @@ public class iMAPRepairInfo extends WallPadiMAPClient {
             }
             }
             Proc.ProcError();
             Proc.ProcError();
         } else {
         } else {
-            Proc.ProcError();
+            if(Proc!=null) Proc.ProcError();
         }
         }
     }
     }
 
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff