Browse Source

[WallPadCall]
1. 로비 통화종료 버그 수정
- ID가 강제로 10번에서 해당 아이디에 맞게 전송

DESKTOP-FBA840V\icontrols 4 years ago
parent
commit
775f298436

+ 22 - 3
WallPadCall/src/main/java/kr/co/icontrols/wallpadcall/screen/TalkLobby.java

@@ -345,6 +345,8 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
                         if (!bSentiMAP) {
                             sendHandlerMsg(HANDLERMSG.HIDE_LOBBYVIDEO, 0, 0, null); // 문열림으로 통화 종료시 로비 영상 노이즈가 생기므로 영상을 GUI 아래로 내림
                             doDoorOpen();
+                            //3초후에 종료 코드를 전송하기로 함(현재는 문열림 전송 후, 종료를 보내지 않고 있음)
+                            DelayedSendHanlderMsg(HANDLERMSG.CALL_END, 0, 0, null, 3000);
                         }
                     } else if (ID.SCREEN.TALKLOBBY.ELEMENT.BUTTON.RELIEF_FILTER_01 <= nID && nID <= ID.SCREEN.TALKLOBBY.ELEMENT.BUTTON.RELIEF_FILTER_04) {
                         LOG_INFO("[onTouchEvent] [RELIEF_FILTER] BUTTON");
@@ -978,20 +980,21 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
         {
             if (MainActivity.mCallController.mCallInfo.getIDLECnt() != MainActivity.mCallController.mCallInfo.IDLECNT_MAX) {
                 LOG_INFO("[doEnd] CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getLOBBY() + "]");
+              //  MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, RemoteIDInfo.nDong, RemoteIDInfo.nHo);
                 if (MainActivity.mCallController.mCallInfo.getLOBBY() == CALLSTATUS.CALLED) {
                     Global.stopMelodyRepeat();
-                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(ConfigValues.strDong), 10);
+                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(ConfigValues.strDong), RemoteIDInfo.nHo);
                     MainActivity.mCallController.onLobbyEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.LOBBY);
     //                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(RemoteIDInfo.strDong), Integer.parseInt(RemoteIDInfo.strHo));
                 }
                 else if (MainActivity.mCallController.mCallInfo.getLOBBY() == CALLSTATUS.TALKING) {
                     MainActivity.mCallController.onLobbyEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.LOBBY);
-                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(ConfigValues.strDong), 10);
+                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(ConfigValues.strDong), RemoteIDInfo.nHo);
                 }
                 else {
                     LOG_INFO("[doEnd] Invalid CALLSTATUS [" + MainActivity.mCallController.mCallInfo.getLOBBY() + "]");
                     MainActivity.mCallController.onLobbyEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.LOBBY);
-                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(ConfigValues.strDong), 10);
+                    MainActivity.mCallController.sendCallEnd(CALLTYPE.LOBBY, Integer.parseInt(ConfigValues.strDong), RemoteIDInfo.nHo);
                 }
             }
             else {
@@ -2003,6 +2006,22 @@ public class TalkLobby extends WpadScreen implements CallEventListener, MainEven
         }
     }
 
+
+    public void DelayedSendHanlderMsg(int what, int arg1, int arg2, Object obj, int delayTime) {
+        try {
+            LOG("[sendHandlerMsg] what [" + what + "], arg1 [" + arg1 + "], arg2 [" + arg2 + "], obj [" + obj + "], DelayTime [" + delayTime + "]");
+            Message HandleMsg = TalkLobbyHandler.obtainMessage();
+            HandleMsg.what = what;
+            HandleMsg.arg1 = arg1;
+            HandleMsg.arg2 = arg2;
+            HandleMsg.obj = obj;
+            TalkLobbyHandler.sendMessageDelayed(HandleMsg, delayTime);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] sendHandlerMsg(msg)");
+            e.printStackTrace();
+        }
+    }
+
     public void sendHandlerMsgDelayed(int what, int arg1, int arg2, Object obj, long delay) {
         try {
             LOG("[sendHandlerMsgDelayed] what [" + what + "], arg1 [" + arg1 + "], arg2 [" + arg2 + "], obj [" + obj + "], delay [" + delay + "]");