ソースを参照

2021.11.17 VIP
1. 현관 모니터링 수정.
2. history DB 제거

DESKTOP-UNEGUH3\MadeinLab_SW_02 3 年 前
コミット
0c7fb2c437

+ 10 - 10
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/MainActivity.java

@@ -489,10 +489,10 @@ public class MainActivity extends WpadActivity {
             TXT_REMOTE_ID.setVisibility(View.INVISIBLE);
 
             initCallEngine();
-            if (ConfigValues.eWallPadType == WALLPADTYPE.MAIN) {
-                initCallHistoryDB();
-                initVisitorPictureHistoryDB();
-            }
+//            if (ConfigValues.eWallPadType == WALLPADTYPE.MAIN) {
+//                initCallHistoryDB();
+//                initVisitorPictureHistoryDB();
+//            }
 
             // 5. Top Menu - ImageView registration
             LOG_INFO("[Create] - Step5 : Top Menu - ImageView registration");
@@ -678,16 +678,16 @@ public class MainActivity extends WpadActivity {
 
         Global.ctrlLCDOnOff(false); // 절전모드 해제
         Global.stopMelodyRepeat();
-        ctrlSmartIOTCamStatusMode(SmartRFCamStatusMode.STATUS_OFF);
-        ctrlSmartIOTCamLEDMode(SmartRFCamLEDMode.LED_OFF);
+        //ctrlSmartIOTCamStatusMode(SmartRFCamStatusMode.STATUS_OFF);
+        //ctrlSmartIOTCamLEDMode(SmartRFCamLEDMode.LED_OFF);
 
         setChangeScreen(mCurrentScreenId, true);
 
         releaseCallEngine();
-        if (ConfigValues.eWallPadType == WALLPADTYPE.MAIN) {
-            releaseCallHistoryDB();
-            releaseVisitorPictureHistoryDB();
-        }
+//        if (ConfigValues.eWallPadType == WALLPADTYPE.MAIN) {
+//            releaseCallHistoryDB();
+//            releaseVisitorPictureHistoryDB();
+//        }
 
         if (mIOInterface != null) {
             mIOInterface.releaseIOInterface();

+ 9 - 1
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/InquiryCallHistory.java

@@ -3,6 +3,8 @@ package kr.co.icontrols.wallpadcall.screen;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Color;
+import android.os.Handler;
+import android.os.Looper;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.Gravity;
@@ -433,7 +435,13 @@ public class InquiryCallHistory extends WpadScreen implements CallEventListener,
                     } else if (strItemType.equals("CallHistoryItems")) {
                         deleteSelectedItems();
                         resetCheckBox();
-                        initHistoryPageInfo();
+                        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                initHistoryPageInfo();
+                            }
+                        }, 500);
+
                         //send_call_history_inquiry("all", "60");
                         //getHistoryFromDB();
                     }

+ 9 - 1
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/InquiryVisitorPictureHistory.java

