Browse Source

<呼叫超时时间统一改成30s>

weizhengliang 4 years ago
parent
commit
d4486648a9

+ 1 - 1
app/build.gradle

@@ -25,7 +25,7 @@ android {
         minSdkVersion 15
         targetSdkVersion 26
         versionCode 1
-        versionName "1.34"
+        versionName "1.35"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 
         buildConfigField "String", "BUILD_TIME", getDate()

+ 1 - 1
app/src/main/java/com/wdkl/callingbed/common/Constants.java

@@ -241,7 +241,7 @@ public class Constants {
     /**
      * 语音呼叫超时时间<br>
      */
-    public static String CALLINGTIMEOUT = "180";
+    public static String CALLINGTIMEOUT = "30";
     /**
      * 熄屏时间<br>
      */

+ 4 - 3
app/src/main/java/com/wdkl/callingbed/ui/CallingBedActivity.java

@@ -401,7 +401,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     /**
      * 呼叫超时时间
      */
-    private long callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);//默认30秒
+    private long callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 30000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);//默认30秒
 
 
     /**
@@ -1893,7 +1893,8 @@ 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);
+        callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 30000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);
+        callTimeOutBack = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) <= 0 ? 30 : StringUtils.parseInt(Constants.CALLINGTIMEOUT));//默认180秒
     }
 
     //---------------------------------------------设置硬件参数部分(下)-----------------------------------------------------------------
@@ -2373,7 +2374,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     /**
      * 后台设置的呼叫超时时间
      */
-    public int callTimeOutBack = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) <= 0 ? 180 : StringUtils.parseInt(Constants.CALLINGTIMEOUT));//默认180秒
+    public int callTimeOutBack = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) <= 0 ? 30 : StringUtils.parseInt(Constants.CALLINGTIMEOUT));//默认180秒
     public int timeOut = callTimeOutBack;
 
     /**