|
@@ -416,6 +416,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
private long screenTimeOut = 15;
|
|
|
|
|
|
+ //床位是否入住
|
|
|
+ private boolean isEmptyInfo = true;
|
|
|
+
|
|
|
/**
|
|
|
* 时间线程
|
|
|
*/
|
|
@@ -1008,7 +1011,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
});
|
|
|
} else {
|
|
|
LogUtil.d("getMainData", "setWelcomeView==succeed==");
|
|
|
- setWelcomeView();
|
|
|
+ //setWelcomeView();
|
|
|
+ setDefaultMainView();
|
|
|
dismissNurseBrightness();
|
|
|
}
|
|
|
}
|
|
@@ -1130,12 +1134,22 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
vWelcome.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
|
|
|
+ private void setDefaultMainView() {
|
|
|
+ isEmptyInfo = true;
|
|
|
+ setTitle();
|
|
|
+ vMain.setVisibility(View.VISIBLE);
|
|
|
+ if (initDataEntity != null) {
|
|
|
+ tvBedNum.setText(initDataEntity.getDeviceBedNum());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 更新主界面UI
|
|
|
*/
|
|
|
private void setMainView() {
|
|
|
if (null != mainDataEntity) {
|
|
|
//关闭欢迎界面
|
|
|
+ isEmptyInfo = false;
|
|
|
vWelcome.setVisibility(View.GONE);
|
|
|
vMain.setVisibility(View.VISIBLE);
|
|
|
|
|
@@ -1412,9 +1426,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (null != vWelcome) {
|
|
|
+ if (!isEmptyInfo) {
|
|
|
//只有在欢迎界面没有显示的时候串口才能用
|
|
|
- if (vWelcome.getVisibility() == View.GONE) {
|
|
|
+ //if (vWelcome.getVisibility() == View.GONE) {
|
|
|
//按键唤醒
|
|
|
if (blackView.getVisibility() == View.VISIBLE) {
|
|
|
CallingBedActivity.this.runOnUiThread(new Runnable() {
|
|
@@ -1597,7 +1611,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
}
|
|
|
|
|
|
|
|
|
- }
|
|
|
+ //}
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2448,9 +2462,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
@Override
|
|
|
public void onStatusVvsipCallEvent(VvsipCall call) {
|
|
|
LogUtil.d("QQWW", "onStatusVvsipCallEvent----call.mState:==" + call.mState + call.isIncomingCall());
|
|
|
- if (!isVisible(vWelcome)) {
|
|
|
+ //if (!isVisible(vWelcome)) {
|
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
|
- }
|
|
|
+ //}
|
|
|
switch (call.mState) {
|
|
|
case 0://正在呼叫中:子机自动接通 isIncomingCall() = true mState = 0 //正在通话中:isIncomingCall() = true
|
|
|
//通话中关闭广播
|
|
@@ -2626,7 +2640,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
protected void comeBackMainPage() {
|
|
|
timeOfBackMainPage++;
|
|
|
timeOut--;
|
|
|
- if (!isVisible(vMain) && timeOfBackMainPage >= callTimeOutBack && !CALL_STATUS.equals(Constants.IN_CALLING) && !isVisible(vWelcome)) {
|
|
|
+ if (!isVisible(vMain) && timeOfBackMainPage >= callTimeOutBack && !CALL_STATUS.equals(Constants.IN_CALLING) && !isEmptyInfo) {
|
|
|
// if (callNurse) {//超时自动取消呼叫了,20191118 之前是长按取消呼叫,后来又改成了根据UI的改变来取消,说让客户一目了然
|
|
|
// callNurse = false;
|
|
|
// UdpSendUtil.sendHangUp(initDataEntity, mainDataEntity);//取消呼叫 add by waderson 20191118
|
|
@@ -2665,7 +2679,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
* 自动拉起护理项加长页面
|
|
|
*/
|
|
|
protected void callLongNursePage(String second) {
|
|
|
- if (!isVisible(vWelcome) && !CALL_STATUS.equals(Constants.IN_CALLING)) {
|
|
|
+ if (!isEmptyInfo && !CALL_STATUS.equals(Constants.IN_CALLING)) {
|
|
|
|
|
|
if ("0".equals(second) || "30".equals(second)) {//一分钟跳4次
|
|
|
if (isVisible(vMain) && !isVisible(vMain_big)) {
|