@@ -457,7 +457,13 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
                     } else if (strItemType.equals("VisitorPictures")) {
                         deleteSelectedItems();
                         resetCheckBox();
-                        initHistoryPageInfo();
+                        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                initHistoryPageInfo();
+                            }
+                        }, 500);
+                        //initHistoryPageInfo();
                         //getHistoryFromDB();
                     }
                 } else if (nID == ID.POPUP.DELETE_ITEMS.ELEMENT.BUTTON.CANCEL) {
@@ -1260,6 +1266,8 @@ public class InquiryVisitorPictureHistory extends WpadScreen implements CallEven
     private void initHistoryPageInfo() {
         try {
             LOG("[initHistoryPageInfo]");
+            if(m_bShowViewer == false)
+                setDirEmpty(define.VISITOR_PICTURE_LOCATION);
             //nHistoryCnt = MainActivity.mVisitorPictureHistoryManager.getHistoryCnt(Declare.DBInfo.TABLE_NAME_HISTORY_VISITORPICTURE);
             //LOG("[initHistoryPageInfo] nHistoryCnt = " + nHistoryCnt);
             //nTotalPage = ((nHistoryCnt + LIST_CNT - 1) / LIST_CNT);

+ 46 - 15
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkFront.java

@@ -274,8 +274,7 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
             nSelectedFilter = 0;
 //            bEnableVisitorPic = false;   // 부재중 방문객 사진 저장은 임시로 삭제한다.
 
-            MainActivity.mIOInterface.ctrlPopupGUI(false);
-            MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
+
 
             sendHandlerMsgDelayed(TalkFront.HANDLERMSG.ENABLE_SAVE_VISITORPICTURE, 0, 0, null, 3000);
             sendHandlerMsgDelayed(TalkFront.HANDLERMSG.SHOW_FRONTVIDEO, 0, 0, null, 1000);
@@ -329,12 +328,14 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
 
             bEnableVisitorPic = false;
             bReliefCallInit = false;
-            MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.NONE, true);
-            initCallVariables();
+            if (ConfigValues.DEVICE_MODELTYPE == Version.MODEL_TYPE.IHN_D101_I_LX2)
+                MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.NONE, true);
+
             if (ConfigValues.bReliefCall) selectReliefCallFilter(nSelectedFilter);
             MainActivity.mCallController.releaseCallEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
             MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
+            initCallVariables();
             //Global.add1stCallHistoryInfoFinal();
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
@@ -459,6 +460,8 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
                 MainActivity.mCallController.setRemoteInfo(strRemoteSIPID, strRemoteIP);
                 sendHandlerMsg(TalkFront.HANDLERMSG.SET_BTN_STATUS, 0, 0, null);
                 if (eCallStatus == CALLSTATUS.CALLED) {
+                    MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
                     MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.FRONT, false);
                     Global.playMelodyRepeat(eCallType);
                     super.setFinishTimerDestroy();
@@ -491,6 +494,9 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
                     //MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.FRONT, false);
                     //Global.playMelodyRepeat(eCallType);
                     //MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
+
                     super.setFinishTimerDestroy();
                     MainActivity.mCallController.set1stCallTimer(eCallType, MainActivity.mCallController.mCTT.CALLED);
                     ((MainActivity) mContext).displayRemoteID(RemoteIDInfo.strName);
@@ -585,14 +591,23 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
                     Global.stopMelodyRepeat();
                     MainActivity.mCallController.setTalkPath(CALLPATH.NORMAL);
                     ((MainActivity) mContext).displayRemoteID(null);
-                    MainActivity.mSound.PlayMent(SND.call.BUSY_TRY_LATER);
-                    MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.FRONT, CALLSTATUS.IDLE);
-                    MainActivity.mCallController.stop1stCallTimer();
-                    ((MainActivity) mContext).finishPopUp(ID.POPUP.POPUP_NOTICE_SUBPHONETALK);
-                    Global.change1stCallLogAction(CALLACTION.BUSY);
-                    nSelectedFilter = 0;
-                    sendReliefFilterSelectBR(nSelectedFilter);
-                    MainActivity.mCallController.MultiCallScenarioManager();
+                    //MainActivity.mSound.PlayMent(SND.call.BUSY_TRY_LATER);
+                    int nTime = MainActivity.mSound.PlayMent(SND.call.BUSY_TRY_LATER);
+
+                    new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+
+                            MainActivity.mCallController.stop1stCallTimer();
+                            ((MainActivity) mContext).finishPopUp(ID.POPUP.POPUP_NOTICE_SUBPHONETALK);
+                            Global.change1stCallLogAction(CALLACTION.BUSY);
+                            nSelectedFilter = 0;
+                            sendReliefFilterSelectBR(nSelectedFilter);
+                            MainActivity.mCallController.MultiCallScenarioManager();
+                        }
+                    }, nTime + 500);
+
+
                 } else if (eCallStatus == CALLSTATUS.CANCEL) {
                     bEnableVisitorPic = false;
                     bReliefCallInit = false;
@@ -858,6 +873,8 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
             if (eCallType == CALLTYPE.FRONT) {
 
                 if (eCallStatus == CALLSTATUS.CALLING) {
+                    MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
                     MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.FRONT, false);
                     super.setFinishTimerDestroy();
                     MainActivity.mCallController.set1stCallTimer(eCallType, MainActivity.mCallController.mCTT.CALLED);
@@ -1807,6 +1824,7 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
 
     private boolean send_check_sip_activation_request(final String strTargetIP) {
         try {
+            //ctrlAlphaBlending(false);
             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() {
@@ -1814,6 +1832,7 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
                     @Override
                     public void ProcSuccess() {
                         LOG_INFO("[send_check_sip_activation_request] ProcSuccess()");
+                        //ctrlAlphaBlending(true);
                         MainActivity.mCallController.mSIPInterface.requestCallForwardToStun(MainActivity.mCallController.makeCallForwarInfo(strTargetIP));
                     }
 
@@ -2237,15 +2256,27 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
                     break;
 
                 case TalkFront.HANDLERMSG.ENABLE_TALK_BTN:
-                    enableTalkBTN(true);
+                    if (MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.CALLING || MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.CALLED || MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.TALKING) {
+                        enableTalkBTN(true);
+                        //MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    }
+
                     break;
 
                 case TalkFront.HANDLERMSG.ENABLE_END_BTN:
-                    enableEndBTN(true);
+                    if (MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.CALLING || MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.CALLED || MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.TALKING) {
+                        enableEndBTN(true);
+                        //MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    }
+
                     break;
 
                 case TalkFront.HANDLERMSG.ENABLE_OPENDOOR_BTN:
-                    enableOpenDoorBTN(true);
+                    if (MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.CALLING || MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.CALLED || MainActivity.mCallController.mCallInfo.getFRONT() == CALLSTATUS.TALKING) {
+                        enableOpenDoorBTN(true);
+                        //MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    }
+
                     break;
 
                 case TalkFront.HANDLERMSG.OFF_FRONT:

+ 9 - 5
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkLobby.java

@@ -271,8 +271,7 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
             nSelectedFilter = 0;
 //            bEnableVisitorPic = false;   // 부재중 방문객 사진 저장은 임시로 삭제한다.
 
-            MainActivity.mIOInterface.ctrlPopupGUI(false);
-            MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
+
 
             sendHandlerMsgDelayed(HANDLERMSG.ENABLE_SAVE_VISITORPICTURE, 0, 0, null, 3000);
         } catch (RuntimeException re) {
@@ -304,7 +303,7 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
         super.onClose();
         try {
             LOG_INFO("[onClose]");
-            MainActivity.mIOInterface.ctrlPopupGUI(true);
+            //MainActivity.mIOInterface.ctrlPopupGUI(true);
             if (MainActivity.mIOInterface != null) MainActivity.mIOInterface.ctrlWallPadLED_Call(false);
             nSelectedFilter = 0;
             sendReliefFilterSelectBR(nSelectedFilter);
@@ -323,12 +322,14 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
 
             bEnableVisitorPic = false;
             bReliefCallInit = false;
-            MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.NONE, true);
-            initCallVariables();
+            if (ConfigValues.DEVICE_MODELTYPE == Version.MODEL_TYPE.IHN_D101_I_LX2)
+                MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.NONE, true);
+
             if (ConfigValues.bReliefCall) selectReliefCallFilter(nSelectedFilter);
             MainActivity.mCallController.releaseCallEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
             MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
+            initCallVariables();
             //Global.add1stCallHistoryInfoFinal();
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
@@ -456,6 +457,9 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
                 MainActivity.mCallController.setRemoteInfo(strRemoteSIPID, strRemoteIP);
                 sendHandlerMsg(HANDLERMSG.SET_BTN_STATUS, 0, 0, null);
                 if (eCallStatus == CALLSTATUS.CALLED) {
+                    MainActivity.mIOInterface.ctrlPopupGUI(false);
+                    MainActivity.mCallController.mSIPInterface.videoSet(true, false, true);
+
                     MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.LOBBY, false);
                     Global.playMelodyRepeat(eCallType);
                     super.setFinishTimerDestroy();

+ 24 - 6
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkResidence.java

@@ -357,13 +357,14 @@ public class TalkResidence extends WpadScreen implements CallEventListener, Main
                 mPathCheckHandler.removeMessages(1);
             }
             mbCallState = false;
-            initCallVariables();
+
             MainActivity.mCallController.mSIPInterface.videoSet(false, false, false);
             MainActivity.mCallController.selectVideoSourceToSubPhone(CALLTYPE.NONE, true);
             MainActivity.mCallController.releaseCallEventListener();
             ((MainActivity) mContext).releaseMainEventListener();
             MainActivity.mCallController.stop1stCallTimer();
             MainActivity.mCallController.stop2ndCallTimer();
+            initCallVariables();
             //Global.add1stCallHistoryInfoFinal();
         } catch (RuntimeException re) {
             LogUtil.errorLogInfo("", TAG, re);
@@ -1713,11 +1714,28 @@ public class TalkResidence extends WpadScreen implements CallEventListener, Main
                     @Override
                     public void ProcError() {
                         LOG_INFO("[send_check_sip_activation_request] ProcError()");
-                        initCallVariables();
-                        MainActivity.mSound.PlayMent(SND.setting.RETRY_INPUT);
-                        updateScreen();
-                        ((MainActivity) mContext).setMenuBTNEnable(true);
-                        MainActivity.mSubPhoneController.sendBusyCall(CALLOWNER.SUB_WALLPAD, CALLTYPE.RESIDENCE);
+//                        initCallVariables();
+//                        MainActivity.mSound.PlayMent(SND.setting.RETRY_INPUT);
+//                        updateScreen();
+//                        ((MainActivity) mContext).setMenuBTNEnable(true);
+//                        MainActivity.mSubPhoneController.sendBusyCall(CALLOWNER.SUB_WALLPAD, CALLTYPE.RESIDENCE);
+
+                        int nTime = MainActivity.mSound.PlayMent(SND.call.BUSY_TRY_LATER);
+
+                        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.RESIDENCE, CALLSTATUS.IDLE);
+                                MainActivity.mCallController.stop1stCallTimer();
+                                initCallVariables();
+                                updateScreen();
+                                Global.change1stCallLogAction(CALLACTION.BUSY);
+                                MainActivity.mCallController.MultiCallScenarioManager();
+                                ((MainActivity) mContext).setMenuBTNEnable(true);
+                                MainActivity.mSubPhoneController.sendBusyCall(CALLOWNER.SUB_WALLPAD, CALLTYPE.RESIDENCE);
+                            }
+                        }, nTime + 500);
+
                     }
 
                     @Override

+ 9 - 1
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/VisitorPictureViewer.java

@@ -4,6 +4,8 @@ import android.content.Context;
 import android.content.Intent;
 import android.graphics.Color;
 import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Looper;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MotionEvent;
@@ -245,7 +247,13 @@ public class VisitorPictureViewer extends WpadScreen implements CallEventListene
                     if (strItemType.equals("VisitorPictureViewer_Delete")) {
                         deleteVisitorPicture(nCurrentPicture);
                         m_bShowCount = false;
-                        send_visitor_picture_inquiry("1", "60");
+                        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                send_visitor_picture_inquiry("1", "60");
+                            }
+                        }, 500);
+
                         //initVisitorPictureInfo(false);
                     }
                 } else if (nID == ID.POPUP.DELETE_ITEMS.ELEMENT.BUTTON.CANCEL) {