|
@@ -2,6 +2,7 @@ package kr.co.icontrols.wallpadcall.screen;
|
|
|
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
|
+import android.content.IntentFilter;
|
|
import android.graphics.Color;
|
|
import android.graphics.Color;
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import android.os.Looper;
|
|
@@ -67,6 +68,7 @@ import kr.co.icontrols.wallpadsupport.WpadSound.SND;
|
|
import kr.co.icontrols.wallpadsupport.WpadTextView;
|
|
import kr.co.icontrols.wallpadsupport.WpadTextView;
|
|
|
|
|
|
import static kr.co.icontrols.callengine.remotecall.RemoteCallMSG.REMOTECALL_CMD.CMD_MULTICALL;
|
|
import static kr.co.icontrols.callengine.remotecall.RemoteCallMSG.REMOTECALL_CMD.CMD_MULTICALL;
|
|
|
|
+import static kr.co.icontrols.wallpadcall.declare.Declare.BR.ACNAME_MAIN_NOTI;
|
|
|
|
|
|
public class TalkFront extends WpadScreen implements CallEventListener, MainEventListener {
|
|
public class TalkFront extends WpadScreen implements CallEventListener, MainEventListener {
|
|
|
|
|
|
@@ -319,6 +321,9 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
applyInitValues();
|
|
applyInitValues();
|
|
sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0);
|
|
sendHandlerMsg(HANDLERMSG.PROC_ADDCALL, 0, 0);
|
|
|
|
|
|
|
|
+ // yjyoon. 녹화중지 이벤트 추가
|
|
|
|
+ addBrActionFilter(Declare.BR.BR_REQUEST_RECORD_STOP);
|
|
|
|
+
|
|
//ctrlAlphaBlending(false);
|
|
//ctrlAlphaBlending(false);
|
|
} catch (RuntimeException re) {
|
|
} catch (RuntimeException re) {
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
@@ -344,7 +349,11 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
getBrightness();
|
|
getBrightness();
|
|
getVolume();
|
|
getVolume();
|
|
bEnableAutoVisitorPic = true;
|
|
bEnableAutoVisitorPic = true;
|
|
- MainActivity.mIOInterface.ctrlPopupGUI(true);
|
|
|
|
|
|
+
|
|
|
|
+ //yjyoon
|
|
|
|
+ MainActivity.mIOInterface.ctrlPopupGUI(true); // 원소스
|
|
|
|
+ //MainActivity.mIOInterface.ctrlPopupGUI(false); // 테스트. 이걸로 하면 로비 영상이 나옴
|
|
|
|
+
|
|
//MainActivity.mCallController.mVideoJNI.setPreviewInfo_V40(0, 0, 0, 0);
|
|
//MainActivity.mCallController.mVideoJNI.setPreviewInfo_V40(0, 0, 0, 0);
|
|
//MainActivity.mIOInterface.ctrlPopupGUI_Resi(false, false);
|
|
//MainActivity.mIOInterface.ctrlPopupGUI_Resi(false, false);
|
|
} catch (RuntimeException re) {
|
|
} catch (RuntimeException re) {
|
|
@@ -402,7 +411,6 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
mCheckHandler.removeMessages(1);
|
|
mCheckHandler.removeMessages(1);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
((MainActivity) mContext).resetRecordTimer();
|
|
((MainActivity) mContext).resetRecordTimer();
|
|
((MainActivity) mContext).ctrlSmartIOTCamLEDMode(SmartRFCamLEDMode.LED_OFF); // LED OFF
|
|
((MainActivity) mContext).ctrlSmartIOTCamLEDMode(SmartRFCamLEDMode.LED_OFF); // LED OFF
|
|
((MainActivity) mContext).ctrlSmartIOTCamStatusMode(SmartRFCamStatusMode.STATUS_OFF); // MODE OFF
|
|
((MainActivity) mContext).ctrlSmartIOTCamStatusMode(SmartRFCamStatusMode.STATUS_OFF); // MODE OFF
|
|
@@ -436,7 +444,26 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
protected void onBrReceive(Intent intent) {
|
|
protected void onBrReceive(Intent intent) {
|
|
super.onBrReceive(intent);
|
|
super.onBrReceive(intent);
|
|
try {
|
|
try {
|
|
- LOG_INFO("[onBrReceive] intent : " + intent);
|
|
|
|
|
|
+ String strAction = intent.getAction();
|
|
|
|
+ if (strAction.equals(Declare.BR.BR_REQUEST_RECORD_STOP)) {
|
|
|
|
+
|
|
|
|
+ Log.v("yjyoon", "TalkFront > onBrReceive : BR_RECORDSTOP START");
|
|
|
|
+
|
|
|
|
+ LOG_INFO("[onBrReceive] strAction[" + strAction + "] bRecordingStatus[" + MainActivity.bRecordingStatus + "]");
|
|
|
|
+ boolean bSave = true;
|
|
|
|
+ try {
|
|
|
|
+ int nKind = intent.getIntExtra(define.NOTIBR_KIND, 0);
|
|
|
|
+ stopStrangerRecord(false, nKind); // 1: 현관콜 2:로비/세대/경비콜
|
|
|
|
+ } catch (RuntimeException re) {
|
|
|
|
+ LogUtil.errorLogInfo("", TAG, re);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ Log.e(TAG, "[Exception] stopStrangerRecord()");
|
|
|
|
+ //e.printStackTrace();
|
|
|
|
+ LogUtil.errorLogInfo("", TAG, e);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Log.v("yjyoon", "TalkFront > onBrReceive : BR_RECORDSTOP END");
|
|
|
|
+ }
|
|
} catch (RuntimeException re) {
|
|
} catch (RuntimeException re) {
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -1136,7 +1163,7 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
MainActivity.mCallController.onFrontEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.FRONT);
|
|
MainActivity.mCallController.onFrontEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.FRONT);
|
|
}
|
|
}
|
|
else if (eCallStatus == CALLSTATUS.RECORDING) {
|
|
else if (eCallStatus == CALLSTATUS.RECORDING) {
|
|
- stopStrangerRecord(true);
|
|
|
|
|
|
+ stopStrangerRecord(true, 0);
|
|
MainActivity.mCallController.onFrontEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.FRONT);
|
|
MainActivity.mCallController.onFrontEvent(CALLEVENTTYPE.TERMINATE_CALL, CALLTYPE.FRONT);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -1753,6 +1780,9 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
((MainActivity) mContext).setMenuBTNEnable(false);
|
|
((MainActivity) mContext).setMenuBTNEnable(false);
|
|
if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40 || ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_NOUGAT) {
|
|
if (ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40 || ConfigValues.DEVICE_BOARDTYPE == BOARD_TYPE.V40_NOUGAT) {
|
|
enableTalkBTN(false); // IHN-1010에서 현관 단일콜일 경우 띵똥 소리 출력 중인 경우에는 통화버튼 disable
|
|
enableTalkBTN(false); // IHN-1010에서 현관 단일콜일 경우 띵똥 소리 출력 중인 경우에는 통화버튼 disable
|
|
|
|
+ } else {
|
|
|
|
+ // yjyoon. 녹화 중 현관콜 처리. 2443 boardtype은 V40_IGW300_NOUGAT.
|
|
|
|
+ enableTalkBTN(true);
|
|
}
|
|
}
|
|
enableEndBTN(false);
|
|
enableEndBTN(false);
|
|
sendHandlerMsgDelayed(HANDLERMSG.ENABLE_END_BTN, 0, 0, 3000); // 통화 시작 후 3초 후 종료 버튼 활성화 (다담 김명준선임 요청 19.09.30)
|
|
sendHandlerMsgDelayed(HANDLERMSG.ENABLE_END_BTN, 0, 0, 3000); // 통화 시작 후 3초 후 종료 버튼 활성화 (다담 김명준선임 요청 19.09.30)
|
|
@@ -2410,10 +2440,17 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- private void stopStrangerRecord(boolean bSave) {
|
|
|
|
|
|
+ private void stopStrangerRecord(boolean bSave, int bCallFront) {
|
|
try {
|
|
try {
|
|
- LOG("[stopStrangerRecord] bSave [" + bSave + "]");
|
|
|
|
- showFrontCam(false, false);
|
|
|
|
|
|
+ LOG("[stopStrangerRecord] bSave [" + bSave + "] bCallFront[" + bCallFront + "]");
|
|
|
|
+
|
|
|
|
+ if (bCallFront == 1) {
|
|
|
|
+ // 현관콜. FrontCam 유지
|
|
|
|
+ showFrontCam(true, false);
|
|
|
|
+ } else {
|
|
|
|
+ showFrontCam(false, false);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (MainActivity.bRecordingStatus) {
|
|
if (MainActivity.bRecordingStatus) {
|
|
MainActivity.bRecordingStatus = false;
|
|
MainActivity.bRecordingStatus = false;
|
|
((MainActivity) (this.getContext())).mediaStopRecord(true);
|
|
((MainActivity) (this.getContext())).mediaStopRecord(true);
|
|
@@ -2424,11 +2461,24 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
if (tempFile.isFile()) {
|
|
if (tempFile.isFile()) {
|
|
tempFile.delete();
|
|
tempFile.delete();
|
|
}
|
|
}
|
|
- finishWallpadCallApp();
|
|
|
|
|
|
+
|
|
|
|
+ // yjyoon. 녹화 중 새로운 콜인 경우 앱을 종료하지 않는다.
|
|
|
|
+ if (bCallFront == 0) {
|
|
|
|
+ finishWallpadCallApp();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- sendHandlerMsg(HANDLERMSG.SAVE_VISITOR_VIDEO_FINISH_APP, 0, 0);
|
|
|
|
|
|
+ // yjyoon
|
|
|
|
+ // 영상 저장 후 앱 종료. 앱 종료를 막기 위해 arg1 = 1 설정
|
|
|
|
+ sendHandlerMsg(HANDLERMSG.SAVE_VISITOR_VIDEO_FINISH_APP, bCallFront == 0 ? 0 : 1, 0);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ Log.v("yjyoon", "Call TalkFront ###Common.BR_MAIN_NOTI.STOP_RECORDING");
|
|
|
|
+ // yjyoon. WallPadMain으로 녹화 종료 이벤트 발생. Common.bWallPadRecoder 값 변경.
|
|
|
|
+ Intent newIntent = new Intent(); // 녹화 종료 BR 전송
|
|
|
|
+ newIntent.setAction(ACNAME_MAIN_NOTI);
|
|
|
|
+ newIntent.putExtra("KIND", /**Common.BR_MAIN_NOTI.STOP_RECORDING*/1027);
|
|
|
|
+ getContext().sendBroadcast(newIntent);
|
|
}
|
|
}
|
|
} catch (RuntimeException re) {
|
|
} catch (RuntimeException re) {
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
@@ -2863,8 +2913,14 @@ public class TalkFront extends WpadScreen implements CallEventListener, MainEven
|
|
break;
|
|
break;
|
|
|
|
|
|
case HANDLERMSG.SAVE_VISITOR_VIDEO_FINISH_APP:
|
|
case HANDLERMSG.SAVE_VISITOR_VIDEO_FINISH_APP:
|
|
- Log.d(TAG, "[TalkFrontHandler] SAVE_VISITOR_VIDEO_FINISH_APP");
|
|
|
|
- ((MainActivity) mContext).saveRecordingFile(true);
|
|
|
|
|
|
+ Log.d(TAG, "[TalkFrontHandler] SAVE_VISITOR_VIDEO_FINISH_APP arg1[" + msg.arg1 + "]");
|
|
|
|
+ if (msg.arg1 == 1) {
|
|
|
|
+ // yjyoon. 거동수상자 녹화 중 현관콜이 들어왔을 때 앱 종료하지 않음.
|
|
|
|
+ Log.v("yjyoon", "SAVE_VISITOR_VIDEO_FINISH_APP[false]");
|
|
|
|
+ ((MainActivity) mContext).saveRecordingFile(false);
|
|
|
|
+ } else {
|
|
|
|
+ ((MainActivity) mContext).saveRecordingFile(true);
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
|
|
|
|
case HANDLERMSG.SAVE_VISITOR_VIDEO_NOT_FINISH_APP:
|
|
case HANDLERMSG.SAVE_VISITOR_VIDEO_NOT_FINISH_APP:
|