|
|
@@ -20,6 +20,7 @@ import android.widget.SeekBar;
|
|
|
|
|
|
import com.artncore.WallPadDataMgr.wallpaddbmgr;
|
|
|
import com.artncore.WallPadDataMgr.wallpaddbmgr.AddressSet;
|
|
|
+import com.artncore.commons.define;
|
|
|
import com.artncore.wallpadimap.RetProci;
|
|
|
|
|
|
import kr.co.icontrols.callengine.engine.CallController.CallEventListener;
|
|
|
@@ -88,10 +89,10 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
WpadImageView IMG_GUARD_BACKGROUND;
|
|
|
WpadImageView IMG_VIDEO_MODULE;
|
|
|
WpadImageView IMG_VOLUME;
|
|
|
- WpadImageView BTN_CONTROL;
|
|
|
- WpadImageView BTN_MAINGATE;
|
|
|
- WpadImageView BTN_SUBGATE;
|
|
|
- WpadImageView BTN_OFFICE;
|
|
|
+// WpadImageView BTN_CONTROL;
|
|
|
+// WpadImageView BTN_MAINGATE;
|
|
|
+// WpadImageView BTN_SUBGATE;
|
|
|
+// WpadImageView BTN_OFFICE;
|
|
|
WpadImageView BTN_TALK;
|
|
|
WpadImageView BTN_END;
|
|
|
|
|
|
@@ -130,11 +131,11 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
ViewRegistration(layout, IMG_VIDEO_MODULE, Common.ImgPosition.GetX(95), Common.ImgPosition.GetY(112));
|
|
|
|
|
|
if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 272, R.drawable.btn_guard_1_normal_easymode, R.drawable.btn_guard_1_pressed_easymode, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.CONTROL);
|
|
|
- ViewRegistration(layout, BTN_CONTROL, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(110));
|
|
|
-
|
|
|
- BTN_OFFICE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 272, R.drawable.btn_guard_4_normal_easymode, R.drawable.btn_guard_4_pressed_easymode, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.OFFICE);
|
|
|
- ViewRegistration(layout, BTN_OFFICE, Common.ImgPosition.GetX(1001), Common.ImgPosition.GetY(110));
|
|
|
+// BTN_CONTROL = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 272, R.drawable.btn_guard_1_normal_easymode, R.drawable.btn_guard_1_pressed_easymode, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.CONTROL);
|
|
|
+// ViewRegistration(layout, BTN_CONTROL, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(110));
|
|
|
+//
|
|
|
+// BTN_OFFICE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 272, R.drawable.btn_guard_4_normal_easymode, R.drawable.btn_guard_4_pressed_easymode, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.OFFICE);
|
|
|
+// ViewRegistration(layout, BTN_OFFICE, Common.ImgPosition.GetX(1001), Common.ImgPosition.GetY(110));
|
|
|
|
|
|
BTN_TALK = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 272, R.drawable.btn_call_normal_easymode, R.drawable.btn_call_pressed_easymode, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.TALK);
|
|
|
ViewRegistration(layout, BTN_TALK, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(382));
|
|
|
@@ -162,17 +163,17 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
}
|
|
|
else {
|
|
|
//modify KSJ
|
|
|
- BTN_CONTROL = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_ctrl_normal, R.drawable.btn_guard_ctrl_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.CONTROL);
|
|
|
- //ViewRegistration(layout, BTN_CONTROL, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(110));
|
|
|
-
|
|
|
- BTN_MAINGATE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_main_normal, R.drawable.btn_guard_main_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.MAINGATE);
|
|
|
- //ViewRegistration(layout, BTN_MAINGATE, Common.ImgPosition.GetX(1001), Common.ImgPosition.GetY(110));
|
|
|
-
|
|
|
- BTN_SUBGATE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_sub_normal, R.drawable.btn_guard_sub_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.SUBGATE);
|
|
|
- //ViewRegistration(layout, BTN_SUBGATE, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(291));
|
|
|
-
|
|
|
- BTN_OFFICE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_office_normal, R.drawable.btn_guard_office_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.OFFICE);
|
|
|
- //ViewRegistration(layout, BTN_OFFICE, Common.ImgPosition.GetX(1001), Common.ImgPosition.GetY(291));
|
|
|
+// BTN_CONTROL = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_ctrl_normal, R.drawable.btn_guard_ctrl_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.CONTROL);
|
|
|
+// //ViewRegistration(layout, BTN_CONTROL, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(110));
|
|
|
+//
|
|
|
+// BTN_MAINGATE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_main_normal, R.drawable.btn_guard_main_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.MAINGATE);
|
|
|
+// //ViewRegistration(layout, BTN_MAINGATE, Common.ImgPosition.GetX(1001), Common.ImgPosition.GetY(110));
|
|
|
+//
|
|
|
+// BTN_SUBGATE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_sub_normal, R.drawable.btn_guard_sub_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.SUBGATE);
|
|
|
+// //ViewRegistration(layout, BTN_SUBGATE, Common.ImgPosition.GetX(815), Common.ImgPosition.GetY(291));
|
|
|
+//
|
|
|
+// BTN_OFFICE = new WpadImageView(context, TOUCH_KIND.BUTTON, 186, 181, R.drawable.btn_guard_office_normal, R.drawable.btn_guard_office_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.OFFICE);
|
|
|
+// //ViewRegistration(layout, BTN_OFFICE, Common.ImgPosition.GetX(1001), Common.ImgPosition.GetY(291));
|
|
|
|
|
|
BTN_TALK = new WpadImageView(context, TOUCH_KIND.BUTTON, 230, 272, R.drawable.btn_guard_call_normal, R.drawable.btn_guard_call_pressed, ID.SCREEN.TALKGUARD.ELEMENT.BUTTON.TALK);
|
|
|
ViewRegistration(layout, BTN_TALK, Common.ImgPosition.GetX(908), Common.ImgPosition.GetY(110));
|
|
|
@@ -276,22 +277,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
mPathCheckHandler.removeMessages(1);
|
|
|
mPathCheckHandler.removeMessages(2);
|
|
|
}
|
|
|
- if (mCtrlBTNAnimHandler != null) {
|
|
|
- mCtrlBTNAnimHandler.removeMessages(0);
|
|
|
- mCtrlBTNAnimHandler.removeMessages(1);
|
|
|
- }
|
|
|
- if (mMainBTNAnimHandler != null) {
|
|
|
- mMainBTNAnimHandler.removeMessages(0);
|
|
|
- mMainBTNAnimHandler.removeMessages(1);
|
|
|
- }
|
|
|
- if (mSubBTNAnimHandler != null) {
|
|
|
- mSubBTNAnimHandler.removeMessages(0);
|
|
|
- mSubBTNAnimHandler.removeMessages(1);
|
|
|
- }
|
|
|
- if (mOfficeBTNAnimHandler != null) {
|
|
|
- mOfficeBTNAnimHandler.removeMessages(0);
|
|
|
- mOfficeBTNAnimHandler.removeMessages(1);
|
|
|
- }
|
|
|
+
|
|
|
if (mCallBTNAnimHandler != null) {
|
|
|
mCallBTNAnimHandler.removeMessages(0);
|
|
|
mCallBTNAnimHandler.removeMessages(1);
|
|
|
@@ -519,7 +505,8 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
}
|
|
|
((MainActivity)mContext).displayRemoteID(null);
|
|
|
Global.stopMelodyRepeat();
|
|
|
- MainActivity.mSound.PlayMent(SND.setting.RETRY_ACTION);
|
|
|
+ sendSoundPlayRequestBR(SND.setting.RETRY_ACTION);
|
|
|
+// MainActivity.mSound.PlayMent(SND.setting.RETRY_ACTION);
|
|
|
MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.GUARD, CALLSTATUS.IDLE);
|
|
|
MainActivity.mCallController.stop1stCallTimer();
|
|
|
Global.change1stCallLogAction(CALLACTION.REJECT);
|
|
|
@@ -552,6 +539,7 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
((MainActivity)mContext).finishPopUp(ID.POPUP.POPUP_NOTICE_SUBPHONETALK);
|
|
|
}
|
|
|
|
|
|
+ doEnd();
|
|
|
MainActivity.mCallController.setTalkPath(CALLPATH.NORMAL);
|
|
|
((MainActivity)mContext).displayRemoteID(null);
|
|
|
Global.stopMelodyRepeat();
|
|
|
@@ -576,7 +564,8 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
if (eCallOwner != CALLOWNER.WALLPAD) {
|
|
|
((MainActivity)mContext).finishPopUp(ID.POPUP.POPUP_NOTICE_SUBPHONETALK);
|
|
|
}
|
|
|
- MainActivity.mCallController.quitMoIPCall();
|
|
|
+// MainActivity.mCallController.quitMoIPCall();
|
|
|
+ doEnd();
|
|
|
MainActivity.mCallController.mCallInfo.setCallStatus(CALLTYPE.GUARD, CALLSTATUS.IDLE);
|
|
|
MainActivity.mCallController.stop1stCallTimer();
|
|
|
MainActivity.mCallController.stop2ndCallTimer();
|
|
|
@@ -1571,38 +1560,12 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
try {
|
|
|
getVolume();
|
|
|
drawVolume();
|
|
|
- getGuardListInfo();
|
|
|
- swap5thBTN(false);
|
|
|
- //enableEndBTN(true)
|
|
|
} catch (Exception e) {
|
|
|
Log.e(TAG, "[Exception] displayScreenValues()");
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void getGuardListInfo() {
|
|
|
- try {
|
|
|
- int nGuardCnt = ConfigValues.mGuardListTable.getCnt();
|
|
|
- for (int i = 0; i < nGuardCnt; i++) {
|
|
|
- String guardName = ConfigValues.mGuardListTable.getGuardInfo(i).NAME();
|
|
|
- Log.d(TAG, "[getGuardListInfo] guardName [" + guardName + "]");
|
|
|
- if (guardName.contains("관할") || guardName.equals("경비실")) {
|
|
|
- strCONTROLGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
|
|
|
- } else if (guardName.contains("정문")) {
|
|
|
- strMAINGATEGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
|
|
|
- } else if (guardName.contains("후문")) {
|
|
|
- strSUBGATEGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
|
|
|
- } else if (guardName.equals("관리실")) {
|
|
|
- strOFFICEGUARD_IP = ConfigValues.mGuardListTable.getGuardInfo(i).IP();
|
|
|
- }
|
|
|
- }
|
|
|
- setGuardBTNEnable(true);
|
|
|
- } catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] getGuardListInfo()");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private String getDongString() {
|
|
|
try {
|
|
|
wallpaddbmgr DBMGR = new wallpaddbmgr(mContext);
|
|
|
@@ -1617,200 +1580,91 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void changeBTN_Activated(String strRemoteIP) {
|
|
|
+ private void setBTNStatus(String strRemoteIP) {
|
|
|
try {
|
|
|
- String strGuardName = MainActivity.mCallController.getGuardName(strRemoteIP);
|
|
|
- LOG_INFO("[changeBTN_Activated] strRemoteIP [" + strRemoteIP + "], strGuardName [" + strGuardName + "]");
|
|
|
- if (strGuardName.contains("관할") || strGuardName.equals("경비실")) {
|
|
|
- mCtrlBTNAnimHandler.sendEmptyMessage(0);
|
|
|
+ LOG("[setBTNStatus] MainActivity.mCallController.mCallInfo.getGUARD() [" + MainActivity.mCallController.mCallInfo.getGUARD() + "]");
|
|
|
+ if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TRYING_CALL) {
|
|
|
+ ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
+ runFlickerCallLED();
|
|
|
+
|
|
|
if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode); // 비황성화
|
|
|
+ BTN_END.setButtonEventOffEnable(R.drawable.btn_end_disabled_easymode); // 비활성화
|
|
|
}
|
|
|
- } else if (strGuardName.contains("정문")) {
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_TALK.setButtonEventOffDisable();
|
|
|
- mCallBTNAnimHandler.sendEmptyMessage(0);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- mMainBTNAnimHandler.sendEmptyMessage(0);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ else {
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_guard_call_disabled); // 비활성화
|
|
|
+ BTN_END.setButtonEventOffEnable(R.drawable.btn_guard_end_disabled); // 비활성화
|
|
|
}
|
|
|
- } else if (strGuardName.contains("후문")) {
|
|
|
+ }
|
|
|
+ else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLING) {
|
|
|
+ ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
+ runFlickerCallLED();
|
|
|
+
|
|
|
if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_TALK.setButtonEventOffDisable();
|
|
|
- mCallBTNAnimHandler.sendEmptyMessage(0);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- mSubBTNAnimHandler.sendEmptyMessage(0);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode); // 비황성화
|
|
|
+ BTN_END.setButtonEventOffDisable(); // 활성화
|
|
|
}
|
|
|
- } else if (strGuardName.equals("관리실")) {
|
|
|
- mOfficeBTNAnimHandler.sendEmptyMessage(0);
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
+ else {
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_guard_call_disabled); // 비활성화
|
|
|
+ BTN_END.setButtonEventOffDisable(); // 활성화
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLED) {
|
|
|
+ runFlickerCallLED();
|
|
|
+ ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
+ enableEndBTN(true);
|
|
|
+
|
|
|
if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ BTN_TALK.setButtonEventOffDisable(); // 활성화
|
|
|
+ BTN_END.setButtonEventOffDisable(); // 활성화
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ BTN_TALK.setButtonEventOffDisable(); // 활성화
|
|
|
+ BTN_END.setButtonEventOffDisable(); // 활성화
|
|
|
}
|
|
|
- swap5thBTN(false);
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] changeBTN_Activated(String strRemoteIP)");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
+ else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TALKING) {
|
|
|
+ ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
+ setOnCallLED();
|
|
|
|
|
|
- private void changeBTNImage_Selected(String strRemoteIP) {
|
|
|
- try {
|
|
|
- LOG("[changeBTNImage_Selected] strRemoteIP [" + strRemoteIP + "]");
|
|
|
- int nGuardCnt = ConfigValues.mGuardListTable.getCnt();
|
|
|
- String strGuardName = "NONE";
|
|
|
- for (int i = 0; i < nGuardCnt; i++) {
|
|
|
- if (ConfigValues.mGuardListTable.getGuardInfo(i).IP().equals(strRemoteIP)) {
|
|
|
- strGuardName = ConfigValues.mGuardListTable.getGuardInfo(i).NAME();
|
|
|
- break;
|
|
|
+ if (ConfigValues.bEasyModeUse) {
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode); // 비황성화
|
|
|
+ BTN_END.setButtonEventOffDisable(); // 활성화
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_guard_call_disabled); // 비활성화
|
|
|
+ BTN_END.setButtonEventOffDisable(); // 활성화
|
|
|
}
|
|
|
}
|
|
|
+ else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CANCEL) {
|
|
|
+ ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
|
|
|
- if (strGuardName.contains("관할") || strGuardName.equals("경비실")) {
|
|
|
- mCtrlBTNAnimHandler.removeMessages(0);
|
|
|
- mCtrlBTNAnimHandler.removeMessages(1);
|
|
|
if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setEnabled(false);
|
|
|
- BTN_OFFICE.setEnabled(true);
|
|
|
- BTN_CONTROL.setImageResource(R.drawable.btn_guard_1_selected_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setEnabled(false);
|
|
|
- BTN_MAINGATE.setEnabled(true);
|
|
|
- BTN_SUBGATE.setEnabled(true);
|
|
|
- BTN_OFFICE.setEnabled(true);
|
|
|
- BTN_CONTROL.setImageResource(R.drawable.btn_guard_ctrl_selected);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode); // 비황성화
|
|
|
+ BTN_END.setButtonEventOffEnable(R.drawable.btn_end_disabled_easymode); // 비활성화
|
|
|
}
|
|
|
- } else if (strGuardName.contains("정문")) {
|
|
|
- mMainBTNAnimHandler.removeMessages(0);
|
|
|
- mMainBTNAnimHandler.removeMessages(1);
|
|
|
- mCallBTNAnimHandler.removeMessages(0);
|
|
|
- mCallBTNAnimHandler.removeMessages(1);
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setEnabled(true);
|
|
|
- BTN_OFFICE.setEnabled(true);
|
|
|
- BTN_TALK.setButtonEventOffEnable();
|
|
|
- BTN_TALK.setImageResource(R.drawable.btn_call_selected_easymode);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setEnabled(true);
|
|
|
- BTN_MAINGATE.setEnabled(false);
|
|
|
- BTN_SUBGATE.setEnabled(true);
|
|
|
- BTN_OFFICE.setEnabled(true);
|
|
|
- BTN_MAINGATE.setImageResource(R.drawable.btn_guard_main_selected);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ else {
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_guard_call_disabled); // 비활성화
|
|
|
+ BTN_END.setButtonEventOffEnable(R.drawable.btn_guard_end_disabled); // 비활성화
|
|
|
}
|
|
|
- } else if (strGuardName.contains("후문")) {
|
|
|
- mSubBTNAnimHandler.removeMessages(0);
|
|
|
- mSubBTNAnimHandler.removeMessages(1);
|
|
|
- mCallBTNAnimHandler.removeMessages(0);
|
|
|
- mCallBTNAnimHandler.removeMessages(1);
|
|
|
+ }
|
|
|
+ else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TIMEOUT_1STCALL) {
|
|
|
+ ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
+
|
|
|
if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setEnabled(true);
|
|
|
- BTN_OFFICE.setEnabled(true);
|
|
|
- BTN_TALK.setButtonEventOffEnable();
|
|
|
- BTN_TALK.setImageResource(R.drawable.btn_call_selected_easymode);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setEnabled(true);
|
|
|
- BTN_MAINGATE.setEnabled(true);
|
|
|
- BTN_SUBGATE.setEnabled(false);
|
|
|
- BTN_OFFICE.setEnabled(true);
|
|
|
- BTN_SUBGATE.setImageResource(R.drawable.btn_guard_sub_selected);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode); // 비황성화
|
|
|
+ BTN_END.setButtonEventOffEnable(R.drawable.btn_end_disabled_easymode); // 비활성화
|
|
|
}
|
|
|
- } else if (strGuardName.equals("관리실")) {
|
|
|
- mOfficeBTNAnimHandler.removeMessages(0);
|
|
|
- mOfficeBTNAnimHandler.removeMessages(1);
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setEnabled(true);
|
|
|
- BTN_OFFICE.setEnabled(false);
|
|
|
- BTN_OFFICE.setImageResource(R.drawable.btn_guard_4_selected_easymode);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setEnabled(true);
|
|
|
- BTN_MAINGATE.setEnabled(true);
|
|
|
- BTN_SUBGATE.setEnabled(true);
|
|
|
- BTN_OFFICE.setEnabled(false);
|
|
|
- BTN_OFFICE.setImageResource(R.drawable.btn_guard_office_selected);
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
+ else {
|
|
|
+ BTN_TALK.setButtonEventOffEnable(R.drawable.btn_guard_call_disabled); // 비활성화
|
|
|
+ BTN_END.setButtonEventOffEnable(R.drawable.btn_guard_end_disabled); // 비활성화
|
|
|
}
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] changeBTNImage_Selected(String strRemoteIP)");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- private void setBTNStatus(String strRemoteIP) {
|
|
|
- try {
|
|
|
- LOG("[setBTNStatus] MainActivity.mCallController.mCallInfo.getGUARD() [" + MainActivity.mCallController.mCallInfo.getGUARD() + "]");
|
|
|
- if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLING) {
|
|
|
- ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
- changeBTNImage_Selected(strRemoteIP);
|
|
|
- runFlickerCallLED();
|
|
|
- } else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.CALLED) {
|
|
|
- runFlickerCallLED();
|
|
|
- ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
- changeBTN_Activated(strRemoteIP);
|
|
|
- enableEndBTN(true);
|
|
|
- } else if (MainActivity.mCallController.mCallInfo.getGUARD() == CALLSTATUS.TALKING) {
|
|
|
- ((MainActivity) mContext).setMenuBTNEnable(false);
|
|
|
- changeBTNImage_Selected(strRemoteIP);
|
|
|
- setOnCallLED();
|
|
|
- swap5thBTN(true);
|
|
|
- } else {
|
|
|
+ else {
|
|
|
mCallBTNAnimHandler.removeMessages(0);
|
|
|
mCallBTNAnimHandler.removeMessages(1);
|
|
|
- mCtrlBTNAnimHandler.removeMessages(0);
|
|
|
- mCtrlBTNAnimHandler.removeMessages(1);
|
|
|
- mMainBTNAnimHandler.removeMessages(0);
|
|
|
- mMainBTNAnimHandler.removeMessages(1);
|
|
|
- mSubBTNAnimHandler.removeMessages(0);
|
|
|
- mSubBTNAnimHandler.removeMessages(1);
|
|
|
- mOfficeBTNAnimHandler.removeMessages(0);
|
|
|
- mOfficeBTNAnimHandler.removeMessages(1);
|
|
|
|
|
|
((MainActivity) mContext).setMenuBTNEnable(true);
|
|
|
- setGuardBTNEnable(false);
|
|
|
setOffCallLED();
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -1836,107 +1690,6 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void setGuardBTNEnable(boolean bEnable) {
|
|
|
- try {
|
|
|
- LOG("[setGuardBTNEnable] bEnable [" + bEnable + "]");
|
|
|
-
|
|
|
- if (bEnable) {
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- if (strCONTROLGUARD_IP.equals("NONE"))
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- else {
|
|
|
- BTN_CONTROL.setButtonEventOffDisable();
|
|
|
- BTN_CONTROL.setImageResource(R.drawable.btn_guard_1_normal_easymode);
|
|
|
- }
|
|
|
- if (strOFFICEGUARD_IP.equals("NONE")) {
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- } else {
|
|
|
- BTN_OFFICE.setButtonEventOffDisable();
|
|
|
- BTN_OFFICE.setImageResource(R.drawable.btn_guard_4_normal_easymode);
|
|
|
- }
|
|
|
- LOG("[setGuardBTNEnable] bEnable 1 [" + bEnable + "]");
|
|
|
-
|
|
|
- BTN_TALK.setButtonEventOffDisable();
|
|
|
- BTN_TALK.setImageResource(R.drawable.btn_call_normal_easymode);
|
|
|
- } else {
|
|
|
- if (strCONTROLGUARD_IP.equals("NONE"))
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- else {
|
|
|
- BTN_CONTROL.setButtonEventOffDisable();
|
|
|
- BTN_CONTROL.setImageResource(R.drawable.btn_guard_ctrl_normal);
|
|
|
- }
|
|
|
- if (strMAINGATEGUARD_IP.equals("NONE"))
|
|
|
- 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);
|
|
|
- else {
|
|
|
- BTN_SUBGATE.setButtonEventOffDisable();
|
|
|
- BTN_SUBGATE.setImageResource(R.drawable.btn_guard_sub_normal);
|
|
|
- }
|
|
|
- if (strOFFICEGUARD_IP.equals("NONE"))
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
- else {
|
|
|
- BTN_OFFICE.setButtonEventOffDisable();
|
|
|
- BTN_OFFICE.setImageResource(R.drawable.btn_guard_office_normal);
|
|
|
- }
|
|
|
- //BTN_TALK.setEnabled(true);
|
|
|
- //LOG("[setGuardBTNEnable] bEnable 2 [" + bEnable + "]");
|
|
|
- //BTN_TALK.setButtonEventOffDisable();
|
|
|
- //BTN_TALK.setImageResource(R.drawable.btn_call_normal_easymode);
|
|
|
-
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_1_disabled_easymode);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_4_disabeld_easymode);
|
|
|
- BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode);
|
|
|
- } else {
|
|
|
- BTN_CONTROL.setButtonEventOffEnable(R.drawable.btn_guard_ctrl_disabled);
|
|
|
- BTN_MAINGATE.setButtonEventOffEnable(R.drawable.btn_guard_main_disabled);
|
|
|
- BTN_SUBGATE.setButtonEventOffEnable(R.drawable.btn_guard_sub_disabled);
|
|
|
- BTN_OFFICE.setButtonEventOffEnable(R.drawable.btn_guard_office_disabled);
|
|
|
- BTN_TALK.setImageResource(R.drawable.btn_guard_call_disabled);
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] setGuardBTNEnable()");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- private void swap5thBTN(boolean bEND) {
|
|
|
- try {
|
|
|
- if (bEND) {
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_TALK.setButtonEventOffEnable(R.drawable.btn_call_disabled_easymode);
|
|
|
- BTN_END.setButtonEventOffDisable();
|
|
|
- BTN_END.setImageResource(R.drawable.btn_end_normal_easymode);
|
|
|
- } else {
|
|
|
- BTN_TALK.setButtonEventOffEnable(R.drawable.btn_guard_call_disabled);
|
|
|
- BTN_END.setButtonEventOffDisable();
|
|
|
- BTN_END.setImageResource(R.drawable.btn_guard_end_normal);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (ConfigValues.bEasyModeUse) {
|
|
|
- BTN_TALK.setButtonEventOffDisable();
|
|
|
- BTN_TALK.setImageResource(R.drawable.btn_call_normal_easymode);
|
|
|
- BTN_END.setButtonEventOffEnable(R.drawable.btn_end_disabled_easymode);
|
|
|
- } else {
|
|
|
- BTN_TALK.setButtonEventOffDisable();
|
|
|
- BTN_TALK.setImageResource(R.drawable.btn_guard_call_normal);
|
|
|
- BTN_END.setButtonEventOffEnable(R.drawable.btn_guard_end_disabled);
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- Log.e(TAG, "[Exception] swap5thBTN(boolean bEND)");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private void enableEndBTN(boolean bEnable) {
|
|
|
try {
|
|
|
if (bEnable) {
|
|
|
@@ -2267,90 +2020,6 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- Handler mCtrlBTNAnimHandler = new Handler() {
|
|
|
- @SuppressLint("HandlerLeak")
|
|
|
- @Override
|
|
|
- public void handleMessage(Message msg) {
|
|
|
-// LOG("[mCtrlBTNAnimHandler] msg.what = " + msg.what);
|
|
|
- if (msg.what == 0) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- if (ConfigValues.bEasyModeUse)
|
|
|
- BTN_CONTROL.setImageResource(R.drawable.btn_guard_1_flashed_easymode);
|
|
|
- else BTN_CONTROL.setImageResource(R.drawable.btn_guard_ctrl_activated);
|
|
|
- mCtrlBTNAnimHandler.sendEmptyMessageDelayed(1, 500);
|
|
|
- }
|
|
|
- } else if (msg.what == 1) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- if (ConfigValues.bEasyModeUse)
|
|
|
- BTN_CONTROL.setImageResource(R.drawable.btn_guard_1_normal_easymode);
|
|
|
- else BTN_CONTROL.setImageResource(R.drawable.btn_guard_ctrl_normal);
|
|
|
- mCtrlBTNAnimHandler.sendEmptyMessageDelayed(0, 500);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- Handler mMainBTNAnimHandler = new Handler() {
|
|
|
- @SuppressLint("HandlerLeak")
|
|
|
- @Override
|
|
|
- public void handleMessage(Message msg) {
|
|
|
-// LOG("[mMainBTNAnimHandler] msg.what = " + msg.what);
|
|
|
- if (msg.what == 0) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- BTN_MAINGATE.setImageResource(R.drawable.btn_guard_main_activated);
|
|
|
- mMainBTNAnimHandler.sendEmptyMessageDelayed(1, 500);
|
|
|
- }
|
|
|
- } else if (msg.what == 1) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- BTN_MAINGATE.setImageResource(R.drawable.btn_guard_main_normal);
|
|
|
- mMainBTNAnimHandler.sendEmptyMessageDelayed(0, 500);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- Handler mSubBTNAnimHandler = new Handler() {
|
|
|
- @SuppressLint("HandlerLeak")
|
|
|
- @Override
|
|
|
- public void handleMessage(Message msg) {
|
|
|
-// LOG("[mSubBTNAnimHandler] msg.what = " + msg.what);
|
|
|
- if (msg.what == 0) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- BTN_SUBGATE.setImageResource(R.drawable.btn_guard_sub_activated);
|
|
|
- mSubBTNAnimHandler.sendEmptyMessageDelayed(1, 500);
|
|
|
- }
|
|
|
- } else if (msg.what == 1) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- BTN_SUBGATE.setImageResource(R.drawable.btn_guard_sub_normal);
|
|
|
- mSubBTNAnimHandler.sendEmptyMessageDelayed(0, 500);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- Handler mOfficeBTNAnimHandler = new Handler() {
|
|
|
- @SuppressLint("HandlerLeak")
|
|
|
- @Override
|
|
|
- public void handleMessage(Message msg) {
|
|
|
-// LOG("[mOfficeBTNAnimHandler] msg.what = " + msg.what);
|
|
|
- if (msg.what == 0) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- if (ConfigValues.bEasyModeUse)
|
|
|
- BTN_OFFICE.setImageResource(R.drawable.btn_guard_4_flashed_easymode);
|
|
|
- else BTN_OFFICE.setImageResource(R.drawable.btn_guard_office_activated);
|
|
|
- mOfficeBTNAnimHandler.sendEmptyMessageDelayed(1, 500);
|
|
|
- }
|
|
|
- } else if (msg.what == 1) {
|
|
|
- if (MainActivity.mCallController.getTalkPath() == CALLPATH.NORMAL) {
|
|
|
- if (ConfigValues.bEasyModeUse)
|
|
|
- BTN_OFFICE.setImageResource(R.drawable.btn_guard_4_normal_easymode);
|
|
|
- else BTN_OFFICE.setImageResource(R.drawable.btn_guard_office_normal);
|
|
|
- mOfficeBTNAnimHandler.sendEmptyMessageDelayed(0, 500);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
private void finishWallpadCallApp() {
|
|
|
try {
|
|
|
doEnd();
|
|
|
@@ -2361,4 +2030,18 @@ public class TalkGuard extends WpadScreen implements CallEventListener, MainEven
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public void sendSoundPlayRequestBR(int nSoundID) {
|
|
|
+ try {
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setAction(define.NOTIFY_ACNAME);
|
|
|
+ intent.putExtra(define.NOTIBR_KIND, define.NOTIFY_PLAYMENT);
|
|
|
+ intent.putExtra(define.NOTIBR_CONTENT, nSoundID);
|
|
|
+ getContext().sendBroadcast(intent);
|
|
|
+ } catch (Exception e) {
|
|
|
+ Log.e(TAG, "[Exception] sendSoundPlayRequestBR(int nSoundID)");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|