Forráskód Böngészése

[WallPadCall]
1. 소스 등록(3차 ECO 기준 코드)
- 생산에러에 대한 내용은 아직 처리되지 않은 소스
2. 버그
- 안심통화 소리 안들림(통화 후, 안심통화 버튼 클릭 시)
- 유선도어락일 경우, 재택방범 해제 안되는 이슈(재택 -> 현관 호출 -> 통화 -> 문열림)
- 로비 문열림 시, 부재중으로 빠짐

jglee 3 éve
szülő
commit
330b9e2772
84 módosított fájl, 8151 hozzáadás és 2462 törlés
  1. 2 2
      WallPadCall/build.gradle
  2. BIN
      WallPadCall/libs/WallPadAPI.jar
  3. 6 18
      WallPadCall/src/main/AndroidManifest.xml
  4. 6 1
      WallPadCall/src/main/java/android_serialport_api/SerialPort.java
  5. 158 25
      WallPadCall/src/main/java/kr/co/icontrols/V40IFCCD/V40IFCCD.java
  6. 127 25
      WallPadCall/src/main/java/kr/co/icontrols/callengine/database/DBManager.java
  7. 50 16
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/AudioRecordController.java
  8. 38 43
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/AutoSaveStrangerPicture.java
  9. 38 42
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/AutoSaveVisitorPicture.java
  10. 349 141
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/CallController.java
  11. 163 35
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/CallManager.java
  12. 18 4
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/HDCTimer.java
  13. 85 53
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/MissedCallVisitorPicture.java
  14. 84 24
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/RemoteCallController.java
  15. 316 95
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/SIPInterface.java
  16. 57 18
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/VideoController.java
  17. 117 24
      WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/VideoJNI.java
  18. 73 14
      WallPadCall/src/main/java/kr/co/icontrols/callengine/history/CallHistoryManager.java
  19. 125 28
      WallPadCall/src/main/java/kr/co/icontrols/callengine/history/VisitorPictureHistoryManager.java
  20. 138 34
      WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/PSTNController.java
  21. 301 73
      WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/PSTNSerialManager.java
  22. 20 4
      WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/Request_PSTN_ATCmd.java
  23. 47 11
      WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/SendNWaitPSTN.java
  24. 11 5
      WallPadCall/src/main/java/kr/co/icontrols/callengine/remotecall/DataSender.java
  25. 1 4
      WallPadCall/src/main/java/kr/co/icontrols/callengine/remotecall/RemoteCallMSG.java
  26. 193 50
      WallPadCall/src/main/java/kr/co/icontrols/callengine/remotecall/RemoteCallManager.java
  27. 1 101
      WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/CeresSIPService.java
  28. 6 1
      WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/Forward.java
  29. 178 34
      WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/RTPManager.java
  30. 10 1
      WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/SIPController.java
  31. 139 39
      WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/SIPSound.java
  32. 279 118
      WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/SIPStun.java
  33. 111 26
      WallPadCall/src/main/java/kr/co/icontrols/callengine/subphone/SubPhoneController.java
  34. 303 76
      WallPadCall/src/main/java/kr/co/icontrols/callengine/subphone/SubPhoneSerialManager.java
  35. 114 28
      WallPadCall/src/main/java/kr/co/icontrols/callengine/subwallpad/SubWallPadController.java
  36. 236 57
      WallPadCall/src/main/java/kr/co/icontrols/callengine/subwallpad/SubWallPadSerialManager.java
  37. 133 25
      WallPadCall/src/main/java/kr/co/icontrols/hdcftp/HDCFTPManager.java
  38. 283 63
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/IOInterface.java
  39. 309 180
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/MainActivity.java
  40. 12 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/ManualActivity.java
  41. 36 6
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/PopupActivity.java
  42. 127 38
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/declare/DataClasses.java
  43. 341 71
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/declare/Global.java
  44. 24 0
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/declare/ID.java
  45. 32 8
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Notice_visitor_upload_complete.java
  46. 32 9
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Request_check_sip_activation.java
  47. 31 8
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Request_lobby_open.java
  48. 31 8
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Request_visitor_access_info.java
  49. 10 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/InquiryCallHistory_Manual.java
  50. 10 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/InquiryVisitorPictureHistory_Manual.java
  51. 10 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/MultiCallPopup_Manual.java
  52. 10 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/RemoteCallPopup_Manual.java
  53. 10 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/SmartIOTCamSetPopup_Manual.java
  54. 9 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkFront_Manual.java
  55. 9 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkGuard_Manual.java
  56. 9 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkLobby_Manual.java
  57. 9 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkPSTN_Manual.java
  58. 9 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkResidence_Manual.java
  59. 10 2
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/VisitorPictureViewer_Manual.java
  60. 41 10
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/DeleteItems.java
  61. 41 10
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/MultiCall.java
  62. 37 9
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/MultiCall_Notice.java
  63. 33 8
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/MultiCall_Record.java
  64. 22 5
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeRemoteCall.java
  65. 30 7
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeSubPhoneTalk.java
  66. 14 3
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeTakePicture.java
  67. 30 7
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeVideoRecord.java
  68. 100 38
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/SmartIOTCamSetting.java
  69. 133 31
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/InquiryCallHistory.java
  70. 124 30
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/InquiryVisitorPictureHistory.java
  71. 325 87
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkFront.java
  72. 302 108
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkGuard.java
  73. 340 63
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkLobby.java
  74. 297 71
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkPSTN.java
  75. 296 119
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkResidence.java
  76. 82 20
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/VisitorPictureViewer.java
  77. 132 33
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkFront_SubWallPad.java
  78. 111 27
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkGuard_SubWallPad.java
  79. 116 29
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkLobby_SubWallPad.java
  80. 149 37
      WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkResidence_SubWallPad.java
  81. BIN
      WallPadCall/src/main/jniLibs/armeabi-v7a/libaCERES.so
  82. BIN
      WallPadCall/src/main/jniLibs/armeabi-v7a/libjniV40if2_ccd.so
  83. BIN
      WallPadCall/src/main/jniLibs/armeabi/libaCERES.so
  84. BIN
      WallPadCall/src/main/jniLibs/armeabi/libjniV40if2_ccd.so

+ 2 - 2
WallPadCall/build.gradle

@@ -78,9 +78,9 @@ android {
 
 dependencies {
     implementation 'androidx.legacy:legacy-support-v4:1.0.0'
-    implementation files('libs/bssofthns.jar')
+    //implementation files('libs/bssofthns.jar')
     implementation files('libs/WallPadAPI.jar')
     implementation files('libs/WallPadSupport.jar')
     implementation files('libs/visitorcalllib-debug.aar')
-    implementation files('libs/milsiplib.aar')
+//    implementation files('libs/milsiplib.aar')
 }

BIN
WallPadCall/libs/WallPadAPI.jar


+ 6 - 18
WallPadCall/src/main/AndroidManifest.xml

@@ -1,14 +1,15 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     package="kr.co.icontrols.wallpadcall"
     android:versionCode="17"
-    android:versionName="2021.06.04.01">
+    android:versionName="2022.02.04.01">
 
     <!--android:sharedUserId="android.uid.system"-->
     <!--<uses-sdk-->
         <!--android:minSdkVersion="16"-->
         <!--android:targetSdkVersion="17" />-->
 
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-feature android:name="android.hardware.camera" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.INTERNET" />
@@ -18,8 +19,6 @@
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.RECORD_VIDEO" />
     <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.GET_TASKS" />
     <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
@@ -32,8 +31,7 @@
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
         android:largeHeap="true"
-        android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"
-        tools:replace="android:theme">
+        android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen">
 
         <activity
             android:name="kr.co.icontrols.wallpadcall.MainActivity"
@@ -65,23 +63,13 @@
             </intent-filter>
         </service>
 
-<!--        <service-->
-<!--            android:name="kr.co.icontrols.callengine.sip.SIPStun"-->
-<!--            android:enabled="true"-->
-<!--            android:exported="true">-->
-
-<!--            <intent-filter>-->
-<!--                <action android:name="kr.co.icontrols.callengine.sip.SIPStun.StartService" />-->
-<!--            </intent-filter>-->
-<!--        </service>-->
-
         <service
-            android:name="kr.co.icontrols.callengine.sip.CeresSIPService"
+            android:name="kr.co.icontrols.callengine.sip.SIPStun"
             android:enabled="true"
             android:exported="true">
 
             <intent-filter>
-                <action android:name="kr.co.icontrols.callengine.sip.CeresSIPService.StartService" />
+                <action android:name="kr.co.icontrols.callengine.sip.SIPStun.StartService" />
             </intent-filter>
         </service>
 

+ 6 - 1
WallPadCall/src/main/java/android_serialport_api/SerialPort.java

@@ -26,6 +26,8 @@ import java.io.OutputStream;
 
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class SerialPort {
 
     private static final String TAG = "SerialPort";
@@ -65,8 +67,11 @@ public class SerialPort {
                     Log.e(TAG, "[SerialPort] access permission Change Error !!! (bCanRead:" + bCanRead + ", bCanWrite:" + bCanWrite + ")");
                     throw new SecurityException();
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 throw new SecurityException();
             }
 

+ 158 - 25
WallPadCall/src/main/java/kr/co/icontrols/V40IFCCD/V40IFCCD.java

@@ -4,9 +4,12 @@ import android.graphics.Bitmap;
 import android.util.Log;
 import android.view.Surface;
 
+import com.util.LogUtil;
+
 import bssoft.stack.sip.BSSVideo;
 import kr.co.icontrols.callengine.engine.CallManager;
 import kr.co.icontrols.callengine.engine.CallManager.CALLTYPE;
+import kr.co.icontrols.callengine.remotecall.AVPacket;
 import kr.co.icontrols.wallpadcall.MainActivity;
 import kr.co.icontrols.wallpadcall.declare.Global.ConfigValues;
 import kr.co.icontrols.wallpadcall.declare.Global.FRONTCAMERATYPE;
@@ -83,15 +86,18 @@ public class V40IFCCD {
     public void setCheckIFrame(boolean bSet) {
         try {
             bCheckIFrame = bSet;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCheckIFrame(boolean bSet)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public static int recvFramecallback(byte[] encodedFrame, int picType, int headerLen, int frameLen, int timeStamp) {
         try {
-//            Log.d(TAG, "[recvFrame_callback] !! picType [" + picType + "], headerLen [" + headerLen + "], frameLen [" + frameLen + "], timeStamp [" + timeStamp + "], bShowMyVideo [" + MainActivity.mCallController.mSIPInterface.bShowMyVideo + "]");
+           //Log.d(TAG, "[recvFrame_callback] !! picType [" + picType + "], headerLen [" + headerLen + "], frameLen [" + frameLen + "], timeStamp [" + timeStamp + "], bShowMyVideo [" + MainActivity.mCallController.mSIPInterface.bShowMyVideo + "]");
             if (frameLen > 50000) {
                 Log.e(TAG, "[recvFrame_callback] !! Buffer Overflow !! picType [" + picType + "], headerLen [" + headerLen + "], frameLen [" + frameLen + "], timeStamp [" + timeStamp + "]");
                 return 0;
@@ -125,12 +131,12 @@ public class V40IFCCD {
             }
 
             CallManager.CALLSTATUS eCallStatus = MainActivity.mCallController.mCallInfo.getRESI();
-//            Log.d(TAG, "[recvFrame_callback] eCallStatus [" + eCallStatus + "]");
+            //Log.d(TAG, "[recvFrame_callback] eCallStatus [" + eCallStatus + "]");
 
             if (MainActivity.mCallController.mSIPInterface.videoManager != null && MainActivity.mCallController.mSIPInterface.videoManager.videoenc.bReceiveRunning
                     || eCallStatus == CallManager.CALLSTATUS.HOMEVIEW) {
                 // 이웃통화 내모습인 경우 or 방문객원격통화 홈뷰어인 경우
-//                Log.e(TAG, "[recvFrame_callback] bShowMyVideo [" + MainActivity.mCallController.mSIPInterface.bShowMyVideo + "]");
+                //Log.e(TAG, "[recvFrame_callback] bShowMyVideo [" + MainActivity.mCallController.mSIPInterface.bShowMyVideo + "]");
                 if (MainActivity.mCallController.mSIPInterface.bShowMyVideo) {
                     if (!BSSVideo.bViewme) {
                         if (MainActivity.mCallController.mSIPInterface.nVideoSignalFlagCnt < 20) {
@@ -146,7 +152,8 @@ public class V40IFCCD {
 
                     if (!bCheckIFrame) {
 //                        Log.e(TAG, "[recvFrame_callback] --------------- [3] ---------------");
-                        MainActivity.mCallController.mSIPInterface.videoManager.writeHNSRTPPacket(encodedFrame, frameLen, frameLen, timeStamp, (picType == 0));
+                        if(MainActivity.mCallController.mSIPInterface.videoManager!=null)
+                            MainActivity.mCallController.mSIPInterface.videoManager.writeHNSRTPPacket(encodedFrame, frameLen, frameLen, timeStamp, (picType == 0));
                     }
                 }
                 else {
@@ -162,7 +169,7 @@ public class V40IFCCD {
 
             if (headerLen == 1280) {
                 // AHD현관카메라 + 방문객 원격통화인 경우
-//                Log.e(TAG, "[recvFrame_callback] --------------- [6] ---------------");
+               //Log.e(TAG, "[recvFrame_callback] --------------- [6] ---------------");
                 if (MainActivity.mVideoController != null) {
                     if (MainActivity.mVideoController.videoRTPManager != null) {
                         MainActivity.mVideoController.videoRTPManager.writeVideoRTPPacket(encodedFrame, frameLen, frameLen, timeStamp, picType);
@@ -170,27 +177,124 @@ public class V40IFCCD {
                 }
             } else if (headerLen == 640) {
                 // 일반현관카메라 + 방문객 원격통화인 경우
+                if(ConfigValues.bRemoteCall)
+                    sendVideoToMobile(encodedFrame, encodedFrame.length, isH264iFrame(encodedFrame, encodedFrame.length));
 //                Log.e(TAG, "[recvFrame_callback] remotecall --------------- [7] ---------------");
-                if (MainActivity.mVideoController != null) {
-                    if (MainActivity.mVideoController.videoRTPManager != null) {
-                        MainActivity.mVideoController.videoRTPManager.writeVideoRTPPacket(encodedFrame, frameLen, frameLen, timeStamp, picType);
-                    }
-                }
+//                if (MainActivity.mVideoController != null) {
+//                    Log.e(TAG, "[recvFrame_callback] remotecall --------------- [7-1] ---------------");
+//                    if (MainActivity.mVideoController.videoRTPManager != null) {
+//                        Log.e(TAG, "[recvFrame_callback] remotecall --------------- [7-2] ---------------");
+//                        MainActivity.mVideoController.videoRTPManager.writeVideoRTPPacket(encodedFrame, frameLen, frameLen, timeStamp, picType);
+//                    }
+//                }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] recvFrame_callback(byte[] encodedFrame, int picType, int headerLen, int frameLen, int timeStamp)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return 0;
     }
 
+    public static int isH264iFrame(byte[] data, int size) {
+//            Log.d(TAG, "[isH264iFrame] data [" + Global.HexToString(data) + "], size [" + size + "]");
+        int index = 0;
+        for (; index + 3 < size; index++) {
+            // This should always succeed in the first iteration.
+            if (data[index] == 0 && data[index + 1] == 0 && data[index + 2] == 1)
+                break;
+        }
+
+        if (index + 3 >= size) return 0;
+        index += 3;
+
+        int nalType = data[index] & 0x1F;
+        if (nalType == 0x05 || nalType == 0x07 || nalType == 0x08)
+            return 1;
+
+        return 2;
+    }
+
+    public static void sendVideoToMobile(byte[] data, int size, int IFrame) {
+        try {
+//            Log.d(TAG, "[sendVideoToMobile] data.length [" + data.length + "], size [" + size + "], IFrame [" + IFrame + "]");
+
+            AVPacket avp = new AVPacket();
+            avp.avType = 0; // 0:video, 1:audio
+            avp.data = data;
+            avp.length = size;
+            avp.frameType = IFrame;
+            try {
+//                    Log.d(TAG, "[sendVideoToMobile] mDataSender.que.put()");
+//                    Log.d(TAG, "[sendVideoToMobile] avp.length [" + avp.length + "]");
+                if (avp != null) MainActivity.mDataSender.blockingQueue.put(avp);
+            } catch (InterruptedException e) {
+                Log.e(TAG, "[InterruptedException] sendVideoToMobile(byte[] data, int size)");
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
+            }
+//            if (MainActivity.mDataSender != null) {
+//            } else {
+//                Log.w(TAG, "[sendVideoToMobile] mDataSender is null!!");
+//            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] sendVideoToMobile(byte[] data)");
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
     int PIC_FRAME_BUFFER_SIZE = 115200;
+    int PIC_FRAME_BUFFER_SIZE_352x288 = 152064;
+
+    public byte[] getDecodedata() {
+
+        int[] anWidth = new int[1];
+        int[] anHeight = new int[1];
+
+        int nLength = PIC_FRAME_BUFFER_SIZE_352x288;
+        byte[] ahFrameBuffer = new byte[PIC_FRAME_BUFFER_SIZE_352x288];
+
+        int nResult = -1;
+
+        nResult = getYVU420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
+
+
+        return ahFrameBuffer;
+    }
+
+    public int[] getDecodedata_int() {
+
+        int[] anWidth = new int[1];
+        int[] anHeight = new int[1];
+
+        int nLength = PIC_FRAME_BUFFER_SIZE_352x288;
+        byte[] ahFrameBuffer = new byte[PIC_FRAME_BUFFER_SIZE_352x288];
+
+        int nResult = -1;
+
+        nResult = getYVU420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
+
+
+        //if (nResult == 0) {
+            int nWidth = anWidth[0];
+            int nHeight = anHeight[0];
+            Log.i(TAG, "[getDecodedPicture] nWidth [" + nWidth + "], nHeight [" + nHeight + "]");
+            int[] anRGB8888 = convertYVU420PtoRGB8888(ahFrameBuffer, nWidth, nHeight);
+            return anRGB8888;
+        //}
+
+        //return ahFrameBuffer;
+    }
 
     public Bitmap getDecodedPicture(CALLTYPE eCallType) {
         try {
             Log.d(TAG, "[getDecodedPicture] eCallType [" + eCallType + "]");
-            int nLength = PIC_FRAME_BUFFER_SIZE;
-            byte[] ahFrameBuffer = new byte[PIC_FRAME_BUFFER_SIZE];
+
             int[] anWidth = new int[1];
             int[] anHeight = new int[1];
 
@@ -199,12 +303,24 @@ public class V40IFCCD {
 
             int nResult = -1;
             if (eCallType == CALLTYPE.LOBBY) {
+                int nLength = PIC_FRAME_BUFFER_SIZE_352x288;
+                byte[] ahFrameBuffer = new byte[PIC_FRAME_BUFFER_SIZE_352x288];
                 if (bFFMPEGEnable) {
                     nResult = SWGetYUV420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
                 } else {
                     nResult = getYVU420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
                 }
+
+                if (nResult == 0) {
+                    int nWidth = anWidth[0];
+                    int nHeight = anHeight[0];
+                    Log.i(TAG, "[getDecodedPicture] nWidth [" + nWidth + "], nHeight [" + nHeight + "]");
+                    int[] anRGB8888 = convertYVU420PtoRGB8888(ahFrameBuffer, nWidth, nHeight);
+                    return Bitmap.createBitmap(anRGB8888, nWidth, nHeight, Bitmap.Config.ARGB_8888);
+                }
             } else if (eCallType == CALLTYPE.FRONT) {
+                int nLength = PIC_FRAME_BUFFER_SIZE;
+                byte[] ahFrameBuffer = new byte[PIC_FRAME_BUFFER_SIZE];
                 if (bAHDCam) {
                     Thread.sleep(1000);   // PR2000K 영상이 늦게 올라오는 경우가 있어서 1초 지연을 둔다. (JEFF, 2020.01.11.01)
                     if (bFFMPEGEnable)
@@ -215,25 +331,34 @@ public class V40IFCCD {
                     if (bFFMPEGEnable)
                         nResult = SWGetYUV420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
                     else
-                        nResult = getYVU420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
+                        nResult = getYVU420pFrameahd(ahFrameBuffer, nLength, anWidth, anHeight);
+                        //nResult = getYVU420pFrame(ahFrameBuffer, nLength, anWidth, anHeight);
+                }
+
+                if (nResult == 0) {
+                    int nWidth = anWidth[0];
+                    int nHeight = anHeight[0];
+                    Log.i(TAG, "[getDecodedPicture] nWidth [" + nWidth + "], nHeight [" + nHeight + "]");
+                    int[] anRGB8888 = convertYVU420PtoRGB8888(ahFrameBuffer, nWidth, nHeight);
+                    return Bitmap.createBitmap(anRGB8888, nWidth, nHeight, Bitmap.Config.ARGB_8888);
                 }
             }
             Log.i(TAG, "[getDecodedPicture] nResult [" + nResult + "]");
 
-            if (nResult == 0) {
-                int nWidth = anWidth[0];
-                int nHeight = anHeight[0];
-                Log.i(TAG, "[getDecodedPicture] nWidth [" + nWidth + "], nHeight [" + nHeight + "]");
-                int[] anRGB8888 = convertYVU420PtoRGB8888(ahFrameBuffer, nWidth, nHeight);
-                return Bitmap.createBitmap(anRGB8888, nWidth, nHeight, Bitmap.Config.ARGB_8888);
-            }
+
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDecodedPicture()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return null;
     }
 
+
+
+
     public int[] convertYVU420PtoRGB8888(byte[] ahData, int nWidth, int nHeight) {
         try {
             int nSize = nWidth * nHeight;
@@ -270,9 +395,13 @@ public class V40IFCCD {
                 if (i != 0 && (i + 2) % nWidth == 0) i += nWidth;
             }
             return anPixels;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] convertYVU420PtoRGB8888(byte[] ahData, int nWidth, int nHeight)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -290,9 +419,13 @@ public class V40IFCCD {
 
 //            Log.d(TAG, "[convertYUVtoRGB] R: " + R + ", G: " + G + ", B: " + B);
             return 0xFF000000 | (B << 16) | (G << 8) | R;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 0;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] convertYUVtoRGB(int Y, int U, int V)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return 0;
         }
     }

+ 127 - 25
WallPadCall/src/main/java/kr/co/icontrols/callengine/database/DBManager.java

@@ -8,6 +8,7 @@ import android.database.sqlite.SQLiteDatabase.CursorFactory;
 import android.util.Log;
 
 import com.artncore.commons.define;
+import com.util.LogUtil;
 
 import java.io.File;
 
@@ -54,9 +55,13 @@ public class DBManager {
     public boolean initDatabase() {
         try {
             return openORcreateDatabase();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initDatabase()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -66,9 +71,13 @@ public class DBManager {
             if (deleteDBFile()) {
                 return openORcreateDatabase();
             } else return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetDatabase()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -77,9 +86,13 @@ public class DBManager {
         try {
             mSQLiteDatabase.close();
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] closeDatabase()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -90,9 +103,13 @@ public class DBManager {
 
             if (mDatabaseFile.exists()) return true;
             else return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] isDBFileExist()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -100,12 +117,12 @@ public class DBManager {
     public boolean deleteDBFile() {
         try {
             if (mDatabaseFile.exists()) {
-                if (mDatabaseFile.delete()) {
+                if (FileDelete(mDatabaseFile)) {
                     LOG_INFO("[deleteDBFile] Succeeded deleting a database file!! [1]");
                     return true;
                 } else {
                     LOG_INFO("[deleteDBFile] Failed to delete a database file!! [1]");
-                    if (mDatabaseFile.delete()) {
+                    if (FileDelete(mDatabaseFile)) {
                         LOG_INFO("[deleteDBFile] Succeeded deleting a database file!! [2]");
                         return true;
                     } else {
@@ -117,9 +134,13 @@ public class DBManager {
                 LOG_INFO("[deleteDBFile] There is no file to delete [" + mDatabaseFile.getPath() + "]");
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteDBFile()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -147,9 +168,13 @@ public class DBManager {
                 return false;
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] openORcreateDatabase()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -174,9 +199,13 @@ public class DBManager {
             LOG_INFO("[createTable] DBQuery : " + DBQuery);
             mSQLiteDatabase.execSQL(DBQuery);
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] createTable(tablename, valus)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -194,9 +223,13 @@ public class DBManager {
                 LOG("[resetTable] Target table does not exist!! [" + table + "]");
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetTable(table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -214,9 +247,13 @@ public class DBManager {
                 LOG_INFO("[deleteTable] Target table does not exist!! [" + table + "]");
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteTable(table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -232,9 +269,13 @@ public class DBManager {
 
             if (nResult == 1) return true;
             else return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] isTableExist(table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -250,9 +291,13 @@ public class DBManager {
             LOG_DEBUG("[isKeyExist] nRecCnt : " + nRecCnt);
             cursor.close();
             return nRecCnt;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 0;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDataAll(table, key)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 0;
         }
     }
@@ -299,9 +344,13 @@ public class DBManager {
                 }
             }
             return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setData(table, key, name)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -350,9 +399,13 @@ public class DBManager {
                 }
             }
             return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setData(table, key, name)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -415,9 +468,13 @@ public class DBManager {
                 }
             }
             return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setData(table, key, avaluename, avalue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -437,9 +494,13 @@ public class DBManager {
             cursor.close();
             return strResult;
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getData(table, key)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -471,9 +532,13 @@ public class DBManager {
             }
             cursor.close();
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDataAll(table, key)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -490,9 +555,13 @@ public class DBManager {
             }
             cursor.close();
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getKeyByValue(table, valuename, value)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -527,9 +596,13 @@ public class DBManager {
             }
             return strResult;
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDBByValues(table, valuenames, values)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -537,9 +610,13 @@ public class DBManager {
     public int deleteDBKey(String strTable, String strKey) {
         try {
             return mSQLiteDatabase.delete(strTable, "KEY=\"" + strKey + "\"", null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 99999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteDBKey(strTable, strKey)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 99999;
         }
     }
@@ -554,9 +631,13 @@ public class DBManager {
             }
             LOG_DEBUG("[deleteDBRec] strWhere = " + strWhere);
             return mSQLiteDatabase.delete(strTable, strWhere, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 99999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteDBRec(strTable, strNames, strValues)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 99999;
         }
     }
@@ -566,9 +647,13 @@ public class DBManager {
             LOG_DEBUG("[accessDBDirectly] strDBQuery : " + strDBQuery);
             Cursor cursor = mSQLiteDatabase.rawQuery(strDBQuery, null);
             return cursor;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] accessDBDirectly(strDBQuery)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -576,9 +661,12 @@ public class DBManager {
     public void execSQL(String strSQL) {
         try {
             mSQLiteDatabase.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] execSQL(strSQL)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -611,10 +699,24 @@ public class DBManager {
                 return lResultCnt;
             }
             return -1;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setData(table, key, avaluename, avalue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
+
+    private synchronized boolean FileDelete(File file)
+    {
+        boolean result = false;
+        if(file!=null && file.exists())
+        {
+            result = file.delete();
+        }
+        return result;
+    }
 }

+ 50 - 16
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/AudioRecordController.java

@@ -12,6 +12,7 @@ import android.media.MediaRecorder;
 import android.util.Log;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.util.LogUtil;
 
 import bssoft.stack.sip.SIPG711;
 import kr.co.icontrols.callengine.remotecall.AVPacket;
@@ -45,9 +46,12 @@ public class AudioRecordController {
             IntentFilter filter = new IntentFilter();
             filter.addAction(Declare.BR.NOTIFY_CHANGE_FRONT_FILTER);
             mContext.registerReceiver(mFilterChangeBR, filter); // BR 등록
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] AudioRecordController(Context context, String recordingDir, String recordingFilePath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -56,9 +60,12 @@ public class AudioRecordController {
             Log.d(TAG, "[releaseAudioRecordController]");
             releaseAudioRecordConfig();
             mContext.unregisterReceiver(mFilterChangeBR); // BR 해제
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseAudioRecordController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -77,9 +84,12 @@ public class AudioRecordController {
                     Log.d(TAG, "[initValue] nFilterPreset[" + i + "] = " + nFilterPreset[i]);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initValue()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -95,9 +105,12 @@ public class AudioRecordController {
             int minSize = AudioTrack.getMinBufferSize(8000, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT);
             int playBufferSize = minSize * 2;
             mAudioTrack = new AudioTrack(AudioManager.STREAM_VOICE_CALL, 8000, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT, playBufferSize, AudioTrack.MODE_STREAM);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] prepareAudioRecordConfig()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -118,9 +131,12 @@ public class AudioRecordController {
             }
             else Log.w(TAG, "[releaseAudioRecordConfig] mAudioTrack is null!!");
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseAudioRecordConfig()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -166,13 +182,17 @@ public class AudioRecordController {
                             }
                         } catch (IllegalStateException ie) {
                             Log.e(TAG, "[IllegalStateException] captureThread().run()");
-                            ie.printStackTrace();
+                            //ie.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, ie);
 
                             if (mAudioRecord != null && bAudioRecording) bAudioRecording = false;
                             return;
+                        } catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
                         } catch (Exception e) {
                             Log.e(TAG, "[Exception] captureThread().run()");
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
 
                             if (mAudioRecord != null && bAudioRecording) bAudioRecording = false;
                             return;
@@ -187,7 +207,8 @@ public class AudioRecordController {
                                 Thread.sleep(1000);
                             }
                         } catch (InterruptedException ie) {
-                            ie.printStackTrace();
+                            //ie.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, ie);
                             Log.e(TAG, "[InterruptedException] startAudioRecording().run()");
                         }
 
@@ -217,9 +238,12 @@ public class AudioRecordController {
                     mAudioTrack.release();
                     mAudioTrack = null;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] stopAudioRecording()");
-                e.printStackTrace();
+                //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -246,16 +270,19 @@ public class AudioRecordController {
                 mAudioTrack.play();
             }
             else Log.w(TAG, "[bufferring] mAudioTrack is null!!!");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] bufferring(short[] data, int dataSize)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     // 현관 녹음 음성(디지털로 변화된 녹음 음성) -> 모바일로 전송
     private void sendDoorAudioToMobile(byte[] data, int size) {
         try {
-//            Log.d(TAG, "[sendDoorAudioToMobile] data.length [" + data.length + "], size [" + size + "]");
+            Log.d(TAG, "[sendDoorAudioToMobile] data.length [" + data.length + "], size [" + size + "]");
             if (MainActivity.mDataSender != null) {
                 AVPacket avp = new AVPacket();
                 avp.avType = 1; // 0:video, 1:audio
@@ -268,22 +295,26 @@ public class AudioRecordController {
                     MainActivity.mDataSender.blockingQueue.put(avp);
                 } catch (InterruptedException e) {
                     Log.e(TAG, "[InterruptedException] sendDoorAudioToMobile()");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                 }
             } else {
 //                Log.w(TAG, "[sendDoorAudioToMobile] mDataSender is null!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendDoorAudioToMobile(byte[] data, int size)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     // 모바일 음성 -> 현관
     public void receiveMobileAudio_door(AVPacket avPacket) {
         try {
-//            Log.d(TAG, "[receiveMobileAudio_door] avPacket.length [" + avPacket.length + "]");
-//            Log.d(TAG, "[receiveMobileAudio_door] avPacket.avType [" + avPacket.avType + "], avPacket.frameType [" + avPacket.frameType + "]");
+            Log.d(TAG, "[receiveMobileAudio_door] avPacket.length [" + avPacket.length + "]");
+            Log.d(TAG, "[receiveMobileAudio_door] avPacket.avType [" + avPacket.avType + "], avPacket.frameType [" + avPacket.frameType + "]");
             if (avPacket.data == null || avPacket.length <= 0) {
                 return;
             }
@@ -296,9 +327,12 @@ public class AudioRecordController {
                     mAudioTrack.write(pcmLinearBuffer, 0, packetSize * 2);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveMobileAudio_door(AVPacket avPacket)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 38 - 43
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/AutoSaveStrangerPicture.java

@@ -4,8 +4,8 @@ import android.content.Context;
 import android.util.Log;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.commons.define;
 import com.artncore.wallpadimap.RetProci;
+import com.util.LogUtil;
 
 import org.apache.commons.net.ftp.FTP;
 
@@ -36,9 +36,12 @@ public class AutoSaveStrangerPicture {
                 Log.d(TAG, "[startAutoSaveStrangerPicture] =====START =====");
                 mContext = context;
                 mAutoPictureInfo = info;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] startAutoSaveStrangerPicture(Context context, AutoPictureInfo Info)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -59,39 +62,32 @@ public class AutoSaveStrangerPicture {
 
                 send_visitor_access_info_request(mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, strType, strTime, strFileName, mAutoPictureInfo.strMessage);
                 Global.sendVisitorEventBRtoMobileVendor(strType, strTime);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 Log.e(TAG, "[Exception] startAutoSaveStrangerPicture.run()");
             }
         }
     }
 
     public static class UploadStrangerPicture extends Thread {
-        boolean bMainServer2dot0 = false;
-        int danjiserverType;
+        int iMainServer2dot0 = 0;
+
         public UploadStrangerPicture() {
             Log.d(TAG, "[UploadStrangerPicture] ===== START =====");
             WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(mContext);
             try {
-                //bMainServer2dot0 = wallpadDeviceSet.GetNewDanjiServer();
-                danjiserverType = wallpadDeviceSet.GetNewDanjiServer();
-                if(danjiserverType == 1)
-                {
-                    bMainServer2dot0 = false;
-                }
-                else if(danjiserverType == 2)
-                {
-                    bMainServer2dot0 = true;
-                }
-                else
-                {
-                    bMainServer2dot0 = true;
-                }
-                Log.d(TAG, "[UploadStrangerPicture] bMainServer2dot0 [" + bMainServer2dot0 + "]");
+                iMainServer2dot0 = wallpadDeviceSet.GetNewDanjiServer();
+                Log.d(TAG, "[UploadStrangerPicture] iMainServer2dot0 [" + iMainServer2dot0 + "]");
                 wallpadDeviceSet.closeDB();
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] UploadStrangerPicture()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 wallpadDeviceSet.closeDB();
             }
         }
@@ -99,22 +95,7 @@ public class AutoSaveStrangerPicture {
         public void run() {
             try {
                 mFTPManager = new HDCFTPManager();
-                boolean isConnect = false;
-
-                if(danjiserverType == 1)
-                {
-                    isConnect = mFTPManager.connectFTP(strRemoteIP);
-                }
-                else if(danjiserverType == 2)
-                {
-                    isConnect = mFTPManager.connectFTP(strRemoteIP);
-                }
-                else
-                {
-                    isConnect = mFTPManager.connectFTP(define.NewDanjiServerIP);
-                }
-
-                if (!isConnect) {
+                if (!mFTPManager.connectFTP(strRemoteIP)) {
                     Log.w(TAG, "[UploadStrangerPicture.run()] FAIL!! -> connectFTP(...)");
                     send_visitor_upload_complete_notice(false, mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, mAutoPictureInfo.eCallType, mAutoPictureInfo.eCallStatus, strTime, strFileName, "null");
                     return;
@@ -126,7 +107,7 @@ public class AutoSaveStrangerPicture {
                     return;
                 }
 
-                if (!bMainServer2dot0) {
+                if (iMainServer2dot0 == 1) {
                     if (!mFTPManager.setPassiveMode()) {
                         Log.w(TAG, "[UploadStrangerPicture.run()] FAIL!! -> setPassiveMode(...)");
                         disconnectFTP();
@@ -160,9 +141,12 @@ public class AutoSaveStrangerPicture {
                 disconnectFTP();
                 Log.d(TAG, "[UploadStrangerPicture.run()] Complete upload!!!");
                 send_visitor_upload_complete_notice(true, mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, mAutoPictureInfo.eCallType, mAutoPictureInfo.eCallStatus, strTime, strFileName, "null");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] UploadStrangerPicture.run()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -177,9 +161,13 @@ public class AutoSaveStrangerPicture {
             }
             Log.d(TAG, "[disconnectFTP] disconnectFTP FAIL!!");
             return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] disconnectFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -187,6 +175,7 @@ public class AutoSaveStrangerPicture {
     static String strReply_User = "";
     static String strReply_PW = "";
     static String strReply_Path = "";
+    static private String strPass_key = "passwd";
 
     public static boolean send_visitor_access_info_request(String strDong, String strHo, String strType, String strTime, final String strFileName, String strMessage) {
         try {
@@ -199,7 +188,7 @@ public class AutoSaveStrangerPicture {
                         Log.d(TAG, "[send_visitor_access_info_request] ProcSuccess()");
                         visitor_access_info.SetItem("ftp_info");
                         strReply_User = visitor_access_info.GetAttributeVal(0, "user");
-                        strReply_PW = visitor_access_info.GetAttributeVal(0, "passwd");
+                        strReply_PW = visitor_access_info.GetAttributeVal(0, strPass_key);
                         strReply_Path = visitor_access_info.GetAttributeVal(0, "path");
                         Log.d(TAG, "[send_visitor_access_info_request] Reply!! User [" + strReply_User + "], PW [" + strReply_PW + "], Path [" + strReply_Path + "]");
                         strUserID = strReply_User;
@@ -222,9 +211,12 @@ public class AutoSaveStrangerPicture {
                 });
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_access_info_request(String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -262,9 +254,12 @@ public class AutoSaveStrangerPicture {
                 });
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_upload_complete_notice(boolean bResult, String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }

+ 38 - 42
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/AutoSaveVisitorPicture.java

@@ -11,8 +11,8 @@ import kr.co.icontrols.wallpadcall.imap.Request_visitor_access_info;
 import org.apache.commons.net.ftp.FTP;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.commons.define;
 import com.artncore.wallpadimap.RetProci;
+import com.util.LogUtil;
 
 import android.content.Context;
 import android.util.Log;
@@ -56,9 +56,12 @@ public class AutoSaveVisitorPicture {
                 mContext = context;
                 mAutoPictureInfo = Info;
                 bRemote_FrontCalled = Remote_FrontCalled;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] startAutoSaveVisitorPicture(Context context, AutoPictureInfo Info)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -91,40 +94,33 @@ public class AutoSaveVisitorPicture {
 
                 send_visitor_access_info_request(mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, strType, strTime, strFileName, mAutoPictureInfo.strMessage);
                 Global.sendVisitorEventBRtoMobileVendor(strType, strTime);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] startAutoSaveVisitorPicture.run()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
 
     public static class UploadVisitorPicture extends Thread {
 
-        boolean bMainServer2dot0 = false;
-        int danjiserverType;
+        int iMainServer2dot0 = 0;
+
         public UploadVisitorPicture() {
             LOG_INFO("[UploadVisitorPicture] ===== START =====");
             WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(mContext);
             try {
-//                bMainServer2dot0 = wallpadDeviceSet.GetNewDanjiServer();
-                danjiserverType = wallpadDeviceSet.GetNewDanjiServer();
-                if(danjiserverType == 1)
-                {
-                    bMainServer2dot0 = false;
-                }
-                else if(danjiserverType == 2)
-                {
-                    bMainServer2dot0 = true;
-                }
-                else
-                {
-                    bMainServer2dot0 = true;
-                }
-                LOG_INFO("[UploadVisitorPicture] bMainServer2dot0 [" + bMainServer2dot0 + "]");
+                iMainServer2dot0 = wallpadDeviceSet.GetNewDanjiServer();
+                LOG_INFO("[UploadVisitorPicture] iMainServer2dot0 [" + iMainServer2dot0 + "]");
                 wallpadDeviceSet.closeDB();
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] UploadVisitorPicture()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
                 wallpadDeviceSet.closeDB();
             }
         }
@@ -132,21 +128,7 @@ public class AutoSaveVisitorPicture {
         public void run() {
             try {
                 mFTPManager = new HDCFTPManager();
-                boolean isConnect;
-                if(danjiserverType == 1)
-                {
-                    isConnect = mFTPManager.connectFTP(strRemoteIP);
-                }
-                else if(danjiserverType == 2)
-                {
-                    isConnect = mFTPManager.connectFTP(strRemoteIP);
-                }
-                else
-                {
-                    isConnect = mFTPManager.connectFTP(define.NewDanjiServerIP);
-                }
-
-                if (!isConnect) {
+                if (!mFTPManager.connectFTP(strRemoteIP)) {
                     Log.w(TAG, "[UploadVisitorPicture.run()] FAIL!! -> connectFTP(...)");
                     send_visitor_upload_complete_notice(false, mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, mAutoPictureInfo.eCallType, strTime, strFileName, "null");
                     return;
@@ -158,7 +140,7 @@ public class AutoSaveVisitorPicture {
                     return;
                 }
 
-                if (!bMainServer2dot0) {
+                if (iMainServer2dot0 == 1) {
                     if (!mFTPManager.setPassiveMode()) {
                         Log.w(TAG, "[UploadVisitorPicture.run()] FAIL!! -> setPassiveMode(...)");
                         disconnectFTP();
@@ -192,9 +174,12 @@ public class AutoSaveVisitorPicture {
                 disconnectFTP();
                 LOG_INFO("[UploadVisitorPicture.run()] Complete upload!!!");
                 send_visitor_upload_complete_notice(true, mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, mAutoPictureInfo.eCallType, strTime, strFileName, "null");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] UploadVisitorPicture.run()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -209,9 +194,13 @@ public class AutoSaveVisitorPicture {
             }
             LOG_INFO("[disconnectFTP] disconnectFTP FAIL!!");
             return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] disconnectFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -219,6 +208,7 @@ public class AutoSaveVisitorPicture {
     static String strReply_User = "";
     static String strReply_PW = "";
     static String strReply_Path = "";
+    static String strPass_Key = "passwd";
 
     public static boolean send_visitor_access_info_request(String strDong, String strHo, String strType, String strTime, final String strFileName, String strMessage) {
         try {
@@ -231,7 +221,7 @@ public class AutoSaveVisitorPicture {
                         LOG_INFO("[send_visitor_access_info_request] ProcSuccess()");
                         visitor_access_info.SetItem("ftp_info");
                         strReply_User = visitor_access_info.GetAttributeVal(0, "user");
-                        strReply_PW = visitor_access_info.GetAttributeVal(0, "passwd");
+                        strReply_PW = visitor_access_info.GetAttributeVal(0, strPass_Key);
                         strReply_Path = visitor_access_info.GetAttributeVal(0, "path");
                         LOG("[send_visitor_access_info_request] Reply!! User [" + strReply_User + "], PW [" + strReply_PW + "], Path [" + strReply_Path + "]");
                         strUserID = strReply_User;
@@ -254,9 +244,12 @@ public class AutoSaveVisitorPicture {
                 });
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_access_info_request(String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -287,9 +280,12 @@ public class AutoSaveVisitorPicture {
                 });
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_upload_complete_notice(boolean bResult, String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 349 - 141
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/CallController.java


+ 163 - 35
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/CallManager.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.callengine.engine;
 import android.content.Context;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import java.util.Timer;
 
 import kr.co.icontrols.wallpadcall.declare.DataClasses.MultiCallInfo;
@@ -151,9 +153,13 @@ public class CallManager {
                 } else {
                     return null;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return null;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getCALLOWNER()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return null;
             }
         }
@@ -247,9 +253,13 @@ public class CallManager {
                 else {
                     return null;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return null;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getCALLTYPE()");
-                e.printStackTrace();
+                //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                 return null;
             }
         }
@@ -322,9 +332,13 @@ public class CallManager {
                 } else {
                     return null;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return null;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getCALLSTATUS()");
-                e.printStackTrace();
+                //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
                 return null;
             }
         }
@@ -500,9 +514,12 @@ public class CallManager {
                 LOG_INFO("[printCallStatus] FRONT [" + getFRONT() + "]");
                 LOG_INFO("[printCallStatus] PSTN [" + getPSTN() + "]");
                 LOG_INFO("[printCallStatus] IHUB [" + getIHUB() + "]");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] printCallStatus() : " + e);
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -542,18 +559,25 @@ public class CallManager {
                 LOG_INFO("[setPSTNCallHold] bHold [" + bHold + "], strHoldInfo [" + strHoldInfo + "]");
                 bPSTNCallHold = bHold;
                 strPSTNHoldInfo = strHoldInfo;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setPSTNCallHold(boolean bHold, String strHoldInfo)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
         public boolean getPSTNCallHold() {
             try {
                 return bPSTNCallHold;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getPSTNCallHold()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return false;
             }
         }
@@ -561,9 +585,13 @@ public class CallManager {
         public String getPSTNCallInfo() {
             try {
                 return strPSTNHoldInfo;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return null;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getPSTNCallInfo()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return null;
             }
         }
@@ -572,9 +600,12 @@ public class CallManager {
             try {
                 bPSTNCallHold = false;
                 strPSTNHoldInfo = null;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] resetPSTNCallHold()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -590,9 +621,12 @@ public class CallManager {
                 LOG_INFO("[printMultiCallStatus] strMultiCall_ID_L [" + strMultiCall_ID_L + "]");
                 LOG_INFO("[printMultiCallStatus] strMultiCall_Name [" + strMultiCall_Name + "]");
                 LOG_INFO("[printMultiCallStatus] strMultiCall_IP [" + strMultiCall_IP + "]");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] printMultiCallStatus() : " + e);
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -609,9 +643,12 @@ public class CallManager {
                 strMultiCall_ID_L = sID_L;
                 strMultiCall_Name = sName;
                 strMultiCall_IP = sIP;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setMultiCallInfo(CALLTYPE eBaseCall, CALLTYPE eType, CALLSTATUS eStatus, CALLOWNER eCallOwner, boolean bAccept, String sID, String sID_H, String sID_L, String sName, String sIP)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -628,9 +665,12 @@ public class CallManager {
                 strMultiCall_ID_L = Info.getID_Low();
                 strMultiCall_Name = Info.getName();
                 strMultiCall_IP = Info.getIP();
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setMultiCallInfo(MultiCallInfo Info)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -638,9 +678,12 @@ public class CallManager {
             try {
                 LOG_INFO("[setMultiCallOwner] eCallOwner [" + eCallOwner + "]");
                 eMultiCallOwner = eCallOwner;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setMultiCallOwner(CALLOWNER eCallOwner)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -648,9 +691,12 @@ public class CallManager {
             try {
                 LOG_INFO("[setMultiCallAcceptFlag] bAccept [" + bAccept + "]");
                 bMultiCallAccept = bAccept;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setMultiCallAcceptFlag(String bAccept)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -658,9 +704,12 @@ public class CallManager {
             try {
                 LOG_INFO("[setPSTNRejectFlag] RESI [" + bReject + "]");
                 bMultiCallPSTNReject = bReject;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setPSTNRejectFlag(String bReject)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -668,9 +717,12 @@ public class CallManager {
             try {
                 LOG_INFO("[updateMultiCallName] sID [" + sName + "]");
                 strMultiCall_Name = sName;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] updateMultiCallName(String sID)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -687,18 +739,25 @@ public class CallManager {
                 strMultiCall_ID_L = "";
                 strMultiCall_Name = "";
                 strMultiCall_IP = "";
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] resetMultiCallInfo()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
         public CALLTYPE getBaseMultiCallType() {
             try {
                 return eBaseMultiCallType;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLTYPE.ERROR;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getBaseMultiCallType()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLTYPE.ERROR;
             }
         }
@@ -709,9 +768,13 @@ public class CallManager {
                 if (eCallType == CALLTYPE.LOBBY || eCallType == CALLTYPE.GUARD || eCallType == CALLTYPE.RESIDENCE)
                     return true;
                 else return false;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] isBaseMultiCallMoIP()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return false;
             }
         }
@@ -719,9 +782,13 @@ public class CallManager {
         public CALLTYPE getMultiCallType() {
             try {
                 return eMultiCallType;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLTYPE.ERROR;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallType()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLTYPE.ERROR;
             }
         }
@@ -729,9 +796,13 @@ public class CallManager {
         public CALLSTATUS getMultiCallStatus() {
             try {
                 return eMultiCallStatus;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLSTATUS.IDLE;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallStatus()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLSTATUS.IDLE;
             }
         }
@@ -739,9 +810,13 @@ public class CallManager {
         public CALLOWNER getMultiCallOwner() {
             try {
                 return eMultiCallOwner;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLOWNER.NONE;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallOwner()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLOWNER.NONE;
             }
         }
@@ -750,9 +825,13 @@ public class CallManager {
             try {
                 LOG("[getMultiCallAccept] bMultiCallAccept [" + bMultiCallAccept + "]");
                 return bMultiCallAccept;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallAccept()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return false;
             }
         }
@@ -760,9 +839,13 @@ public class CallManager {
         public boolean getMultiCallPSTNReject() {
             try {
                 return bMultiCallPSTNReject;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallPSTNReject()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return false;
             }
         }
@@ -770,9 +853,13 @@ public class CallManager {
         public String getMultiCall_ID() {
             try {
                 return strMultiCall_ID;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCall_ID()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -780,9 +867,13 @@ public class CallManager {
         public String getMultiCall_ID_H() {
             try {
                 return strMultiCall_ID_H;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallID_H()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -790,9 +881,13 @@ public class CallManager {
         public String getMultiCall_ID_L() {
             try {
                 return strMultiCall_ID_L;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallID_L()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -800,9 +895,13 @@ public class CallManager {
         public String getMultiCall_Name() {
             try {
                 return strMultiCall_Name;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCall_Name()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -810,9 +909,13 @@ public class CallManager {
         public String getMultiCall_IP() {
             try {
                 return strMultiCall_IP;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCall_IP()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -899,9 +1002,13 @@ public class CallManager {
                 } else {
                     return null;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return null;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getCALLEVENTTYPE()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return null;
             }
         }
@@ -925,9 +1032,13 @@ public class CallManager {
             LOG_INFO("[makeSIPID] SIPID : " + SIPID);
 
             return SIPID;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] MakeSIPID(...) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -985,9 +1096,13 @@ public class CallManager {
             LOG_INFO("[makeSIPID] SIPID : " + SIPID);
 
             return SIPID;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] MakeSIPID(...) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -996,12 +1111,17 @@ public class CallManager {
 
     public String makeCallForwarInfo(String strIPAddress) {
         try {
-            String strForwardInfo = makeSIPID(strIPAddress) + "@" + strIPAddress + ":" + nSIPPort;
+            //String strForwardInfo = makeSIPID(strIPAddress) + "@" + strIPAddress + ":" + nSIPPort;
+            String strForwardInfo = strIPAddress + "@" + strIPAddress + ":" + nSIPPort;
             LOG_INFO("[makeCallForwarInfo] strForwardInfo [" + strForwardInfo + "]");
             return strForwardInfo;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeCallForwarInfo(String strIPAddress)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -1016,9 +1136,13 @@ public class CallManager {
             else if (IP_Parse[2].equals("0")) return CALLTYPE.LOBBY;
             else if (IP_Parse[2].equals("201")) return CALLTYPE.IHUB;
             else return CALLTYPE.RESIDENCE;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return CALLTYPE.NONE;
         } catch (Exception e) {
             Log.e(TAG, "[getCallType] getCallType(strIPAddress) + e");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return CALLTYPE.NONE;
         }
     }
@@ -1033,9 +1157,13 @@ public class CallManager {
             else if (IP_Parse[2].equals("0")) return CALLTYPE.LOBBY;
             else if (IP_Parse[2].equals("201")) return CALLTYPE.IHUB;
             else return CALLTYPE.RESIDENCE;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return CALLTYPE.NONE;
         } catch (Exception e) {
             Log.e(TAG, "[getCallType] getCallType(strIPAddress) + e");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return CALLTYPE.NONE;
         }
     }

+ 18 - 4
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/HDCTimer.java

@@ -15,6 +15,8 @@ import android.os.Looper;
 import android.os.Message;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class HDCTimer {
 
     String TAG = "HDCTimer";
@@ -54,9 +56,12 @@ public class HDCTimer {
     public HDCTimer(Context context) {
         try {
             mContext = context;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] HDCTimer(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -101,9 +106,12 @@ public class HDCTimer {
             mBundle.putSerializable(strCALLTYPE, eCallType);
             HandleMsg.setData(mBundle);
             HDCTimerHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -135,9 +143,12 @@ public class HDCTimer {
                 mCallTimer = null;
                 nRemainSec = -99;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCallTimer(int nTimeout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -163,9 +174,12 @@ public class HDCTimer {
                     sendHDCTimerHandler(HANDLERMSG.CALL_TIMEOUT, eTriggerCallEvent, eTriggerCallType);
                     LOG_INFO("[CallTimerCntDown(" + nTimerNo + ")] Call End!!");
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] CallTimeCntDown().run()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }

+ 85 - 53
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/MissedCallVisitorPicture.java

@@ -4,8 +4,8 @@ import android.content.Context;
 import android.util.Log;
 
 import com.artncore.WallPadDataMgr.WallpadDeviceSet;
-import com.artncore.commons.define;
 import com.artncore.wallpadimap.RetProci;
+import com.util.LogUtil;
 
 import org.apache.commons.net.ftp.FTP;
 
@@ -55,9 +55,12 @@ public class MissedCallVisitorPicture {
                 bRemote_FrontCalled = Remote_FrontCalled;
                 strMissedCallPicURI = new String[nShotCnt];
                 for (int i = 0; i < strMissedCallPicURI.length; i++) strMissedCallPicURI[i] = "";
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] startMissedCallVisitorPicture(Context context, AutoPictureInfo Info)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -72,20 +75,22 @@ public class MissedCallVisitorPicture {
                     Thread.sleep(nShotInterval);
                 }
                 Log.i(TAG, "[startMissedCallVisitorPicture.run()] Take Pics OK!!");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] startMissedCallVisitorPicture.run()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
 
     public static class uploadVisitorPicture extends Thread {
 
-        boolean bMainServer2dot0 = false;
+        int iMainServer2dot0 = 0;
         String strUploadFile = "";
         String strFileName = "";
         String strTime = "";
-        int danjiserverType;
 
         public uploadVisitorPicture(String strTargetFile) {
             WallpadDeviceSet wallpadDeviceSet = new WallpadDeviceSet(mContext);
@@ -93,48 +98,25 @@ public class MissedCallVisitorPicture {
                 strUploadFile = strTargetFile;
                 strFileName = extractFileName(strTargetFile);
                 strTime = extractFileTime(strTargetFile);
-//                bMainServer2dot0 = wallpadDeviceSet.GetNewDanjiServer();
-                danjiserverType = wallpadDeviceSet.GetNewDanjiServer();
-                if(danjiserverType == 1)
-                {
-                    bMainServer2dot0 = false;
-                }
-                else if(danjiserverType == 2)
-                {
-                    bMainServer2dot0 = true;
-                }
-                else
-                {
-                    bMainServer2dot0 = true;
-                }
-
-                Log.d(TAG, "[uploadVisitorPicture] bMainServer2dot0 [" + bMainServer2dot0 + "]");
+                iMainServer2dot0 = wallpadDeviceSet.GetNewDanjiServer();
+                Log.d(TAG, "[uploadVisitorPicture] iMainServer2dot0 [" + iMainServer2dot0 + "]");
                 wallpadDeviceSet.closeDB();
                 Log.d(TAG, "[uploadVisitorPicture] strUploadFile [" + strUploadFile + "], strFileName [" + strFileName + "], strTime [" + strTime + "]");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] uploadVisitorPicture(String strTargetFile)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
         public void run() {
             try {
                 mFTPManager = new HDCFTPManager();
-                boolean isConnect;
-                if(danjiserverType == 1)
-                {
-                    isConnect = mFTPManager.connectFTP(strRemoteIP);
-                }
-                else if(danjiserverType == 2)
-                {
-                    isConnect = mFTPManager.connectFTP(strRemoteIP);
-                }
-                else
-                {
-                    isConnect = mFTPManager.connectFTP(define.NewDanjiServerIP);
-                }
+
                 if (!mFTPManager.isFTPConnected()) {
-                    if (!isConnect) {
+                    if (!mFTPManager.connectFTP(strRemoteIP)) {
                         Log.w(TAG, "[uploadVisitorPicture.run()] FAIL!! -> connectFTP(...)");
                         send_visitor_upload_complete_notice(false, mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, mAutoPictureInfo.eCallType, strTime, strFileName, "null");
                         return;
@@ -147,7 +129,7 @@ public class MissedCallVisitorPicture {
                     return;
                 }
 
-                if (!bMainServer2dot0) {
+                if (iMainServer2dot0 == 1) {
                     if (!mFTPManager.setPassiveMode()) {
                         Log.w(TAG, "[uploadVisitorPicture.run()] FAIL!! -> setPassiveMode(...)");
                         disconnectFTP();
@@ -180,9 +162,12 @@ public class MissedCallVisitorPicture {
                 disconnectFTP();
                 Log.d(TAG, "[uploadVisitorPicture.run()] Complete upload!!!");
                 send_visitor_upload_complete_notice(true, mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, mAutoPictureInfo.eCallType, strTime, strFileName, "null");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] uploadVisitorPicture.run()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -198,7 +183,7 @@ public class MissedCallVisitorPicture {
                         File mFile = new File(strMissedCallPicURI[i]);
                         if (mFile.exists()) {
                             Log.w(TAG, "[deleteTakenPicture] File found and will be deleted!! [" + mFile.getPath() + "]");
-                            mFile.delete();
+                            FileDelete(mFile);
                         } else {
                             Log.w(TAG, "[deleteTakenPicture] There is no file (" + strMissedCallPicURI[i] + ")");
                         }
@@ -211,9 +196,13 @@ public class MissedCallVisitorPicture {
                 strMissedCallPicURI[i] = null;
             }
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteTakenPicture()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -226,9 +215,12 @@ public class MissedCallVisitorPicture {
             try {
                 strTargetFile = targetfile;
                 for (int i = 0; i < targetfile.length; i++) strTargetFile[i] = targetfile[i];
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] deleteTakenPicture(String targetfile)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -241,7 +233,7 @@ public class MissedCallVisitorPicture {
                             File mFile = new File(strTargetFile[i]);
                             if (mFile.exists()) {
                                 Log.i(TAG, "[deleteTakenPicture.run()] File found and will be deleted!! [" + mFile.getPath() + "]");
-                                mFile.delete();
+                                FileDelete(mFile);
                             } else {
                                 Log.i(TAG, "[deleteTakenPicture.run()] There is no file (" + strTargetFile[i] + ")");
                                 long lSocketConnectionPeriod = 0;
@@ -252,7 +244,7 @@ public class MissedCallVisitorPicture {
                                     Thread.sleep(100);
                                     if (mFile.exists()) {
                                         Log.i(TAG, "[deleteTakenPicture.run()] (while) File found and will be deleted!! [" + mFile.getPath() + "]");
-                                        mFile.delete();
+                                        FileDelete(mFile);
                                     } else {
                                         Log.i(TAG, "[deleteTakenPicture.run()] (while) There is no file (" + strTargetFile[i] + ")");
                                     }
@@ -268,9 +260,12 @@ public class MissedCallVisitorPicture {
                     }
                     strMissedCallPicURI[i] = null;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] deleteTakenPicture.run()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -315,9 +310,12 @@ public class MissedCallVisitorPicture {
                 }
                 strMissedCallPicURI[i] = null;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] saveTakenPicture()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -370,9 +368,12 @@ public class MissedCallVisitorPicture {
             ((MainActivity) mContext).sendBRMissedVisitorPicture(mAutoPictureInfo.strDong, mAutoPictureInfo.strHo, strMissedCallPicURI);
 
             for (int i = 0; i < strMissedCallPicURI.length; i++) strMissedCallPicURI[i] = null;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] saveTakenPicture2()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -380,9 +381,13 @@ public class MissedCallVisitorPicture {
         try {
             String[] strParse_01 = strTargetFile.split("/");
             return strParse_01[4];
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] extractFileName(String strTargetFile)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -396,9 +401,13 @@ public class MissedCallVisitorPicture {
             // 이전현장 지원을 위해, 프로토콜을 변경하기로 함. 예) "2017년 9월 21일 오전 9시 58분 23초" 인 경우 "2017.09.21.09.58.23" 에서 "20170921_095823"으로 변경
 //            strTime = strParse_03[5].substring(0, 4) + "." + strParse_03[5].substring(4, 6) + "." + strParse_03[5].substring(6) + "." + strParse_03[6].substring(0, 2) + "." + strParse_03[6].substring(2, 4) + "." + strParse_03[6].substring(4);
             return strParse_03[5] + "_" + strParse_03[6];
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] extractFileTime(String strTargetFile)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -412,9 +421,13 @@ public class MissedCallVisitorPicture {
                     Global.ZeroPadding_Head(4, ConfigValues.strDong) + "_" + Global.ZeroPadding_Head(4, ConfigValues.strHo) + "_" + eCallType.toString() + "_";
             String strTimeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
             return strDeviceInfo + strTimeStamp + ".jpg";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeVisitorPictureName(CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -429,9 +442,13 @@ public class MissedCallVisitorPicture {
             }
             Log.d(TAG, "[disconnectFTP] disconnectFTP FAIL!!");
             return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] disconnectFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -439,6 +456,7 @@ public class MissedCallVisitorPicture {
     static String strReply_User = "";
     static String strReply_PW = "";
     static String strReply_Path = "";
+    static String strPass_Key = "passwd";
 
     public static boolean send_visitor_access_info_request(String strDong, String strHo, String strType, String strTime, final String strFileName, String strMessage, final String strFilePath) {
         try {
@@ -452,7 +470,7 @@ public class MissedCallVisitorPicture {
                         Log.d(TAG, "[send_visitor_access_info_request] ProcSuccess()");
                         visitor_access_info.SetItem("ftp_info");
                         strReply_User = visitor_access_info.GetAttributeVal(0, "user");
-                        strReply_PW = visitor_access_info.GetAttributeVal(0, "passwd");
+                        strReply_PW = visitor_access_info.GetAttributeVal(0, strPass_Key);
                         strReply_Path = visitor_access_info.GetAttributeVal(0, "path");
                         Log.d(TAG, "[send_visitor_access_info_request] Reply!! User [" + strReply_User + "], PW [" + strReply_PW + "], Path [" + strReply_Path + "]");
                         strUserID = strReply_User;
@@ -475,9 +493,12 @@ public class MissedCallVisitorPicture {
                 });
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_access_info_request(String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -509,10 +530,21 @@ public class MissedCallVisitorPicture {
                 });
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_visitor_upload_complete_notice(boolean bResult, String strDong, String strHo, String strType, String strTime, String strFileName, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
+
+    private static synchronized void FileDelete(File file)
+    {
+        if(file!=null && file.exists())
+        {
+            file.delete();
+        }
+    }
 }

+ 84 - 24
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/RemoteCallController.java

@@ -11,6 +11,8 @@ import android.os.Message;
 import android.os.Messenger;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.callengine.remotecall.AVPacket;
 import kr.co.icontrols.callengine.engine.CallManager.CALLEVENTTYPE;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -35,9 +37,12 @@ public class RemoteCallController {
             mContext = context;
             mContext.startService(new Intent(mContext, RemoteCallManager.class));
             bindRemoteCallManagerService();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] RemoteCallController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -45,9 +50,12 @@ public class RemoteCallController {
         try {
             Log.d(TAG, "[bindRemoteCallManagerService]");
             mContext.bindService(new Intent(mContext, RemoteCallManager.class), mServiceConnection, Context.BIND_AUTO_CREATE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] RemoteCallManager()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -56,9 +64,12 @@ public class RemoteCallController {
             Log.d(TAG, "[unbindRemoteCallManagerService]");
             ctrlRemoteServiceRegister(false);
             mContext.unbindService(mServiceConnection);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unbindRemoteCallManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -69,9 +80,12 @@ public class RemoteCallController {
                 Log.d(TAG, "[mServiceConnection.onServiceConnected] name [" + name + "], service [" + service + "]");
                 mRemoteMsn = new Messenger(service);
                 ctrlRemoteServiceRegister(true);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceConnected(ComponentName name, IBinder service)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -80,9 +94,12 @@ public class RemoteCallController {
             try {
                 Log.d(TAG, "[mServiceConnection.onServiceDisconnected] name [" + name + "]");
                 mRemoteMsn = null;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceDisconnected(ComponentName name)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -104,9 +121,12 @@ public class RemoteCallController {
             else {
                 Log.w(TAG, "[ctrlRemoteServiceRegister] mRemoteMsn is null!! bRegister [" + bRegister + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlRemoteServiceRegister(boolean bRegister)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -114,16 +134,19 @@ public class RemoteCallController {
         try {
             sendCloseRemoteCall();
             unbindRemoteCallManagerService();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseRemoteCallController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     class RemoteCallControllerHandler extends Handler {
         @Override
         public void handleMessage(Message msg) {
-//            Log.d(TAG, "[RemoteCallControllerHandler] what [" + msg.what + "], arg1 [" + msg.arg1 + "], arg2 [" + msg.arg2 + "], obj [" + msg.obj + "]");
+            Log.d(TAG, "[RemoteCallControllerHandler] what [" + msg.what + "], arg1 [" + msg.arg1 + "], arg2 [" + msg.arg2 + "], obj [" + msg.obj + "]");
             switch (msg.what) {
                 case REMOTECALLMSG.RECEIVE_EVENT_REQUEST_MONITOR:
                     receiveRequestFrontMonitoring(msg.getData());
@@ -169,9 +192,12 @@ public class RemoteCallController {
                 Log.w(TAG, "[receiveRequestFrontMonitoring] CALLSTATUS is not idle!!!");
                 sendCloseRemoteCall();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveRequestFrontMonitoring(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -186,17 +212,20 @@ public class RemoteCallController {
                     MainActivity.mCallController.CallScenarioManager(CALLOWNER.MOBILE, CALLEVENTTYPE.CONNECT_CALL, eCallType, null, null, null);
                 }
             } else if (eCallType == CALLTYPE.LOBBY) {
-                if (eCallOwner == CALLOWNER.NONE) {
+                //if (eCallOwner == CALLOWNER.NONE) {
                     MainActivity.mCallController.CallScenarioManager(CALLOWNER.MOBILE, CALLEVENTTYPE.CONNECT_CALL, eCallType, null, null, null);
-                }
+                //}
             } else if (eCallType == CALLTYPE.GUARD) {
                 if (eCallOwner == CALLOWNER.NONE) {
                     MainActivity.mCallController.CallScenarioManager(CALLOWNER.MOBILE, CALLEVENTTYPE.CONNECT_CALL, eCallType, null, null, null);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveStartCalling(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -204,8 +233,8 @@ public class RemoteCallController {
         try {
             CALLTYPE eCallType = CALLTYPE.getCALLTYPE(mBundle.getString(REMOTECALLHANDELKEY.CALLTYPE));
             AVPacket avPacket = (AVPacket) mBundle.getSerializable(REMOTECALLHANDELKEY.AVPACKET);
-//            Log.d(TAG, "[receiveAudioData] eCallType [" + eCallType + "]");
-//            Log.d(TAG, "[receiveAudioData] avPacket.avType [" + avPacket.avType + "], avPacket.length [" + avPacket.length + "]");
+            //Log.d(TAG, "[receiveAudioData] eCallType [" + eCallType + "]");
+            //Log.d(TAG, "[receiveAudioData] avPacket.avType [" + avPacket.avType + "], avPacket.length [" + avPacket.length + "]");
             if (eCallType == CALLTYPE.FRONT) {
                 MainActivity.mAudioRecordController.receiveMobileAudio_door(avPacket);
             } else if (eCallType == CALLTYPE.LOBBY) {
@@ -218,9 +247,12 @@ public class RemoteCallController {
             } else {
                 Log.w(TAG, "[receiveAudioData] Invalid eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveAudioData(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -233,9 +265,12 @@ public class RemoteCallController {
             } else {
                 Log.w(TAG, "[receiveUnlockDoor] Invalid eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveUnlockDoor(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -246,14 +281,18 @@ public class RemoteCallController {
             Log.d(TAG, "[receiveCloseSession] eCallType [" + eCallType + "], eCallOwner [" + eCallOwner + "]");
             if (eCallOwner == CALLOWNER.MOBILE || eCallOwner == CALLOWNER.NONE) {
                 if (eCallType == CALLTYPE.FRONT || eCallType == CALLTYPE.LOBBY || eCallType == CALLTYPE.GUARD || eCallType == CALLTYPE.RESIDENCE) {
+                    if (eCallType == CALLTYPE.RESIDENCE) MainActivity.mCallController.mVideoJNI.encoderStopOperation();
                     MainActivity.mCallController.CallScenarioManager(CALLOWNER.MOBILE, CALLEVENTTYPE.TERMINATE_CALL, eCallType, null, null, null);
                 } else {
                     Log.w(TAG, "[receiveCloseSession] Invalid eCallType [" + eCallType + "]");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveCloseSession()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -261,9 +300,12 @@ public class RemoteCallController {
         try {
             Log.d(TAG, "[sendOpenRemoteCall] eCallType [" + eCallType + "]");
             sendMsgToRemoteService(REMOTECALLMSG.SEND_OPEN_REMOTECALLLIB, eCallType, eCallStatus);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendOpenRemoteCall(CALLTYPE eCallType, CALLSTATUS eCallStatus)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -271,9 +313,12 @@ public class RemoteCallController {
         try {
             Log.d(TAG, "[sendOpenRemoteCall] eCallType [" + eCallType + "], strRemoteSIPID [" + strRemoteSIPID + "], strRemoteIP [" + strRemoteIP + "]");
             sendMsgToRemoteService(REMOTECALLMSG.SEND_OPEN_REMOTECALLLIB, eCallType, strRemoteSIPID, strRemoteIP);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendOpenRemoteCall(CALLTYPE eCallType, String strRemoteSIPID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -281,9 +326,12 @@ public class RemoteCallController {
         try {
             Log.d(TAG, "[sendCloseRemoteCall]");
             sendMsgToRemoteService(REMOTECALLMSG.SEND_CLOSE_REMOTECALLLIB, null, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendCloseRemoteCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -292,9 +340,12 @@ public class RemoteCallController {
         try {
             Log.d(TAG, "[sendCmdToRemoteCall] cmd [" + cmd + "], strRemoteID [" + strRemoteID + "], strRemoteIP [" + strRemoteIP + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(REMOTECALLMSG.SEND_MSG_TO_REMOTECALL, cmd, strRemoteID, strRemoteIP, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.d(TAG, "[Exception] sendCmdToRemoteCall(int cmd, String strRemoteIP, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -312,9 +363,12 @@ public class RemoteCallController {
             } else {
                 Log.w(TAG, "[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -331,9 +385,12 @@ public class RemoteCallController {
             } else {
                 Log.w(TAG, "[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallType [" + eCallType + "], strRemoteSIPID [" + strRemoteSIPID + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, CALLTYPE eCallType, String strRemoteSIPID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -351,9 +408,12 @@ public class RemoteCallController {
             } else {
                 Log.w(TAG, "[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], cmd [" + cmd + "], strRemoteID [" + strRemoteID + "], strRemoteIP [" + strRemoteIP + "], eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, int cmd, String strRemoteID, String strRemoteIP, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 316 - 95
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/SIPInterface.java


+ 57 - 18
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/VideoController.java

@@ -3,11 +3,14 @@ package kr.co.icontrols.callengine.engine;
 import android.content.Context;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import bssoft.stack.sip.BSSVideo;
 import bssoft.stack.sip.SIPStack;
 import bssoft.stack.sip.videoEnc;
 import kr.co.icontrols.callengine.remotecall.AVPacket;
 import kr.co.icontrols.wallpadcall.MainActivity;
+import kr.co.icontrols.wallpadcall.declare.Global;
 import kr.co.icontrols.wallpadcall.declare.Global.ConfigValues;
 import kr.co.icontrols.wallpadcall.declare.Global.FRONTCAMERATYPE;
 
@@ -26,9 +29,12 @@ public class VideoController {
         try {
             Log.e(TAG, "======== VideoController ========");
             mContext = context;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] VideoController(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -43,16 +49,22 @@ public class VideoController {
                 if (MainActivity.mCallController != null) {
                     try {
                         MainActivity.mCallController.mVideoJNI.encoderStopOperation();
+                    } catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
                     } catch (Exception e) {
                         ((MainActivity) mContext).setEncodingStopError();
                         Log.e(TAG, "[Exception] releaseVideoController encoderStopOperation()");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseVideoController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -128,7 +140,8 @@ public class VideoController {
 //                        Log.d(TAG, "[startVideoEncoding] == 3 == bSet [" + bSet + "], bEncoding [" + bEncoding + "], bEncoderStarted [" + bEncoderStarted + "]");
 //                    } catch (Exception e) {
 //                        Log.e(TAG, "[Exception] startVideoEncoding().run()");
-//                        e.printStackTrace();
+//                        //e.printStackTrace();
+                            //LogUtil.errorLogInfo("", TAG, e);
 //                    }
 //                }
 //            };
@@ -148,12 +161,12 @@ public class VideoController {
                             BSSVideo.bService = false;
                             BSSVideo.bRemoteview = false;
 
-                            if (videoRTPManager != null && videoRTPManager.videoEnc.bReceiveRunning) {
+                            /*if (videoRTPManager != null && videoRTPManager.videoEnc.bReceiveRunning) {
                                 videoRTPManager.videoEnc.bReceiveRunning = false;
                                 videoRTPManager.interrupt();
                                 videoRTPManager.closeSocket();
                                 videoRTPManager = null;
-                            }
+                            }*/
 
                             if (!bDecoding) {
                                 if (bDecoderStarted) {
@@ -168,10 +181,13 @@ public class VideoController {
                                     MainActivity.mCallController.mVideoJNI.setCheckIFrame(false);
                                     try {
                                         MainActivity.mCallController.mVideoJNI.encoderStopOperation();
+                                    } catch (RuntimeException re) {
+                                        LogUtil.errorLogInfo("", TAG, re);
                                     } catch (Exception e) {
                                         ((MainActivity) mContext).setEncodingStopError();
                                         Log.e(TAG, "[Exception] startVideoEncoding encoderStopOperation()");
-                                        e.printStackTrace();
+                                        //e.printStackTrace();
+                                        LogUtil.errorLogInfo("", TAG, e);
                                     }
                                 }
                             }
@@ -205,22 +221,36 @@ public class VideoController {
                                     videoRTPManager = new VideoRTPManager();
                                     videoRTPManager.start();
 //                                MainActivity.mCallController.mVideoJNI.setComposite(false);
-                                    MainActivity.mCallController.mVideoJNI.decoderStartOperation();
+                                    if (ConfigValues.DEVICE_BOARDTYPE == Global.BOARD_TYPE.V40_IGW300_NOUGAT) {
+                                        if (ConfigValues.eFrontCameraType == FRONTCAMERATYPE.SMARTIOT) {
+                                            MainActivity.mCallController.mVideoJNI.decoderStartOperation();
+                                        }
+                                    }
+                                    else {
+                                        MainActivity.mCallController.mVideoJNI.decoderStartOperation();
+                                    }
+
                                 }
                             }
                         }
                         Log.d(TAG, "== 2 == [startVideoEncoding] bSet [" + bSet + "], bEncoding [" + bEncoding + "], bEncoderStarted [" + bEncoderStarted + "], " +
                                 "bDecoding [" + bDecoding + "], bDecoderStarted [" + bDecoderStarted + "]");
-                    } catch (Exception e) {
+                    }catch (RuntimeException re) {
+                        LogUtil.errorLogInfo("", TAG, re);
+                    }  catch (Exception e) {
                         Log.e(TAG, "[Exception] startVideoEncoding().run()");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
             };
             if (runnable != null) ((MainActivity) mContext).runOnUiThread(runnable);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startVideoEncoding(final boolean bSet, final boolean bEncoding, final boolean bDecoding)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return;
         }
     }
@@ -270,23 +300,26 @@ public class VideoController {
                 dataSize += frameSize;
 
                 int packetSize = dataSize;
-//                Log.d(TAG, "[writeVideoRTPPacket] packetSize [" + packetSize + "]");
+                Log.d(TAG, "[writeVideoRTPPacket] packetSize [" + packetSize + "]");
                 videoEnc.RTPtimestamp = timeStamp;
                 if (videoEnc.rtpVideoBuffer != null && packetSize > 0) {
-//                    Log.d(TAG, "[writeVideoRTPPacket] ============ [3] ============");
+                    Log.d(TAG, "[writeVideoRTPPacket] ============ [3] ============");
                     if (IFrame == 0) videoEnc.RTPmark = 1;
                     else videoEnc.RTPmark = 0;
                     videoEnc.RTPsequence++;
 //                    Log.d(TAG, "[writeVideoRTPPacket] ============ [4] ============");
-                    videoEnc.encodeHNSRtpHeader(SIPStack.SIP_CODEC_H264, BSSVideo.bViewme);
+                    videoEnc.encodeHNSRtpHeader(SIPStack.SIP_CODEC_H263, BSSVideo.bViewme);
 
-//                    Log.d(TAG, "[writeVideoRTPPacket] ============ [5] ============");
+                    Log.d(TAG, "[writeVideoRTPPacket] ============ [5] ============");
                     sendFrontVideoToMobile(encodedFrame, frameSize, IFrame); // 현관 인코딩 영상을 모바일로 전송
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 SIPStack.exceptionCountAtCurrentCall++;
                 Log.e(TAG, "[Exception] writeVideoRTPPacket(final byte[] encodedFrame, final int headerLen, final int frameLen, final int timeStamp, final int IFrame)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return 0;
             }
             return dataSize;
@@ -309,16 +342,22 @@ public class VideoController {
                 try {
 //                    Log.d(TAG, "[sendFrontVideoToMobile] mDataSender.que.put()");
                     MainActivity.mDataSender.blockingQueue.put(avp);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
                 } catch (InterruptedException e) {
                     Log.e(TAG, "[InterruptedException] sendFrontVideoToMobile()");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
             } else {
                 Log.w(TAG, "[sendFrontVideoToMobile] mDataSender is NULL!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendFrontVideoToMobile(byte[] data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 117 - 24
WallPadCall/src/main/java/kr/co/icontrols/callengine/engine/VideoJNI.java

@@ -6,10 +6,14 @@ import kr.co.icontrols.wallpadcall.declare.Global.BOARD_TYPE;
 import kr.co.icontrols.wallpadcall.declare.Global.ConfigValues;
 
 import android.graphics.Bitmap;
+import android.os.Handler;
+import android.os.Looper;
 import android.util.Log;
 import android.view.Surface;
 import android.view.SurfaceView;
 
+import com.util.LogUtil;
+
 import static kr.co.icontrols.wallpadcall.MainActivity.bFFMPEGEnable;
 
 public class VideoJNI {
@@ -43,9 +47,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[setCheckIFrame] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCheckIFrame(boolean bSet)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -59,9 +66,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[setCameraSelect] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCameraSelect()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -75,9 +85,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[setCameraSurface] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCameraSurface(Surface CameraSurface, int nWidth, int nHeight, int nBitRate, int nFrameRate)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -92,9 +105,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[setDecoderInfo_V40] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDecoderInfo_V40(int X, int Y, int W, int H)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -109,9 +125,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[setPreviewInfo_V40] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPreviewInfo_V40(int X, int Y, int W, int H)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -130,9 +149,12 @@ public class VideoJNI {
             else {
                 Log.w(TAG, "[encoderStartOperation] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] encoderStartOperation()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -154,9 +176,12 @@ public class VideoJNI {
             else {
                 Log.w(TAG, "[encoderStopOperation] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] encoderStopOperation()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -170,9 +195,12 @@ public class VideoJNI {
             mSurface = surface;
             nSurfaceWidth = width;
             nSurfaceHeight = height;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setRemoteSurfaceview(Surface surface, int width, int height)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -223,31 +251,51 @@ public class VideoJNI {
             else {
                 Log.w(TAG, "[decoderStartOperation] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] decoderStartOperation()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void decoderStopOperation() {
         try {
             Log.d(TAG, "[decoderStopOperation] BOARDTYPE [" + BOARDTYPE + "], bDecoderStarted [" + bDecoderStarted + "], SWDecoderStarted [" + SWDecoderStarted + "]");
+            int nTime = 500;
             if (BOARDTYPE == BOARD_TYPE.V40_IGW300) {
                 if (bDecoderStarted) {
                     bDecoderStarted = false;
-                    mV40IFCCD.decoderStopOperation();
+                    new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            mV40IFCCD.decoderStopOperation();
+                        }
+                    }, nTime);
                 }
             }
             else if (BOARDTYPE == BOARD_TYPE.V40) {
                 if (bDecoderStarted) {
                     bDecoderStarted = false;
-                    mV40IFCCD.decoderStopOperation();
+                    new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            mV40IFCCD.decoderStopOperation();
+                        }
+                    }, nTime);
                 }
             }
             else if (BOARDTYPE == BOARD_TYPE.V40_IGW300_NOUGAT) {
                 if (bDecoderStarted) {
                     bDecoderStarted = false;
-                    mV40IFCCD.decoderStopOperation();
+                    new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            mV40IFCCD.decoderStopOperation();
+                        }
+                    }, nTime);
+
                 }
             }
             else if (BOARDTYPE == BOARD_TYPE.V40_NOUGAT) {
@@ -261,25 +309,38 @@ public class VideoJNI {
                             SWDecoderClose(1);
                             Log.e(TAG, "[decoderStopOperation] ========== JEFF 2 ========== SWDecoderStarted [" + SWDecoderStarted + "]");
                         }
-                        mV40IFCCD.decoderStopOperation();
+                        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                mV40IFCCD.decoderStopOperation();
+                            }
+                        }, nTime);
                     }
                     else {
-                        mV40IFCCD.decoderStopOperation();
+                        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                mV40IFCCD.decoderStopOperation();
+                            }
+                        }, nTime);
                     }
                 }
             }
             else {
                 Log.w(TAG, "[decoderStopOperation] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] decoderStopOperation()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void sendDataToDecoder(byte[] hData, int nHeaderLen, int nFrameLen, int nTimeStamp) {
         try {
-            Log.e(TAG, "[sendDataToDecoder] hData.length [" + hData.length + "], nHeaderLen [" + nHeaderLen + "], nFrameLen [" + nFrameLen + "], nTimeStamp [" + nTimeStamp + "]");
+//            Log.e(TAG, "[sendDataToDecoder] hData.length [" + hData.length + "], nHeaderLen [" + nHeaderLen + "], nFrameLen [" + nFrameLen + "], nTimeStamp [" + nTimeStamp + "]");
             if (BOARDTYPE == BOARD_TYPE.V40_IGW300) {
                 if (bFFMPEGEnable) {
                     SWSendDataToDecoder(hData, nFrameLen);
@@ -317,9 +378,12 @@ public class VideoJNI {
             else {
                 Log.w(TAG, "[sendDataToDecoder] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendDataToDecoder(byte[] hData, int nHeaderLen, int nFrameLen, int nTimeStamp)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -332,9 +396,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[deallocate] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deallocate()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -347,9 +414,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[stopAllOperation] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stopAllOperation()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -368,12 +438,23 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[setComposite] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setComposite(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
+    public byte[] getDecodedata()
+    {
+        return mV40IFCCD.getDecodedata();
+    }
+    public int[] getDecodedata_int()
+    {
+        return mV40IFCCD.getDecodedata_int();
+    }
     public Bitmap getMoIPPicture(CallManager.CALLTYPE eCallType) {
         try {
             Log.d(TAG, "[getMoIPPicture] eCallType [" + eCallType + "]");
@@ -392,9 +473,12 @@ public class VideoJNI {
             } else {
                 Log.w(TAG, "[getMoIPPicture] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getMoIPPicture()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return null;
     }
@@ -414,9 +498,12 @@ public class VideoJNI {
             else {
                 Log.w(TAG, "[SWDecoderInit] SW decoder already run!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SWDecoderInit(Surface surface, int width, int height)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -430,9 +517,12 @@ public class VideoJNI {
             else {
                 Log.w(TAG, "[SWDecoderClose] SW decoder already stop!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SWDecoderClose(int nTraceNo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -452,9 +542,12 @@ public class VideoJNI {
                     Log.w(TAG, "[SWSendDataToDecoder] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SWSendDataToDecoder(byte[] hData, int nFrameLen)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 73 - 14
WallPadCall/src/main/java/kr/co/icontrols/callengine/history/CallHistoryManager.java

@@ -11,6 +11,8 @@ import android.content.Context;
 import android.database.Cursor;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class CallHistoryManager {
 
     String TAG = "CallHistoryManager";
@@ -62,9 +64,13 @@ public class CallHistoryManager {
                 mDBManager.initDatabase();
                 return mDBManager.createTable(Declare.DBInfo.TABLE_NAME_HISTORY_CALL, Declare.DBInfo.VALUE_NAME_HISTORY_CALL);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initCallHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -72,9 +78,13 @@ public class CallHistoryManager {
     public boolean releaseCallHistory() {
         try {
             return mDBManager.closeDatabase();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseCallHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -84,9 +94,13 @@ public class CallHistoryManager {
             clearOverCntHistory();
             Info.printValue();
             return mDBManager.addHistory(Declare.DBInfo.TABLE_NAME_HISTORY_CALL, Declare.DBInfo.VALUE_NAME_HISTORY_CALL, Info.getValueArrayWithoutTime());
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] addCallHistory(Info)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -96,9 +110,12 @@ public class CallHistoryManager {
             String strDBQuery = "update " + Declare.DBInfo.TABLE_NAME_HISTORY_CALL + " set CHECKED='TRUE' where " + strStart + " <= ID and ID <= " + strEnd + ";";
 //            Log.e(TAG, "[updateNewCheck] strDBQuery [" + strDBQuery + "]");
             mDBManager.execSQL(strDBQuery);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateNewCheck(String strStart, String strEnd)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -113,9 +130,12 @@ public class CallHistoryManager {
                 Log.e(TAG, "[clearOverCntHistory] nClearCnt = " + nClearCnt);
                 deleteOldestHistory(Declare.DBInfo.TABLE_NAME_HISTORY_CALL, nClearCnt);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] clearOverCntHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -132,9 +152,13 @@ public class CallHistoryManager {
                 Info.addCallHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCallHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -154,9 +178,13 @@ public class CallHistoryManager {
                 Info.addCallHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCallHistory(nStartIndex, nCnt)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -176,9 +204,13 @@ public class CallHistoryManager {
                 Info.addCallHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getPSTNRedialInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -191,6 +223,9 @@ public class CallHistoryManager {
                 String getdata = cursor.getString(0).trim();
                 try {
                     return Integer.parseInt(getdata);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -999;
                 } catch (Exception e) {
                     cursor.close();
                     return -999;
@@ -198,9 +233,13 @@ public class CallHistoryManager {
             }
             cursor.close();
             return -999;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getHistoryCnt(String table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -999;
         }
     }
@@ -213,6 +252,9 @@ public class CallHistoryManager {
                 String getdata = cursor.getString(0).trim();
                 try {
                     return Integer.parseInt(getdata);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -999;
                 } catch (Exception e) {
                     cursor.close();
                     return -999;
@@ -220,9 +262,13 @@ public class CallHistoryManager {
             }
             cursor.close();
             return -999;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getNewHistoryCnt(String table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -999;
         }
     }
@@ -237,9 +283,12 @@ public class CallHistoryManager {
             }
             LOG_INFO("[deleteHistoryList] strSQL = " + strSQL);
             mDBManager.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteHistoryList(String table, String[] strID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -254,9 +303,12 @@ public class CallHistoryManager {
             }
             LOG_INFO("[deleteHistoryList] strSQL = " + strSQL);
             mDBManager.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteHistoryList(String table, ArrayList<String> strID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -265,18 +317,25 @@ public class CallHistoryManager {
             String strSQL = "delete from " + table + " where ID in (select ID from " + table + " limit " + nDelCnt + ");";
             LOG_INFO("[deleteOldestHistory] strSQL = " + strSQL);
             mDBManager.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteOldestHistory(String table, int nDelCnt)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public boolean deleteDBFile() {
         try {
             return mDBManager.deleteDBFile();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteDBFile()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }

+ 125 - 28
WallPadCall/src/main/java/kr/co/icontrols/callengine/history/VisitorPictureHistoryManager.java

@@ -12,6 +12,8 @@ import android.content.Context;
 import android.database.Cursor;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class VisitorPictureHistoryManager {
 
     String TAG = "VisitorPictureHistoryManager";
@@ -63,9 +65,13 @@ public class VisitorPictureHistoryManager {
                 mDBManager.initDatabase();
                 return mDBManager.createTable(Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE, Declare.DBInfo.VALUE_NAME_HISTORY_VISITORPICTURE);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initVisitorPictureHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -73,9 +79,13 @@ public class VisitorPictureHistoryManager {
     public boolean releaseVisitorPictureHistory() {
         try {
             return mDBManager.closeDatabase();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseVisitorPictureHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -86,9 +96,13 @@ public class VisitorPictureHistoryManager {
             clearOverCntHistory();
             Info.printValue();
             return mDBManager.addHistory(Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE, Declare.DBInfo.VALUE_NAME_HISTORY_VISITORPICTURE, Info.getValueArrayWithoutTime());
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] addVisitorPictureHistory(Info)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -97,9 +111,12 @@ public class VisitorPictureHistoryManager {
         try {
             String strDBQuery = "update " + Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE + " set CHECKED='TRUE' where " + strStart + " <= ID and ID <= " + strEnd + ";";
             mDBManager.execSQL(strDBQuery);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateNewCheck(String strStart, String strEnd)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -108,9 +125,12 @@ public class VisitorPictureHistoryManager {
             String strDBQuery = "update " + Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE + " set THIEF='TRUE' where ID = " + strID + ";";
             Log.d(TAG, "[updateThiefPicture] strDBQuery [" + strDBQuery + "]");
             mDBManager.execSQL(strDBQuery);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateThiefPicture(String strID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -125,9 +145,12 @@ public class VisitorPictureHistoryManager {
                 Log.d(TAG, "[clearOverCntHistory] nClearCnt = " + nClearCnt);
                 deleteOldestHistory(Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE, nClearCnt);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] clearOverCntHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -144,9 +167,13 @@ public class VisitorPictureHistoryManager {
                 Info.addVisitorPictureHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVisitorPicHistory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -167,9 +194,13 @@ public class VisitorPictureHistoryManager {
                 Info.addVisitorPictureHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVisitorPicHistory(nStartIndex, nCnt)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -189,9 +220,13 @@ public class VisitorPictureHistoryManager {
                 Info.addVisitorPictureHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVisitorPictureHistoryByID(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -211,9 +246,13 @@ public class VisitorPictureHistoryManager {
                 Info.addVisitorPictureHistoryInfo(strResult[0], strResult[1], strResult[2], strResult[3], strResult[4], strResult[5], strResult[6], strResult[7]);
             }
             return Info;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVisitorPictureHistory_All()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -226,9 +265,13 @@ public class VisitorPictureHistoryManager {
             Cursor mCursor = mDBManager.accessDBDirectly(strDBQuery);
             if (mCursor.getCount() > 0) return true;
             else return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] isExistVisitorPicture(String strFilePath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -241,6 +284,9 @@ public class VisitorPictureHistoryManager {
                 String getdata = cursor.getString(0).trim();
                 try {
                     return Integer.parseInt(getdata);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -999;
                 } catch (Exception e) {
                     cursor.close();
                     return -999;
@@ -248,9 +294,13 @@ public class VisitorPictureHistoryManager {
             }
             cursor.close();
             return -999;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getHistoryCnt(String table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -999;
         }
     }
@@ -263,6 +313,9 @@ public class VisitorPictureHistoryManager {
                 String getdata = cursor.getString(0).trim();
                 try {
                     return Integer.parseInt(getdata);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    return -999;
                 } catch (Exception e) {
                     cursor.close();
                     return -999;
@@ -270,9 +323,13 @@ public class VisitorPictureHistoryManager {
             }
             cursor.close();
             return -999;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getNewHistoryCnt(String table)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -999;
         }
     }
@@ -287,9 +344,12 @@ public class VisitorPictureHistoryManager {
             }
             LOG_INFO("[deleteHistoryList] strSQL = " + strSQL);
             mDBManager.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteHistoryList(String table, String[] strID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -304,9 +364,12 @@ public class VisitorPictureHistoryManager {
             }
             LOG_INFO("[deleteHistoryList] strSQL = " + strSQL);
             mDBManager.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteHistoryList(String table, ArrayList<String> strID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -315,18 +378,25 @@ public class VisitorPictureHistoryManager {
             String strSQL = "delete from " + table + " where ID in (select ID from " + table + " limit " + nDelCnt + ");";
             LOG_INFO("[deleteOldestHistory] strSQL = " + strSQL);
             mDBManager.execSQL(strSQL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteOldestHistory(String table, int nDelCnt)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public boolean deleteDBFile() {
         try {
             return mDBManager.deleteDBFile();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteDBFile()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -341,9 +411,13 @@ public class VisitorPictureHistoryManager {
                 LOG_INFO("[deleteVisitorPictureDirectory] There is no directory!! [" + Declare.DBInfo.DIRECTORY_URI_VISITORPICTURE + "]");
             }
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteVisitorPictureDirectory()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -352,15 +426,24 @@ public class VisitorPictureHistoryManager {
         try {
             File mFile = new File(strPath);
             File[] childFileList = mFile.listFiles();
-            for (File childFile : childFileList) {
-                if (childFile.isDirectory())
-                    deleteDirectory(childFile.getAbsolutePath()); // 혹시 있을지 모르는 하위폴더 삭제
-                else childFile.delete(); // 파일 삭제
+            if(childFileList!=null)
+            {
+                for (File childFile : childFileList) {
+                    if (childFile.isDirectory())
+                        deleteDirectory(childFile.getAbsolutePath()); // 혹시 있을지 모르는 하위폴더 삭제
+                    else childFile.delete(); // 파일 삭제
+                }
+                mFile.delete(); // 상위 폴더 삭제
             }
-            mFile.delete(); // 상위 폴더 삭제
-        } catch (Exception e) {
+
+
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG,re);
+        }
+        catch (Exception e) {
             Log.e(TAG, "[Exception] deleteDirectory(String strPath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -371,14 +454,17 @@ public class VisitorPictureHistoryManager {
                 File mFile = new File(strURI.get(i));
                 if (mFile.exists()) {
                     LOG_INFO("[deleteVisitorPicture] strPath exists!! [" + strURI.get(i) + "]");
-                    mFile.delete();
+                    FileDelete(mFile);
                 } else {
                     LOG_INFO("[deleteVisitorPicture] There is no strPath!! [" + strURI.get(i) + "]");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteHistoryList(ArrayList<String> strURI)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -403,10 +489,21 @@ public class VisitorPictureHistoryManager {
                     return true;
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initVisitorPictureDB(String table, String[] value)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
+
+    private synchronized void FileDelete(File file)
+    {
+        if(file!=null && file.exists())
+        {
+            file.delete();
+        }
+    }
 }

+ 138 - 34
WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/PSTNController.java

@@ -14,6 +14,7 @@ import android.os.Messenger;
 import android.util.Log;
 
 import com.artncore.wallpadapi.IGW300API;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.engine.CallManager.CALLEVENTTYPE;
 import kr.co.icontrols.callengine.engine.CallManager.CALLPATH;
@@ -80,9 +81,12 @@ public class PSTNController {
                 bindPSTNSerialManagerService();
             }
             mPSTNInfo = new PSTNInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] PSTNController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -123,18 +127,24 @@ public class PSTNController {
                 unbindPSTNSerialManagerService();
             }
             stopPSTNRingCntThread();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releasePSTNController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void bindPSTNSerialManagerService() {
         try {
             mContext.bindService(new Intent(mContext, PSTNSerialManager.class), mServiceConnection, Context.BIND_AUTO_CREATE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] bindPSTNSerialManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -142,9 +152,12 @@ public class PSTNController {
         try {
             ctrlRemoteServiceRegister(false);
             mContext.unbindService(mServiceConnection);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unbindPSTNSerialManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -155,9 +168,12 @@ public class PSTNController {
                 LOG_INFO("[mServiceConnection.onServiceConnected] name [" + name + "], service [" + service + "]");
                 mRemoteMsn = new Messenger(service);
                 ctrlRemoteServiceRegister(true);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceConnected(ComponentName name, IBinder service)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -166,9 +182,12 @@ public class PSTNController {
             try {
                 LOG_INFO("[mServiceConnection.onServiceDisconnected] name [" + name + "]");
                 mRemoteMsn = null;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceDisconnected(ComponentName name)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -188,9 +207,12 @@ public class PSTNController {
             } else {
                 LOG_WARN("[ctrlRemoteServiceRegister] mRemoteMsn is null!! bRegister [" + bRegister + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlRemoteServiceRegister(boolean bRegister)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -202,9 +224,12 @@ public class PSTNController {
             } else {
                 LOG_WARN("[sendMsgToLocalService] mLocalMsn is null!! nMsg [" + nMsg + "], strMessage [" + strMessage + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToLocalService(int nMsg, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -216,9 +241,12 @@ public class PSTNController {
             } else {
                 LOG_WARN("[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], strMessage [" + strMessage + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -291,9 +319,12 @@ public class PSTNController {
                 sendMsgToRemoteService(PSTNHANDLERMSG.SEND_HOOK_ON, null);
                 stopPSTNRingCntThread();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHookOn()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -308,27 +339,36 @@ public class PSTNController {
             } else {
                 sendMsgToRemoteService(PSTNHANDLERMSG.SEND_HOOK_OFF, null);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHookOff()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void sendHookOffDelay() {
         try {
             sendMsgToRemoteService(PSTNHANDLERMSG.SEND_HOOK_OFF_DELAY, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHookOffDelay()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void sendGetPSTNPath() {
         try {
             sendMsgToRemoteService(PSTNHANDLERMSG.SEND_GET_PSTN_PATH, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendGetPSTNPath()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -359,18 +399,24 @@ public class PSTNController {
                 sendMsgToRemoteService(PSTNHANDLERMSG.SEND_REJECT, null);
                 stopPSTNRingCntThread();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendReject()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void sendDial(String strDialNo) {
         try {
             sendMsgToRemoteService(PSTNHANDLERMSG.SEND_DIAL, strDialNo);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendDial(String strDialNo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -384,9 +430,12 @@ public class PSTNController {
             else {
                 sendMsgToRemoteService(PSTNHANDLERMSG.SEND_DTMF, strDTMF);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendDTMF(String strDTMF)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -430,18 +479,24 @@ public class PSTNController {
             else {
                 sendMsgToRemoteService(PSTNHANDLERMSG.SEND_HOOKON_DIAL, strDialNo);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHookOnDialNo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void cancelSendDTMF() {
         try {
             sendHandlerMsgDelayed(GWPSTNHANDLERMSG.CANCEL_SEND_DTMF, 0, 0, null, 0); // DTMF 송신
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] cancelSendDTMF()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -458,9 +513,12 @@ public class PSTNController {
             else {
                 startPSTNRingCntThread();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receivePSTNRing()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -476,9 +534,12 @@ public class PSTNController {
             Log.e(TAG, "[startPSTNRingCntThread] ========= PSTNRingCntThread START =========");
             mPSTNRingCntThread = new PSTNRingCntThread();
             mPSTNRingCntThread.start();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startPSTNRingCntThread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -488,18 +549,25 @@ public class PSTNController {
             bRingCntEnable = false;
             mPSTNRingCntThread = null;
             Log.d(TAG, "[stopPSTNRingCntThread] ========= PSTNRingCntThread END!!! =========");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stopPSTNRingCntThread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public boolean isPSTNReceiving() {
         try {
             return bRingCntEnable;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] isPSTNReceiving()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -507,18 +575,24 @@ public class PSTNController {
     public void clearPSTNCall() {
         try {
             stopPSTNRingCntThread();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] clearPSTNCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void initPSTNModem() {
         try {
             sendMsgToRemoteService(PSTNHANDLERMSG.INIT_PSTNMODEM, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initPSTNModem()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -539,9 +613,12 @@ public class PSTNController {
                 Log.e(TAG, "[PSTNRingCntThread.run()] nRingCnt [" + nRingCnt + "], bRingCntEnable [" + bRingCntEnable + "]");
                 sendMsgToLocalService(PSTNHANDLERMSG.RECEIVE_RING_END, null);
                 stopPSTNRingCntThread();
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] PSTNRingCntThread().run() : " + e);
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -585,9 +662,12 @@ public class PSTNController {
                 if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300) sendHandlerMsgDelayed(GWPSTNHANDLERMSG.SEND_DTMFNO_V40_IGW300, 0, 0, String.valueOf(nNo), nDelayTime);
                 else sendHandlerMsgDelayed(GWPSTNHANDLERMSG.START_TONE, nDelayTime, 0, String.valueOf(nNo), nDelayTime); // DTMF 송신 (ToneGenerator - 각 번호별 Interval: 1s)
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendDTMFNo(String strNo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -597,9 +677,12 @@ public class PSTNController {
             runDTMFSender(true);
             mGWDTMFSenderThread = new GWDTMFSenderThread();
             mGWDTMFSenderThread.start();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startGWDTMFSender()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -610,9 +693,12 @@ public class PSTNController {
             if (mGWDTMFSenderThread != null) {
                 mGWDTMFSenderThread = null;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stopGWDTMFSender()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -624,9 +710,12 @@ public class PSTNController {
                 LOG("[runDTMFSender] mGWDTMFSendDataBuilder [" + mGWDTMFSendDataBuilder.toString() + "]");
             }
             bSenderRun = bRun;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runDTMFSender(boolean bRun)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -634,9 +723,12 @@ public class PSTNController {
         try {
             LOG("[addGWDTMFBuffer] strDTMF [" + strDTMF + "]");
             mGWDTMFSendDataBuilder.append(strDTMF);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] addGWDTMFBuffer(String strDTMF)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -645,9 +737,12 @@ public class PSTNController {
             LOG("[cancelGWDTMFBuffer] Before mGWDTMFSendDataBuilder [" + mGWDTMFSendDataBuilder.toString() + "]");
             mGWDTMFSendDataBuilder.delete(0, mGWDTMFSendDataBuilder.length());
             LOG("[cancelGWDTMFBuffer] After mGWDTMFSendDataBuilder [" + mGWDTMFSendDataBuilder.toString() + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] addGWDTMFBuffer(String strDTMF)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -703,9 +798,12 @@ public class PSTNController {
                         }
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] GWDTMFSenderThread.run()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -777,9 +875,12 @@ public class PSTNController {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             GWPSTNHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -792,9 +893,12 @@ public class PSTNController {
             HandleMsg.arg2 = arg2;
             HandleMsg.obj = obj;
             GWPSTNHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(int what, int arg1, int arg2, String obj, long delay)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 301 - 73
WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/PSTNSerialManager.java


+ 20 - 4
WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/Request_PSTN_ATCmd.java

@@ -6,6 +6,8 @@ import kr.co.icontrols.callengine.pstn.ATCmds.SendNWaitResultCtrl;
 import android.content.Context;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class Request_PSTN_ATCmd extends SendNWaitPSTN {
 
     String TAG = "Request_PSTN_ATCmd";
@@ -43,9 +45,13 @@ public class Request_PSTN_ATCmd extends SendNWaitPSTN {
             strCurrentCmd = strATCmd;
             strExpectedReply = strReplyCmd;
             return sendNwaitPSTN(strATCmd, strReplyCmd, bReply);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_PSTN_ATCmd(strATCmd, strReplyCmd, bReply)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -54,9 +60,13 @@ public class Request_PSTN_ATCmd extends SendNWaitPSTN {
         try {
             strExpectedReply = strReplyCmd;
             return procPSTNModemPatch(strReplyCmd, bReply);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procPSTNModemPatch(strReplyCmd, bReply)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -85,18 +95,24 @@ public class Request_PSTN_ATCmd extends SendNWaitPSTN {
                 mSendNWaitResultCtrl.onResult(eResult);
                 return;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onProcessDone(SendNWaitResult eResult)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void setResultCtrl(SendNWaitResultCtrl eResult) {
         try {
             mSendNWaitResultCtrl = eResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setResultCtrl(SendNWaitResult eResult)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 47 - 11
WallPadCall/src/main/java/kr/co/icontrols/callengine/pstn/SendNWaitPSTN.java

@@ -8,6 +8,8 @@ import android.os.Looper;
 import android.os.Message;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class SendNWaitPSTN implements PSTNCmdResultListener {
 
     String TAG = "SendNWaitPSTN";
@@ -100,18 +102,25 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
 
     public SendNWaitPSTN() {
         try {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SendNWaitPSTN()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public boolean sendNwaitPSTN(String strATCmd, String strReplyCmd, boolean bReply) {
         try {
             return procSendPSTN(strATCmd, strReplyCmd, bReply);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendNwaitPSTN(strATCmd, strReplyCmd, bReply)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -130,9 +139,13 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
                 onProcessDone(SendNWaitResult.SendFailure);
             }
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procSendPSTN(strATCmd, strReplyCmd, bReply)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -152,9 +165,13 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
                 onProcessDone(SendNWaitResult.SendFailure);
             }
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procPSTNModemPatch(String strReplyCmd, boolean bReply)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -176,9 +193,12 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
                 strCurrentCmd = strATCmd;
                 strExpectdReplyCmd = strReplyCmd;
                 SWHandler = Handle;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] SendNWaitPSTNCmdThread(strATCmd, strReplyCmd, Handle)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -186,9 +206,12 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
             try {
                 strExpectdReplyCmd = strReplyCmd;
                 SWHandler = Handle;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] SendNWaitPSTNCmdThread(strReplyCmd, Handle)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -197,9 +220,12 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
                 Message HandleMsg = SWHandler.obtainMessage();
                 HandleMsg.what = msg;
                 SWHandler.sendMessage(HandleMsg);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -218,16 +244,20 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
                         Thread.sleep(10);
                     } catch (InterruptedException e) {
                         Log.e(TAG, "[InterruptedException] (SerialDataReceiver.run()) Thread.sleep(100)");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
                 Log.w(TAG, "[SendNWaitPSTNCmdThread.run()] strCurrentCmd [" + strCurrentCmd + "] TIMEOUT!!!");
                 sendHandlerMsg(HANDLE_MSG_TIMEOUT);
                 sendHandlerMsg(HANDLE_MSG_STOP_THREAD);
                 return;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] (SendNWaitMultiRFThread.run())");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 sendHandlerMsg(HANDLE_MSG_ERROR_OTHER);
                 sendHandlerMsg(HANDLE_MSG_STOP_THREAD);
             }
@@ -238,9 +268,12 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
         try {
             PSTNSerialManager.releasePSTNCmdResultListener();
             if (mSendNWaitPSTNCmdThread != null) mSendNWaitPSTNCmdThread.interrupt();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stopReplyThread()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -248,9 +281,12 @@ public class SendNWaitPSTN implements PSTNCmdResultListener {
     public void onReplyResult(String strResult) {
         try {
             strReplyResult = strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onReplyResult(strResult)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 11 - 5
WallPadCall/src/main/java/kr/co/icontrols/callengine/remotecall/DataSender.java

@@ -3,6 +3,7 @@ package kr.co.icontrols.callengine.remotecall;
 import android.util.Log;
 
 import com.hdc.visitorcall.VisitorCallLib;
+import com.util.LogUtil;
 
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -17,15 +18,16 @@ public class DataSender extends Thread {
 
     public void run() {
         try {
-//            Log.e(TAG, "DataSender =============== [1] ===============");
+            //Log.e(TAG, "DataSender =============== [1] ===============");
             VisitorCallLib mVisitorCallLib = VisitorCallLib.getInstance();
             for (;;) {
                 try {
-//                    Log.e(TAG, "DataSender =============== [2] ===============");
+                    //Log.e(TAG, "DataSender =============== [2] ===============");
                     AVPacket avPacket = blockingQueue.take();
+                    //Log.e(TAG, "DataSender =============== [3] ===============");
                     if (mVisitorCallLib != null) {
 //                        Log.e(TAG, "DataSender =============== [3] ===============");
-//                        Log.d(TAG, "[DataSender.run()] ndkHandle [" + mVisitorCallLib.ndkHandle + "], avType [" + avPacket.avType + "], length [" + avPacket.length + "], frameType [" + avPacket.frameType + "]");
+                       //Log.d(TAG, "[DataSender.run()] ndkHandle [" + mVisitorCallLib.ndkHandle + "], avType [" + avPacket.avType + "], length [" + avPacket.length + "], frameType [" + avPacket.frameType + "]");
                         int sendMediaResult = mVisitorCallLib.SendMedia(mVisitorCallLib.ndkHandle, avPacket.avType, avPacket.data, avPacket.length, avPacket.frameType);
 //                        Log.d(TAG, "[DataSender.run()] EVENT_sendMediaResult [" + sendMediaResult + "]");
                         if (sendMediaResult == -2) { // define.SendMediaFail
@@ -38,13 +40,17 @@ public class DataSender extends Thread {
                 } catch (InterruptedException e) {
 //                    Log.e(TAG, "DataSender =============== [5] ===============");
                     Log.e(TAG, "[InterruptedException] DataSender.run()");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
 //            Log.e(TAG, "DataSender =============== [6] ===============");
             Log.e(TAG, "[Exception] DataSender.run()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 1 - 4
WallPadCall/src/main/java/kr/co/icontrols/callengine/remotecall/RemoteCallMSG.java

@@ -22,10 +22,7 @@ public class RemoteCallMSG {
         public final static int RECEIVE_EVENT_AUDIO_DATA = 202;       // 모바일에서 오디오 데이터 수신
         public final static int RECEIVE_EVENT_UNLOCK_DOOR = 203;      // 모바일에서 문열림 요청
         public final static int RECEIVE_EVENT_CLOSE_SESSION = 204;    // 모바일에서 통화 종료 (세션 종료)
-
-        // 방문객원격통화 2차 개발
-        public final static int RECEIVE_EVENT_REQUEST_GUARD_CALL = 205;  // 모바일에서 경비실 통화 (발신) 요청
-        public final static int RECEICE_EVNET_REQUEST_HOME_VIEWER = 206; // 모바일에서 세대모니터링 (홈뷰어) 요청
+        public final static int RECEIVE_EVENT_CLOSE_HOMEVIEW = 205;   // 방문객원격통화 홈뷰어 종료
 
         public final static int SEND_OPEN_REMOTECALLLIB = 300;        // 방문객원격통화 스트리밍 서버 세션 OPEN
         public final static int SEND_CLOSE_REMOTECALLLIB = 301;       // 방문객원격통화 스트리밍 서버 세션 CLOSE

+ 193 - 50
WallPadCall/src/main/java/kr/co/icontrols/callengine/remotecall/RemoteCallManager.java

@@ -1,6 +1,5 @@
 package kr.co.icontrols.callengine.remotecall;
 
-import android.app.ActivityManager;
 import android.app.Service;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
@@ -23,6 +22,7 @@ import com.artncore.WallPadDataMgr.wallpaddbmgr;
 import com.artncore.commons.define;
 import com.artncore.wallpadimap.RetProci;
 import com.hdc.visitorcall.VisitorCallLib;
+import com.util.LogUtil;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -104,14 +104,17 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 Log.d(TAG, "[onCreate] bRegister [" + bRegister + "]");
                 SetData.closeDB();
 
-                if (!bRegister) sendHandlerMsgDelayed(HANDLERMSG.REGISTER_REMOTECALL_LIB, 0, 0, 2000); // 방문객 원격통화 라이브러리 등록 여부 판단 후 등록 (서비스 시작 후 2초 딜레이)
-                else Log.w(TAG, "[onCreate] Already VisitorCallLib Registration did!!!");
+//                if (!bRegister) sendHandlerMsgDelayed(HANDLERMSG.REGISTER_REMOTECALL_LIB, 0, 0, 2000); // 방문객 원격통화 라이브러리 등록 여부 판단 후 등록 (서비스 시작 후 2초 딜레이)
+//                else Log.w(TAG, "[onCreate] Already VisitorCallLib Registration did!!!");
             } else {
                 Log.w(TAG, "[onCreate] InitInfo Fail!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCreate()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -127,9 +130,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             super.onDestroy();
             unregisterBRReceiver();
             Log.i(TAG, "[onDestroy] ===================== RemoteCallManager Stopped!! =====================");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onDestroy()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -144,9 +150,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             for (int i = 0; i < nRemoteCnt; i++) {
                 mRemoteMsns.get(i).send(msg);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteMsns(int nMsg, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -162,9 +171,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             for (int i = 0; i < nRemoteCnt; i++) {
                 mRemoteMsns.get(i).send(msg);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteMsns(int nMsg, CALLTYPE eCallType, AVPacket avPacket)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -190,9 +202,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     return true;
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] InitInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -206,8 +221,11 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 Log.d(TAG, "[getExtractData] subString [" + subString + "]");
                 return subString;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return null;
     }
@@ -243,9 +261,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 }
                 SetData.closeDB();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerRemoteCallLib()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -266,9 +287,13 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             Message message = VisitorCallEventHandler.obtainMessage(VisitorCallEvent.EVENT_START_CALLING, obj);
             VisitorCallEventHandler.sendMessage(message);
             return 0;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_StartCalling(int handle, String caller)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return -1;
     }
@@ -312,9 +337,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_UnlockDoor(int handle, String device, String caller)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return -1;
     }
@@ -383,18 +411,25 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     if (mGuardListTable == null) getGuardList();
                 }
 //                    Log.d(TAG, "[EVENT_RequestMonitor] CALLTYPE_GUARD_NAME.size() [" + REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.size() + "]");
-                for (int i = 0; i < REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.size(); i++) {
-                    if (REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.get(i).equals(device)) {
-                        Log.d(TAG, "[EVENT_RequestMonitor] CALLTYPE_GUARD_NAME[" + i + "] = " + REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.get(i));
-                        // 모바일에서 경비실 통화 발신
-                        RemoteCallMSG.REMOTE_CALLTYPE = CALLTYPE.GUARD;
-                        return tryGuardCall(getGuardID(device));
+                if(REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME!=null)
+                {
+                    for (int i = 0; i < REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.size(); i++) {
+                        if (REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME!=null && REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.get(i).equals(device)) {
+                            Log.d(TAG, "[EVENT_RequestMonitor] CALLTYPE_GUARD_NAME[" + i + "] = " + REMOTECALL_CALLTYPE.CALLTYPE_GUARD_NAME.get(i));
+                            // 모바일에서 경비실 통화 발신
+                            RemoteCallMSG.REMOTE_CALLTYPE = CALLTYPE.GUARD;
+                            return tryGuardCall(getGuardID(device));
+                        }
                     }
                 }
+
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_RequestMonitor(int handle, String device, String caller)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
 
         }
         Log.w(TAG, "[EVENT_RequestMonitor] EVENT_RequestMonitor_FAIL!!!");
@@ -420,9 +455,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             Object obj = avPacket;
             Message message = VisitorCallEventHandler.obtainMessage(VisitorCallEvent.EVENT_AUDIO_DATA, obj);
             VisitorCallEventHandler.sendMessage(message);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_AudioData(int handle, byte[] bytes, int size)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -431,9 +469,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
     public int EVENT_RequestShowAuthorityKey(int handle, String strKey) {
         try {
             Log.d(TAG, "[EVENT_RequestShowAuthorityKey] handle [" + handle + "], strKey [" + strKey + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_RequestShowAuthorityKey(int handler, String strKey)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return -1;
     }
@@ -461,9 +502,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             SetData.SetRemoteCallUserCnt(remoteCallUserCnt); // 사용자 추가 완료 후 DB 저장 (DB 업데이트)
             SetData.closeDB();
             addRemoteCallUserInfo(userList, document);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_RegisteredUserList(int handle, String userXML)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -472,9 +516,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
     public void EVENT_DelRegisteredUserList(int handle, int result, String message) {
         try {
             Log.d(TAG, "[EVENT_DelRegisteredUserList] handle [" + handle + "], result [" + result + "], message [" + message + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_DelRegisteredUserList(int handle, int result, String message)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -490,9 +537,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     Log.d(TAG, "[EVENT_SetUserAuthority] dataList.Name [" + dataList.get(i).Name + "], dataList.MonitorAuth [" + dataList.get(i).MonitorAuth + "], dataList.HomeViewerAuth [" + dataList.get(i).HomeViewerAuth + "]");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_SetUserAuthority(int handle, int result, String message)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -511,9 +561,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             Object obj = eventContent;
             Message message = VisitorCallEventHandler.obtainMessage(VisitorCallEvent.EVENT_OTHEREVENT, arg1, 0, obj);
             VisitorCallEventHandler.sendMessage(message);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_OtherEvent(int handle, int eventType, String eventContent, int eventLength)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -533,9 +586,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 Message message = VisitorCallEventHandler.obtainMessage(VisitorCallEvent.EVENT_CLOSED_SESSION, obj);
                 VisitorCallEventHandler.sendMessage(message);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] EVENT_ClosedSession(int handle, int count)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -601,17 +657,27 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     }
 
                     bMobileTalk = false;
+                    Log.d(TAG, "[VisitorCallEventHandler] REMOTE_CALLTYPE handle [" + RemoteCallMSG.REMOTE_CALLTYPE + "]");
                     if (RemoteCallMSG.REMOTE_CALLTYPE != CALLTYPE.NONE) {
                         sendMsgToRemoteMsns(REMOTECALLMSG.RECEIVE_EVENT_CLOSE_SESSION, RemoteCallMSG.REMOTE_CALLTYPE);
                         if (RemoteCallMSG.REMOTE_CALLOWNER == CALLOWNER.MOBILE) {
                             Log.d(TAG, "[VisitorCallEventHandler] REMOTE_CALLOWNER [" + RemoteCallMSG.REMOTE_CALLOWNER + "]");
-                            sendBR_AppFinish(getApplicationContext());
+                            WallpadStatusData mWallpadStatusData = new WallpadStatusData(getApplicationContext());
+                            int nAlarmStatus = mWallpadStatusData.GetAlarmStatus();
+                            mWallpadStatusData.closeDB();
+                            Log.d(TAG, "[VisitorCallEventHandler] nAlarmStatus [" + nAlarmStatus + "]");
+                            if (RemoteCallMSG.REMOTE_CALLTYPE == CALLTYPE.FRONT) {
+                                if (nAlarmStatus != WallpadStatusData.GUARD_OUT) sendBR_AppFinish(getApplicationContext());
+                            }
                         }
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] VisitorCallEventHandler.handleMessage()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -681,9 +747,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     Log.w(TAG, "[openRemoteCallLib] Not Supported eCallType!! [" + eCallType + "]");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] openRemoteCallLib(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -694,9 +763,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 if (mHandle >= 0) mVisitorCallLib.Close(mHandle);
                 mVisitorCallLib.ndkHandle = mHandle = -1;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] closeRemoteCallLib()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -734,9 +806,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 mVisitorCallLib.SetUserAuthority(dong, ho, PhoneKey, 1, Integer.parseInt(MonitorAuth), 0, Integer.parseInt(LobbyOpenAuth)); // 통화기능/영상감시/현관문열림/로비문열림
 
             wallPadRemoteCallUserData.AddRemoteCallUserInfo(PhoneKey, Name); // DB에 추가
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] addRemoteCallUserInfo(NodeList userList, Document document)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -757,9 +832,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     mVisitorCallLib.SendCommand(mVisitorCallLib.ndkHandle, cmd, strCaller);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendCommandToRemoteCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -777,9 +855,13 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 return REMOTECALL_CALLER.CALLER_LOBBY;
             }
             return "NONE";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCallerName(String strGuardIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -813,9 +895,13 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
 
             Log.d(TAG, "[getRemoteName] strResult [" + strResult + "]");
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getRemoteName(String strSIPID, String strIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -838,9 +924,13 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 }
             }
             return "NONE";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardName(String strGuardIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -852,9 +942,13 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             else if (strGuardName.equals(REMOTECALL_CALLTYPE.CALLTYPE_SUBGATE_GUARD)) return REMOTECALLHANDELKEY.GUARD_03;
             else if (strGuardName.equals(REMOTECALL_CALLTYPE.CALLTYPE_OFFICE_GUARD)) return REMOTECALLHANDELKEY.GUARD_04;
             else return REMOTECALLHANDELKEY.GUARD_01;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardID(String strGuardName)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -903,9 +997,13 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 return strGuardList;
             }
             return null;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardList()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -947,9 +1045,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] tryGuardCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return -1;
     }
@@ -984,9 +1085,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 Log.d(TAG, "[send_check_sip_activation_request] bGuardConnCheck [" + bGuardConnCheck + "]");
                 return true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_check_sip_activation_request(String strTargetIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -1000,9 +1104,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 Log.d(TAG, "[callRegisteredUserList] dong [" + dong + "], ho [" + ho + "]");
                 mVisitorCallLib.GetRegisteredUserList(dong, ho); // 사용자 리스트 요청
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] callRegisteredUserList(String phoneKey)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1025,7 +1132,7 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                 WallpadStatusData mWallpadStatusData = new WallpadStatusData(getApplicationContext());
                 int nAlarmStatus = mWallpadStatusData.GetAlarmStatus();
                 mWallpadStatusData.closeDB();
-
+                Log.d(TAG, "[runCallMainActivity] nAlarmStatus [" + nAlarmStatus + "]");
                 if (nAlarmStatus != WallpadStatusData.GUARD_OUT) sendBR_AppFinish(getApplicationContext());
 
                 ComponentName mComponentName = new ComponentName(strWallPadCallPackageName, strWallPadCallMainActivityName);
@@ -1042,9 +1149,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             else {
                 Log.w(TAG, "[runCallMainActivity] WallPadCall is already running!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runCallMainActivity(CALLOWNER eCallOwner, CALLEVENTTYPE eEventType, CALLTYPE eCallType, String strRemoteInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1061,9 +1171,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             if (bOn) mIntent.setAction(define.NOTIFY_ACNAME_LCD_BACKLIGHT_ON);
             else mIntent.setAction(define.NOTIFY_ACNAME_LCD_BACKLIGHT_OFF);
             getApplicationContext().sendBroadcast(mIntent);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+		LogUtil.errorLogInfo("", TAG, re);
+	} catch (Exception e) {
             Log.e(TAG, "[Exception] sendLCDBacklightStatus(boolean bOn)");
-            e.printStackTrace() ;
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1099,9 +1212,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             HandleMsg.arg2 = arg2;
             HandleMsg.obj = obj;
             mHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(int what, int arg1, int arg2, Object obj)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1113,9 +1229,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             mHandler.sendMessageDelayed(HandleMsg, delay);
+        } 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();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1174,10 +1293,25 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
                             mVisitorCallLib.SendRegistrationKey(dong, ho, strKey);
                         }
                     }
+                    else if (kind == define.NOTIFY_EVENT_CHANGE_GUARDLIST) {
+                        // 경비실기 설정정보가 변경된 경우 방문객원격통화 스트림 서버로 경비실기 목록 다시 전달
+                        String strGuardList = getGuardList();
+                        if (strGuardList != null)  {
+                            Log.d(TAG, "[mRemoteCallBR] strGuardList [" + strGuardList + "]");
+                            if (!strGuardList.equals("")) {
+                                Log.d(TAG, "[mRemoteCallBR] == mVisitorCallLib.SetSecurityOffice ==");
+                                int nResult = mVisitorCallLib.SetSecurityOffice(dong, ho, strGuardList); // 경비실기 목록 재전달
+                                Log.d(TAG, "[mRemoteCallBR] nResult [" + nResult + "]");
+                            }
+                        }
+                    }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] onReceive(Context context, Intent intent)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -1187,9 +1321,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             IntentFilter filter = new IntentFilter();
             filter.addAction(Declare.BR.VISITOR_REMOTE_CALL);
             registerReceiver(mRemoteCallBR, filter, null, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerBRReceiver()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1198,9 +1335,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             if (mRemoteCallBR != null) {
                 unregisterReceiver(mRemoteCallBR);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unregisterBRReceiver()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1211,9 +1351,12 @@ public class RemoteCallManager extends Service implements VisitorCallLib.Callbac
             mIntent.setAction(define.BR_APP_FINISH);
             mIntent.putExtra(CALLTRIGGER.CALLOWNER, "MOBILE");
             context.sendBroadcast(mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendBR_AppFinish(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 1 - 101
WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/CeresSIPService.java

@@ -42,8 +42,6 @@ public class CeresSIPService extends Service {
 
     private Context mContext;
 
-    private mySocket socket;
-    private MyTCPServer mTCPServer;
     private String clientIP;
     protected Configuration conf = null;
     private DBAdapter database;
@@ -85,12 +83,6 @@ public class CeresSIPService extends Service {
             mPCMIF = new PCMInterface();
         }
 
-        mTCPServer = MyTCPServer.getInstance(mContext, mHandler);
-        if (mTCPServer == null) {
-            Log.v(TAG, "TCPServer is null.");
-        } else {
-            mTCPServer.start();
-        }
 
         database = new DBAdapter(this);
         database.open();
@@ -140,12 +132,7 @@ public class CeresSIPService extends Service {
             mPCMIF = new PCMInterface();
         }
 
-        mTCPServer = MyTCPServer.getInstance(mContext, mHandler);
-        if (mTCPServer == null) {
-            Log.v(TAG, "TCPServer is null.");
-        } else {
-            mTCPServer.start();
-        }
+
 
         database = new DBAdapter(this);
         database.open();
@@ -333,94 +320,7 @@ public class CeresSIPService extends Service {
     }
 
 
-    public class mySocket extends Thread {
-
-        Socket s;
-        String toCall;
-        BufferedWriter output;
-        BufferedReader input;
-        String message;
-        Handler handler;
-
-        public mySocket (String toCall, String msg, Handler handler) {
-            this.toCall = toCall;
-            this.message = msg;
-            this.handler = handler;
-        }
-
-        @Override
-        public void run() {
-            try {
-                s = new Socket(toCall, 4001);
-
-                output = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
-                input = new BufferedReader(new InputStreamReader(s.getInputStream()), 10);
-
-                int what = -1;
-
-                while (input != null) {
-                    output.write(message);
-                    output.flush();
-                    String msg = input.readLine();
-                    if (msg != null) {
-                        if (msg.equals("ACK")) {
-                            switch (message) {
-                                case "I_AM_HERE":
-                                    what = 101;
-                                    break;
-                                case "I_AM_TALKING":
-                                    what = 102;
-                                    break;
-                            }
-                            if (what != -1) {
-                                s.close();
-                                handler.sendMessage(handler.obtainMessage(what));
-                            }
-
-                            break;
-                        }
-                    }
-                }
-                if (s != null)
-                    s.close();
 
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            super.handleMessage(msg);
-
-            int what = msg.what;
-            String message = null;
-
-            Log.v("yjyoon", "Handler what=" + what);
-
-            switch(what) {
-                case 100: // from server.
-                    clientIP = (String)msg.obj;
-                    message = "I_AM_HERE";
-                    break;
-                case 101: // from I_AM_HERE
-                    message = "I_AM_TALKING";
-                    break;
-                case 102: // from I_AM_TALKING
-                    int i = mCMIF.CERES_MakeCall(clientIP, 3);        // 1 : audio, 2: video, 3: audio+video
-                    Log.v("yjyoon", "mCMIF.CERES_MakeCall " + i);
-                    conf.setRedialNumber(clientIP);
-                    break;
-            }
-
-            if (message != null) {
-                mySocket s = new mySocket(clientIP, message, mHandler);
-                s.start();
-            }
-        }
-    };
 
 
 

+ 6 - 1
WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/Forward.java

@@ -4,6 +4,8 @@ import java.util.StringTokenizer;
 
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class Forward {
 
     String TAG = "Forward";
@@ -78,9 +80,12 @@ public class Forward {
                     tokenCount++;
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setValue(value) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 178 - 34
WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/RTPManager.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.callengine.sip;
 import android.content.Context;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import java.io.IOException;
 import java.net.DatagramPacket;
 import java.net.DatagramSocket;
@@ -17,9 +19,12 @@ import bssoft.stack.sip.RFC2833;
 import bssoft.stack.sip.RTPCore;
 import bssoft.stack.sip.SIPG711;
 import bssoft.stack.sip.SIPStack;
+import kr.co.icontrols.callengine.engine.CallManager;
 import kr.co.icontrols.callengine.remotecall.AVPacket;
 import kr.co.icontrols.wallpadcall.MainActivity;
 
+import static kr.co.icontrols.wallpadcall.MainActivity.mCallController;
+
 public class RTPManager { /* extends Thread */
     static String TAG = "RTPManager";
     public RTPCore rtpCore = null;
@@ -47,8 +52,11 @@ public class RTPManager { /* extends Thread */
                     encpacketsize = 160;
                 }
                 bValid = SIPController.sipSound.getEncodeddata(rtpCore.rtpPacketBuffer, encpacketsize, 12);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
-                System.err.println("I/O problems: " + e);
+                //System.err.println("I/O problems: " + e);
+                LogUtil.errorLogInfo("", TAG, e);
                 SIPStack.exceptionCountAtCurrentCall++;
                 return;
             }
@@ -59,8 +67,11 @@ public class RTPManager { /* extends Thread */
                         rtpWriteEnc(encpacketsize, rtpCore.remotePayloadType, rtpCore.remoteMediaIp, rtpCore.remoteMediaPort);
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
-                System.err.println("I/O problems: " + e);
+                //System.err.println("I/O problems: " + e);
+                LogUtil.errorLogInfo("", TAG, e);
                 SIPStack.exceptionCountAtCurrentCall++;
             }
         }
@@ -79,8 +90,12 @@ public class RTPManager { /* extends Thread */
             try {
                 encpacketsize = SIPSound.BULK_SIZE;
                 bValid = SIPController.sipSound.getBulkdata(rtpCore.rtpPacketBuffer, encpacketsize, 12);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return;
             } catch (Exception e) {
-                System.err.println("I/O problems: " + e);
+                //System.err.println("I/O problems: " + e);
+                LogUtil.errorLogInfo("", TAG, e);
                 SIPStack.exceptionCountAtCurrentCall++;
                 return;
             }
@@ -91,8 +106,11 @@ public class RTPManager { /* extends Thread */
                         rtpWriteEnc(encpacketsize, rtpCore.remotePayloadType, rtpCore.remoteMediaIp, rtpCore.remoteMediaPort);
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
-                System.err.println("I/O problems: " + e);
+                //System.err.println("I/O problems: " + e);
+                LogUtil.errorLogInfo("", TAG, e);
                 SIPStack.exceptionCountAtCurrentCall++;
             }
         }
@@ -107,8 +125,10 @@ public class RTPManager { /* extends Thread */
 
     public void receiveAudio(final boolean bMobile) {
         try {
-//            Log.d(TAG, "[receiveAudio] bMobile [" + bMobile + "]");
+            Log.d(TAG, "[receiveAudio] bMobile [" + bMobile + "]");
             if (receiveThread != null) receiveThread.interrupt();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveAudio()");
         }
@@ -122,7 +142,7 @@ public class RTPManager { /* extends Thread */
                         theSocket = new DatagramSocket(rtpCore.RTP_PORT);
                         theSocket.setReuseAddress(true);
                         dp = new DatagramPacket(rtpCore.buffer, rtpCore.buffer.length);
-//                        Log.d(TAG, "[receiveAudio] rtpCore.buffer.length [" + rtpCore.buffer.length + "]");
+                        Log.d(TAG, "[receiveAudio] rtpCore.buffer.length [" + rtpCore.buffer.length + "]");
                     } catch (SocketException e) {
                         SIPStack.exceptionCountAtCurrentCall++;
                         return;
@@ -156,6 +176,8 @@ public class RTPManager { /* extends Thread */
                         } catch (SocketException se) {
                             SIPStack.exceptionCountAtCurrentCall++;
                             //break;
+                        } catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
                         } catch (Exception e) {
                             SIPStack.exceptionCountAtCurrentCall++;
                             //break;
@@ -180,10 +202,14 @@ public class RTPManager { /* extends Thread */
             receiveThread = new Thread(runner);
             //receiveThread.setPriority(10);
             receiveThread.start();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return;
         } catch (Exception e) {
             receiveThread = null;
             rtpCore.running = false;
-            System.err.println("Exception: " + e);
+            //System.err.println("Exception: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -211,8 +237,13 @@ public class RTPManager { /* extends Thread */
 //                                Log.d(TAG, "[startSendAudioThread] =================== 1 ===================");
                                 encpacketsize = SIPSound.BULK_SIZE;
                                 bValid = SIPController.sipSound.getBulkdata(rtpCore.rtpPacketBuffer, encpacketsize, 12);
+                            } catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                                SIPStack.exceptionCountAtCurrentCall++;
+                                bValid = false;
                             } catch (Exception e) {
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 SIPStack.exceptionCountAtCurrentCall++;
                                 bValid = false;
                             }
@@ -227,15 +258,23 @@ public class RTPManager { /* extends Thread */
                                         rtpWriteEnc(encpacketsize, rtpCore.remotePayloadType, rtpCore.remoteMediaIp, rtpCore.remoteMediaPort);
                                     }
                                 }
+                            } catch (RuntimeException re) {
+                                SIPStack.exceptionCountAtCurrentCall++;
+                                LogUtil.errorLogInfo("", TAG, re);
                             } catch (Exception e) {
                                 SIPStack.exceptionCountAtCurrentCall++;
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                             }
 //                            Log.d(TAG, "[startSendAudioThread] =================== 4 ===================");
                             Thread.sleep(SIPSound.PTIME);
+                        } catch (RuntimeException re) {
+                            SIPStack.exceptionCountAtCurrentCall++;
+                            LogUtil.errorLogInfo("", TAG, re);
                         } catch (Exception e) {
                             SIPStack.exceptionCountAtCurrentCall++;
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                     }   //while
 //                    Log.d(TAG, "[startSendAudioThread] =================== 5 ===================");
@@ -248,10 +287,15 @@ public class RTPManager { /* extends Thread */
             sendThread = new Thread(runner);
             //sendThread.setPriority(10);
             sendThread.start();
+        } catch (RuntimeException re) {
+            sendThread = null;
+            SIPStack.exceptionCountAtCurrentCall++;
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             sendThread = null;
             SIPStack.exceptionCountAtCurrentCall++;
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -276,8 +320,13 @@ public class RTPManager { /* extends Thread */
                             try {
                                 encpacketsize = SIPSound.BULK_SIZE;
                                 bValid = SIPController.sipSound.getBulkdata(rtpCore.rtpPacketBuffer, encpacketsize, 12);
+                            } catch (RuntimeException re) {
+                                LogUtil.errorLogInfo("", TAG, re);
+                                SIPStack.exceptionCountAtCurrentCall++;
+                                bValid = false;
                             } catch (Exception e) {
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                                 SIPStack.exceptionCountAtCurrentCall++;
                                 bValid = false;
                             }
@@ -288,14 +337,22 @@ public class RTPManager { /* extends Thread */
                                         rtpWriteEnc(encpacketsize, rtpCore.remotePayloadType, rtpCore.remoteMediaIp, rtpCore.remoteMediaPort);
                                     }
                                 }
+                            } catch (RuntimeException re) {
+                                SIPStack.exceptionCountAtCurrentCall++;
+                                LogUtil.errorLogInfo("", TAG, re);
                             } catch (Exception e) {
                                 SIPStack.exceptionCountAtCurrentCall++;
-                                e.printStackTrace();
+                                //e.printStackTrace();
+                                LogUtil.errorLogInfo("", TAG, e);
                             }
                             Thread.sleep(SIPSound.PTIME);
+                        } catch (RuntimeException re) {
+                            SIPStack.exceptionCountAtCurrentCall++;
+                            LogUtil.errorLogInfo("", TAG, re);
                         } catch (Exception e) {
                             SIPStack.exceptionCountAtCurrentCall++;
-                            e.printStackTrace();
+                            //e.printStackTrace();
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
                     }   //while
 //                    Log.d(TAG, "[startSendMobileAudioThread] =================== 4 ===================");
@@ -306,10 +363,15 @@ public class RTPManager { /* extends Thread */
             sendThread = new Thread(runner);
             //sendThread.setPriority(10);
             sendThread.start();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            sendThread = null;
+            SIPStack.exceptionCountAtCurrentCall++;
         } catch (Exception e) {
             sendThread = null;
             SIPStack.exceptionCountAtCurrentCall++;
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -321,8 +383,21 @@ public class RTPManager { /* extends Thread */
                 if (SIPController.sipSound.bAudioTrackPlaying == true) {
                     rtpCore.packetSize = dp.getLength() - 12;
                     if (SIPG711.decodeULawExt(rtpCore.buffer, 12, rtpCore.packetSize, rtpCore.pcmLinearBuffer) == true) {
-                        if (!bMobile) SIPController.sipSound.playAudio(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2);
-                        else sendAudioToMobile(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2); // 방문객 원격통화 경비 / 로비 음성->모바일 전송
+                        //if (!bMobile) SIPController.sipSound.playAudio(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2);
+                        //else sendAudioToMobile(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2); // 방문객 원격통화 경비 / 로비 음성->모바일 전송
+
+                        if (mCallController.mCallInfo.getCallOwner() == CallManager.CALLOWNER.MOBILE)
+                            sendAudioToMobile(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2);
+                        else
+                        {
+
+                            if(mCallController.mbCallConnect)
+                                SIPController.sipSound.playAudio(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2);
+                            else if(mCallController.mCallInfo.getCalledType() != CallManager.CALLTYPE.LOBBY)
+                                SIPController.sipSound.playAudio(rtpCore.pcmLinearBuffer, rtpCore.packetSize * 2);
+                        }
+
+
                     }
                 }
             } else if (rtpCore.PARSEpayload == SIPStack.SIP_CODEC_G711A) {
@@ -361,14 +436,18 @@ public class RTPManager { /* extends Thread */
                     MainActivity.mDataSender.blockingQueue.put(avp);
                 } catch (InterruptedException e) {
                     Log.e(TAG, "[InterruptedException] sendAudioToMobile()");
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
             } else {
 //                Log.w(TAG, "[sendAudioToMobile] mDataSender is NULL!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendAudioToMobile");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -443,8 +522,13 @@ public class RTPManager { /* extends Thread */
             } else {
                 return;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -453,8 +537,13 @@ public class RTPManager { /* extends Thread */
             if (rtpCore.rtpPacketBuffer != null && packetsize > 0) {
                 bSend = rtpCore.encodeRtpHeader(codec);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -465,8 +554,13 @@ public class RTPManager { /* extends Thread */
                 rtpCore.RTPtimestamp += 160;
                 SendRTPPacket(ip, port, rtpCore.rtpPacketBuffer, packetsize);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -516,8 +610,13 @@ public class RTPManager { /* extends Thread */
 
         try {
             System.arraycopy(data, 0, rtpCore.rtpPacketBuffer, 12, datasize);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -526,8 +625,13 @@ public class RTPManager { /* extends Thread */
             if (rtpCore.rtpPacketBuffer != null && packetsize > 0) {
                 bSend = rtpCore.encodeRtpHeader(codec);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -539,8 +643,13 @@ public class RTPManager { /* extends Thread */
                 SendRTPPacket(ip, port, rtpCore.rtpPacketBuffer, packetsize);
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -605,8 +714,13 @@ public class RTPManager { /* extends Thread */
 //                Log.e(TAG, "[rtpWriteEnc] =================== 10 ===================");
                 bSend = rtpCore.encodeRtpHeader(codec);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -618,8 +732,13 @@ public class RTPManager { /* extends Thread */
                 rtpCore.RTPtimestamp += 160;
                 SendRTPPacket(ip, port, rtpCore.rtpPacketBuffer, packetsize);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -635,8 +754,13 @@ public class RTPManager { /* extends Thread */
             if (rtpCore.rtpBulkBuffer != null && packetsize > 0) {
                 bSend = rtpCore.encodeRtpHeader(rtpCore.remotePayloadType);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -647,8 +771,13 @@ public class RTPManager { /* extends Thread */
                 rtpCore.RTPtimestamp += datasize;
                 int sent = SendRTPPacket(rtpCore.remoteMediaIp, rtpCore.remoteMediaPort, rtpCore.rtpBulkBuffer, packetsize);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("I/O problems: " + e);
+            //System.err.println("I/O problems: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -701,10 +830,12 @@ public class RTPManager { /* extends Thread */
             sent = dataSize;
         } catch (UnknownHostException uhe) {
             SIPStack.exceptionCountAtCurrentCall++;
-            uhe.printStackTrace();
+            //uhe.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, uhe);
         } catch (IOException ie) {
             SIPStack.exceptionCountAtCurrentCall++;
-            ie.printStackTrace();
+            //ie.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, ie);
         }
         return sent;
     }
@@ -741,6 +872,8 @@ public class RTPManager { /* extends Thread */
 
             if (SIPController.sipSound != null) SIPController.sipSound.closeAudioDevice();
 
+        } catch (RuntimeException re) {
+            SIPStack.exceptionCountAtCurrentCall++;
         } catch (Exception e) {
             SIPStack.exceptionCountAtCurrentCall++;
         }
@@ -790,6 +923,8 @@ public class RTPManager { /* extends Thread */
                     SIPController.sipSound.closeCaptureDevice();
                     SIPController.sipSound.captureAudio();
                 }
+            } catch (RuntimeException re) {
+                SIPStack.exceptionCountAtCurrentCall++;
             } catch (Exception e) {
                 SIPStack.exceptionCountAtCurrentCall++;
                 return;
@@ -811,11 +946,14 @@ public class RTPManager { /* extends Thread */
                 RTPSENDTimer.scheduleAtFixedRate(new BULKSENDTimerTask(), 0, SIPController.sipSound.PTIME);
             } else {
                 Log.e(TAG, "[RTPInit] ========== [9] ==========");
-                this.startSendAudioThread();
+                    this.startSendAudioThread();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] RTPInit(int port)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -846,6 +984,9 @@ public class RTPManager { /* extends Thread */
                     Log.e(TAG, "[RTPRemoteCallInit] rtpCore.remoteMediaIp [" + rtpCore.remoteMediaIp + "]");
                     SIPController.sipSound.prepareAudioTrack(rtpCore.remoteMediaIp);
                 }
+            } catch (RuntimeException re) {
+                SIPStack.exceptionCountAtCurrentCall++;
+                return;
             } catch (Exception e) {
                 SIPStack.exceptionCountAtCurrentCall++;
                 return;
@@ -865,9 +1006,12 @@ public class RTPManager { /* extends Thread */
             } else {
                 this.startSendMobileAudioThread();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] RTPRemoteCallInit(int port)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 10 - 1
WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/SIPController.java

@@ -19,6 +19,8 @@ import android.os.Build;
 import android.os.Vibrator;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import bssoft.stack.sip.*;
 
 public class SIPController {
@@ -51,8 +53,13 @@ public class SIPController {
         try {
             Log.d(TAG, "[initSound] bMobile [" + bMobile + "]");
             sipSound = new SIPSound(bMobile);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            SIPStack.exceptionCountAtCurrentCall++;
+            return;
         } catch (Exception e) {
-            System.err.println("SIPSouond unavailable: " + e);
+            //System.err.println("SIPSouond unavailable: " + e);
+            LogUtil.errorLogInfo("", TAG, e);
             SIPStack.exceptionCountAtCurrentCall++;
             return;
         }
@@ -175,6 +182,8 @@ public class SIPController {
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception decideCodecChange(context)");
         }

+ 139 - 39
WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/SIPSound.java

@@ -10,6 +10,8 @@ import android.media.audiofx.Equalizer;
 import android.os.Environment;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -179,7 +181,8 @@ public class SIPSound {
                         try {
                             os = new FileOutputStream(filePath);
                         } catch (FileNotFoundException e) {
-                            e.printStackTrace();
+                            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
                         }
                         */
 
@@ -191,14 +194,14 @@ public class SIPSound {
 
                     if (mAudioRecord != null) {
                         try {
-//                            Log.e(TAG, "================= sipsound [3] =================");
+                            //Log.e(TAG, "================= sipsound [3] =================");
 //                            int frames = DMA_SIZE / 2;
                             int frames = DMA_SIZE;   // dadam
                             mAudioRecord.setPositionNotificationPeriod(frames);   // duration(초)*samplerate(8000)
                             mAudioRecord.setRecordPositionUpdateListener(new AudioRecord.OnRecordPositionUpdateListener() {
                                 public void onPeriodicNotification(AudioRecord recorder) {
                                     try {
-//                                        Log.e(TAG, "================= sipsound [4] =================");
+                                        //Log.e(TAG, "================= sipsound [4] =================");
                                         if (bAudioRecording == false) {
                                             if (mAudioTrack != null && bAudioTrackPlaying == true) {
                                                 bAudioTrackPlaying = false;
@@ -212,7 +215,7 @@ public class SIPSound {
                                         }
 
 //                                        int frames = DMA_SIZE / 2;
-//                                        Log.e(TAG, "================= sipsound [5] =================");
+                                        //Log.e(TAG, "================= sipsound [5] =================");
                                         int frames = DMA_SIZE;   // dadam
                                         int count = recorder.read(dmaShortBuffer, 0, frames);
 
@@ -225,15 +228,19 @@ public class SIPSound {
                                             byte bData[] = short2byte(dmaShortBuffer);
                                             os.write(bData, 0, DMA_SIZE * 2);
                                         } catch (IOException e) {
-                                            e.printStackTrace();
+                                            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
                                         }
                                         */
 
-//                                        Log.e(TAG, "================= sipsound [6] =================");
+                                        //Log.e(TAG, "================= sipsound [6] =================");
                                         bufferring(dmaShortBuffer, count);
+                                    } catch (RuntimeException re) {
+                                        LogUtil.errorLogInfo("", TAG, re);
                                     } catch (Exception e) {
                                         Log.e(TAG, "[Exception] captureAudio().run().onPeriodicNotification(AudioRecord recorder)");
-                                        e.printStackTrace();
+                                        //e.printStackTrace();            
+                                        LogUtil.errorLogInfo("", TAG, e);
                                     }
                                 }
 
@@ -248,7 +255,8 @@ public class SIPSound {
                             mAudioRecord.read(dmaShortBuffer, 0, frames);
                         } catch (IllegalStateException e) {
                             Log.e(TAG, "[IllegalStateException] captureAudio().run()");
-                            e.printStackTrace();
+                            //e.printStackTrace();            
+                            LogUtil.errorLogInfo("", TAG, e);
                             if (mAudioTrack != null && bAudioTrackPlaying == true) {
                                 bAudioTrackPlaying = false;
                             }
@@ -259,6 +267,9 @@ public class SIPSound {
 
                             bActive = false;
                             return;
+                        } catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                            return;
                         } catch (Exception e1) {
                             Log.e(TAG, "[Exception] captureAudio().run()");
                             if (mAudioTrack != null && bAudioTrackPlaying == true) {
@@ -292,15 +303,20 @@ public class SIPSound {
 
 //                                Thread.sleep(1000);
                             }
+                        } catch (RuntimeException re) {
+                            LogUtil.errorLogInfo("", TAG, re);
+                            SIPStack.exceptionCountAtCurrentCall++;
                         } catch (Exception e) {
                             SIPStack.exceptionCountAtCurrentCall++;
                             Log.e(TAG, "[Exception] captureAudio().run()");
-                            e.printStackTrace();
+                            //e.printStackTrace();            
+                            LogUtil.errorLogInfo("", TAG, e);
                         }
 //                        } catch (InterruptedException e) {
 //                            SIPStack.exceptionCountAtCurrentCall++;
 //                            Log.e(TAG, "[InterruptedException] captureAudio().run()");
-//                            e.printStackTrace();
+//                            //e.printStackTrace();            
+                              //LogUtil.errorLogInfo("", TAG, e);
 //                        }
 
 //                        Log.e(TAG, "================= sipsound [10] =================");
@@ -334,7 +350,8 @@ public class SIPSound {
         try {
             os = new FileOutputStream(filePath);
         } catch (FileNotFoundException e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         while (isRecording) {
@@ -347,7 +364,8 @@ public class SIPSound {
                 byte bData[] = short2byte(sData);
                 os.write(bData, 0, BufferElements2Rec * BytesPerElement * BytesPerElement);
             } catch (IOException e) {
-                e.printStackTrace();
+                //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             }
 //            bufferring(dmaShortBuffer, count);
         }
@@ -356,7 +374,8 @@ public class SIPSound {
             Log.d(TAG, "FileStream close!!!!!!!!!!!!");
             os.close();
         } catch (IOException e) {
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         */
     }
@@ -387,7 +406,8 @@ public class SIPSound {
                 try {
                     os.close();
                 } catch (IOException e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
                 }
                 */
 
@@ -400,9 +420,12 @@ public class SIPSound {
                 }
                 mAudioRecord = null;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] == 1 == closeAudioDevice() -> CLOSEAUDIODEVICE CAPTURE");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
 
         try {
@@ -419,9 +442,12 @@ public class SIPSound {
 //                mAudioTrack.release();
 //            }
             mAudioTrack = null;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] == 2 == closeAudioDevice() -> CLOSEAUDIODEVICE TRACK");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         SIPController.nFilterMode = 0;   // 음성변조 필터 선택값을 초기화 한다.
     }
@@ -439,7 +465,8 @@ public class SIPSound {
                 try {
                     os.close();
                 } catch (IOException e) {
-                    e.printStackTrace();
+                    //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
                 }
                 */
 
@@ -452,9 +479,12 @@ public class SIPSound {
                 }
                 mAudioRecord = null;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] closeCaptureDevice() --> CLOSEAUDIODEVICE CAPTURE");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         SIPController.nFilterMode = 0;   // 음성변조 필터 선택값을 초기화 한다.
         return;
@@ -480,9 +510,12 @@ public class SIPSound {
                 bActive = true;
             }
             bSpeakerLock = false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] prepareAudioTrack()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return;
     }
@@ -517,6 +550,8 @@ public class SIPSound {
                 bActive = true;
             }
             bSpeakerLock = false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] prepareAudioTrack() --> PREPAREAUDIOTRACK ++++++++++EXCEPTION");
         }
@@ -531,9 +566,13 @@ public class SIPSound {
             else if (IP_Parse[2].equals("0")) return CALLTYPE.LOBBY;
             else if (IP_Parse[2].equals("201")) return CALLTYPE.IHUB;
             else return CALLTYPE.RESIDENCE;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return CALLTYPE.NONE;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCallType(String strIPAddress)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return CALLTYPE.NONE;
         }
     }
@@ -564,24 +603,32 @@ public class SIPSound {
             bSpeakerLock = false;
             // Log.i(TAG, ">>>>>>>>>>>>>>>>>>>>>RESETAUDIOTRACK ++++++++++END");
             return;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetAudioTrack()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void playAudio(byte[] data, int dataSize) {
-        if (bSpeakerLock == true) return;
-        if (mAudioTrack != null && bAudioTrackPlaying == true) {
+        //if (bSpeakerLock == true) return;
+        //Log.d(TAG, "[] playAudio()");
+        if (mAudioTrack != null ){//&& bAudioTrackPlaying == true) {
             if (bActive == false) {
-                return;
+                //return;
             }
+            //Log.d(TAG, "[1] playAudio()");
 
             try {
                 mAudioTrack.write(data, 0, dataSize);
+                //Log.d(TAG, "[2] playAudio()");
                 if (mAudioTrack != null) {
+                    //Log.d(TAG, "[3] playAudio()");
                     mAudioTrack.play();
                 } else {
+                    //Log.d(TAG, "[4] playAudio()");
                     // bulk case
                     int minSize = AudioTrack.getMinBufferSize(8000, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT);
                     int playbufferSize = minSize * 2;
@@ -592,9 +639,12 @@ public class SIPSound {
                         bActive = true;
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] playAudio(byte[] data, int dataSize) --> BSS DEBUG: TRACK PLAY ERROR");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
         return;
@@ -622,9 +672,12 @@ public class SIPSound {
                         bActive = true;
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] playAudio(short[] data, int dataSize) --> BSS DEBUG: TRACK PLAY ERROR");
-                System.err.println(e);
+                //System.err.println(e);
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
         return;
@@ -702,9 +755,12 @@ public class SIPSound {
             if (flowIndicator == SIPStack.SIP_MEDIAFLOW_SENDONLY) {
                 playAudio(comportableNoise, datasize);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] bufferring(short[] data, int datasize)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -734,9 +790,12 @@ public class SIPSound {
             }
             BUFFER_BUFFERREDSIZE += packetsize;
             bCaptureBufferLock = false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] bufferringMobileAudio()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -762,6 +821,9 @@ public class SIPSound {
                 if (bOverTime == true) {
                     return false;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getLineardata(byte[] data, int datasize)");
                 return false;
@@ -809,6 +871,9 @@ public class SIPSound {
                 if (bOverTime == true) {
                     return false;
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getEncodeddata(byte[] data,int datasize,int pos)");
                 return false;
@@ -869,6 +934,8 @@ public class SIPSound {
             BUFFER_PLAY_INDEX = 0;
             BUFFER_BUFFERREDSIZE = 0;
             if (mAudioTrack != null) mAudioTrack.flush();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetBufferInfo()");
         }
@@ -889,6 +956,8 @@ public class SIPSound {
             if (mAudioTrack != null && mAudioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING) {
                 resetAudioTrack();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setSpeakerRoute(boolean out)");
         }
@@ -918,9 +987,12 @@ public class SIPSound {
             SIPStun.mEqualizer.setBandLevel((short) 3, SIPStun.nEQ_4K);
             SIPStun.mEqualizer.setBandLevel((short) 4, SIPStun.nEQ_14K);
             SIPStun.mEqualizer.setEnabled(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initEqualizer()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -939,27 +1011,36 @@ public class SIPSound {
             SIPStun.mEqualizer.setBandLevel((short) 3, minEQLevel);
             SIPStun.mEqualizer.setBandLevel((short) 4, minEQLevel);
             SIPStun.mEqualizer.setEnabled(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initEqualizer()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public static void enableEqualizer() {
         try {
             SIPStun.mEqualizer.setEnabled(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] enableEqualizer()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public static void disableEqualizer() {
         try {
             SIPStun.mEqualizer.setEnabled(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] disableEqualizer()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -978,9 +1059,13 @@ public class SIPSound {
                 Log.e(TAG, "[getEQValues] mEqualizer is null!!");
             }
             return null;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlEQ60(short Value)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -992,9 +1077,12 @@ public class SIPSound {
                 SIPStun.nEQ_60 = Value;
                 SIPStun.mEqualizer.setBandLevel((short) 0, SIPStun.nEQ_60);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlEQ60(short Value)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1005,9 +1093,12 @@ public class SIPSound {
                 SIPStun.nEQ_230 = Value;
                 SIPStun.mEqualizer.setBandLevel((short) 1, SIPStun.nEQ_230);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlEQ230(short Value)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1018,9 +1109,12 @@ public class SIPSound {
                 SIPStun.nEQ_910 = Value;
                 SIPStun.mEqualizer.setBandLevel((short) 2, SIPStun.nEQ_910);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlEQ910(short Value)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1031,9 +1125,12 @@ public class SIPSound {
                 SIPStun.nEQ_4K = Value;
                 SIPStun.mEqualizer.setBandLevel((short) 3, SIPStun.nEQ_4K);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlEQ4K(short Value)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1044,9 +1141,12 @@ public class SIPSound {
                 SIPStun.nEQ_14K = Value;
                 SIPStun.mEqualizer.setBandLevel((short) 4, SIPStun.nEQ_14K);
             }
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+		LogUtil.errorLogInfo("", TAG, re);
+	} catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlEQ14K(short Value)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 279 - 118
WallPadCall/src/main/java/kr/co/icontrols/callengine/sip/SIPStun.java


+ 111 - 26
WallPadCall/src/main/java/kr/co/icontrols/callengine/subphone/SubPhoneController.java

@@ -18,6 +18,8 @@ import android.os.Message;
 import android.os.Messenger;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class SubPhoneController {
     String TAG = "SubPhoneController";
 
@@ -55,9 +57,12 @@ public class SubPhoneController {
             mContext = context;
             mContext.startService(new Intent(mContext, SubPhoneSerialManager.class));
             bindSubPhoneSerialManagerService();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SubPhoneController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -66,9 +71,12 @@ public class SubPhoneController {
         try {
             sendInitializeStatus();
             unbindSubPhoneSerialManagerService();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseSubPhoneController()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -76,9 +84,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[bindSubPhoneSerialManagerService]");
             mContext.bindService(new Intent(mContext, SubPhoneSerialManager.class), mServiceConnection, Context.BIND_AUTO_CREATE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] bindSubPhoneSerialManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -87,9 +98,12 @@ public class SubPhoneController {
             LOG_INFO("[unbindSubPhoneSerialManagerService]");
             ctrlRemoteServiceRegister(false);
             mContext.unbindService(mServiceConnection);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unbindSubPhoneSerialManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -100,9 +114,12 @@ public class SubPhoneController {
                 LOG_INFO("[mServiceConnection.onServiceConnected] name [" + name + "]");
                 mRemoteMsn = new Messenger(service);
                 ctrlRemoteServiceRegister(true);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceConnected(ComponentName name, IBinder service)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -111,9 +128,12 @@ public class SubPhoneController {
             try {
                 LOG_INFO("[mServiceConnection.onServiceDisconnected] name [" + name + "]");
                 mRemoteMsn = null;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceDisconnected(ComponentName name)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -133,9 +153,12 @@ public class SubPhoneController {
             } else {
                 LOG_WARN("[ctrlRemoteServiceRegister] mRemoteMsn is null!! bRegister [" + bRegister + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlRemoteServiceRegister(boolean bRegister)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -147,9 +170,12 @@ public class SubPhoneController {
             } else {
                 LOG_WARN("[sendMsgToLocalMsn] mLocalMsn is null!! nMsg [" + nMsg + "], strMessage [" + strMessage + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToLocalMsn(int nMsg, SubPhonePacket PacketData)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -166,9 +192,12 @@ public class SubPhoneController {
             else {
                 LOG_WARN("[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -188,9 +217,12 @@ public class SubPhoneController {
             } else {
                 LOG_WARN("[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -234,9 +266,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyNewCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_NOTIFY_INCOMMING_CALL, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyNewCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -244,9 +279,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyNewCallGuard] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "], strGuardID [" + strGuardID + "], bVideo [" + bVideo + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_NOTIFY_INCOMMING_CALL, eCallOwner, eCallType, strGuardID, String.valueOf(bVideo));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyNewCallGuard(CALLOWNER eCallOwner, CALLTYPE eCallType, String strGuardID, boolean bVideo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -254,9 +292,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyNewCallResidence] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "], strRemoteIP [" + strRemoteIP + "], bVideo [" + bVideo + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_NOTIFY_INCOMMING_CALL, eCallOwner, eCallType, strRemoteIP, String.valueOf(bVideo));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyNewCallResidence(CALLOWNER eCallOwner, CALLTYPE eCallType, String strGuardID, boolean bVideo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -264,9 +305,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyStartCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_NOTIFY_START_CALL, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyStartCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -274,9 +318,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyMobileStartCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_NOTIFY_MOBILE_START_CALL, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyMobileStartCall(CALLOWNER eCallOwner, CALTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -284,9 +331,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyEndCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_NOTIFY_END_CALL, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyEndCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -294,9 +344,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[notifyEndCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_BUSY, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendBusyCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -304,9 +357,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[sendACKFrontMonitoring] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_ACK_FRONT_MONITORING, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendACKFrontMonitoring(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -314,9 +370,12 @@ public class SubPhoneController {
         try {
             LOG_INFO("[sendACKNewCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "], strGuardType [" + strGuardType + "], strOption [" + strOption + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_ACK_REQUEST_CALL, eCallOwner, eCallType, strGuardType, strOption);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendACKNewCall(CALLOWNER eCallOwner, CALLTYPE eCallType, String strGuardType, String strOption)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -324,18 +383,24 @@ public class SubPhoneController {
         try {
             LOG_INFO("[sendACKDoorOpen] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_ACK_DOOR_OPEN, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendACKDoorOpen(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void sendInitializeStatus() {
         try {
             sendMsgToRemoteService(SUBPHONEHANDLERMSG.SEND_INITIALIZATION, null, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendInitializeStatus(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -351,9 +416,12 @@ public class SubPhoneController {
                 sendBusyCall(eCallOwner, eCallType);
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveRequestFrontMonitoring(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -374,9 +442,12 @@ public class SubPhoneController {
                 sendBusyCall(eCallOwner, eCallType);
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveNewCall(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -386,6 +457,9 @@ public class SubPhoneController {
             CALLTYPE eCallType = CALLTYPE.getCALLTYPE(mBundle.getString(SUBPHONEHANDELKEY.CALLTYPE));
             LOG_INFO("[receiveStartCall] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
 
+            if(eCallType == CALLTYPE.LOBBY)
+                MainActivity.mCallController.mCallInfo.setCallOwner(eCallOwner);
+
             if (eCallOwner != CALLOWNER.MOBILE) {
                 if (MainActivity.mCallController.mCallInfo.getCallOwner() == eCallOwner || MainActivity.mCallController.mCallInfo.getCallOwner() == CALLOWNER.NONE) {
                     MainActivity.mCallController.mCallInfo.setCallOwner(eCallOwner);
@@ -394,9 +468,12 @@ public class SubPhoneController {
                     sendBusyCall(eCallOwner, eCallType);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveStartCall(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -410,9 +487,12 @@ public class SubPhoneController {
                 MainActivity.mCallController.onSubPhoneEvent(eCallOwner, CALLEVENTTYPE.TERMINATE_CALL, eCallType, null, null);
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveEndCall(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -421,15 +501,20 @@ public class SubPhoneController {
             CALLOWNER eCallOwner = CALLOWNER.getCALLOWNER(mBundle.getString(SUBPHONEHANDELKEY.CALLOWNER));
             CALLTYPE eCallType = CALLTYPE.getCALLTYPE(mBundle.getString(SUBPHONEHANDELKEY.CALLTYPE));
             LOG_INFO("[receiveDoorOpen] eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
+            if(eCallType == CALLTYPE.LOBBY)
+                MainActivity.mCallController.mCallInfo.setCallOwner(eCallOwner);
 
             if (MainActivity.mCallController.mCallInfo.getCallOwner() == eCallOwner || MainActivity.mCallController.mCallInfo.getCallOwner() == CALLOWNER.NONE) {
                 MainActivity.mCallController.onSubPhoneEvent(eCallOwner, CALLEVENTTYPE.DOOR_OPEN, eCallType, null, null);
             } else if (eCallOwner == CALLOWNER.UNIVERSAL_DEVICE) {
                 MainActivity.mCallController.onSubPhoneEvent(eCallOwner, CALLEVENTTYPE.DOOR_OPEN, eCallType, null, null);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveDoorOpen(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 303 - 76
WallPadCall/src/main/java/kr/co/icontrols/callengine/subphone/SubPhoneSerialManager.java


+ 114 - 28
WallPadCall/src/main/java/kr/co/icontrols/callengine/subwallpad/SubWallPadController.java

@@ -11,6 +11,8 @@ import android.os.Message;
 import android.os.Messenger;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import java.util.Timer;
 import java.util.TimerTask;
 
@@ -40,9 +42,12 @@ public class SubWallPadController {
                 Log.d(TAG, "[mServiceConnection.onServiceConnected] name [" + name + "], service [" + service + "]");
                 mRemoteMsn = new Messenger(service);
                 ctrlRemoteServiceRegister(true);
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceConnected(ComponentName name, IBinder service)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -51,9 +56,12 @@ public class SubWallPadController {
             try {
                 Log.d(TAG, "[mServiceConnection.onServiceDisconnected] name [" + name + "]");
                 mRemoteMsn = null;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] mServiceConnection.onServiceDisconnected(ComponentName name)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -64,18 +72,24 @@ public class SubWallPadController {
             mContext = context;
             mContext.startService(new Intent(mContext, SubWallPadSerialManager.class));
             bindSubWallPadSerialManagerService();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SubWallPadController");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void releaseSubWallPadController() {
         try {
             unbindSubWallPadSerialManagerService();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseSubWallPadController()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -83,9 +97,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[bindSubWallPadSerialManagerService] ========== START ==========");
             mContext.bindService(new Intent(mContext, SubWallPadSerialManager.class), mServiceConnection, Context.BIND_AUTO_CREATE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] bindSubWallPadSerialManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -94,9 +111,12 @@ public class SubWallPadController {
             Log.d(TAG, "[unbindSubWallPadSerialManagerService] ========== START ==========");
             ctrlRemoteServiceRegister(false);
             mContext.unbindService(mServiceConnection);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unbindSubWallPadSerialManagerService()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -115,9 +135,12 @@ public class SubWallPadController {
             } else {
                 Log.w(TAG, "[ctrlRemoteServiceRegister] mRemoteMsn is null!! bRegister [" + bRegister + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlRemoteServiceRegister(boolean bRegister)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -190,9 +213,12 @@ public class SubWallPadController {
                 sendBusyCall(eCallOwner, eCallType);
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveNewCall(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -209,9 +235,12 @@ public class SubWallPadController {
             } else {
                 MainActivity.mCallController.onSubWallPadEvent(eCallOwner, CALLEVENTTYPE.TERMINATE_CALL, eCallType, null, null);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveStartCall(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -225,9 +254,12 @@ public class SubWallPadController {
             if (eCallOwner != CALLOWNER.SUB_WALLPAD) {
                 MainActivity.mCallController.onSubWallPadEvent(eCallOwner, CALLEVENTTYPE.TERMINATE_CALL, eCallType, null, strCMD);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveEndCall(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -242,9 +274,12 @@ public class SubWallPadController {
             } else {
                 sendBusyCall(eCallOwner, eCallType);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveRequestFrontMonitoring(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -259,9 +294,12 @@ public class SubWallPadController {
             } else if (eCallOwner == CALLOWNER.UNIVERSAL_DEVICE) {
                 MainActivity.mCallController.onSubWallPadEvent(eCallOwner, CALLEVENTTYPE.DOOR_OPEN, eCallType, null, null);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveDoorOpen(Bundle bundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -282,9 +320,12 @@ public class SubWallPadController {
             } else {
                 MainActivity.mCallController.onSubWallPadEvent(eCallOwner, CALLEVENTTYPE.RECEIVE_CALL_ACK, eCallType, null, null);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveACKNewCall(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -292,9 +333,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[notifyEndCall] eCallOwner [" + eCallOwner+ "], eCallType [" + eCallType+ "]");
             sendMsgToRemoteService(SUBWALLPADHANDLERMSG.SEND_BUSY, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendBusyCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -310,9 +354,12 @@ public class SubWallPadController {
             int nMentPlayTime = MainActivity.mSound.PlayMent(SND.call.BUSY_TRY_LATER);
             Thread.sleep(nMentPlayTime + 500);
             MainActivity.mCallController.onSubWallPadEvent(eCallOwner, CALLEVENTTYPE.TERMINATE_CALL, eCallType, null, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveBusy()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -321,9 +368,12 @@ public class SubWallPadController {
             Log.d(TAG, "[receiveInitialize]");
             if (mTimer != null) mTimer.cancel();
 //            MainActivity.mCallController.onSubWallPadEvent(CALLOWNER.NONE, CALLEVENTTYPE.INITIALIZE_ALLCALL, CALLTYPE.NONE, null, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveInitialize()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -340,9 +390,12 @@ public class SubWallPadController {
             // 서브월패드에서 경비 통화요청 커맨드 송신 후 ACK를 설정시간 이내에 받지 못하는 경우(통화실패)를 체크하기 위해 타이머 구동
             mTimer = new Timer();
             mTimer.schedule(task, SUBWALLPAD_REQUEST_TIMEOUT);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyNewCallGuard(CALLOWNER eCallOwner, CALLTYPE eCallType, String strGuardID, boolean bVideo)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -350,9 +403,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[notifyStartCall] eCallOwner [" + eCallOwner+ "], eCallType [" + eCallType+ "]");
             sendMsgToRemoteService(SUBWALLPADHANDLERMSG.SEND_NOTIFY_START_CALL, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyStartCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -360,9 +416,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[notifyEndCall] eCallOwner [" + eCallOwner+ "], eCallType [" + eCallType+ "]");
             sendMsgToRemoteService(SUBWALLPADHANDLERMSG.SEND_NOTIFY_END_CALL, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] notifyEndCall(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -375,9 +434,12 @@ public class SubWallPadController {
             // 서브월패드에서 이웃 통화요청 커맨드 송신 후 ACK를 설정시간 이내에 받지 못하는 경우(통화실패)를 체크하기 위해 타이머 구동
             mTimer = new Timer();
             mTimer.schedule(task, SUBWALLPAD_REQUEST_TIMEOUT);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestResidenceCall(CALLOWNER eCallOwner, CALLTYPE eCallType, String strDong, String strHo)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -392,9 +454,12 @@ public class SubWallPadController {
                 }
                 MainActivity.mCallController.stop1stCallTimer();
                 sendMoipFinishBR(); // FINISH BR
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] TimerTask");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -413,9 +478,12 @@ public class SubWallPadController {
             } else {
                 Log.w(TAG, "[sendMsgToRemoteService] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteService(int nMsg, CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -434,9 +502,12 @@ public class SubWallPadController {
             else {
                 Log.d(TAG, "[sendMsgToRemoteServiceResidence] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "], strDong [" + strDong + "], strHo [" + strHo + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteServiceResidence(int nMsg, CALLOWNER eCallOwner, CALLTYPE eCallType, String strDong, String strHo)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -455,9 +526,12 @@ public class SubWallPadController {
             else {
                 Log.w(TAG, "[sendMsgToRemoteServiceGuard] mRemoteMsn is null!! nMsg [" + nMsg + "], eCallOwner [" + eCallOwner + "], eCallType [" + eCallType + "], strGuard [" + strGuard + "], strOption [" + strOption + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteServiceGuard(int nMsg, CALLOWNER eCallOwner, CALLTYPE eCallType, String strGuard, String strOption)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -465,9 +539,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[sendRequestFrontMonitoring] eCallOwner [" + eCallOwner+ "], eCallType [" + eCallType+ "]");
             sendMsgToRemoteService(SUBWALLPADHANDLERMSG.SEND_REQUEST_FRONT_MONITORING, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestFrontMonitoring(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -475,9 +552,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[sendRequestDoorOpen] eCallOwner [" + eCallOwner+ "], eCallType [" + eCallType+ "]");
             sendMsgToRemoteService(SUBWALLPADHANDLERMSG.SEND_REQUEST_DOOR_OPEN, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestDoorOpen(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -485,9 +565,12 @@ public class SubWallPadController {
         try {
             Log.d(TAG, "[sendACKFrontMonitoring] eCallOwner [" + eCallOwner+ "], eCallType [" + eCallType+ "]");
             sendMsgToRemoteService(SUBWALLPADHANDLERMSG.SEND_ACK_FRONT_MONITORING, eCallOwner, eCallType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendACKFrontMonitoring(CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -496,9 +579,12 @@ public class SubWallPadController {
             Intent mIntent = new Intent();
             mIntent.setAction(Declare.BR.APP_FINISH);
             mContext.sendBroadcast(mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMoipFinishBR()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 236 - 57
WallPadCall/src/main/java/kr/co/icontrols/callengine/subwallpad/SubWallPadSerialManager.java

@@ -20,6 +20,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.WallpadStatusData.WeatherTable;
 import com.artncore.commons.define;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import java.io.File;
 import java.io.IOException;
@@ -90,9 +91,12 @@ public class SubWallPadSerialManager extends Service {
                 checkTimeSyncTimer();
                 if (mTimeSyncTimer != null) mTimeSyncTimer.start(); // 서브월패드 시간 동기화를 위한 타이머 구동
             } else Log.e(TAG, "[onCreate] SubWallPad serial port NOT opened!!");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCreate()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -106,9 +110,12 @@ public class SubWallPadSerialManager extends Service {
                 mTimeSyncTimer = null;
             }
             unregisterBRReceiver();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onDestroy()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -195,9 +202,12 @@ public class SubWallPadSerialManager extends Service {
 
                 sendMsgToLocalMsn(SUBWALLPADHANDLERMSG.RECEIVED_DATA, mSubPhonePacket);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procRcvData(byte[] hReceivedData)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -208,9 +218,13 @@ public class SubWallPadSerialManager extends Service {
                 hResult[i] = hRawData[i];
             }
             return hResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setReceivedData(byte[] hRawData, int nCnt)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -241,9 +255,13 @@ public class SubWallPadSerialManager extends Service {
             mSerialDataReceiver = new SerialDataReceiver();
             mSerialDataReceiver.start();
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startSerialPort()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -267,9 +285,13 @@ public class SubWallPadSerialManager extends Service {
                 Log.d(TAG, "[openSerialPort] mSerialPort FD : " + mSerialPort.get_FD());
             }
             return mSerialPort;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] openSerialPort(SerialInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -290,9 +312,15 @@ public class SubWallPadSerialManager extends Service {
                     sBaudrate = "9600";
                 else sBaudrate = "1200";
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            if (DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300 || DEVICE_BOARDTYPE == BOARD_TYPE.V40)
+                sBaudrate = "9600";
+            else sBaudrate = "1200";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getSubPhoneBaudrate");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             if (DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300 || DEVICE_BOARDTYPE == BOARD_TYPE.V40)
                 sBaudrate = "9600";
             else sBaudrate = "1200";
@@ -310,9 +338,12 @@ public class SubWallPadSerialManager extends Service {
             filter.addAction(Declare.BR.WIRELESSREMOTECTRL);
             filter.addAction(Declare.BR.NOTIFY_ACNAME_SUBWALLPAD);
             registerReceiver(mSubWallPadServiceBRReceiver, filter, null, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] registerBRReceiver()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -321,9 +352,12 @@ public class SubWallPadSerialManager extends Service {
             if (mSubWallPadServiceBRReceiver != null) {
                 unregisterReceiver(mSubWallPadServiceBRReceiver);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] unregisterBRReceiver()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -392,9 +426,12 @@ public class SubWallPadSerialManager extends Service {
                     sendMsgToRemoteMsns(SUBWALLPADHANDLERMSG.RECEIVE_NOTIFY_END_CALL, getOwner(Data.getSID()), getCallType(Data.getData(0)));
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] analysisReceivePacketData(SubPhonePacket Data)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -409,9 +446,12 @@ public class SubWallPadSerialManager extends Service {
         try {
             DEVICE_MODELTYPE = Version.getModelType();
             DEVICE_BOARDTYPE = getBoardType(DEVICE_MODELTYPE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDeviceType()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -424,10 +464,9 @@ public class SubWallPadSerialManager extends Service {
                 case MODEL_TYPE.IHN_D101_I:
                 case MODEL_TYPE.IHN_1010GL:
                 case MODEL_TYPE.IHN_1010GL_I:
+                case MODEL_TYPE.IHN_1010GL_I_2443:
                 case MODEL_TYPE.IHN_D101K:
                 case MODEL_TYPE.IHN_D101K_I:
-                case MODEL_TYPE.IHN_1010GL_I_2443:
-                case MODEL_TYPE.IHN_1010GL_I_6410:
                     if (ConfigValues.AOS_VERSION >= 7) return BOARD_TYPE.V40_IGW300_NOUGAT;
                     else return BOARD_TYPE.V40_IGW300;
 
@@ -446,6 +485,7 @@ public class SubWallPadSerialManager extends Service {
                 case MODEL_TYPE.IHN_430_I:
                 case MODEL_TYPE.IHN_1050DW_I:
                 case MODEL_TYPE.IHN_1020B_I:
+                case MODEL_TYPE.IHN_1010_I_2443:
                 case MODEL_TYPE.IHN_1303_I:
                     if (ConfigValues.AOS_VERSION >= 7) return BOARD_TYPE.V40_NOUGAT;
                     else return BOARD_TYPE.V40;
@@ -453,9 +493,13 @@ public class SubWallPadSerialManager extends Service {
                 default:
                     return -99;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getBoardType(int nModelType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -469,9 +513,13 @@ public class SubWallPadSerialManager extends Service {
             else if (hCallType == SubWallPadCmds.CALLTYPE_PSTN) return CALLTYPE.PSTN;
             else if (hCallType == SubWallPadCmds.CALLTYPE_RESIDENCE) return CALLTYPE.RESIDENCE;
             else return CALLTYPE.NONE;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return CALLTYPE.ERROR;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCallType(byte hCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return CALLTYPE.ERROR;
         }
     }
@@ -489,9 +537,13 @@ public class SubWallPadSerialManager extends Service {
             else if (Global.getBathTVIdx(hSID) >= 0) return Global.getBathTVOwner(Global.getBathTVIdx(hSID));
             else if (hSID == SubWallPadCmds.ID_MOBILE) return CALLOWNER.MOBILE;
             else return CALLOWNER.NONE;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return CALLOWNER.ERROR;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getOwner(byte hSID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return CALLOWNER.ERROR;
         }
     }
@@ -505,9 +557,13 @@ public class SubWallPadSerialManager extends Service {
             else if (hGuardID == SubWallPadCmds.GUARDTYPE_OFFICE)
                 return SUBWALLPADHANDELKEY.GUARD_04;
             else return SUBWALLPADHANDELKEY.GUARD_01;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardType(byte hGuardID)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -534,9 +590,12 @@ public class SubWallPadSerialManager extends Service {
                 Log.w(TAG, "[runCallMainActivity] WallPadCall is already running!!");
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runCallMainActivity(CALLOWNER eCallOwner, CALLEVENTTYPE eEventType, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -553,9 +612,12 @@ public class SubWallPadSerialManager extends Service {
             if (bOn) mIntent.setAction(define.NOTIFY_ACNAME_LCD_BACKLIGHT_ON);
             else mIntent.setAction(define.NOTIFY_ACNAME_LCD_BACKLIGHT_OFF);
             getApplicationContext().sendBroadcast(mIntent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendLCDBacklightStatus(boolean bOn)");
-            e.printStackTrace() ;
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -567,9 +629,13 @@ public class SubWallPadSerialManager extends Service {
             String strTopActivity = mComponentName.getPackageName();
             Log.d(TAG, "[getTopActivity] strTopActivity [" + strTopActivity + "]");
             return strTopActivity;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getTopActivity()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -601,9 +667,14 @@ public class SubWallPadSerialManager extends Service {
             hPacket[Packet.getLength() - 1] = SubWallPadCmds.ETX;
 
             return hPacket;
-        } catch(Exception e){
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG,re);
+            return null;
+        }
+        catch(Exception e){
             Log.e(TAG, "[Exception] makeSerialPacket(SubPhonePacket Packet)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -619,9 +690,13 @@ public class SubWallPadSerialManager extends Service {
                 Log.w(TAG, "[sendSerialData] mOutputStream is null!!");
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendSerialData(byte[] hPacket)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -635,9 +710,12 @@ public class SubWallPadSerialManager extends Service {
                 Log.w(TAG, "[sendMsgToLocalMsn] LocalMsn is null!! nMsg [" + nMsg + "]");
                 PacketInfo.printValue();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToLocalMsn(int nMsg, SubPhonePacket PacketInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -649,9 +727,12 @@ public class SubWallPadSerialManager extends Service {
             for (int i = 0; i < nClientsCnt; i++) {
                 mRemoteMsns.get(i).send(msg);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteMsns(int nMsg, SubPhonePacket PacketInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -667,9 +748,12 @@ public class SubWallPadSerialManager extends Service {
             for (int i = 0; i < nClientsCnt; i++) {
                 mRemoteMsns.get(i).send(msg);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteMsns(int nMsg, CALLOWNER eCallOwner, CALLTYPE eCallType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -686,9 +770,12 @@ public class SubWallPadSerialManager extends Service {
             for (int i = 0; i < nClientsCnt; i++) {
                 mRemoteMsns.get(i).send(msg);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendMsgToRemoteMsns(int nMsg, CALLOWNER eCallOwner, CALLTYPE eCallType, String strGuardType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -718,9 +805,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_NOTIFY_NEW_CALL, hDATA1, hDATA2, hDATA3, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendNotifyNewCall(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -744,9 +834,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_ALL, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_NOTIFY_START_CALL, hDATA1, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendNotifyStartCall(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -770,9 +863,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_ALL, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_NOTIFY_END_CALL, hDATA1, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendNotifyEndCall(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -795,9 +891,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_FRONT_MONITORING, hDATA1, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestFrontMonitoring(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -820,9 +919,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_DOOR_OPEN, hDATA1, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestDoorOpen(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -843,9 +945,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_NEIGHBOR_CALL, hDATA1, hDATA2, hDATA3, hDATA4);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestResidenceCall(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -860,9 +965,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_EMERGENCY_OCCURED, SubWallPadCmds.DATA01_EMERGENCY, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestEmergency(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -901,9 +1009,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(hDID, SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.CMD_ACK_DOOR_OPEN, hDATA1, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendACKDoorOpen(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -928,9 +1039,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(hDID, SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.CMD_BUSY, hDATA1, (byte) 0x01, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendBusyCall(Bundle mBundle)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -944,9 +1058,12 @@ public class SubWallPadSerialManager extends Service {
             RemoteIDInfo.strName = String.valueOf(Integer.valueOf(RemoteIDInfo.strDong)) + "동 " + String.valueOf(Integer.valueOf(RemoteIDInfo.strHo)) + "호";
             Log.d(TAG, "[receiveNeighborInfo] strDong [" + RemoteIDInfo.strDong + "], strHo [" + RemoteIDInfo.strHo + "], strName [" + RemoteIDInfo.strName + "]");
             Log.d(TAG, "[receiveNeighborInfo] strDongInfo [" + Global.strDongInfo + "], strHoInfo [" + Global.strHoInfo + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveNeighborInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -959,9 +1076,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_WEATHER_UPDATE, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestWeatherUpdate()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -975,9 +1095,12 @@ public class SubWallPadSerialManager extends Service {
                 DBMGR.SetCurWeatherCode(String.valueOf(decCode));
                 DBMGR.closeDB();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveCurWeatherCode()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1039,9 +1162,12 @@ public class SubWallPadSerialManager extends Service {
             Weathertbl.AddWeatherData(month + day, Global.getStrWeatherCode(weatherCode), weatherCode, String.valueOf(lowTemp), String.valueOf(highTemp), amRain, pmRain);
             Log.d(TAG, "[proWeatherInfoRcv] DATE [" + month + day + "], TEXT [" + Global.getStrWeatherCode(weatherCode) + "], CODE [" + weatherCode + "], " + "LOWTEMP [" + lowTemp + "], HIGHTEMP [" + highTemp + "], AMRAIN [" + amRain + "], PMRAIN [" + pmRain + "]");
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] proWeatherInfoRcv()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         DBMGR.closeDB();
     }
@@ -1100,9 +1226,12 @@ public class SubWallPadSerialManager extends Service {
 
             List<WallpadStatusData.WeatherItem> getWeatherList = (List<WallpadStatusData.WeatherItem>) Weathertbl.GetWeatherData();
             Log.d(TAG, "[sendWeatherResult] getWeatherList.size() [" + getWeatherList.size() + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendWeatherResult()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
         DBMGR.closeDB();
     }
@@ -1133,9 +1262,12 @@ public class SubWallPadSerialManager extends Service {
                     }
                 }
             };
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkTimeSyncTimer()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1147,9 +1279,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_TIME_SYNC, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestTimeSync()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1161,9 +1296,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_TIME_SYNC_V2, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestTimeSyncV2()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1198,9 +1336,12 @@ public class SubWallPadSerialManager extends Service {
                 intent.putExtra(define.NOTIBR_KIND, define.NOTIFY_SYSTEMTIMESETTED);
                 sendBroadcast(intent);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveTimeSyncACK()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1242,9 +1383,12 @@ public class SubWallPadSerialManager extends Service {
                 intent.putExtra(define.NOTIBR_KIND, define.NOTIFY_SYSTEMTIMESETTED);
                 sendBroadcast(intent);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveTimeSyncACKV2()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1259,9 +1403,12 @@ public class SubWallPadSerialManager extends Service {
             } else {
                 sendSerialData(makeHeatingPacket(false, roomNum, -1, -1));
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestHeatingStatus()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1274,9 +1421,12 @@ public class SubWallPadSerialManager extends Service {
             } else {
                 sendSerialData(makeHeatingPacket(true, roomNum, status, setTemp));
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendRequestHeatingCtrl()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1321,9 +1471,13 @@ public class SubWallPadSerialManager extends Service {
             hResultPacket[SERIAL_PACKET_NORMAL_LENGTH - 1] = SubWallPadCmds.ETX; // ETX
             Log.d(TAG, "[makeHeatingPacket] hResultPacket [" + Global.printHexs(hResultPacket, hResultPacket.length) + "]");
             return hResultPacket;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeHeatCtrlPacket(int roomNum)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -1335,9 +1489,12 @@ public class SubWallPadSerialManager extends Service {
             WallpadStatusData wd = new WallpadStatusData(this);
             wd.setHeatingRoomNum(nNum);
             wd.closeDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveHeatingRoomNum()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1373,9 +1530,12 @@ public class SubWallPadSerialManager extends Service {
                 mIntent.putExtra(Declare.BR.HEATING_CONTENT, strHeatResult);
                 sendBroadcast(mIntent);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHeatingResult(boolean bCtrl, SubPhonePacket mSubPhonePacket)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1389,9 +1549,12 @@ public class SubWallPadSerialManager extends Service {
             mSubPhonePacket.setAllData(SubWallPadCmds.ID_WALLPAD, SubWallPadCmds.ID_SUBWALLPAD, SubWallPadCmds.CMD_REQUEST_EMERGENCY_OCCURED, SubWallPadCmds.CMD_REQUEST_EMERGENCY_OCCURED, (byte) 0x00, (byte) 0x00, (byte) 0x00);
 
             sendSerialData(makeSerialPacket(mSubPhonePacket));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendNotifyEmergency()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1415,9 +1578,12 @@ public class SubWallPadSerialManager extends Service {
             intent.setComponent(new ComponentName("kr.co.icontrols.wallpademergency", "kr.co.icontrols.wallpademergency.MainActivity"));
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             startActivity(intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveEmergencyOccured()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1429,9 +1595,12 @@ public class SubWallPadSerialManager extends Service {
             intentBR.setAction(define.NOTIFY_ACNAME);
             intentBR.putExtra(define.NOTIBR_KIND, define.NOTIFY_ALARM_RELEASE);
             getApplicationContext().sendBroadcast(intentBR);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] receiveEmergencyRelease()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1446,9 +1615,13 @@ public class SubWallPadSerialManager extends Service {
             Log.d(TAG, "[setCheckSumPacket] hCS = " + String.format("%d[%X]", i, hCS));
 
             return hCS;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return (byte) 0x00;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCheckSumPacket(byte[] hTarget)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return (byte) 0x00;
         }
     }
@@ -1566,9 +1739,12 @@ public class SubWallPadSerialManager extends Service {
                         if (nRcvDataCnt == -99) nRcvDataCnt = 0;
                         else Log.w(TAG, "[SerialDataReceiver.run()] [RESET] Receive TimeOut!!!");
                     }
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
                 } catch (Exception e) {
                     Log.e(TAG, "[Exception] SerialDataReceiver.run()");
-                    e.printStackTrace();
+                    //e.printStackTrace();            
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
             }
         }
@@ -1603,9 +1779,12 @@ public class SubWallPadSerialManager extends Service {
                         sendRequestHeatingCtrl(roomNum, status, setTemp);
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] onReceive(Context context, Intent intent)");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }

+ 133 - 25
WallPadCall/src/main/java/kr/co/icontrols/hdcftp/HDCFTPManager.java

@@ -4,11 +4,14 @@ import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
 
 import org.apache.commons.net.ftp.FTPClient;
 
 import android.util.Log;
 
+import com.util.LogUtil;
+
 public class HDCFTPManager {
 
     String TAG = "HDCFTPManager";
@@ -47,9 +50,13 @@ public class HDCFTPManager {
             mFTPClient.connect(TargetIP);
             LOG_INFO("[connectFTP] Connected to [" + TargetIP + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] connectFTP(TargetIP)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -57,9 +64,13 @@ public class HDCFTPManager {
     public boolean isFTPConnected() {
         try {
             return mFTPClient.isConnected();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] isFTPConnected()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -67,12 +78,19 @@ public class HDCFTPManager {
     public boolean loginFTP(String ID, String PW) {
         try {
             boolean bResult = false;
-            bResult = mFTPClient.login(ID, PW);
+            for(int i =0 ;i<1; i++)
+            {
+                bResult = mFTPClient.login(ID, PW);
+            }
             LOG_INFO("[loginFTP] logged FTP Server in : [" + bResult + "]");
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] loginFTP(ID, PW)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -87,9 +105,13 @@ public class HDCFTPManager {
             }
             LOG_INFO("[logoutFTP] bResult [" + bResult + "]");
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] logoutFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -99,9 +121,13 @@ public class HDCFTPManager {
             mFTPClient.disconnect();
             LOG_INFO("[disconnectFTP] Disconnected FTP");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] disconnectFTP()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -113,7 +139,7 @@ public class HDCFTPManager {
             File mFile = new File(localFilePath);
             if (mFile.exists()) {
                 LOG_INFO("[downloadFile] [" + localFilePath + "] is exist!!");
-                if (mFile.delete()) {
+                if (FileDelete(mFile)) {
                     LOG_INFO("[downloadFile] [" + localFilePath + "] is deleted!!");
                 } else {
                     LOG_INFO("[downloadFile] Fail to delete [" + localFilePath + "]");
@@ -130,15 +156,20 @@ public class HDCFTPManager {
             LOG_INFO("[downloadFile] bResult [" + bResult + "]");
 
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] downloadFile(remoteFilepath, localFilePath)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             deleteFile(localFilePath);
             return false;
         }
     }
 
     public boolean uploadFile(String remoteFilepath, String localFilePath) {
+        FileInputStream FileInStm = null;
         try {
             boolean bResult = false;
             File mFile = new File(localFilePath);
@@ -146,16 +177,31 @@ public class HDCFTPManager {
                 LOG_INFO("[uploadFile] No FILE!! [" + localFilePath + "]");
                 return false;
             }
-            FileInputStream FileInStm = new FileInputStream(mFile);
+            FileInStm = new FileInputStream(mFile);
             bResult = mFTPClient.storeFile(remoteFilepath, FileInStm);
             LOG_INFO("[uploadFile] bResult [" + bResult + "]");
 
             return bResult;
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG,re);
+            return false;
+        }
+        catch (Exception e) {
             Log.e(TAG, "[Exception] uploadFile(remoteFilepath, localFilePath)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
+        finally {
+            if(FileInStm!=null) {
+                try {
+                    FileInStm.close();
+                } catch (IOException e) {
+                    LogUtil.errorLogInfo("", TAG, e);
+                }
+            }
+            FileInStm = null;
+        }
     }
 
     public boolean isFileexist(String Filepath) {
@@ -165,9 +211,13 @@ public class HDCFTPManager {
             bResult = mFile.exists();
             LOG_INFO("[isFileexist] bResult [" + bResult + "]");
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] isFileexist(Filepath)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -177,15 +227,19 @@ public class HDCFTPManager {
             boolean bResult = false;
             File mFile = new File(Filepath);
             if (mFile.exists()) {
-                bResult = mFile.delete();
+                bResult = FileDelete(mFile);// mFile.delete();
             } else {
                 LOG_INFO("[deleteFile] There is no file = " + Filepath);
             }
             LOG_INFO("[deleteFile] bResult [" + bResult + "]");
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteFile(Filepath)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -195,9 +249,13 @@ public class HDCFTPManager {
             mFTPClient.setReceieveDataSocketBufferSize(BufferSize);
             LOG_INFO("[setReceieveDataSocketBufferSize] BufferSize [" + BufferSize + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setReceieveDataSocketBufferSize(BufferSize)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -207,9 +265,13 @@ public class HDCFTPManager {
             mFTPClient.setReceiveBufferSize(BufferSize);
             LOG_INFO("[setReceiveBufferSize] BufferSize [" + BufferSize + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setReceiveBufferSize(BufferSize)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -224,9 +286,13 @@ public class HDCFTPManager {
                 LOG_INFO("[setFTPEnvironment] Not connected!!");
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setCtrlEncoding(Encode)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -237,9 +303,13 @@ public class HDCFTPManager {
             bResult = mFTPClient.setFileType(FileType);
             LOG_INFO("[setFileType] bResult [" + bResult + "]");
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setFileType(FileType)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -249,9 +319,13 @@ public class HDCFTPManager {
             mFTPClient.enterLocalPassiveMode();
             LOG_INFO("[setPassiveMode] Set LocalPassiveMode!!");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPassiveMode()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -261,9 +335,13 @@ public class HDCFTPManager {
             mFTPClient.enterLocalActiveMode();
             LOG_INFO("[setPassiveMode] Set LocalActiveMode!!");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setActiveMode()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -274,9 +352,13 @@ public class HDCFTPManager {
             bResult = mFTPClient.setFileTransferMode(Mode);
             LOG_INFO("[setFileTransferMode] bResult [" + bResult + "]");
             return bResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setFileTransferMode(Mode)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -286,9 +368,13 @@ public class HDCFTPManager {
             mFTPClient.setDefaultTimeout(mSec);
             LOG_INFO("[setDefaultTimeout] Set Timeout [" + mSec + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDefaultTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -298,9 +384,13 @@ public class HDCFTPManager {
             mFTPClient.setConnectTimeout(mSec);
             LOG_INFO("[setConnectTimeout] Set Timeout [" + mSec + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setConnectTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -310,9 +400,13 @@ public class HDCFTPManager {
             mFTPClient.setSoTimeout(mSec);
             LOG_INFO("[setSoTimeout] Set Timeout [" + mSec + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setSoTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -322,10 +416,24 @@ public class HDCFTPManager {
             mFTPClient.setDataTimeout(mSec);
             LOG_INFO("[setDataTimeout] Set Timeout [" + mSec + "]");
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDataTimeout(Sec)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
+
+    private synchronized boolean FileDelete(File file)
+    {
+        boolean result = false;
+        if(file!=null && file.exists())
+        {
+            result = file.delete();
+        }
+        return result;
+    }
 }

+ 283 - 63
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/IOInterface.java

@@ -7,6 +7,7 @@ import android.util.Log;
 
 import com.artncore.wallpadapi.IGW300API;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.v40ioctl.V40IOInterface;
 import kr.co.icontrols.v40ioctl.V40IOInterface2;
@@ -127,9 +128,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[IOInterface] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] IOInterface(int nBoardType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -140,7 +144,8 @@ public class IOInterface {
                 mV40IOIF = new V40IOInterface();
                 if (wallpadapi != null) mWallPadAPI = wallpadapi;
                 else Log.w(TAG, "[IOInterface] wallpadapi is null!!");
-                mIGW300API = mWallPadAPI.Get_IGW300Controller();
+                if(mWallPadAPI!=null)
+                    mIGW300API = mWallPadAPI.Get_IGW300Controller();
                 if (mIGW300API == null) {
                     Log.d(TAG, "[IOInterface] mIGW300API is null!!");
                     startConnectIGW300API();
@@ -153,7 +158,8 @@ public class IOInterface {
                 mV40IOIF_NOUGAT = new V40IOInterface2();
                 if (wallpadapi != null) mWallPadAPI = wallpadapi;
                 else Log.w(TAG, "[IOInterface] wallpadapi is null!!");
-                mIGW300API = mWallPadAPI.Get_IGW300Controller();
+                if(mWallPadAPI!=null)
+                    mIGW300API = mWallPadAPI.Get_IGW300Controller();
                 if (mIGW300API == null) {
                     Log.d(TAG, "[IOInterface] mIGW300API is null!!");
                     startConnectIGW300API();
@@ -165,9 +171,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[IOInterface] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] IOInterface(int nBoardType, WallPadAPI wallpadapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -187,9 +196,12 @@ public class IOInterface {
             if (mV40IOIF != null) mV40IOIF = null;
             if (mV40IOIF_NOUGAT != null) mV40IOIF_NOUGAT = null;
             if (mIGW300API != null) mIGW300API = null;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] releaseIOInterface()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -197,9 +209,12 @@ public class IOInterface {
     public void setBoardType(int nBoardType) {
         try {
             BOARDTYPE = nBoardType;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBoardType(nBoardType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -281,10 +296,14 @@ public class IOInterface {
                 bWallpadJNI = false;
                 Log.w(TAG, "[VideoJNI] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            bWallpadJNI = false;
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             bWallpadJNI = false;
             Log.e(TAG, "[Exception] ctrlWallpadJNI(bOpen)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -294,9 +313,13 @@ public class IOInterface {
             SetMacAddr(0xFB01, MACAddr);
             ctrlWallpadJNI(false);
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setMacAddr(MACAddr)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -310,9 +333,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[getBoardRevision] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getBoardRevision()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -334,9 +361,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[setSpeakerGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setSpeakerGain(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -351,9 +382,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[getSpeakerGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getSpeakerGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -368,9 +403,13 @@ public class IOInterface {
                 LOG_INFO("[setWallPadSpeakerDefaultGain] nResult = " + nResult);
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setWallPadSpeakerDefaultGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -385,9 +424,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[getWallPadSpeakerGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getWallPadSpeakerGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -409,9 +452,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[setMICGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setMICGain(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -426,9 +473,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[getMICGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getMICGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -450,9 +501,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[setMICBoostGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setMICBoostGain(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
 
@@ -468,9 +523,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[getMICBoostGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[getMICBoostGain] getMICGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -492,9 +551,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[setMICRecordGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setMICRecordGain(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
 
@@ -510,9 +573,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[getMICRecordGain] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getMICRecordGain()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -526,9 +593,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[ctrlWallPadCamPower] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlWallPadCamPower(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -551,9 +622,13 @@ public class IOInterface {
 
             if (ConfigValues.eFrontCameraType == Global.FRONTCAMERATYPE.RF) ctrlRFFrontCamPolling(bOn);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlFrontCamPower(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -580,9 +655,13 @@ public class IOInterface {
             }
             LOG_INFO("[ctrlFrontCamBell] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlFrontCamBell(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -599,9 +678,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[ctrlAudioSwitch34118] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlAudioSwitch34118(bWallPad)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -617,9 +700,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[setWallPadVolume_V40] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setWallPadVolume_V40");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -635,9 +721,13 @@ public class IOInterface {
             }
             if (nResult > 0) return true;
             else return false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDTMFWrite(nNo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -657,9 +747,13 @@ public class IOInterface {
                 Log.w(TAG, "[ctrlLcdWakeUp] Not supported BOARDTYPE [" + BOARDTYPE + "]");
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlLcdWakeUp");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -681,9 +775,13 @@ public class IOInterface {
                 Log.w(TAG, "[setNetworkDNS] Not supported BOARDTYPE [" + BOARDTYPE + "]");
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setNetworkDNS(sDNS)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -700,9 +798,13 @@ public class IOInterface {
                 Log.w(TAG, "[setDTMFOutDelayTime] Not supported BOARDTYPE! [" + BOARDTYPE + "]");
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDTMFOutDelayTime(int nDelay)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -719,9 +821,13 @@ public class IOInterface {
                 Log.w(TAG, "[setDTMFOutOnOff] Not supported BOARDTYPE [" + BOARDTYPE + "]");
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDTMFOutOnOff(boolean bON)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -739,9 +845,13 @@ public class IOInterface {
                 Log.w(TAG, "[Exception] setDTMFInOnOff(boolean bON)");
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setDTMFInOnOff");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -758,9 +868,13 @@ public class IOInterface {
             }
             Log.d(TAG, "[selectFrontCam] nResult: " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] selectFrontCam(boolean bFrontCam)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -774,9 +888,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[ctrlCameraBrightness] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlCameraBrightness(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -790,9 +908,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[ctrlFrontCamContrast] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlFrontCamContrast(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -807,9 +929,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[ctrlVideoSelectSubPhone] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlVideoSelectSubPhone(boolean bFront)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -827,9 +953,12 @@ public class IOInterface {
                 else WpdInterfaceControl(IOCTL_POPUP_GUI, 0);
             }
             ctrlWallpadJNI(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlPopupGUI(boolean bUP");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -847,9 +976,12 @@ public class IOInterface {
                 else WpdInterfaceControl(IOCTL_POPUP_GUI, 0);   // MoIP 영상 위로
             }
             ctrlWallpadJNI(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlPopupGUI_Resi(boolean bUP");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -863,9 +995,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathDoor] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathNormal()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -879,9 +1014,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathDoor] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathDoor()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -895,9 +1033,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathGuard] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathGuard()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -911,9 +1052,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathPSTN] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathPSTN()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -927,9 +1071,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathDoor_SubPhone] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathDoor_SubPhone()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -943,9 +1090,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathMoIP_SubPhone] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathMoIP_SubPhone()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -959,9 +1109,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathGuard_SubPhone] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathGuard_SubPhone()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -975,9 +1128,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlSetTalkPathPSTN_SubPhone] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSetTalkPathPSTN_SubPhone()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -992,9 +1148,12 @@ public class IOInterface {
             } else {
                 Log.w(TAG, "[ctrlPSTNHookOn] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlPSTNHookOn()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1006,9 +1165,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[openWirelessDoorlock] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] openWirelessDoorlock()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1025,9 +1188,13 @@ public class IOInterface {
                 LOG_INFO("[ctrlWallPadLED_Call] nResult = " + nResult);
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlWallPadLED_Call(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -1041,9 +1208,13 @@ public class IOInterface {
             ctrlWallpadJNI(false);
             LOG_INFO("[ctrlWallPadLED_DoorOpen] nResult = " + nResult);
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlWallPadLED_DoorOpen(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -1;
         }
     }
@@ -1056,9 +1227,13 @@ public class IOInterface {
                 Log.w(TAG, "[sendDTMF] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendDTMF(int nNo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1068,9 +1243,12 @@ public class IOInterface {
             sendHandlerMsgDelayed(HANDLERMSG.CX93021_RESET_HIGH, 0, 0, 0);
             sendHandlerMsgDelayed(HANDLERMSG.CX93021_RESET_LOW, 0, 0, 100);
             sendHandlerMsgDelayed(HANDLERMSG.CX93021_RESET_HIGH, 0, 0, 200);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetPSTNModem()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1083,9 +1261,13 @@ public class IOInterface {
                 ctrlWallpadJNI(false);
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPSTNResetLow()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1099,9 +1281,13 @@ public class IOInterface {
                 ctrlWallpadJNI(false);
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -99;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPSTNResetHigh()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -99;
         }
     }
@@ -1111,9 +1297,12 @@ public class IOInterface {
             Log.i(TAG, "[ctrlRFFrontCamPolling] bStop [" + bStop + "]");
             if (mWallPadAPI != null) mWallPadAPI.SetDevService_DoorCamUseOnOff(bStop);
             else Log.w(TAG, "[ctrlRFFrontCamPolling] mWallPadAPI is null!!");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlRFFrontCamPolling(boolean bOn)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1132,9 +1321,13 @@ public class IOInterface {
                 nResult = -99;
             }
             return nResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            nResult = -98;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSubWallPadTalkPath(boolean bSet)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             nResult = -98;
         }
         Log.i(TAG, "[ctrlSubWallPadTalkPath] nResult = " + nResult);
@@ -1173,9 +1366,12 @@ public class IOInterface {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             IOIFHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1187,9 +1383,12 @@ public class IOInterface {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             IOIFHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1240,9 +1439,13 @@ public class IOInterface {
                 default:
                     return -100;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -999;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] interfaceIGW300(int nCMD)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -999;
         }
     }
@@ -1262,9 +1465,13 @@ public class IOInterface {
                 Log.e(TAG, "[IGW300_IOCtrl] nResult [" + nResult + "], ErrorCode [" + mIGW300API.ErrorCode.ErrStr() + "]");
                 return -2;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return -102;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] IGW300_IOCtrl(byte hCMD, boolean OnOff)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return -102;
         }
         return 0;
@@ -1284,9 +1491,12 @@ public class IOInterface {
                 Log.e(TAG, "[IGW300_CallPathCtrl] nResult [" + nResult + "], ErrorCode [" + mIGW300API.ErrorCode.ErrStr() + "]");
                 return -2;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] IGW300_CallPathCtrl(byte hCallPath)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return 0;
     }
@@ -1301,9 +1511,12 @@ public class IOInterface {
                 mConnectIGW300APIThread.start();
             }
             else Log.w(TAG, "[startConnectIGW300API] mConnectIGW300APIThread is not null!!, bIGW300ConnectorRun [" + bIGW300ConnectorRun+ "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] startConnectIGW300API()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1316,9 +1529,12 @@ public class IOInterface {
                 mConnectIGW300APIThread = null;
             }
             else Log.w(TAG, "[stopConnectIGW300API] mConnectIGW300APIThread is null!!, bIGW300ConnectorRun [" + bIGW300ConnectorRun+ "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] stopConnectIGW300API()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1344,13 +1560,17 @@ public class IOInterface {
                         Thread.sleep(100);
                     } catch (InterruptedException e) {
                         Log.e(TAG, "[InterruptedException] Thread.sleep(100)");
-                        e.printStackTrace();
+                        //e.printStackTrace();
+                        LogUtil.errorLogInfo("", TAG, e);
                     }
                 }
                 Log.i(TAG, "[ConnectIGW300APIThread().run()] ===== while end =====");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] ConnectIGW300APIThread.run()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 309 - 180
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/MainActivity.java


+ 12 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/ManualActivity.java

@@ -16,6 +16,7 @@ import android.widget.RelativeLayout;
 
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.pstn.ATCmds;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -108,6 +109,8 @@ public class ManualActivity extends WpadActivity {
 
         try {
             wdb = new WallpadStatusData(this);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Error] - WallpadStatusData Create : " + e);
         }
@@ -192,9 +195,12 @@ public class ManualActivity extends WpadActivity {
                             MainActivity.mPSTNController.sendMsgToLocalService(ATCmds.PSTNHANDLERMSG.RECEIVE_RING, null);
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(this.TAG,  "[Exception] onReceive()");
-                e.printStackTrace();
+                //e.printStackTrace();            
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -313,9 +319,13 @@ public class ManualActivity extends WpadActivity {
                 default:
                     break;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] - setChangeScreen->Screen Create: " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             mCurrentScreenId = -1;
             return false;
         }

+ 36 - 6
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/PopupActivity.java

@@ -19,6 +19,7 @@ import com.artncore.WallPadDataMgr.WallpadDeviceSet;
 import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.wallpadapi.SmartKeyRfDoorAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.pstn.ATCmds;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -34,6 +35,7 @@ import kr.co.icontrols.wallpadcall.popup.NoticeSubPhoneTalk;
 import kr.co.icontrols.wallpadcall.popup.NoticeTakePicture;
 import kr.co.icontrols.wallpadcall.popup.NoticeVideoRecord;
 import kr.co.icontrols.wallpadcall.popup.SmartIOTCamSetting;
+import kr.co.icontrols.wallpadcall.popup.UpdateInfo;
 import kr.co.icontrols.wallpadsupport.WpadActivity;
 import kr.co.icontrols.wallpadsupport.WpadScale;
 
@@ -152,6 +154,7 @@ public class PopupActivity extends WpadActivity {
     NoticeRemoteCall PopupNoticeRemoteCall;
     SmartIOTCamSetting PopupSmartIoTCamSetting;
     NoticeTakePicture PopupNoticeTakePicture;
+    UpdateInfo PopupUpdateInfo;
 
     /**
      * Static Variables 초기화<br>
@@ -209,6 +212,8 @@ public class PopupActivity extends WpadActivity {
 
         try {
             wdb = new WallpadStatusData(this);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - onCreate->WallpadStatusData Create : " + e);
         }
@@ -347,9 +352,12 @@ public class PopupActivity extends WpadActivity {
                             MainActivity.mPSTNController.sendMsgToLocalService(ATCmds.PSTNHANDLERMSG.RECEIVE_RING, null);
                     }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(this.TAG,  "[Exception] onReceive()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     };
@@ -487,14 +495,24 @@ public class PopupActivity extends WpadActivity {
                     Style = Common.POPUP_STYLE_NORMAL;
                     FinishTime = Common.FINISH_TIME_POPUP_NORMAL_SEC;
                     break;
+                case ID.POPUP.POPUP_UPDATEINFO:
+                    PopupUpdateInfo = new UpdateInfo(mContext, AllLayout);
+                    super.setCurrentScreen(PopupMultiCall);
+
+                    break;
 
                 default:
                     Log.e(TAG, "[Error] setChangeLayout - OnlyRemove Input ID Not found!!!");
                     return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            mCurrentScreenId = -1;
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[ExceptionError] - setChangeScreen->Screen Create : " + e.toString());
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             mCurrentScreenId = -1;
             return false;
         }
@@ -555,9 +573,12 @@ public class PopupActivity extends WpadActivity {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -569,9 +590,12 @@ public class PopupActivity extends WpadActivity {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -589,9 +613,12 @@ public class PopupActivity extends WpadActivity {
             } else {
                 Log.w(TAG, "[ctrlSmartIOTCamStatusMode] Not Supported FRONTCAMERA!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSmartIOTCamStatusMode(byte mode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -606,9 +633,12 @@ public class PopupActivity extends WpadActivity {
             } else {
                 Log.w(TAG, "[ctrlSmartIOTCamLEDMode] Not Supported FRONTCAMERA!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSmartIOTCamLEDMode(byte mode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 127 - 38
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/declare/DataClasses.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.wallpadcall.declare;
 import android.content.Context;
 import android.util.Log;
 
+import com.util.LogUtil;
+
 import java.util.ArrayList;
 
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -162,9 +164,12 @@ public final class DataClasses {
                 strMultiCall_ID_L = sID_L;
                 strMultiCall_Name = sName;
                 strMultiCall_IP = sIP;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] setMulticallInfo(CALLTYPE eBaseCallType, CALLTYPE eCallType, CALLSTATUS eCallStatus, CALLOWNER eCallOwner, String sID, String sID_H, String sID_L, String sName, String sIP)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -172,9 +177,12 @@ public final class DataClasses {
             try {
                 LOG("[updateName] sName [" + sName + "]");
                 strMultiCall_Name = sName;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] updateName(String sName)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
@@ -190,18 +198,25 @@ public final class DataClasses {
                 strMultiCall_ID_L = "";
                 strMultiCall_Name = "";
                 strMultiCall_IP = "";
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] resetMulticallVariables()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
 
         public boolean getMultiCallFlag() {
             try {
                 return bMultiCallAccept;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return false;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallFlag()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return false;
             }
         }
@@ -209,9 +224,13 @@ public final class DataClasses {
         public CALLTYPE getBaseMultiCallType() {
             try {
                 return eBaseMultiCallType;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLTYPE.ERROR;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getBaseMultiCallType()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLTYPE.ERROR;
             }
         }
@@ -219,9 +238,13 @@ public final class DataClasses {
         public CALLTYPE getMultiCallType() {
             try {
                 return eMultiCallType;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLTYPE.ERROR;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallType()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLTYPE.ERROR;
             }
         }
@@ -229,9 +252,13 @@ public final class DataClasses {
         public CALLSTATUS getMultiCallStatus() {
             try {
                 return eMultiCallStatus;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLSTATUS.IDLE;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallStatus()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLSTATUS.IDLE;
             }
         }
@@ -239,9 +266,13 @@ public final class DataClasses {
         public CALLOWNER getMultiCallOwner() {
             try {
                 return eMultiCallOwner;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return CALLOWNER.NONE;
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getMultiCallOwner()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return CALLOWNER.NONE;
             }
         }
@@ -249,9 +280,13 @@ public final class DataClasses {
         public String getID() {
             try {
                 return strMultiCall_ID;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getID()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -259,9 +294,13 @@ public final class DataClasses {
         public String getID_High() {
             try {
                 return strMultiCall_ID_H;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getID_High()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -269,9 +308,13 @@ public final class DataClasses {
         public String getID_Low() {
             try {
                 return strMultiCall_ID_L;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getID_Low()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -279,9 +322,13 @@ public final class DataClasses {
         public String getName() {
             try {
                 return strMultiCall_Name;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getName()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -289,9 +336,13 @@ public final class DataClasses {
         public String getIP() {
             try {
                 return strMultiCall_IP;
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
+                return "ERROR";
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] getIP()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
                 return "ERROR";
             }
         }
@@ -300,9 +351,12 @@ public final class DataClasses {
             try {
                 LOG("[printMultiCallInfo] eBaseMultiCallType [" + eBaseMultiCallType + "], eMultiCallType [" + eMultiCallType + "], eMultiCallStatus [" + eMultiCallStatus + "], eMultiCallOwner [" + eMultiCallOwner + "], bMultiCallAccept [" + bMultiCallAccept + "], " +
                         "strMultiCallID [" + strMultiCall_ID + "], strMultiCallID_H [" + strMultiCall_ID_H + "], strMultiCallID_L [" + strMultiCall_ID_L + "], strMultiCall_Name [" + strMultiCall_Name + "], strMultiCall_IP [" + strMultiCall_IP + "]");
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] printMultiCallInfo()");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -650,7 +704,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < ValueTable.size(); i++) {
-                LOG("[ConfigValueTable] Name [" + getConfigValue(i).NAME() + "], Count [" + getConfigValue(i).CNT() + "], Value [" + getConfigValue(i).VALUE() + "], ETC [" + getConfigValue(i).ETC() + "]");
+                ConfigValue item = getConfigValue(i);
+                if(item!=null)
+                    LOG("[ConfigValueTable] Name [" + item.NAME() + "], Count [" + item.CNT() + "], Value [" + item.VALUE() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -711,7 +767,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < LineTable.size(); i++) {
-                LOG("[LineInfoTable] Name [" + getLineInfo(i).NAME() + "], Low [" + getLineInfo(i).LOW() + "], High [" + getLineInfo(i).HIGH() + "], ETC [" + getLineInfo(i).ETC() + "]");
+                LineInfo item = getLineInfo(i);
+                if(item!=null)
+                    LOG("[LineInfoTable] Name [" + item.NAME() + "], Low [" + item.LOW() + "], High [" + item.HIGH() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -766,7 +824,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < SubTable.size(); i++) {
-                LOG("[SubInfoTable] ID [" + getSubInfo(i).ID() + "], IP [" + getSubInfo(i).IP() + "], ETC [" + getSubInfo(i).ETC() + "]");
+                SubInfo item = getSubInfo(i);
+                if(item!=null)
+                    LOG("[SubInfoTable] ID [" + item.ID() + "], IP [" + item.IP() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -815,7 +875,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < ElevDisableTable.size(); i++) {
-                LOG("[ElevDisableFloorTable] Floor [" + getElevDisableInfo(i).FLOOR() + "], ETC [" + getElevDisableInfo(i).ETC() + "]");
+                ElevDisableFloor item = getElevDisableInfo(i);
+                if(item!=null)
+                    LOG("[ElevDisableFloorTable] Floor [" + item.FLOOR() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -870,7 +932,9 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < GuardTable.size(); i++) {
-                LOG("[GuardListTable] Name [" + getGuardInfo(i).NAME() + "], IP [" + getGuardInfo(i).IP() + "], ETC [" + getGuardInfo(i).ETC() + "]");
+                GuardList item = getGuardInfo(i);
+                if(item!=null)
+                    LOG("[GuardListTable] Name [" + item.NAME() + "], IP [" + item.IP() + "], ETC [" + item.ETC() + "]");
             }
         }
 
@@ -1344,10 +1408,15 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < AccessKeyTables.size(); i++) {
-                LOG("[AccessKeyInfoTable] Index [" + getAccessKeyInfo(i).getIndex() + "], SN [" + getAccessKeyInfo(i).getSN() + "], UID [" + getAccessKeyInfo(i).getUID() + "], Type [" + getAccessKeyInfo(i).getType() + "], " +
-                        "SiteCode [" + getAccessKeyInfo(i).getSitecode() + "], Dong [" + getAccessKeyInfo(i).getDong() + "], Ho [" + getAccessKeyInfo(i).getHo() + "], KeyNum [" + getAccessKeyInfo(i).getKeyNo() + "], " +
-                        "IssueCnt [" + getAccessKeyInfo(i).getIssueCnt() + "], IssuedDate [" + getAccessKeyInfo(i).getIssuedDate() + "], LastUseDate [" + getAccessKeyInfo(i).getLastUseDate() + "], " +
-                        "Message [" + getAccessKeyInfo(i).getMessage() + "]");
+                AccessKeyInfo item = getAccessKeyInfo(i);
+                if(item!=null)
+                {
+                    LOG("[AccessKeyInfoTable] Index [" + item.getIndex() + "], SN [" + item.getSN() + "], UID [" + item.getUID() + "], Type [" + item.getType() + "], " +
+                            "SiteCode [" + item.getSitecode() + "], Dong [" + item.getDong() + "], Ho [" + item.getHo() + "], KeyNum [" + item.getKeyNo() + "], " +
+                            "IssueCnt [" + item.getIssueCnt() + "], IssuedDate [" + item.getIssuedDate() + "], LastUseDate [" + item.getLastUseDate() + "], " +
+                            "Message [" + item.getMessage() + "]");
+                }
+
             }
         }
 
@@ -1489,8 +1558,13 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < AlarmInfoTables.size(); i++) {
-                LOG("[AlarmInfoTable] sName [" + getAlarmInfo(i).getName() + "], sAlarmType [" + getAlarmInfo(i).getAlarmType() + "], sRemoteIP [" + getAlarmInfo(i).getRemoteIP() + "], " +
-                        "sChecked [" + getAlarmInfo(i).getChecked() + "], sETC [" + getAlarmInfo(i).getETC() + "], sTimestamp [" + getAlarmInfo(i).getTimestamp() + "]");
+                AlarmInfo item  = getAlarmInfo(i);
+                if(item!=null)
+                {
+                    LOG("[AlarmInfoTable] sName [" + item.getName() + "], sAlarmType [" + item.getAlarmType() + "], sRemoteIP [" + item.getRemoteIP() + "], " +
+                            "sChecked [" + item.getChecked() + "], sETC [" + item.getETC() + "], sTimestamp [" + item.getTimestamp() + "]");
+                }
+
             }
         }
 
@@ -1714,8 +1788,13 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < CallHistoryInfoTables.size(); i++) {
-                LOG("[CallHistoryInfoTable] sID [" + getCallHistoryInfo(i).getID() + "], sName [" + getCallHistoryInfo(i).getName() + "], sCallResult [" + getCallHistoryInfo(i).getCallResult() + "], sRemoteIP [" + getCallHistoryInfo(i).getRemoteIP() + "], " +
-                        "sSIPID [" + getCallHistoryInfo(i).getSIPID() + "], sChecked [" + getCallHistoryInfo(i).getChecked() + "], sETC [" + getCallHistoryInfo(i).getETC() + "], sTimestamp [" + getCallHistoryInfo(i).getTimestamp() + "]");
+                CallHistoryInfo item = getCallHistoryInfo(i);
+                if(item!=null)
+                {
+                    LOG("[CallHistoryInfoTable] sID [" + item.getID() + "], sName [" + item.getName() + "], sCallResult [" + item.getCallResult() + "], sRemoteIP [" + item.getRemoteIP() + "], " +
+                            "sSIPID [" + item.getSIPID() + "], sChecked [" + item.getChecked() + "], sETC [" + item.getETC() + "], sTimestamp [" + item.getTimestamp() + "]");
+                }
+
             }
         }
 
@@ -1877,10 +1956,15 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < VisitorPictureHistoryInfoTables.size(); i++) {
-                LOG("[CallHistoryInfoTable] ID [" + getVisitorPictureHistoryInfo(i).getID() + "], Name [" + getVisitorPictureHistoryInfo(i).getName() + "], RemoteSIPID [" + getVisitorPictureHistoryInfo(i).getRemoteSIPID() + "], " +
-                        "Checked [" + getVisitorPictureHistoryInfo(i).getChecked() + "], Thief [" + getVisitorPictureHistoryInfo(i).getThief() + "], " +
-                        "URI [" + getVisitorPictureHistoryInfo(i).getURI() + "], ETC [" + getVisitorPictureHistoryInfo(i).getETC() + "], " +
-                        "Timestamp [" + getVisitorPictureHistoryInfo(i).getTimestamp() + "]");
+                VisitorPictureHistoryInfo item = getVisitorPictureHistoryInfo(i);
+                if(item!=null)
+                {
+                    LOG("[CallHistoryInfoTable] ID [" + item.getID() + "], Name [" + item.getName() + "], RemoteSIPID [" + item.getRemoteSIPID() + "], " +
+                            "Checked [" + item.getChecked() + "], Thief [" + item.getThief() + "], " +
+                            "URI [" + item.getURI() + "], ETC [" + item.getETC() + "], " +
+                            "Timestamp [" + item.getTimestamp() + "]");
+                }
+
             }
         }
 
@@ -2055,13 +2139,18 @@ public final class DataClasses {
 
         public void printValue() {
             for (int i = 0; i < RemoteCallUserTables.size(); i++) {
-                Log.d(TAG, "[RemoteCallUserTable.printValue] sID [" + getRemoteCallUserInfo(i).getStrID() + "]," +
-                        "sName [" + getRemoteCallUserInfo(i).getStrName() + "], " +
-                        "sPhoneKey [" + getRemoteCallUserInfo(i).getStrPhoneKey() + "], " +
-                        "sMonitorAuth [" + getRemoteCallUserInfo(i).getStrMonitorAuth() + "], " +
-                        "sLobbyOpenAuth [" + getRemoteCallUserInfo(i).getStrLobbyOpenAuth() + "], " +
-                        "sDoorOpenAuth [" + getRemoteCallUserInfo(i).getStrDoorOpenAuth() + "], " +
-                        "sHomeViewerAuth [" + getRemoteCallUserInfo(i).getStrHomeViewerAuth() + "]");
+                RemoteCallUserInfo item = getRemoteCallUserInfo(i);
+                if(item!=null)
+                {
+                    Log.d(TAG, "[RemoteCallUserTable.printValue] sID [" + item.getStrID() + "]," +
+                            "sName [" + item.getStrName() + "], " +
+                            "sPhoneKey [" + item.getStrPhoneKey() + "], " +
+                            "sMonitorAuth [" + item.getStrMonitorAuth() + "], " +
+                            "sLobbyOpenAuth [" + item.getStrLobbyOpenAuth() + "], " +
+                            "sDoorOpenAuth [" + item.getStrDoorOpenAuth() + "], " +
+                            "sHomeViewerAuth [" + item.getStrHomeViewerAuth() + "]");
+                }
+
             }
         }
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 341 - 71
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/declare/Global.java


+ 24 - 0
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/declare/ID.java

@@ -652,6 +652,7 @@ public final class ID {
         public final static int POPUP_MULTICALL_RECORD = 25000; // 멀티콜 팝업 (거동수상자 영상 녹화)
 
         public final static int POPUP_SMARTIOT_SETTING = 26000; // 스마트현관카메라(효성/대우) 설정 팝업
+        public final static int POPUP_UPDATEINFO = 27000;
         public final static int POPUP_ALL = 90000;   // 모든 팝업
 
 
@@ -778,6 +779,29 @@ public final class ID {
             }
         }
 
+        /**
+         * 멀티콜
+         */
+        public static final class UPDATEINFO {
+            final static int BASE = POPUP_UPDATEINFO;
+
+            public static final class ELEMENT {
+                public static final class IMAGE {
+                    public final static int BACKGROUND = BASE + 100;
+                    public final static int ICON = BASE + 101;
+                }
+
+                public static final class BUTTON {
+                    public final static int ACCEPT = BASE + 200;
+                }
+
+                public static final class TEXT {
+                    public final static int INSTRUCTION = BASE + 300;
+
+                }
+            }
+        }
+
         /**
          * 멀티콜 거동수상자 영상녹화
          */

+ 32 - 8
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Notice_visitor_upload_complete.java

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

+ 32 - 9
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Request_check_sip_activation.java

@@ -7,6 +7,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 public class Request_check_sip_activation extends WallPadiMAPClient {
     String TAG = "Reqst_chck_sip_activ";
@@ -42,9 +43,12 @@ public class Request_check_sip_activation extends WallPadiMAPClient {
             //XML Header 생성
             XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
                     "<imap ver = \"1.0\" address = \"" + DeviceIP + "\" sender = \"" + DeviceDong + "동 " + DeviceHo + "호" + "\">\r\n";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Request_check_sip_activation(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -56,9 +60,13 @@ public class Request_check_sip_activation extends WallPadiMAPClient {
                     "   </service>\r\n" +
                     "</imap>";
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeXMLMsg(String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -67,18 +75,24 @@ public class Request_check_sip_activation extends WallPadiMAPClient {
         try {
             svrIP = strIPAddress;
             svrPort = nPort;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setServerInfo(String strIPAddress, int nPort)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void setResultCtrl(RetProci retProci) {
         try {
             Proc = retProci;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setResultCtrl(RetProci retProci)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -89,7 +103,9 @@ public class Request_check_sip_activation extends WallPadiMAPClient {
                 String result = GetAttributeVal(0, "result");
                 if (result != null) {
                     if (result.equalsIgnoreCase("ok")) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("check_sip_activation")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                        String name = GetAttributeVal(0, "name");
+                        String type = GetAttributeVal(0, "type");
+                        if ((name!=null && name.equalsIgnoreCase("check_sip_activation")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                             Proc.ProcSuccess();
                             return;
                         }
@@ -97,11 +113,14 @@ public class Request_check_sip_activation extends WallPadiMAPClient {
                 }
                 Proc.ProcError();
             } else {
-                Proc.ProcError();
+                if(Proc!=null) Proc.ProcError();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ProcComplite()");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -111,13 +130,17 @@ public class Request_check_sip_activation extends WallPadiMAPClient {
 
     public boolean send_check_sip_activation(String strTargetIP, String strMessage) {
         try {
-            Log.d(TAG, "[send_check_sip_activation] strTargetIP: " + strTargetIP + ", svrPort: " + svrPort);
+//            Log.d(TAG, "[send_check_sip_activation] strTargetIP: " + strTargetIP + ", svrPort: " + svrPort);
             SetServerIPConfig(strTargetIP, svrPort);
             SendXMLDoc(makeXMLMsg(strMessage), true);
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_check_sip_activation(String strTargetIP, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }

+ 31 - 8
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Request_lobby_open.java

@@ -7,6 +7,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
 import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
 
 public class Request_lobby_open extends WallPadiMAPClient {
     String TAG = "Request_lobby_open";
@@ -42,9 +43,12 @@ public class Request_lobby_open extends WallPadiMAPClient {
             //XML Header 생성
             XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
                     "<imap ver = \"1.0\" address = \"" + DeviceIP + "\" sender = \"" + DeviceDong + "동 " + DeviceHo + "호" + "\">\r\n";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Request_lobby_open(Context context)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -54,9 +58,13 @@ public class Request_lobby_open extends WallPadiMAPClient {
                     "   <service type=\"request\" name=\"lobby_open\"/>\r\n" +
                     "</imap>";
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeXMLMsg(String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return null;
         }
     }
@@ -65,18 +73,24 @@ public class Request_lobby_open extends WallPadiMAPClient {
         try {
             svrIP = strIPAddress;
             svrPort = nPort;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setServerInfo(String strIPAddress, int nPort)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     public void setResultCtrl(RetProci retProci) {
         try {
             Proc = retProci;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setResultCtrl(RetProci retProci)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -87,7 +101,9 @@ public class Request_lobby_open extends WallPadiMAPClient {
                 String result = GetAttributeVal(0, "result");
                 if (result != null) {
                     if (result.equalsIgnoreCase("ok")) {
-                        if ((GetAttributeVal(0, "name").equalsIgnoreCase("lobby_open")) && (GetAttributeVal(0, "type").equalsIgnoreCase("reply"))) {
+                        String name = GetAttributeVal(0, "name");
+                        String type = GetAttributeVal(0, "type");
+                        if ((name!=null && name.equalsIgnoreCase("lobby_open")) && (type!=null && type.equalsIgnoreCase("reply"))) {
                             Proc.ProcSuccess();
                             return;
                         }
@@ -95,11 +111,14 @@ public class Request_lobby_open extends WallPadiMAPClient {
                 }
                 Proc.ProcError();
             } else {
-                Proc.ProcError();
+                if(Proc!=null) Proc.ProcError();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ProcComplite()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -112,9 +131,13 @@ public class Request_lobby_open extends WallPadiMAPClient {
             SetServerIPConfig(strTargetIP, svrPort);
             SendXMLDoc(makeXMLMsg(strMessage), true);
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_lobby_open(String strTargetIP, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }

+ 31 - 8
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/imap/Request_visitor_access_info.java

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

+ 10 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/InquiryCallHistory_Manual.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
 import kr.co.icontrols.wallpadcall.declare.Global.ConfigValues;
@@ -79,9 +81,12 @@ public class InquiryCallHistory_Manual extends WpadScreen {
             TXT_MANUAL_NEXT = new WpadTextView(context, false, 183, 87, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.INQUIRYCALL_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_NEXT, Common.ManualMarginLEFT(594), Common.ManualMarginTOP(581));
             TXT_MANUAL_NEXT.setText(mContext.getString(R.string.manual_inquirycall_next));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] InquiryCallHistory_Manual(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -101,9 +106,12 @@ public class InquiryCallHistory_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 10 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/InquiryVisitorPictureHistory_Manual.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
 import kr.co.icontrols.wallpadcall.declare.ID;
@@ -68,9 +70,12 @@ public class InquiryVisitorPictureHistory_Manual extends WpadScreen {
             TXT_MANUAL_NEXT = new WpadTextView(context, false, 183, 87, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.INQUIRYVISITOR_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_NEXT, Common.ManualMarginLEFT(594), Common.ManualMarginTOP(581));
             TXT_MANUAL_NEXT.setText(mContext.getString(R.string.manual_inquiryvisit_next));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] InquiryVisitorPictureHistory_Manual(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -90,9 +95,12 @@ public class InquiryVisitorPictureHistory_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 10 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/MultiCallPopup_Manual.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
 import kr.co.icontrols.wallpadcall.declare.ID;
@@ -46,9 +48,12 @@ public class MultiCallPopup_Manual extends WpadScreen {
             TXT_MANUAL_DECLINE = new WpadTextView(context, false, 270, 84, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.POPUP_MULTICALL_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_DECLINE, Common.ManualMarginLEFT(703), Common.ManualMarginTOP(482));
             TXT_MANUAL_DECLINE.setText(mContext.getString(R.string.manual_popup_multicall_decline));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] MultiCallPopup_Manual(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -68,9 +73,12 @@ public class MultiCallPopup_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 10 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/RemoteCallPopup_Manual.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
 import kr.co.icontrols.wallpadcall.declare.ID;
@@ -35,9 +37,12 @@ public class RemoteCallPopup_Manual extends WpadScreen {
             TXT_MANUAL = new WpadTextView(context, false, 840, 150, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.POPUP_REMOTECALL_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL, Common.ManualMarginLEFT(163), Common.ManualMarginTOP(130));
             TXT_MANUAL.setText(mContext.getString(R.string.manual_popup_remotecall));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] RemoteCallPopup_Manual(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -57,9 +62,12 @@ public class RemoteCallPopup_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 10 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/SmartIOTCamSetPopup_Manual.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
 import kr.co.icontrols.wallpadcall.declare.ID;
@@ -74,9 +76,12 @@ public class SmartIOTCamSetPopup_Manual extends WpadScreen {
             TXT_CANCEL = new WpadTextView(context, false, 350, 75, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.POPUP_SMARTIOTSETTING_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_CANCEL, 896, 640);
             TXT_CANCEL.setText(mContext.getString(R.string.manual_smartiotset_cancel));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SmartIOTCamSetPopup_Manual(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -96,9 +101,12 @@ public class SmartIOTCamSetPopup_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 9 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkFront_Manual.java

@@ -9,6 +9,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -156,9 +157,12 @@ public class TalkFront_Manual extends WpadScreen {
                 ViewRegistration(layout, TXT_MANUAL_BRIGHT, Common.ManualMarginLEFT(1006), Common.ManualMarginTOP(694));
                 TXT_MANUAL_BRIGHT.setText(mContext.getString(R.string.manual_talkfront_bright));
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkFront_Manual(Context context, RelativeLayout layout, WallPadAPI wapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -178,9 +182,12 @@ public class TalkFront_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 9 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkGuard_Manual.java

@@ -9,6 +9,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -129,9 +130,12 @@ public class TalkGuard_Manual extends WpadScreen {
                 ViewRegistration(layout, TXT_MANUAL_VOLUME, Common.ManualMarginLEFT(287), Common.ManualMarginTOP(689));
                 TXT_MANUAL_VOLUME.setText(mContext.getString(R.string.manual_talkguard_volume));
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkGuard_Manual(Context context, RelativeLayout layout, WallPadAPI wapi)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -151,9 +155,12 @@ public class TalkGuard_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 9 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkLobby_Manual.java

@@ -9,6 +9,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.engine.CallManager.CALLSTATUS;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -145,8 +146,11 @@ public class TalkLobby_Manual extends WpadScreen {
             TXT_MANUAL_VOLUME = new WpadTextView(context, false, 280, 66, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.TALKLOBBY_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_VOLUME, Common.ManualMarginLEFT(703), Common.ManualMarginTOP(694));
             TXT_MANUAL_VOLUME.setText(mContext.getString(R.string.manual_talklobby_volume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -183,9 +187,12 @@ public class TalkLobby_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 9 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkPSTN_Manual.java

@@ -9,6 +9,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -84,9 +85,12 @@ public class TalkPSTN_Manual extends WpadScreen {
             TXT_MANUAL_VOLUME = new WpadTextView(context, false, 280, 87, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.TALKPSTN_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_VOLUME, Common.ManualMarginLEFT(738), Common.ManualMarginTOP(681));
             TXT_MANUAL_VOLUME.setText(mContext.getString(R.string.manual_talkpstn_volume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkPSTN_Manual(Context context, RelativeLayout layout, WallPadAPI wapi)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -106,9 +110,12 @@ public class TalkPSTN_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 9 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/TalkResidence_Manual.java

@@ -9,6 +9,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -119,9 +120,12 @@ public class TalkResidence_Manual extends WpadScreen {
             TXT_MANUAL_VOLUME = new WpadTextView(context, false, 280, 87, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.TALKRESIDENCE_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_VOLUME, Common.ManualMarginLEFT(738), Common.ManualMarginTOP(681));
             TXT_MANUAL_VOLUME.setText(mContext.getString(R.string.manual_talkresi_volume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkResidence_Manual(Context context, RelativeLayout layout, WallPadAPI wapi)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -141,9 +145,12 @@ public class TalkResidence_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 10 - 2
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/manual/VisitorPictureViewer_Manual.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
 import kr.co.icontrols.wallpadcall.declare.ID;
@@ -61,9 +63,12 @@ public class VisitorPictureViewer_Manual extends WpadScreen {
             TXT_MANUAL_NEXT = new WpadTextView(context, false, 183, 87, Gravity.LEFT, Color.WHITE, Common.fontsize._20, false, ID.MANUAL.VISITORVIEWER_MANUAL.ELEMENT.TEXT.INFO);
             ViewRegistration(layout, TXT_MANUAL_NEXT, Common.ManualMarginLEFT(594), Common.ManualMarginTOP(581));
             TXT_MANUAL_NEXT.setText(mContext.getString(R.string.manual_visitviewer_prev));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] VisitorPictureViewer_Manual(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -83,9 +88,12 @@ public class VisitorPictureViewer_Manual extends WpadScreen {
             if (nEvent == MotionEvent.ACTION_UP) {
                 super.finish();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 41 - 10
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/DeleteItems.java

@@ -1,6 +1,7 @@
 package kr.co.icontrols.wallpadcall.popup;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import android.content.Context;
 import android.content.Intent;
@@ -92,9 +93,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
             TXT_INSTRUCTION.setText(strTXT_INSTRUCTION);
 
             super.setFinishTimerCreate(Common.FINISH_TIME_POPUP_DELETE_ITEMS);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DeleteItems(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,9 +125,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
             } else {
                 LOG_WARN("[Initialize] mIntent is null!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -135,9 +142,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
             MainActivity.mIOInterface.ctrlPopupGUI(false);
             setPopupResult(ID.POPUP.DELETE_ITEMS.ELEMENT.BUTTON.CANCEL, strPopupType);
             MainActivity.mCallController.releasePopupEventListener();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -146,9 +156,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -170,9 +183,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
                 }
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -185,9 +201,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
             data.putExtra("TYPE", strItemType);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -195,9 +214,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
     public void onCallerID(String strCallerID) {
         try {
             LOG_INFO("[onCallerID strCallerID [" + strCallerID + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallerID(String strCallerID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -205,9 +227,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
     public void onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo) {
         try {
             LOG_INFO("[onCallerID eCallType [" + eCallType + "], eCallStatus [" + eCallStatus + "], strRemoteInfo [" + strRemoteInfo + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -215,9 +240,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
     public void onShowPopupRemoteVideo(boolean bShow) {
         try {
             LOG_INFO("[onShowPopupRemoteVideo] bShow [" + bShow + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowPopupRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -225,9 +253,12 @@ public class DeleteItems extends WpadScreen implements PopupEventListener {
         try {
             LOG_INFO("[onOutSideTouchExit]");
             setPopupResult(ID.POPUP.DELETE_ITEMS.ELEMENT.BUTTON.CANCEL, strPopupType);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 41 - 10
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/MultiCall.java

@@ -11,6 +11,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.engine.CallController.PopupEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -116,9 +117,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
             TXT_INSTRUCTION.setText(strTXT_INSTRUCTION);
 
             MainActivity.mIOInterface.ctrlPopupGUI(true); // 멀티콜 팝업 클래스 생성시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] MultiCall(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -153,9 +157,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
             } else {
                 LOG_WARN("[Initialize] mIntent is null!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -173,9 +180,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
 //            Log.d(TAG, "[onClose] eCallPath: " + eCallPath);
 //            if ((eCallPath == CALLPATH.MOIP_V40_LOBBY) || ((eCallPath == CALLPATH.MOIP_V40_GUARD) && (ConfigValues.bGuardVideoEnable)))
             MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 로비 또는 경비(영상)일 경우, 팝업 닫힐 경우 GUI 화면이 아래로(영상이 위로)
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -184,9 +194,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -233,9 +246,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
                     ((PopupActivity) mContext).StartManual(ID.MANUAL.MANUAL_POPUPMULTICALL);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -257,9 +273,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
             data.putExtra("POPUP_BTN", nInput);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -270,9 +289,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
             strTXT_REMOTENAME = strCallerID;
             TXT_REMOTENAME.setText(strTXT_REMOTENAME);
             if (strTXT_REMOTENAME.equals("NONE")) strTXT_REMOTENAME = "전화가 왔습니다.";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallerID(String strCallerID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -298,9 +320,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
 
             IMG_ICON.setImageResource(nICON_ID);
             TXT_REMOTENAME.setText(strTXT_REMOTENAME);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -308,9 +333,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
     public void onShowPopupRemoteVideo(boolean bShow) {
         try {
             LOG_INFO("[onShowPopupRemoteVideo] bShow [" + bShow + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowPopupRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -329,9 +357,12 @@ public class MultiCall extends WpadScreen implements PopupEventListener {
         try {
             LOG_INFO("[onOutSideTouchExit]");
             setPopupResult(ID.POPUP.MUTICALL.ELEMENT.BUTTON.REJECT);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 37 - 9
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/MultiCall_Notice.java

@@ -1,6 +1,7 @@
 package kr.co.icontrols.wallpadcall.popup;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import android.content.Context;
 import android.content.Intent;
@@ -100,9 +101,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
             super.setFinishTimerCreate(Common.FINISH_TIME_POPUP_NOTICE);
 
             MainActivity.mIOInterface.ctrlPopupGUI(true); // 멀티콜알림 팝업 생성시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] MultiCall(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -139,9 +143,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
             } else {
                 LOG_WARN("[Initialize] mIntent is null!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -175,9 +182,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
                 }
             }
             MainActivity.mCallController.releasePopupEventListener();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -186,9 +196,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -206,9 +219,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
                 }
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -220,9 +236,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
             data.putExtra("POPUP_BTN", nInput);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -232,9 +251,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
             LOG_INFO("[onCallerID] strCallerID [" + strCallerID + "]");
             strTXT_REMOTENAME = strCallerID;
             TXT_REMOTENAME.setText(strTXT_REMOTENAME);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallerID(String strCallerID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -242,9 +264,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
     public void onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo) {
         try {
             LOG_INFO("[onCallerID eCallType [" + eCallType + "], eCallStatus [" + eCallStatus + "], strRemoteInfo [" + strRemoteInfo + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -252,9 +277,12 @@ public class MultiCall_Notice extends WpadScreen implements PopupEventListener {
     public void onShowPopupRemoteVideo(boolean bShow) {
         try {
             LOG_INFO("[onShowPopupRemoteVideo] bShow [" + bShow + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowPopupRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 

+ 33 - 8
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/MultiCall_Record.java

@@ -10,6 +10,7 @@ import android.view.View;
 import android.widget.RelativeLayout;
 
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.engine.CallController.PopupEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -78,9 +79,12 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
             TXT_MENT.setText(strTXT_MENT);
 
             MainActivity.mIOInterface.ctrlPopupGUI(true); // 거동수상자 녹화 알림 팝업 클래스 생성시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] MultiCall_Record(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -95,9 +99,12 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
             } else {
                 Log.w(TAG, "[Initialize] mIntent is null!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -108,9 +115,12 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
             MainActivity.mCallController.releasePopupEventListener();
             MainActivity.mCallController.stop2ndCallTimer();
             MainActivity.mIOInterface.ctrlPopupGUI(false); // 팝업 닫힐 경우 GUI 화면이 아래로(영상이 위로)
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -134,9 +144,12 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
                     super.finish();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         } 
     }
         
@@ -145,9 +158,12 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
     public void onCallerID(String strCallerID) {
         try {
             Log.d(TAG, "[onCallerID strCallerID [" + strCallerID + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallerID(String strCallerID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -155,9 +171,12 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
     public void onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo) {
         try {
             Log.d(TAG, "[onCallerID eCallType [" + eCallType + "], eCallStatus [" + eCallStatus + "], strRemoteInfo [" + strRemoteInfo + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMulticallChange(CALLTYPE eCallType, CALLSTATUS eCallStatus, String strRemoteInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -173,18 +192,24 @@ public class MultiCall_Record extends WpadScreen implements PopupEventListener {
             data.putExtra("POPUP_BTN", nInput);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     protected void onOutSideTouchExit() {
         try {
             setPopupResult(ID.POPUP.MULTICALL_RECORD.ELEMENT.BUTTON.CANCEL);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 22 - 5
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeRemoteCall.java

@@ -9,6 +9,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.callengine.engine.CallManager.CALLPATH;
 import kr.co.icontrols.wallpadcall.MainActivity;
 import kr.co.icontrols.wallpadcall.PopupActivity;
@@ -68,9 +70,12 @@ public class NoticeRemoteCall extends WpadScreen {
             TXT_INSTRUCTION2.setText(strINSTRUCTION2);
 
             MainActivity.mIOInterface.ctrlPopupGUI(true); // 모바일 통화중 팝업 생성시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NoticeRemoteCall(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -80,9 +85,12 @@ public class NoticeRemoteCall extends WpadScreen {
         try {
             Log.d(TAG, "[onClose]");
 //            MainActivity.mIOInterface.ctrlPopupGUI(true); // 모바일 통화중 팝업 닫힘시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -105,9 +113,12 @@ public class NoticeRemoteCall extends WpadScreen {
                     ((PopupActivity) mContext).StartManual(ID.MANUAL.MANUAL_POPUPREMOTECALL);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -121,9 +132,12 @@ public class NoticeRemoteCall extends WpadScreen {
             data.putExtra("POPUP_BTN", nInput);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nInput)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -141,9 +155,12 @@ public class NoticeRemoteCall extends WpadScreen {
     protected void onOutSideTouchExit() {
         try {
             setPopupResult(ID.POPUP.NOTICE_REMOTECALL.ELEMENT.BUTTON.END);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 30 - 7
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeSubPhoneTalk.java

@@ -9,6 +9,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.MainActivity;
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -84,18 +86,24 @@ public class NoticeSubPhoneTalk extends WpadScreen {
 
             super.setFinishTimerDestroy();
             MainActivity.mIOInterface.ctrlPopupGUI(true); // 서브폰 통화중 팝업 생성시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NoticeSubPhoneTalk(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     protected void Initialize() {
         try {
             LOG_INFO("[Initialize]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -105,9 +113,12 @@ public class NoticeSubPhoneTalk extends WpadScreen {
         try {
             LOG_INFO("[onClose]");
 //            MainActivity.mIOInterface.ctrlPopupGUI(true); // 서브폰 통화중 팝업 닫힘시 GUI 화면이 위로
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -116,9 +127,12 @@ public class NoticeSubPhoneTalk extends WpadScreen {
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -135,9 +149,12 @@ public class NoticeSubPhoneTalk extends WpadScreen {
                     super.finish();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -151,9 +168,12 @@ public class NoticeSubPhoneTalk extends WpadScreen {
             data.putExtra("POPUP_BTN", nInput);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -161,9 +181,12 @@ public class NoticeSubPhoneTalk extends WpadScreen {
         try {
             LOG_INFO("[onOutSideTouchExit]");
             setPopupResult(ID.POPUP.NOTICE_SUBPHONETALK.ELEMENT.BUTTON.END);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 14 - 3
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeTakePicture.java

@@ -8,6 +8,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.MainActivity;
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -56,9 +58,12 @@ public class NoticeTakePicture extends WpadScreen {
             TXT_INSTRUCTION2 = new WpadTextView(context, false, 984, 90, Gravity.CENTER, Color.GRAY, Common.fontsize._20, false, ID.POPUP.NOTICE_TAKEPICTURE.ELEMENT.TEXT.INSTRUCTION2);
             ViewRegistration(layout, TXT_INSTRUCTION2, Common.PopupAlarmMarginLEFT(147), Common.PopupAlarmMarginTOP(500));
             TXT_INSTRUCTION2.setText(strINSTRUCTION2);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NoticeTakePicture(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -67,9 +72,12 @@ public class NoticeTakePicture extends WpadScreen {
         super.onClose();
         try {
             Log.d(TAG, "[onClose]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -86,9 +94,12 @@ public class NoticeTakePicture extends WpadScreen {
                     finish();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 30 - 7
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/NoticeVideoRecord.java

@@ -11,6 +11,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.wallpadcall.MainActivity;
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
@@ -67,9 +69,12 @@ public class NoticeVideoRecord extends WpadScreen {
             TXT_INSTRUCTION2.setText(strINSTRUCTION2);
 
 //            setEndBTNStatus(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] NoticeVideoRecord(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -79,9 +84,12 @@ public class NoticeVideoRecord extends WpadScreen {
         try {
             Log.d(TAG, "[onClose]");
             mContext.unregisterReceiver(mVideoRecordBR);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -99,9 +107,12 @@ public class NoticeVideoRecord extends WpadScreen {
                     finish();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -113,9 +124,12 @@ public class NoticeVideoRecord extends WpadScreen {
             data.putExtra("POPUP_BTN", nInput);
 
             super.setPopupResult(data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setPopupResult(int nInput)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -138,9 +152,12 @@ public class NoticeVideoRecord extends WpadScreen {
 //                        setEndBTNStatus(false);
 //                    }
                 }
+            } catch (RuntimeException re) {
+                LogUtil.errorLogInfo("", TAG, re);
             } catch (Exception e) {
                 Log.e(TAG, "[Exception] onReceive(Context context, Intent intent)");
-                e.printStackTrace();
+                //e.printStackTrace();
+                LogUtil.errorLogInfo("", TAG, e);
             }
         }
     }
@@ -156,9 +173,12 @@ public class NoticeVideoRecord extends WpadScreen {
                 BTN_END.setButtonEventOffEnable(R.drawable.popup_btn_end_normal);
 //                ((MainActivity) mContext).TopHomeBtn.setButtonEventOffEnable(R.drawable.topbar_icon_home_disabled);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setEndBTNStatus");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -166,9 +186,12 @@ public class NoticeVideoRecord extends WpadScreen {
         try {
             // 팝업 영역 이외 터치시 저장 안함
             setPopupResult(ID.POPUP.NOTICE_VIDEORECORD.ELEMENT.BUTTON.END_NOT_SAVE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onOutSideTouchExit()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 100 - 38
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/popup/SmartIOTCamSetting.java

@@ -15,6 +15,7 @@ import com.artncore.WallPadDataMgr.WallpadStatusData;
 import com.artncore.commons.define;
 import com.artncore.wallpadapi.SmartKeyRfDoorAPI;
 import com.artncore.wallpadapi.WallPadAPI;
+import com.util.LogUtil;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -122,9 +123,12 @@ public class SmartIOTCamSetting extends WpadScreen {
             title.setText("스마트현관카메라 설정");
 
             DrawContents();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG,"[Exception] SmartIOTCamSetting(Context context, RelativeLayout layout, WallPadAPI wpapi, int operationMode)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -194,9 +198,13 @@ public class SmartIOTCamSetting extends WpadScreen {
                 Log.w(TAG, "[initInfo] mWallPadAPI.Check_Connect() FAIL!!");
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -224,9 +232,13 @@ public class SmartIOTCamSetting extends WpadScreen {
                     ", Period [" + mCurrentSensorPeriod + "], Brightness [" + mCurrentCamBrightness + "]");
 
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] GetDBConfigValue()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -257,9 +269,12 @@ public class SmartIOTCamSetting extends WpadScreen {
                     Log.w(TAG, "[SaveDBConfigValue] smartKeyRfDoorAPI is null!!");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] SaveDBConfigValue()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -332,7 +347,7 @@ public class SmartIOTCamSetting extends WpadScreen {
             for (int j = 0; j < SET_CNT; j++) {
                 textTitle[arrayIdx] = new WpadTextView(this.getContext(), false, 360, 54, Gravity.LEFT, 0xff966432, Common.fontsize._36, false, ID.POPUP.SMARTIOT_SETTING.ELEMENT.TEXT.SET_TEXT);
                 ViewRegistration(this.getLayout(), textTitle[arrayIdx], Common.PopupNormalMarginLEFT(236), Common.PopupNormalMarginTOP(278 + 90 * arrayIdx));
-                textTitle[arrayIdx].setText(SettingData.get(j).mTitle);
+                if(textTitle[arrayIdx]!=null) textTitle[arrayIdx].setText(SettingData.get(j).mTitle);
 
                 textValue[arrayIdx] = new WpadTextView(this.getContext(), false, 254, 54, Gravity.CENTER, Color.WHITE, Common.fontsize._36, true, ID.POPUP.SMARTIOT_SETTING.ELEMENT.TEXT.TEXT1 + arrayIdx);
                 ViewRegistration(this.getLayout(), textValue[arrayIdx], Common.PopupNormalMarginLEFT(717), Common.PopupNormalMarginTOP(278 + 90 * arrayIdx));
@@ -345,22 +360,26 @@ public class SmartIOTCamSetting extends WpadScreen {
 
                 SettingData.get(j).SetViewIdx(arrayIdx);
 
-                if (SettingData.get(j).mTitle.equals(TXT_SENSOR_SENSITIVITY)) {
+                SetKind item = SettingData.get(j);
+                if (item.mTitle.equals(TXT_SENSOR_SENSITIVITY)) {
                     DrawSensorSensitivity(mCurrentSensitivity);
                 }
-                if (SettingData.get(j).mTitle.equals(TXT_SENSOR_PERIOD)) {
+                if (item.mTitle.equals(TXT_SENSOR_PERIOD)) {
                     DrawSensorPeriod(mCurrentSensorPeriod);
                 }
-                if (SettingData.get(j).mTitle.equals(TXT_CAM_BRIGHTNESS)) {
+                if (item.mTitle.equals(TXT_CAM_BRIGHTNESS)) {
                     DrawCamBrightness(mCurrentCamBrightness);
                 }
                 arrayIdx++;
             }
 
             DrawTakingPicSet(bCurrentTakingPicSet);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DrawContents()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -393,9 +412,12 @@ public class SmartIOTCamSetting extends WpadScreen {
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getViewIdx(String searchName)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return retIdx;
     }
@@ -445,9 +467,12 @@ public class SmartIOTCamSetting extends WpadScreen {
 //
 //            bCurrentTakingPicSet = false;
 //            MainActivity.mSound.Play(WpadSound.SND.effect.WARNING005); // 통신 실패시
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] changeTakingPicSet(boolean bUse)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -458,9 +483,12 @@ public class SmartIOTCamSetting extends WpadScreen {
 //                Log.d(TAG, "[ctrlSmartIOTCamStatusMode] result [" + result + "]");
 //                return result;
 //            } else Log.w(TAG, "[ctrlSmartIOTCamStatusMode] smartKeyRfDoorAPI is null!!");
-//        } catch (Exception e) {
+//        } catch (RuntimeException re) {
+//                LogUtil.errorLogInfo("", TAG, re);
+//            } catch (Exception e) {
 //            Log.e(TAG, "[Exception] ctrlSmartIOTCamStatusMode(byte mode)");
-//            e.printStackTrace();
+//            //e.printStackTrace();
+            //LogUtil.errorLogInfo("", TAG, e);
 //        }
 //        return -1;
 //    }
@@ -472,7 +500,9 @@ public class SmartIOTCamSetting extends WpadScreen {
 //                Log.d(TAG, "[ctrlSmartIOTCCamLEDMode] result [" + result + "]");
 //                return result;
 //            } else Log.w(TAG, "[ctrlSmartIOTCCamLEDMode] smartKeyRfDoorAPI is null!!");
-//        } catch (Exception e) {
+//        } catch (RuntimeException re) {
+//                LogUtil.errorLogInfo("", TAG, re);
+//            } catch (Exception e) {
 //            Log.e(TAG, "[Exception] ctrlSmartIOTCamLEDMode(byte mode)");
 //            e.printStackTrace();
 //        }
@@ -507,9 +537,12 @@ public class SmartIOTCamSetting extends WpadScreen {
                     btnNext[i].setButtonEventOffEnable(R.drawable.btn_box_next_disabled);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DrawTakingPicSet(boolean bSet)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -526,27 +559,34 @@ public class SmartIOTCamSetting extends WpadScreen {
             }
 
             DrawSensorSensitivity(mCurrentSensitivity);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ChangeSensorSensitivity(boolean Up)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void DrawSensorSensitivity(int val) {
         try {
             int idx = getViewIdx(TXT_SENSOR_SENSITIVITY);
-            textValue[idx].setText(String.valueOf(val));
+            if(textValue[idx]!=null)
+                textValue[idx].setText(String.valueOf(val));
             if (val == MAX_SENSOR_SENSITIVITY) {
-                btnNext[idx].setButtonRearImage();
+                if(btnNext[idx]!=null)btnNext[idx].setButtonRearImage();
             } else if (val == MIN_SENSOR_SENSITIVITY) {
-                btnPrev[idx].setButtonRearImage();
+                if(btnPrev[idx]!=null)btnPrev[idx].setButtonRearImage();
             } else {
-                btnNext[idx].setButtonFrontImage();
-                btnPrev[idx].setButtonFrontImage();
+                if(btnNext[idx]!=null)btnNext[idx].setButtonFrontImage();
+                if(btnPrev[idx]!=null) btnPrev[idx].setButtonFrontImage();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DrawSensorSensitivity(int val)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -563,9 +603,12 @@ public class SmartIOTCamSetting extends WpadScreen {
             }
 
             DrawSensorPeriod(mCurrentSensorPeriod);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ChangeSensorPeriod(boolean Up)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -573,18 +616,24 @@ public class SmartIOTCamSetting extends WpadScreen {
         try {
             Log.d(TAG, "[DrawSensorPeriod] val [" + val + "]");
             int idx = getViewIdx(TXT_SENSOR_PERIOD);
-            textValue[idx].setText(String.valueOf(val) + TXT_SECOND);
+            if(textValue[idx]!=null)
+                textValue[idx].setText(String.valueOf(val) + TXT_SECOND);
             if (val == MAX_SENSOR_PERIOD) {
-                btnNext[idx].setButtonRearImage();
+                if(btnNext[idx]!=null)
+                    btnNext[idx].setButtonRearImage();
             } else if (val == MIN_SENSOR_PERIOD) {
-                btnPrev[idx].setButtonRearImage();
+                if(btnPrev[idx]!=null)
+                    btnPrev[idx].setButtonRearImage();
             } else {
-                btnNext[idx].setButtonFrontImage();
-                btnPrev[idx].setButtonFrontImage();
+                if(btnNext[idx]!=null) btnNext[idx].setButtonFrontImage();
+                if(btnPrev[idx]!=null) btnPrev[idx].setButtonFrontImage();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DrawSensorPeriod(int val)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -601,9 +650,12 @@ public class SmartIOTCamSetting extends WpadScreen {
             }
 
             DrawCamBrightness(mCurrentCamBrightness);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ChangeCamBrightness(boolean Up)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -611,18 +663,22 @@ public class SmartIOTCamSetting extends WpadScreen {
         try {
             Log.d(TAG, "[DrawCamBrightness] val [" + val + "]");
             int idx = getViewIdx(TXT_CAM_BRIGHTNESS);
-            textValue[idx].setText(String.valueOf(val));
+            if(textValue[idx]!=null)
+                textValue[idx].setText(String.valueOf(val));
             if (val == MAX_BRIGHTNESS) {
-                btnNext[idx].setButtonRearImage();
+                if(btnNext[idx]!=null) btnNext[idx].setButtonRearImage();
             } else if (val == MIN_BRIGHTNESS) {
-                btnPrev[idx].setButtonRearImage();
+                if(btnPrev[idx]!=null)btnPrev[idx].setButtonRearImage();
             } else {
-                btnNext[idx].setButtonFrontImage();
-                btnPrev[idx].setButtonFrontImage();
+                if(btnNext[idx]!=null) btnNext[idx].setButtonFrontImage();
+                if(btnPrev[idx]!=null) btnPrev[idx].setButtonFrontImage();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] DrawCamBrightness(int val)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -660,9 +716,12 @@ public class SmartIOTCamSetting extends WpadScreen {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -673,9 +732,12 @@ public class SmartIOTCamSetting extends WpadScreen {
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 133 - 31
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/InquiryCallHistory.java

@@ -10,6 +10,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import java.util.ArrayList;
 
 import kr.co.icontrols.callengine.engine.CallController.CallEventListener;
@@ -220,9 +222,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 nViewGuide_Y += 90 + idx * 90;
             }
             getHistoryFromDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] InquiryCallHistory(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -239,9 +244,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             if (ConfigValues.bEasyModeUse) LIST_CNT = LIST_CNT_EASYMODE;
 
             initHistoryPageInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -253,9 +261,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             ((MainActivity) mContext).finishPopUp(ID.POPUP.POPUP_ALL);
             ((MainActivity) mContext).finishManual(ID.MANUAL.MANUAL_ALL);
             ((MainActivity) mContext).releaseMainEventListener();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -264,9 +275,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -308,9 +322,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 }
             }
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -322,9 +339,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 Sound().Play(SND.effect.TOUCH_LATCHED);
                 finishWallpadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -336,9 +356,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 ((MainActivity) mContext).finishPopUp(ID.POPUP.POPUP_ALL);
                 ((MainActivity) mContext).finishManual(ID.MANUAL.MANUAL_ALL);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strRemoteIP, String strRemoteSIPID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -346,9 +369,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
     public void onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage) {
         try {
             LOG_INFO("[onSubPhoneEvent] eCallOwner [" + eCallOwner + "], eCallStatus [" + eCallStatus + "], eCallType [" + eCallType + "], strTargetID [" + strTargetID + "], strMessage [" + strMessage + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -356,9 +382,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
     public void onVideoSet(boolean bSet, String strRemoteSIPID) {
         try {
             LOG_INFO("[onVideoSet] bSet [" + bSet + "], strRemoteSIPID [" + strRemoteSIPID + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onVideoSet(boolean bSet, String strRemoteSIPID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -366,9 +395,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
     public void onShowRemoteVideo(boolean bShow) {
         try {
             LOG_INFO("[onShowRemoteVideo] bShow [" + bShow + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -398,9 +430,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                     getHistoryFromDB();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -429,9 +464,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             LOG("[tryAutoCall] eCallResult [" + eCallResult + "]");
             if (eCallResult == CALLTYPE.LOBBY || eCallResult == CALLTYPE.NONE) return false;
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] tryAutoCall() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -459,9 +498,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 LOG("[getGuardName] There is no guard name match with IP [" + strGuardIP + "]");
                 return "NONE";
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardName(strGuardIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -518,9 +561,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             }
             LOG("[makeUnitName] strResult = " + strResult);
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeUnitName(strName) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -540,9 +587,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             String strResult = strDate + " " + strTime;
             LOG("[makeUnitTimestamp] strResult = " + strResult);
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeUnitTimestamp(strTimestamp) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -580,9 +631,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             }
             LOG("[makeUnitType] strResult = " + strResult);
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeUnitType(strResultType) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -598,9 +653,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
 
             if (bChecked) showPopupDeleteSelectedItem();
             else resetCheckBox();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteCheckedItems()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -614,9 +672,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 mLIST_VALUE[i].CHECK = false;
             }
             MainActivity.mCallHistoryManager.deleteHistoryList(Declare.DBInfo.TABLE_NAME_HISTORY_CALL, SelectedIDs);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteSelectedItems()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -624,9 +685,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
         try {
             MainActivity.mCallHistoryManager.deleteDBFile();
             MainActivity.mCallHistoryManager.initCallHistory(mContext);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteAllItems()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -654,9 +718,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                 }
                 mLIST_VALUE[nIndex].CHECK = true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkSelectedLists(int nIndex)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -673,9 +740,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                     mLIST[i].BTN_CHECK.setVisibility(nVisibility);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showCheckBox(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -691,9 +761,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                         mLIST[i].BTN_CHECK.setImageChange(R.drawable.cir_check_bar_normal_gray, R.drawable.cir_check_bar_selected);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetCheckBox()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -702,9 +775,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             Intent data = new Intent();
             data.putExtra("TYPE", "CallHistoryItems");
             ((MainActivity) (getContext())).startPopup(ID.POPUP.POPUP_DELETE_ITEMS, data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showPopupDeleteSelectedItem()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -713,9 +789,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             Intent data = new Intent();
             data.putExtra("TYPE", "CallHistoryItems_All");
             ((MainActivity) (getContext())).startPopup(ID.POPUP.POPUP_DELETE_ITEMS, data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showPopupDeleteAllItem()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -733,9 +812,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             else if (eCallType == CALLTYPE.PSTN)
                 return "전화";
             else return "경비실";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "경비실";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getNameImgText(String strIPAddress)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "경비실";
         }
     }
@@ -748,9 +831,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             else if (strName.contains("번호정보없음")) return false;
             else if (strName.contains("NONE")) return false;
             else return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] activateTalkBTN(String strName)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -844,9 +931,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
 
             strText_PageNo = nCurrentPage + "/" + nTotalPage;
             TXT_PAGE.setText(strText_PageNo);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getHistoryFromDB()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -858,9 +948,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             nTotalPage = ((nHistoryCnt + LIST_CNT - 1) / LIST_CNT);
             LOG("[initHistoryPageInfo] nTotalPage = " + nTotalPage);
             nCurrentPage = 1;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initHistoryPageInfo() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -870,9 +963,12 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             nCurrentPage--;
             if (nCurrentPage < 1) nCurrentPage = nTotalPage;
             getHistoryFromDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] prevPage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -882,18 +978,24 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
             nCurrentPage++;
             if (nCurrentPage > nTotalPage) nCurrentPage = 1;
             getHistoryFromDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] nextPage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void finishWallpadCallApp() {
         try {
             super.finish();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallpadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 124 - 30
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/InquiryVisitorPictureHistory.java

@@ -11,6 +11,8 @@ import android.view.View;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import java.io.File;
 import java.util.ArrayList;
 
@@ -224,9 +226,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             ViewRegistration(layout, BTN_DELETE_ALL, Common.ImgPosition.GetX(980), Common.ImgPosition.GetY(382));
 
             getHistoryFromDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] InquiryVisitorPictureHistory(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -245,9 +250,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
 
             super.setFinishTimerCreate(Common.FINISH_TIME_START_SCREEN);
             initHistoryPageInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -261,9 +269,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             ((MainActivity) mContext).releaseMainEventListener();
             ((MainActivity) mContext).setTopSetBtnVisible(false);
 //            ((MainActivity) mContext).checkMemoryUsage(); // 메모리 체크
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -272,9 +283,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -317,9 +331,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -331,9 +348,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                 Sound().Play(SND.effect.TOUCH_LATCHED);
                 finishWallpadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -345,9 +365,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                 ((MainActivity) mContext).finishPopUp(ID.POPUP.POPUP_ALL);
                 ((MainActivity) mContext).finishManual(ID.MANUAL.MANUAL_ALL);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strRemoteIP, String strRemoteSIPID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -355,9 +378,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
     public void onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage) {
         try {
             LOG_INFO("[onSubPhoneEvent] eCallOwner [" + eCallOwner + "], eCallStatus [" + eCallStatus + "], eCallType [" + eCallType + "], strTargetID [" + strTargetID + "], strMessage [" + strMessage + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -365,9 +391,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
     public void onVideoSet(boolean bSet, String strRemoteSIPID) {
         try {
             LOG_INFO("[onVideoSet] bSet [" + bSet + "], strRemoteSIPID [" + strRemoteSIPID + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onVideoSet(boolean bSet, String strRemoteSIPID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -375,9 +404,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
     public void onShowRemoteVideo(boolean bShow) {
         try {
             LOG_INFO("[onShowRemoteVideo] bShow [" + bShow + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -407,9 +439,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                     getHistoryFromDB();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -423,9 +458,13 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                 LOG("[getGuardName] There is no guard name match with IP [" + strGuardIP + "]");
                 return "NONE";
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardName(strGuardIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -470,9 +509,13 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                 if (strResult.equals("현관")) return String.format("[%s] ", strResult);
                 else return String.format("[%s]\n", strResult);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeUnitName(strName) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -488,9 +531,13 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             String strResult = strDate + " " + strTime;
             LOG("[makeUnitTimestamp] strResult = " + strResult);
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return "ERROR";
         } catch (Exception e) {
             Log.e(TAG, "[Exception] makeUnitTimestamp(strTimestamp) : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return "ERROR";
         }
     }
@@ -500,9 +547,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             LOG("[runPictureViewer] nID [" + nID + "]");
             Global.strVisitorPictureID = mVisitorPictureHistoryInfoTable.getVisitorPictureHistoryInfo(nID).getID();
             super.setChangeScreen(ID.SCREEN.SCREEN_VISITORPICTUREVIEWER);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runPictureViewer(int nID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -528,7 +578,9 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
 //            }
 //
 //            if (decryptFolder.exists()) {
-//                File decryptFile = new File(Declare.DBInfo.DIRECTORY_URI_DECRYPTED_VISITORPICTURE + "/" + fileName);
+//                //File decryptFile = new File(Declare.DBInfo.DIRECTORY_URI_DECRYPTED_VISITORPICTURE + "/" + fileName);
+//                //파일 복호화 하는 경우, 기존 경로와 맞지 않아서 방문자 사진 리스트에서 보이지 않는 이슈 발생 수정
+//                File decryptFile = mFile;
 //                File tempFile = ((MainActivity) mContext).decryptPictureFile(new File(define.VISITOR_PICTURE_LOCATION + "/ENCRYPTED_" + fileName), decryptFile); // 사진 복호화화여 로딩
 //                if (tempFile != null) {
 //                    Bitmap mBitmap = BitmapFactory.decodeFile(tempFile.getPath());
@@ -543,9 +595,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
 //                    LOG_WARN("[drawVisitorPicture] tempFile is null!! [" + tempFile.getPath() + "]");
 //                }
 //            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVisitorPicture(String strURI)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -564,9 +619,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                     mLIST[nIndex].BTN_CHECK.setImageChange(R.drawable.photo_check_selected, R.drawable.photo_check_normal);
                 mLIST_VALUE[nIndex].CHECK = true;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] checkSelectedLists(int nIndex)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -583,9 +641,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                     mLIST[i].BTN_CHECK.setVisibility(View.VISIBLE);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showCheckBox(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -603,9 +664,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
 
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] resetCheckBox()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -623,9 +687,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             if (bChecked) showPopupDeleteSelectedItem();
             else resetCheckBox();
             bChecked = false;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteCheckedItems()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -642,9 +709,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             }
             MainActivity.mVisitorPictureHistoryManager.deleteHistoryList(Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE, SelectedIDs);
             MainActivity.mVisitorPictureHistoryManager.deleteHistoryList(SelectedURIs);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteSelectedItems()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -653,9 +723,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             MainActivity.mVisitorPictureHistoryManager.deleteDBFile();
             MainActivity.mVisitorPictureHistoryManager.deleteVisitorPictureDirectory();
             MainActivity.mVisitorPictureHistoryManager.initVisitorPictureHistory(mContext);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteAllItems()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -664,9 +737,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             Intent data = new Intent();
             data.putExtra("TYPE", "VisitorPictures");
             ((MainActivity) (getContext())).startPopup(ID.POPUP.POPUP_DELETE_ITEMS, data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showPopupDeleteSelectedItem()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -675,9 +751,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             Intent data = new Intent();
             data.putExtra("TYPE", "VisitorPictures_All");
             ((MainActivity) (getContext())).startPopup(ID.POPUP.POPUP_DELETE_ITEMS, data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showPopupDeleteAllItem()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -762,9 +841,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             showCheckBox(false);
             strText_PageNo = nCurrentPage + "/" + nTotalPage;
             TXT_PAGE.setText(strText_PageNo);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getHistoryFromDB()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -776,9 +858,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             nTotalPage = ((nHistoryCnt + LIST_CNT - 1) / LIST_CNT);
             LOG("[initHistoryPageInfo] nTotalPage = " + nTotalPage);
             nCurrentPage = 1;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initHistoryPageInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -788,9 +873,12 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             nCurrentPage--;
             if (nCurrentPage < 1) nCurrentPage = nTotalPage;
             getHistoryFromDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] prevPage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -800,18 +888,24 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
             nCurrentPage++;
             if (nCurrentPage > nTotalPage) nCurrentPage = 1;
             getHistoryFromDB();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] nextPage()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void finishWallpadCallApp() {
         try {
             super.finish();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallpadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 325 - 87
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkFront.java


+ 302 - 108
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkGuard.java

@@ -21,6 +21,7 @@ import android.widget.SeekBar;
 import com.artncore.WallPadDataMgr.wallpaddbmgr;
 import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
 import com.artncore.wallpadimap.RetProci;
+import com.util.LogUtil;
 
 import kr.co.icontrols.callengine.engine.CallController.CallEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLEVENTTYPE;
@@ -35,6 +36,7 @@ import kr.co.icontrols.wallpadcall.MainActivity.MAINEVENT;
 import kr.co.icontrols.wallpadcall.MainActivity.MainEventListener;
 import kr.co.icontrols.wallpadcall.R;
 import kr.co.icontrols.wallpadcall.declare.Common;
+import kr.co.icontrols.wallpadcall.declare.DataClasses;
 import kr.co.icontrols.wallpadcall.declare.DataClasses.MultiCallInfo;
 import kr.co.icontrols.wallpadcall.declare.DataClasses.RemoteIDInfo;
 import kr.co.icontrols.wallpadcall.declare.DataClasses.SmartRFCamLEDMode;
@@ -216,9 +218,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             }
             displayScreenValues();
             sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkGuard(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -243,9 +248,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 if (MainActivity.bFFMPEGEnable) ((MainActivity)mContext).showRemoteVideo(false, false);
                 MainActivity.mCallController.mVideoJNI.setDecoderInfo_V40(76, 85, 576, 405); // 영상 좌표 재설정 (세대 통화 멀티콜 이후 상황 대비)
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -253,9 +261,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
         try {
             RemoteIDInfo.InitVariables();
             MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.GUARD, CALLSTATUS.IDLE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initCallVariables()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -264,6 +275,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
         super.onClose();
         try {
             LOG_INFO("[onClose]");
+            MainActivity.m_bRejectCall = false;
             if (MainActivity.mIOInterface != null) MainActivity.mIOInterface.ctrlWallPadLED_Call(false);
             if (mPathCheckHandler != null) {
                 mPathCheckHandler.removeMessages(0);
@@ -296,9 +308,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             MainActivity.mCallController.releaseCallEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
             Global.add1stCallHistoryInfoFinal();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -307,9 +322,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
         super.onBrReceive(intent);
         try {
 //            LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -338,6 +356,9 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                         } else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLED) {
                             doTalk(CALLOWNER.WALLPAD);
                         }
+                        else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TALKING) {
+                            doTalk(CALLOWNER.WALLPAD);
+                        }
                     } else if (nID == ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.MAINGATE) {
                         if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.IDLE) {
                             ((MainActivity) mContext).setMenuBTNEnable(false);
@@ -351,6 +372,9 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                         } else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLED) {
                             doTalk(CALLOWNER.WALLPAD);
                         }
+                        else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TALKING) {
+                            doTalk(CALLOWNER.WALLPAD);
+                        }
                     } else if (nID == ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.SUBGATE) {
                         if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.IDLE) {
                             ((MainActivity) mContext).setMenuBTNEnable(false);
@@ -364,6 +388,10 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                         } else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLED) {
                             doTalk(CALLOWNER.WALLPAD);
                         }
+                        else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TALKING) {
+                            doTalk(CALLOWNER.WALLPAD);
+                        }
+
                     } else if (nID == ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.OFFICE) {
                         if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.IDLE) {
                             ((MainActivity) mContext).setMenuBTNEnable(false);
@@ -377,6 +405,9 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                         } else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLED) {
                             doTalk(CALLOWNER.WALLPAD);
                         }
+                        else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TALKING) {
+                            doTalk(CALLOWNER.WALLPAD);
+                        }
                     } else if (nID == ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.TALK) {
                         Log.d(TAG, "[onTouchEvent] TALK BUTTON");
                         doTalk(CALLOWNER.WALLPAD);
@@ -385,9 +416,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -401,9 +435,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else if (eEvent == MAINEVENT.BTN_HOME_MOBILE) {
                 finishWallpadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -426,7 +463,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
         try {
             LOG_INFO("[onCallEvent] eCallOwner [" + eCallOwner + "], eCallStatus [" + eCallStatus + "], eCallType [" + eCallType + "], strRemoteIP [" + strRemoteIP + "], strRemoteSIPID [" + strRemoteSIPID + "], strMessage [" + strMessage + "]");
 
-            if (eCallType == CALLTYPE.GUARD) {
+            if(eCallType == CALLTYPE.NONE)
+                eCallType = CALLTYPE.GUARD;
+
+            if(MainActivity.m_bRejectCall)
+                eCallType = CALLTYPE.GUARD;
+
+            if (eCallType == CALLTYPE.GUARD){
                 MainActivity.mCallController.setRemoteInfo(strRemoteSIPID, strRemoteIP);
                 setBTNStatus(strRemoteIP);
                 if (eCallStatus == CALLSTATUS.TRYING_CALL) {
@@ -614,9 +657,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 onMultiCallEvent(eCallOwner, eCallStatus, eCallType, strRemoteIP, strRemoteSIPID, strMessage);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strRemoteIP, String strRemoteSIPID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -650,7 +696,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                                 if (MainActivity.mPSTNController != null) MainActivity.mPSTNController.stopPSTNRingCntThread(); // PSTN 멀티콜 거절시 ring cnt 초기화
                                 MainActivity.mCallController.stop2ndCallTimer();
                                 doMultiCallReject();
-                                if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
+                                //if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
                                 sendHandlerMsgDelayed(HANDLERMSG.REFRESH_BTNLED_STATUS, 0, 0, 1000);
                             }
 
@@ -707,7 +753,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                                 if (MainActivity.mPSTNController != null) MainActivity.mPSTNController.stopPSTNRingCntThread(); // PSTN 멀티콜 거절시 ring cnt 초기화
                                 MainActivity.mCallController.stop2ndCallTimer();
                                 doMultiCallReject();
-                                if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
+                                //if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
                                 sendHandlerMsgDelayed(HANDLERMSG.REFRESH_BTNLED_STATUS, 0, 0, 1000);
                             }
                         }
@@ -839,9 +885,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 LOG_WARN("[onMultiCallEvent] Invalid CallStatus [" + eCallStatus + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMultiCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strRemoteIP, String strRemoteSIPID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -880,9 +929,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 Log.w(TAG, "[onSubPhoneEvent] Incorrect eCallType!!! eCallType = " + eCallType);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -901,9 +953,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 if (!bSet) ctrlAlphaBlending(bSet);
                 MainActivity.mCallController.mSIPInterface.videoSet(bSet, false, bSet);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onVideoSet(boolean bSet, String strRemoteSIPID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -912,9 +967,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
         try {
             LOG_INFO("[onShowRemoteVideo] bShow [" + bShow + "]");
             if (ConfigValues.bGuardVideoEnable && MainActivity.bFFMPEGEnable) ((MainActivity) mContext).showRemoteVideo(bShow, false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -929,9 +987,9 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             if (nScreen == ID.POPUP.POPUP_MULTICALL) {
                 if (nID == ID.POPUP.MUTICALL.ELEMENT.BUTTON.ACCEPT) {
                     LOG_INFO("[onPopupResult] ID.POPUP.MUTICALL.ELEMENT.BUTTON.ACCEPT");
-                    if (ConfigValues.bGuardVideoEnable) {
-                        MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
-                    }
+                    //if (ConfigValues.bGuardVideoEnable) {
+                        //MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
+                    //}
                     MainActivity.mCallController.stop2ndCallTimer();
                     doMultiCallAccept();
                 } else if (nID == ID.POPUP.MUTICALL.ELEMENT.BUTTON.REJECT) {
@@ -939,10 +997,10 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     if (MainActivity.mPSTNController != null) MainActivity.mPSTNController.stopPSTNRingCntThread(); // PSTN 멀티콜 거절시 ring cnt 초기화
                     MainActivity.mCallController.stop2ndCallTimer();
                     doMultiCallReject();
-                    if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
+                    //if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
                     sendHandlerMsgDelayed(HANDLERMSG.REFRESH_BTNLED_STATUS, 0, 0, 1000);
                 }
-                if (bFinish && ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 팝업 닫히면 GUI 화면이 아래로(영상이 위로)
+                //if (bFinish && ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 팝업 닫히면 GUI 화면이 아래로(영상이 위로)
             } else if (nScreen == ID.POPUP.POPUP_NOTICE_SUBPHONETALK) {
                 if (nID == ID.POPUP.NOTICE_SUBPHONETALK.ELEMENT.BUTTON.END) {
                     LOG_INFO("[onPopupResult] ID.POPUP.NOTICE_SUBPHONETALK.ELEMENT.BUTTON.END");
@@ -952,7 +1010,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else if (nScreen == ID.POPUP.POPUP_MULTICALL_NOTICE) {
                 if (nID == ID.POPUP.MUTICALL_NOTICE.ELEMENT.BUTTON.CONFIRM) {
                     LOG_INFO("[onPopupResult] ID.POPUP.POPUP_MULTICALL_NOTICE.ELEMENT.BUTTON.CONFIRM");
-                    if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 화면이 경비(영상)통화일 경우 멀티콜 알림 팝업 닫힐시 GUI 화면이 아래로(영상이 위로)
+                    //if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 화면이 경비(영상)통화일 경우 멀티콜 알림 팝업 닫힐시 GUI 화면이 아래로(영상이 위로)
 
                     /**
                      * JEFF, 2020.01.01
@@ -961,15 +1019,15 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     if (MainActivity.mPSTNController != null) MainActivity.mPSTNController.stopPSTNRingCntThread(); // PSTN 멀티콜 거절시 ring cnt 초기화
                     MainActivity.mCallController.stop2ndCallTimer();
                     doMultiCallReject();
-                    if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
+                    //if (ConfigValues.bGuardVideoEnable) MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
                     sendHandlerMsgDelayed(HANDLERMSG.REFRESH_BTNLED_STATUS, 0, 0, 1000);
                 }
             } else if (nScreen == ID.POPUP.POPUP_MULTICALL_RECORD) {
                 if (nID == ID.POPUP.MULTICALL_RECORD.ELEMENT.BUTTON.OK) {
                     LOG_INFO("[onPopupResult] ID.POPUP.MULTICALL_RECORD.ELEMENT.BUTTON.OK");
                     // [스마트현관카메라] 현재통화 종료 및 영상 녹화 시작
-                    if (ConfigValues.bGuardVideoEnable)
-                        MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
+                    //if (ConfigValues.bGuardVideoEnable)
+                        //MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
                     MainActivity.mCallController.stop2ndCallTimer();
                     doMultiCallAccept();
                 } else if (nID == ID.POPUP.MULTICALL_RECORD.ELEMENT.BUTTON.CANCEL) {
@@ -977,8 +1035,8 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     // [스마트현관카메라] 거동수상자 녹화 취소 및 현재 통화상태 유지
                     MainActivity.mCallController.stop2ndCallTimer();
                     doMultiCallReject();
-                    if (ConfigValues.bGuardVideoEnable)
-                        MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 IHN-1010 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
+                    //if (ConfigValues.bGuardVideoEnable)
+                     //   MainActivity.mIOInterface.ctrlPopupGUI(false); // 현재 통화패스가 IHN-1010 경비(영상)통화일 경우 멀티콜 거절시 GUI 화면이 아래로(영상이 위로)
                     sendHandlerMsgDelayed(HANDLERMSG.REFRESH_BTNLED_STATUS, 0, 0, 1000);
                     ((MainActivity) mContext).ctrlSmartIOTCamLEDMode(SmartRFCamLEDMode.LED_OFF); // LED OFF
                     ((MainActivity) mContext).ctrlSmartIOTCamStatusMode(SmartRFCamStatusMode.STATUS_OFF); // MODE OFF
@@ -990,9 +1048,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     MainActivity.mCallController.quitMoIPCall();
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1004,9 +1065,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 LOG_INFO("[doTalk] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getGUARD() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalk()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1039,9 +1103,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 RemoteIDInfo.InitVariables();
                 MainActivity.mCallController.MultiCallScenarioManager();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doEnd() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1058,9 +1125,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 LOG_INFO("[doTalkByBTN] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getGUARD() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalkByBTN(CALLOWNER eCallOwner)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1068,9 +1138,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
         try {
             MainActivity.mCallController.mCallInfo.setMultiCallAcceptFlag(true);
             doEnd();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doMultiCallAccept()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1085,16 +1158,20 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 MainActivity.mCallController.rejectMoIPMultiCall();
                 MainActivity.mCallController.mCallInfo.setCallStatus(eMultiCallType, CALLSTATUS.IDLE);
             } else if (eMultiCallType == CALLTYPE.PSTN) {
-                MainActivity.mPSTNController.sendReject();
+                if(MainActivity.mPSTNController!=null)
+                    MainActivity.mPSTNController.sendReject();
                 MainActivity.mCallController.onPSTNEvent(CALLEVENTTYPE.CANCEL_CALL, null, null);
                 MainActivity.mCallController.mCallInfo.setCallStatus(eMultiCallType, CALLSTATUS.IDLE);
             } else {
                 LOG_WARN("[doMultiCallReject] Invalid eMultiCallType [" + eMultiCallType + "]");
             }
             MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doMultiCallReject()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1114,9 +1191,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 LOG("[doAutoCall] AutoCall is not activated!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doAutoCall() : " + e);
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1146,9 +1226,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             RemoteIDInfo.strHo = Integer.toString(nHo);
 
             return send_check_sip_activation_request(strGuardIP);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] tryGuardCall(CALLOWNER eCallOwner, int nGuardType)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             MainActivity.mCallController.mCallInfo.setCallOwner(CALLOWNER.NONE);
             return false;
         }
@@ -1157,9 +1241,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
     private boolean tryGuardCallBySubPhone() {
         try {
             return send_check_sip_activation_request(RemoteIDInfo.strIP);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] tryGuardCallBySubPhone()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1184,13 +1272,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     setBTNStatus(MainActivity.mCallController.mCallInfo.getMultiCall_IP());
                     MainActivity.mCallController.set1stCallTimer(eMType, MainActivity.mCallController.mCTT.CALLED);
 
-                    if (ConfigValues.bGuardVideoEnable) {
-                        if (MainActivity.mCallController.mCallInfo.getCallOwner() != CALLOWNER.WALLPAD) {
-                            MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.LOBBY, false);
-                        }
-                        ctrlAlphaBlending(true);
-                        MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
-                    }
+//                    if (ConfigValues.bGuardVideoEnable) {
+//                        if (MainActivity.mCallController.mCallInfo.getCallOwner() != CALLOWNER.WALLPAD) {
+//                            MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.LOBBY, false);
+//                        }
+//                        ctrlAlphaBlending(true);
+//                        MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
+//                    }
                 }
                 ((MainActivity) mContext).displayRemoteID(MainActivity.mCallController.mCallInfo.getMultiCall_Name());
                 MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
@@ -1203,9 +1291,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 }
                 MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procAddCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1222,42 +1313,54 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     ((MainActivity) mContext).ctrlSmartIOTCamLEDMode(SmartRFCamLEDMode.LED_OFF);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] playFrontCamBell(boolean bBell)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private boolean send_check_sip_activation_request(String strTargetIP) {
         try {
-            Request_check_sip_activation check_sip_activation = new Request_check_sip_activation(mContext);
-            if (check_sip_activation.send_check_sip_activation(strTargetIP, null)) {
-                check_sip_activation.setResultCtrl(new RetProci() {
-
-                    @Override
-                    public void ProcSuccess() {
-                        LOG_INFO("[send_check_sip_activation_request] ProcSuccess()");
-                        MainActivity.mCallController.tryMoIPCall(CALLTYPE.GUARD, RemoteIDInfo.strDong, RemoteIDInfo.strHo);
-                    }
-
-                    @Override
-                    public void ProcError() {
-                        LOG_INFO("[send_check_sip_activation_request] ProcError()");
-                        MainActivity.mSound.PlayMent(SND.setting.RETRY_ACTION);
-                        MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.GUARD, CALLSTATUS.IDLE);
-                        ((MainActivity) mContext).setMenuBTNEnable(true);
-                    }
-
-                    @Override
-                    public void ProcDoing() {
-                        LOG_INFO("[send_check_sip_activation_request] ProcDoing()");
-                    }
-                });
-                return true;
-            }
+            LOG_INFO("[send_check_sip_activation_request] " + RemoteIDInfo.strDong + " " + RemoteIDInfo.strHo);
+            MainActivity.mCallController.tryMoIPCall(CALLTYPE.GUARD, RemoteIDInfo.strDong, RemoteIDInfo.strHo);
+
+
+//            Request_check_sip_activation check_sip_activation = new Request_check_sip_activation(mContext);
+//            if (check_sip_activation.send_check_sip_activation(strTargetIP, null)) {
+//                check_sip_activation.setResultCtrl(new RetProci() {
+//
+//                    @Override
+//                    public void ProcSuccess() {
+//                        LOG_INFO("[send_check_sip_activation_request] ProcSuccess()");
+//                        MainActivity.mCallController.tryMoIPCall(CALLTYPE.GUARD, RemoteIDInfo.strDong, RemoteIDInfo.strHo);
+//                    }
+//
+//                    @Override
+//                    public void ProcError() {
+//                        LOG_INFO("[send_check_sip_activation_request] ProcError()");
+//                        MainActivity.mCallController.tryMoIPCall(CALLTYPE.GUARD, RemoteIDInfo.strDong, RemoteIDInfo.strHo);
+////                        MainActivity.mSound.PlayMent(SND.setting.RETRY_ACTION);
+////                        MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.GUARD, CALLSTATUS.IDLE);
+////                        ((MainActivity) mContext).setMenuBTNEnable(true);
+//                    }
+//
+//                    @Override
+//                    public void ProcDoing() {
+//                        LOG_INFO("[send_check_sip_activation_request] ProcDoing()");
+//                    }
+//                });
+//                return true;
+//            }
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] send_check_sip_activation_request(String strTargetIP, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -1287,9 +1390,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 return false;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] tryAutoCall(String strAutoCallInfo)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return false;
         }
     }
@@ -1302,13 +1409,16 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     || BOARDTYPE == BOARD_TYPE.V40_IGW300_NOUGAT || BOARDTYPE == BOARD_TYPE.V40_NOUGAT) {
                 if (bON) IMG_VIDEO_MODULE.setImageResource(R.drawable.video_black_back_test_4);
                 else IMG_VIDEO_MODULE.setImageResource(R.drawable.image_guard);
-                MainActivity.mIOInterface.ctrlPopupGUI(!bON);
+                //MainActivity.mIOInterface.ctrlPopupGUI(!bON);
             } else {
                 Log.w(TAG, "[ctrlAlphaBlending] Not supported BOARDTYPE!! [" + BOARDTYPE + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlAlphaBlending(boolean bON)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1318,32 +1428,39 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             drawVolume();
             getGuardListInfo();
             swap5thBTN(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayScreenValues()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void getGuardListInfo() {
         try {
-            int nGuardCnt = ConfigValues.mGuardListTable.getCnt();
+            DataClasses.GuardListTable table = ConfigValues.mGuardListTable;
+            int nGuardCnt = table.getCnt();
             for (int i = 0; i < nGuardCnt; i++) {
-                String guardName = ConfigValues.mGuardListTable.getGuardInfo(i).NAME();
+                String guardName = table.getGuardInfo(i).NAME();
                 Log.d(TAG, "[getGuardListInfo] guardName [" + guardName + "]");
                 if (guardName.contains("관할") || guardName.equals("경비실")) {
-                    strCONTROLGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
+                    strCONTROLGUARD_IP = table.getGuardInfo(i).IP();
                 } else if (guardName.contains("정문")) {
-                    strMAINGATEGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
+                    strMAINGATEGUARD_IP = table.getGuardInfo(i).IP();
                 } else if (guardName.contains("후문")) {
-                    strSUBGATEGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
+                    strSUBGATEGUARD_IP = table.getGuardInfo(i).IP();
                 } else if (guardName.equals("관리실")) {
-                    strOFFICEGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
+                    strOFFICEGUARD_IP = table.getGuardInfo(i).IP();
                 }
             }
             setGuardBTNEnable(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getGuardListInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1355,6 +1472,9 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             String strResult = Addr.Dong;
             LOG("[getDongString] strResult [" + strResult + "]");
             return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getDongString()");
             return null;
@@ -1419,9 +1539,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 }
                 swap5thBTN(false);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] changeBTN_Activated(String strRemoteIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1518,9 +1641,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] changeBTNImage_Selected(String strRemoteIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1557,9 +1683,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 setGuardBTNEnable(false);
                 setOffCallLED();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBTNStatus(String strRemoteIP)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1574,9 +1703,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             } else {
                 setOffCallLED();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBTNLEDStatus()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1607,13 +1739,17 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                         BTN_CONTROL.setImageResource(R.drawable.btn_guard_ctrl_normal);
                     }
                     if (strMAINGATEGUARD_IP.equals("NONE"))
-                        BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
+                    {
+                        if(BTN_MAINGATE!=null) BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
+                    }
                     else {
                         BTN_MAINGATE.setButtonEventOffDisable();
                         BTN_MAINGATE.setImageResource(R.drawable.btn_guard_main_normal);
                     }
                     if (strSUBGATEGUARD_IP.equals("NONE"))
-                        BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
+                    {
+                        if(BTN_SUBGATE!=null)BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
+                    }
                     else {
                         BTN_SUBGATE.setButtonEventOffDisable();
                         BTN_SUBGATE.setImageResource(R.drawable.btn_guard_sub_normal);
@@ -1638,9 +1774,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     BTN_TALK.setImageResource(R.drawable.btn_guard_call_disabled);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setGuardBTNEnable()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1667,9 +1806,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     BTN_END.setButtonEventOffEnable(R.drawable.btn_guard_end_disabled);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] swap5thBTN(boolean bEND)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1690,9 +1832,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     BTN_END.setButtonEventOffEnable(R.drawable.btn_guard_end_disabled);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] enableEndBTN(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1706,9 +1851,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 bFlickeringCallLED = true;
                 sendHandlerMsg(HANDLERMSG.FLICKER_LED_CALL, 0, 0);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] runFlickerCallLED()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1719,9 +1867,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 bStatusFlickeringCallLED = true;
                 MainActivity.mIOInterface.ctrlWallPadLED_Call(bStatusFlickeringCallLED);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setOnCallLED()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1735,9 +1886,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     MainActivity.mIOInterface.ctrlWallPadLED_Call(bStatusFlickeringCallLED);
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setOffCallLED()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1764,9 +1918,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                     LOG_INFO("[ctrlCallLED] bFlickeringCallLED [" + bFlickeringCallLED + "], bStatusFlickeringCallLED [" + bStatusFlickeringCallLED + "]");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlCallLED()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1778,7 +1935,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             if (nCurrentVolume != nCtrlLevel) {
                 nCurrentVolume = nCtrlLevel;
                 showVolume(nCurrentVolume);
-//                ctrlVolume(false);
+                //ctrlVolume(false);
             }
         }
 
@@ -1798,9 +1955,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
     private void getVolume() {
         try {
             nCurrentVolume = Global.getGuardVolume();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1809,24 +1969,35 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             if (!Global.setGuardVolume(nValue)) {
                 LOG_WARN("[setVolume] Fail to set volume!! nValue [" + nValue + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void ctrlVolume(boolean bSave) {
         try {
             if (bSave) setVolume(nCurrentVolume);
-            CALLSTATUS eCallStatus = MainActivity.mCallController.mCallInfo.getGUARD();
+            CALLSTATUS eCallStatus;
+            if(MainActivity.m_bRejectCall)
+                eCallStatus = MainActivity.mCallController.mCallInfo.getRESI();
+            else
+                eCallStatus = MainActivity.mCallController.mCallInfo.getGUARD();
+
             LOG("[ctrlVolume] eCallStatus [" + eCallStatus + "]");
-            if (eCallStatus == CALLSTATUS.TALKING) {
+            if ((eCallStatus == CALLSTATUS.TALKING) || (eCallStatus == CALLSTATUS.TRYING_CALL)) {
                 if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300 || ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300_NOUGAT) Global.setV40WallPadVolume(nCurrentVolume);
                 else if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40 || ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_NOUGAT) Global.setV40WallPadVolume_GUARD(nCurrentVolume);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1835,9 +2006,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
 //            Log.d(TAG, "[showVolume] nValue [" + nValue + "]");
             if (TXT_VOLUME_LEVEL != null) TXT_VOLUME_LEVEL.setText(Integer.toString(nValue));
             else Log.w(TAG, "[showVolume] TXT_VOLUME_LEVEL is null!!");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showVolume(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1848,9 +2022,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
                 showVolume(nCurrentVolume);
             }
             else Log.w(TAG, "[drawVolume] SEEKBAR_VOLUME is null!!");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1862,9 +2039,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             if ((nValue % 10) != 0) result++;
             Log.d(TAG, "[getCtrlLevel] result: " + result);
             return result;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCtrlLevel(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -1877,9 +2058,13 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             else progress = (nValue - 1) * 11;
 
             return progress;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSeekBarThumb()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -1933,9 +2118,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1947,9 +2135,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -2092,9 +2283,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
             doEnd();
             if (MainActivity.mCallController.mCallInfo.getPSTNCallHold()) return;
             ((MainActivity) mContext).finishWallPadCall();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallpadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 340 - 63
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkLobby.java


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 297 - 71
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkPSTN.java


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 296 - 119
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkResidence.java


+ 82 - 20
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/VisitorPictureViewer.java

@@ -11,6 +11,8 @@ import android.view.View;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
 
+import com.util.LogUtil;
+
 import java.io.File;
 import java.util.ArrayList;
 
@@ -112,9 +114,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
 
             Initialize();
             initVisitorPictureInfo(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] VisitorPictureViewer(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -127,9 +132,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
 //            ((MainActivity) mContext).setTopMenuBtnVisible(false);
             int mMarginLeft = ((MainActivity) mContext).TopBackBtn.getVisibility() == View.VISIBLE ? 893 : 1019;
             ((MainActivity) mContext).setManualBtnVisible(((MainActivity) mContext).getManualUse(), mMarginLeft);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -141,9 +149,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
             ((MainActivity) mContext).releaseMainEventListener();
             ((MainActivity) mContext).setTopBackBtnVisible(false);
 //            ((MainActivity) mContext).setTopMenuBtnVisible(true);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -152,9 +163,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
         super.onBrReceive(intent);
         try {
             LOG_INFO("[onBrReceive] intent : " + intent);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onBrReceive(Intent intent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -182,9 +196,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -195,9 +212,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
             if (eEvent == MAINEVENT.BTN_HOME) {
                 finishWallpadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -220,9 +240,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
                     LOG_INFO("[onPopupResult] ID.POPUP.DELETE_ITEMS.ELEMENT.BUTTON.CANCEL");
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onPopupResult(Intent data)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -234,9 +257,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
                 ((MainActivity) mContext).finishPopUp(ID.POPUP.POPUP_ALL);
                 ((MainActivity) mContext).finishManual(ID.MANUAL.MANUAL_ALL);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strRemoteIP, String strRemoteSIPID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -244,9 +270,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
     public void onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage) {
         try {
             LOG_INFO("[onSubPhoneEvent] eCallOwner [" + eCallOwner + "], eCallStatus [" + eCallStatus + "], eCallType [" + eCallType + "], strTargetID [" + strTargetID + "], strMessage [" + strMessage + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubPhoneEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -254,9 +283,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
     public void onVideoSet(boolean bSet, String strRemoteSIPID) {
         try {
             LOG_INFO("[onVideoSet] bSet [" + bSet + "], strRemoteSIPID [" + strRemoteSIPID + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onVideoSet(boolean bSet, String strRemoteSIPID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -264,9 +296,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
     public void onShowRemoteVideo(boolean bShow) {
         try {
             LOG_INFO("[onShowRemoteVideo] bShow [" + bShow + "]");
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onShowRemoteVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -287,9 +322,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
             LOG_INFO("[initVisitorPictureInfo] nCurrentPicture = " + nCurrentPicture + ", nTotalPicture = " + nTotalPicture);
             printPageNo();
             drawVisitorPicture(nCurrentPicture);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initVisitorPictureInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -302,9 +340,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
                     return i + 1;
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getStartPictureIndex(String strID)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return 0;
     }
@@ -336,9 +377,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
 //            } else {
 //                LOG_WARN("[drawVisitorPicture] tempFile is null!! [" + tempFile.getPath() + "]");
 //            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVisitorPicture(int nIndex)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -347,9 +391,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
             Intent data = new Intent();
             data.putExtra("TYPE", "VisitorPictureViewer_Delete");
             ((MainActivity) (getContext())).startPopup(ID.POPUP.POPUP_DELETE_ITEMS, data);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showPopupDeletePicture()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -362,9 +409,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
 
             MainActivity.mVisitorPictureHistoryManager.deleteHistoryList(Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE, SelectedIDs);
             MainActivity.mVisitorPictureHistoryManager.deleteHistoryList(SelectedURIs);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteVisitorPicture(int nIndex)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -375,9 +425,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
             if (nCurrentPicture > nTotalPicture) nCurrentPicture = 1;
             printPageNo();
             drawVisitorPicture(nCurrentPicture);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] viewNext()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -388,9 +441,12 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
             if (nCurrentPicture < 1) nCurrentPicture = nTotalPicture;
             printPageNo();
             drawVisitorPicture(nCurrentPicture);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] viewPrevious()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -398,18 +454,24 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
         try {
             strText_PageNo = nCurrentPicture + "/" + nTotalPicture;
             TXT_PAGE.setText(strText_PageNo);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] printPageNo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void finishWallpadCallApp() {
         try {
             super.finish();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallpadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 132 - 33
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkFront_SubWallPad.java

@@ -15,6 +15,8 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.callengine.engine.CallController.SubWallPadEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLEVENTTYPE;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -100,13 +102,16 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             SEEKBAR_VOLUME = (SeekBar) volumeLayout.findViewById(R.id.volumeSeekBar);
             SEEKBAR_VOLUME.setMax(100);
             SEEKBAR_VOLUME.setOnSeekBarChangeListener(mOnVolumeChangeListener);
-            layout.addView(volumeLayout);
+            if(layout!=null) layout.addView(volumeLayout);
 
             applyInitValues();
             sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkFront_SubWallPad(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -122,9 +127,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             MainActivity.mCallController.stop2ndCallTimer();
             MainActivity.mCallController.setTalkPath(CALLPATH.NORMAL);
             RemoteIDInfo.InitVariables();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -138,9 +146,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             CALLSTATUS eCallStatus = MainActivity.mCallController.mCallInfo.getFRONT();
             Log.d(TAG, "[Initialize] eCallStatus [" + eCallStatus + "]");
             if (eCallStatus != CALLSTATUS.IDLE) ((MainActivity) mContext).setMenuBTNEnable(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -149,9 +160,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             getVolume();
             drawVolume();
             enableDoorOpenBTN(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] applyInitValues()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -165,9 +179,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else if (keyCode == Declare.BTN.DOOR_OPEN || keyCode == Declare.BTN.DOOR_OPEN_V40) {
                 doDoorOpen();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onKeyDown(int keyCode, KeyEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -191,9 +208,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -204,9 +224,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (eEvent == MAINEVENT.BTN_HOME) {
                 finishWallPadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -279,9 +302,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 onMultiCallEvent(eCallOwner, eCallStatus, eCallType, strTargetID, strMessage);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubWallPadCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -340,9 +366,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[onMultiCallEvent] Invalid CallStatus [" + eCallStatus + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMultiCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -385,9 +414,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
 //                Global.bFrontMonitoring_SubWallPad = false;
 //                Log.d(TAG, "[procAddCall] bFrontMonitoring_SubWallPad [" + Global.bFrontMonitoring_SubWallPad + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procAddCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -406,9 +438,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else {
                 Log.w(TAG, "[doTalk] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getFRONT() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalk(CALLOWNER eCallOwner)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -421,9 +456,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else  {
                 Log.w(TAG, "[doAutoCall] AutoCall is not activated!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doAutoCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -446,9 +484,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 MainActivity.mCallController.mCallInfo.printCallStatus();
                 MainActivity.mCallController.MultiCallScenarioManager();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doEnd()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -470,9 +511,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else {
                 Log.w(TAG, "[doTalkByBTN] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getFRONT() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalkByBTN(CALLOWNER eCallOwner)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -494,9 +538,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[doDoorOpen] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getFRONT() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doDoorOpen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -506,9 +553,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             sendHandlerMsgDelayed(HANDLERMSG.PLAYMENT_OPENDOOR, 0, 0, 1000);
             sendHandlerMsgDelayed(HANDLERMSG.END_CALL, 0, 0, 3000);
             return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doDoorOpenACK()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
         return false;
     }
@@ -531,9 +581,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else {
                 Log.w(TAG, "[doMultiCallReject] Invalid eMultiCallType [" + eMultiCallType + "]");
             }
-        } catch(Exception e) {
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
             Log.e(TAG, "[Exception] doMultiCallReject()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -551,9 +604,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else ((MainActivity) mContext).removeFrontVideoLayout();
 
             if (bBell) MainActivity.mIOInterface.ctrlFrontCamBell(bBell);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showFrontCam(bOn, bBell)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -561,9 +617,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             MainActivity.mIOInterface.ctrlFrontCamPower(bBell);
             MainActivity.mIOInterface.ctrlFrontCamBell(bBell);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] playFrontCamBell(boolean bBell)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -587,9 +646,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 BTN_END.setButtonEventOffEnable(R.drawable.btn_pstn_end_disabled);
                 BTN_DOOROPEN.setButtonEventOffEnable(R.drawable.btn3_open_disabled);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBTNStatus()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -598,9 +660,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             Log.d(TAG, "[enableTalkBTN] bEnable [" + bEnable + "]");
             if (bEnable) BTN_TALK.setButtonEventOffDisable();
             else BTN_TALK.setButtonEventOffEnable(R.drawable.btn_pstn_call_disabled);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] enableTalkBTN(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -608,9 +673,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             if (bEnable) BTN_DOOROPEN.setButtonEventOffDisable();
             else BTN_DOOROPEN.setButtonEventOffEnable(R.drawable.btn3_open_disabled);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] enableDoorOpenBTN(boolean bEnable)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -638,9 +706,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
     private void getVolume() {
         try {
             nCurrentVolume = Global.getFrontVolume();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -649,9 +720,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             Log.d(TAG, "[setVolume]");
             if (!Global.setFrontVolume(nValue))
                 Log.d(TAG, "[setVolume] Fail to set Volume!! nValue: " + nValue);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setVolume(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -663,9 +737,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (eCallStatus == CALLSTATUS.TALKING) {
                 Global.setV40WallPadVolume(nCurrentVolume);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.d(TAG, "[Exception] ctrlVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -673,15 +750,20 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             SEEKBAR_VOLUME.setProgress(ctrlSeekBarThumb(nCurrentVolume));
             showVolume(ctrlSeekBarThumb(nCurrentVolume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVolume");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
     private void showVolume(int nValue) {
         try {
             TXT_VOLUME_LEVEL.setText(String.valueOf(getCtrlLevel(nValue)));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showVolume(nValue)");
         }
@@ -694,9 +776,13 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else if (nValue == 10) progress = 100;
             else progress = (nValue - 1) * 11;
             return progress;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSeekBarThumb()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -708,9 +794,13 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if ((nValue % 10) != 0) result++;
             Log.d(TAG, "[getCtrlLevel] result: " + result);
             return result;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCtrlLevel(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -793,9 +883,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -807,9 +900,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -818,9 +914,12 @@ public class TalkFront_SubWallPad  extends WpadScreen implements SubWallPadEvent
             doEnd();
             if (MainActivity.mCallController.mCallInfo.getPSTNCallHold()) return;
             super.finish();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallPadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 111 - 27
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkGuard_SubWallPad.java

@@ -14,6 +14,8 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.callengine.engine.CallController.SubWallPadEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLEVENTTYPE;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
@@ -98,13 +100,16 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             SEEKBAR_VOLUME = (SeekBar) volumeLayout.findViewById(R.id.volumeSeekBar);
             SEEKBAR_VOLUME.setMax(100);
             SEEKBAR_VOLUME.setOnSeekBarChangeListener(mOnVolumeChangeListener);
-            layout.addView(volumeLayout);
+            if(layout!=null) layout.addView(volumeLayout);
 
             displayScreenValues();
             sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkGuard_SubWallPad (Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -116,9 +121,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (ConfigValues.bGuardVideoEnable) showGuardVideo(false);
             MainActivity.mCallController.releaseSubWallPadEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -133,9 +141,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (MainActivity.mCallController.mCallInfo.getGUARD() != CALLSTATUS.IDLE) {
                 ((MainActivity) mContext).setMenuBTNEnable(false);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -143,9 +154,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             RemoteIDInfo.InitVariables();
             MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.GUARD, CALLSTATUS.IDLE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initCallVariables()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -153,9 +167,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             getVolume();
             drawVolume();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayScreenValues()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -265,9 +282,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 onMultiCallEvent(eCallOwner, eCallStatus, eCallType, strTargetID, strMessage);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubWallPadCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -336,9 +356,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[onMultiCallEvent] Invalid CallStatus [" + eCallStatus + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMultiCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -359,9 +382,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -371,9 +397,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (eEvent == MAINEVENT.BTN_HOME) {
                 finishWallPadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -405,9 +434,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 }
                 MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procAddCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -424,9 +456,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[doTalk] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getGUARD() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalk(CALLOWNER eCallOwner)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -452,9 +487,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 RemoteIDInfo.InitVariables();
                 MainActivity.mCallController.MultiCallScenarioManager();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doEnd()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -469,9 +507,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[doAutoCall] AutoCall is not activated!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doAutoCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -494,9 +535,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 Log.w(TAG, "[doMultiCallReject] Invalid eMultiCallType [" + eMultiCallType + "]");
             }
             MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doMultiCallReject()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -504,9 +548,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             if (bShow) ((MainActivity) mContext).initFrontVideoLayout();
             else ((MainActivity) mContext).removeFrontVideoLayout();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showGuardVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -526,9 +573,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 BTN_TALK.setButtonEventOffEnable(R.drawable.btn_residence_call_disabled2);
                 BTN_END.setButtonEventOffEnable(R.drawable.btn_residence_call_disabled2);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBTNStatus()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -536,9 +586,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             MainActivity.mIOInterface.ctrlFrontCamPower(bBell);
             MainActivity.mIOInterface.ctrlFrontCamBell(bBell);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] playFrontCamBell(boolean bBell)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -567,9 +620,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
     private void getVolume() {
         try {
             nCurrentVolume = Global.getGuardVolume();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -578,9 +634,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (!Global.setGuardVolume(nValue)) {
                 Log.w(TAG, "[setVolume] Fail to set volume!! nValue [" + nValue + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -592,9 +651,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300 || ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_IGW300_NOUGAT) Global.setV40WallPadVolume(nCurrentVolume);
                 else if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40 || ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_NOUGAT) Global.setV40WallPadVolume_GUARD(nCurrentVolume);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -602,6 +664,8 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
 //            Log.d(TAG, "[showVolume] nValue: " + nValue);
             TXT_VOLUME_LEVEL.setText(String.valueOf(getCtrlLevel(nValue)));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showVolume(nValue)");
         }
@@ -611,9 +675,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             SEEKBAR_VOLUME.setProgress(ctrlSeekBarThumb(nCurrentVolume));
             showVolume(ctrlSeekBarThumb(nCurrentVolume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -625,9 +692,13 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if ((nValue % 10) != 0) result++;
             Log.d(TAG, "[getCtrlLevel] result: " + result);
             return result;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCtrlLevel(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -640,9 +711,13 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else progress = (nValue - 1) * 11;
 
             return progress;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSeekBarThumb()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -698,9 +773,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -712,9 +790,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -722,9 +803,12 @@ public class TalkGuard_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             doEnd();
             super.finish();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallPadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 116 - 29
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkLobby_SubWallPad.java

@@ -14,6 +14,8 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.callengine.engine.CallController.SubWallPadEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLOWNER;
 import kr.co.icontrols.callengine.engine.CallManager.CALLSTATUS;
@@ -97,13 +99,16 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             SEEKBAR_VOLUME = (SeekBar) volumeLayout.findViewById(R.id.volumeSeekBar);
             SEEKBAR_VOLUME.setMax(100);
             SEEKBAR_VOLUME.setOnSeekBarChangeListener(mOnVolumeChangeListener);
-            layout.addView(volumeLayout);
+            if(layout!=null) layout.addView(volumeLayout);
 
             displayScreenValues();
             sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0, null);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkLobby_SubWallPad(Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -116,9 +121,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             MainActivity.mCallController.releaseSubWallPadEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
             showLobbyVideo(false);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -133,9 +141,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (MainActivity.mCallController.mCallInfo.getLOBBY() != CALLSTATUS.IDLE) {
                 ((MainActivity) mContext).setMenuBTNEnable(false);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -143,9 +154,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             RemoteIDInfo.InitVariables();
             MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.LOBBY, CALLSTATUS.IDLE);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initCallVariables()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -153,9 +167,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             getVolume();
             drawVolume();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayScreenValues()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -177,9 +194,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception ] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -190,9 +210,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (eEvent == MAINEVENT.BTN_HOME) {
                 finishWallPadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -270,9 +293,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 onMultiCallEvent(eCallOwner, eCallStatus, eCallType, strTargetID, strMessage);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubWallPadCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -347,9 +373,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[onMultiCallEvent] Invalid CallStatus [" + eCallStatus + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMultiCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -383,9 +412,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 // 멀티콜 없음
                 MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procAddCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -398,9 +430,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[doTalk] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getLOBBY() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalk(eCallOwner)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -423,9 +458,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 MainActivity.mCallController.mCallInfo.printCallStatus();
                 MainActivity.mCallController.MultiCallScenarioManager();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doEnd()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -439,9 +477,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             } else {
                 Log.w(TAG, "[doDoorOpen] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getLOBBY() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doDoorOpen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -463,9 +504,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 Log.w(TAG, "[doMultiCallReject] Invalid eMultiCallType [" + eMultiCallType + "]");
             }
             MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doMultiCallReject()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -476,9 +520,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             ctrlAlphaBlending(bShow);
             if (bShow) sendHandlerMsgDelayed(HANDLERMSG.INIT_FRONTVIDEO, 0, 0, null, 1500);
             else ((MainActivity) mContext).removeFrontVideoLayout();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showLobbyVideo(boolean bShow)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -490,9 +537,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 IMG_VIDEO_MODULE.setBackgroundColor(Color.argb(0, 0, 0, 0));
             } else IMG_VIDEO_MODULE.setImageResource(R.drawable.image_lobby);
             MainActivity.mIOInterface.ctrlPopupGUI(!bON);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlAlphaBlending(boolean bON)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -515,9 +565,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
                 BTN_END.setButtonEventOffEnable(R.drawable.btn_pstn_end_disabled);
                 BTN_DOOROPEN.setButtonEventOffEnable(R.drawable.btn3_open_disabled);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBTNStatus()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -525,9 +578,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             MainActivity.mIOInterface.ctrlFrontCamPower(bBell);
             MainActivity.mIOInterface.ctrlFrontCamBell(bBell);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] playFrontCamBell(boolean bBell)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -557,9 +613,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             nCurrentVolume = Global.getLobbyVolume();
             Log.d(TAG, "[getVolume] nCurrentVolume: " + nCurrentVolume);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -568,9 +627,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (!Global.setLobbyVolume(nValue)) {
                 Log.w(TAG, "[setVolume] Fail to set volume!! nValue [" + nValue + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -582,9 +644,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if (eCallStatus == CALLSTATUS.TALKING) {
                 Global.setV40WallPadVolume(nCurrentVolume);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -592,6 +657,8 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
 //            Log.d(TAG, "[showVolume] nValue: " + nValue);
             TXT_VOLUME_LEVEL.setText(String.valueOf(getCtrlLevel(nValue)));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showVolume(nValue)");
         }
@@ -601,9 +668,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
         try {
             SEEKBAR_VOLUME.setProgress(ctrlSeekBarThumb(nCurrentVolume));
             showVolume(ctrlSeekBarThumb(nCurrentVolume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -615,9 +685,13 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             if ((nValue % 10) != 0) result++;
 //            Log.d(TAG, "[getCtrlLevel] result: " + result);
             return result;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCtrlLevel(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -630,9 +704,13 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             else progress = (nValue - 1) * 11;
 
             return progress;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSeekBarThumb()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -706,9 +784,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             HandleMsg.arg2 = arg2;
             HandleMsg.obj = obj;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -721,9 +802,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             HandleMsg.arg2 = arg2;
             HandleMsg.obj = obj;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
-        } catch (Exception e) {
+        } catch (RuntimeException re) {
+		LogUtil.errorLogInfo("", TAG, re);
+	} catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -732,9 +816,12 @@ public class TalkLobby_SubWallPad  extends WpadScreen implements SubWallPadEvent
             doEnd();
             if (MainActivity.mCallController.mCallInfo.getPSTNCallHold()) return;
             ((MainActivity) mContext).finishWallPadCall();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallPadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

+ 149 - 37
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/subwallpadscreen/TalkResidence_SubWallPad.java

@@ -14,6 +14,8 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.SeekBar;
 
+import com.util.LogUtil;
+
 import kr.co.icontrols.callengine.engine.CallController.SubWallPadEventListener;
 import kr.co.icontrols.callengine.engine.CallManager.CALLPATH;
 import kr.co.icontrols.callengine.engine.CallManager.CALLEVENTTYPE;
@@ -127,7 +129,7 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             SEEKBAR_VOLUME = (SeekBar) volumeLayout.findViewById(R.id.volumeSeekBar);
             SEEKBAR_VOLUME.setMax(100);
             SEEKBAR_VOLUME.setOnSeekBarChangeListener(mOnVolumeChangeListener);
-            layout.addView(volumeLayout);
+            if(layout!=null) layout.addView(volumeLayout);
 
             int nTenKeyGuide_X = Common.ImgPosition.GetX(460);
             int nTenKeyGuide_Y = Common.ImgPosition.GetY(112);
@@ -172,9 +174,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
 
             displayScreenValues();
             sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] TalkResidence_SubWallPad (Context context, RelativeLayout layout)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -187,9 +192,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             Global.strHoInfo = "";
             MainActivity.mCallController.releaseSubWallPadEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onClose()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -203,9 +211,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             if (MainActivity.mCallController.mCallInfo.getRESI() != CALLSTATUS.IDLE) {
                 ((MainActivity) mContext).setMenuBTNEnable(false);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] Initialize()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -215,9 +226,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.RESIDENCE, CALLSTATUS.IDLE);
             Global.TargetInputStep = TARGETINFOINPUTSTEP.DONG;
             strTXT_RESIDENCEINFO = "";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] initCallVariables()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -227,9 +241,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             drawVolume();
             showTalkMode(false);
             updateInstruction();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] displayScreenValues()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -338,9 +355,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             } else {
                 onMultiCallEvent(eCallOwner, eCallStatus, eCallType, strTargetID, strMessage);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onSubWallPadCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -349,9 +369,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             Log.d(TAG, "[onMultiCallEvent] eCallOwner [" + eCallOwner + "], eCallStatus [" + eCallStatus + "], eCallType [" + eCallType +"], strTargetID [" + strTargetID + "], strMessage [" + strMessage + "]");
             MainActivity.mCallController.mCallInfo.printCallStatus();
 
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMultiCallEvent(CALLOWNER eCallOwner, CALLSTATUS eCallStatus, CALLTYPE eCallType, String strTargetID, String strMessage)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -464,9 +487,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                     }
                 }
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onTouchEvent(View v, MotionEvent event)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -477,9 +503,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             if (eEvent == MAINEVENT.BTN_HOME) {
                 finishWallPadCallApp();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] onMainTouchEvent(MAINEVENT eEvent)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -504,9 +533,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 if (RemoteIDInfo.bAutoCall) doAutoCall();
                 MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] procAddCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -525,11 +557,16 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 try {
                     if (RemoteIDInfo.bRentRoomSelected) RemoteIDInfo.strIP = Global.makeIPAddress(DeviceType.RENTRESIDENCE, RemoteIDInfo.strDong, RemoteIDInfo.strHo);
                     else RemoteIDInfo.strIP = Global.makeIPAddress(DeviceType.RESIDENCE, RemoteIDInfo.strDong, RemoteIDInfo.strHo);
+                } catch (RuntimeException re) {
+                    LogUtil.errorLogInfo("", TAG, re);
+                    MainActivity.mSound.PlayMent(SND.setting.RETRY_INPUT);
+                    ((MainActivity) mContext).setMenuBTNEnable(true);
                 } catch (Exception e) {
                     Log.e(TAG, "[Exception] doTalk");
                     MainActivity.mSound.PlayMent(SND.setting.RETRY_INPUT);
                     ((MainActivity) mContext).setMenuBTNEnable(true);
-                    e.printStackTrace();
+                    //e.printStackTrace();
+                    LogUtil.errorLogInfo("", TAG, e);
                 }
                 Log.d(TAG, "[doTalk] strDong [" + RemoteIDInfo.strDong + "], strHo [" + RemoteIDInfo.strHo + "], strIP [" + RemoteIDInfo.strIP + "]");
 
@@ -541,9 +578,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             } else {
                 Log.w(TAG, "[doTalk] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getRESI() + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doTalk(CALLOWNER eCallOwner)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -568,9 +608,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 MainActivity.mCallController.mCallInfo.printCallStatus();
                 MainActivity.mCallController.MultiCallScenarioManager();
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doEnd()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -586,9 +629,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             } else {
                 Log.w(TAG, "[doAutoCall] AutoCall is not activated!!");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doAutoCall()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -610,9 +656,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 Log.w(TAG, "[doMultiCallReject] Invalid eMultiCallType [" + eMultiCallType + "]");
             }
             MainActivity.mCallController.mCallInfo.resetMultiCallInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] doMultiCallReject()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -620,9 +669,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
         try {
             updateResiInfo();
             updateInstruction();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateScreen()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -650,9 +702,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             }
 
             TXT_INSTRUCTION.setText(strTXT_INSTRUCTION);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateInstruction()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -715,9 +770,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 Log.w(TAG, "[updateResiInfo] Call Status is not IDLE!!! strName [" + RemoteIDInfo.strName + "]");
                 strTXT_RESIDENCEINFO = RemoteIDInfo.strName;
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] updateResiInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -744,9 +802,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 }
             }
             updateResiInfo();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] deleteResiInfo()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -773,9 +834,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 BTN_TALK.setImageResource(R.drawable.btn_residence_call_normal2);
                 showTalkMode(false);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setBTNStatus()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -788,8 +852,10 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
 
                 // 텐키 이미지 조작
                 BTN_DELETE.setVisibility(View.INVISIBLE);
-                if (ConfigValues.bEnableHouseDivision) BTN_DIVISION.setVisibility(View.INVISIBLE);
-                for (int i = 0; i < BTN_TENKEY.length; i++) {
+                if (ConfigValues.bEnableHouseDivision) {
+                    if(BTN_DIVISION!=null)
+                        BTN_DIVISION.setVisibility(View.INVISIBLE);
+                }for (int i = 0; i < BTN_TENKEY.length; i++) {
                     BTN_TENKEY[i].setVisibility(View.INVISIBLE);
                 }
 
@@ -802,7 +868,10 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
 
                 // 텐키 이미지 조작
                 BTN_DELETE.setVisibility(View.VISIBLE);
-                if (ConfigValues.bEnableHouseDivision) BTN_DIVISION.setVisibility(View.VISIBLE);
+                if (ConfigValues.bEnableHouseDivision) {
+                    if(BTN_DIVISION!=null)
+                        BTN_DIVISION.setVisibility(View.VISIBLE);
+                }
                 for (int i = 0; i < BTN_TENKEY.length; i++) {
                     BTN_TENKEY[i].setVisibility(View.VISIBLE);
                 }
@@ -810,8 +879,11 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                 // 통화상대 정보
                 ((MainActivity) mContext).displayRemoteID(null);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -868,9 +940,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
                     break;
             }
             MainActivity.mSound.PlayMent(nSoundIndex);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] playButtonMent(int nBTN)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -878,9 +953,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
         try {
             MainActivity.mIOInterface.ctrlFrontCamPower(bBell);
             MainActivity.mIOInterface.ctrlFrontCamBell(bBell);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] playFrontCamBell(boolean bBell)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -909,9 +987,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
     private void getVolume() {
         try {
             nCurrentVolume = Global.getResidenceVolume();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -920,9 +1001,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             if (!Global.setResidenceVolume(nValue)) {
                 Log.w(TAG, "[setVolume] Fail to set volume!! nValue [" + nValue + "]");
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] setVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -934,9 +1018,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             if (eCallStatus == CALLSTATUS.TALKING) {
                 Global.setV40WallPadVolume_RESIDENCE(nCurrentVolume);
             }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -944,6 +1031,8 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
         try {
 //            Log.d(TAG, "[showVolume] nValue: " + nValue);
             TXT_VOLUME_LEVEL.setText(String.valueOf(getCtrlLevel(nValue)));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] showVolume(nValue)");
         }
@@ -953,9 +1042,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
         try {
             SEEKBAR_VOLUME.setProgress(ctrlSeekBarThumb(nCurrentVolume));
             showVolume(ctrlSeekBarThumb(nCurrentVolume));
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] drawVolume()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -967,9 +1059,13 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             if ((nValue % 10) != 0) result++;
             Log.d(TAG, "[getCtrlLevel] result: " + result);
             return result;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] getCtrlLevel(nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -982,9 +1078,13 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             else progress = (nValue - 1) * 11;
 
             return progress;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return 1;
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlSeekBarThumb()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
             return 1;
         }
     }
@@ -994,9 +1094,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             // IHN-750의 이웃통화에 한해서 MoIP 음량을 별도로 조절한다. (이유: 에코 발생이유로 별도 음성 튜닝)
             Log.d(TAG, "[ctrlWallPadMoIPVolume] nValue [" + nValue + "]");
             Global.setV40WallPadVolume_RESIDENCE(nCurrentVolume);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] ctrlWallPadMoIPVolume(int nValue)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1050,9 +1153,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessage(HandleMsg);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1064,9 +1170,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
             HandleMsg.arg1 = arg1;
             HandleMsg.arg2 = arg2;
             MainHandler.sendMessageDelayed(HandleMsg, delay);
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] sendHandlerMsgDelayed(msg)");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 
@@ -1074,9 +1183,12 @@ public class TalkResidence_SubWallPad  extends WpadScreen implements SubWallPadE
         try {
             doEnd();
             ((MainActivity) mContext).finishWallPadCall();
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
         } catch (Exception e) {
             Log.e(TAG, "[Exception] finishWallPadCallApp()");
-            e.printStackTrace();
+            //e.printStackTrace();
+            LogUtil.errorLogInfo("", TAG, e);
         }
     }
 }

BIN
WallPadCall/src/main/jniLibs/armeabi-v7a/libaCERES.so


BIN
WallPadCall/src/main/jniLibs/armeabi-v7a/libjniV40if2_ccd.so


BIN
WallPadCall/src/main/jniLibs/armeabi/libaCERES.so


BIN
WallPadCall/src/main/jniLibs/armeabi/libjniV40if2_ccd.so


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott