|
@@ -698,12 +698,11 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
@Override
|
|
|
protected void initUtil() {
|
|
|
serialPortUtil = ((MyApplication) this.getApplication()).serialPortUtil;
|
|
|
- serialPortUtil.setOnDataReceiveListener(this);
|
|
|
- iMediaPlayerVolume = this;
|
|
|
-
|
|
|
if (serialPortUtil != null) {
|
|
|
+ serialPortUtil.setOnDataReceiveListener(this);
|
|
|
setDoorLight(serialPortUtil, "111");//初始化白色
|
|
|
}
|
|
|
+ iMediaPlayerVolume = this;
|
|
|
|
|
|
//设置语言
|
|
|
textToSpeech = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
|
|
@@ -720,6 +719,15 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ protected void onNewIntent(Intent intent) {
|
|
|
+ super.onNewIntent(intent);
|
|
|
+ if (serialPortUtil != null) {
|
|
|
+ serialPortUtil.setOnDataReceiveListener(this);
|
|
|
+ }
|
|
|
+ iMediaPlayerVolume = this;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
protected void initData() {
|
|
|
//以太网和wifi切换
|
|
|
changeNetConnect();
|
|
@@ -1958,6 +1966,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
VoiceManagerUtil.setCallVoice(CallingBedActivity.this, Integer.parseInt(Constants.BEDCALLVOICE));
|
|
|
//刷新呼叫超时时间
|
|
|
callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);
|
|
|
+ callTimeOutBack = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) <= 0 ? 180 : StringUtils.parseInt(Constants.CALLINGTIMEOUT));
|
|
|
}
|
|
|
|
|
|
private void updateNursingBackground() {
|