From: snickersun Date: Sun, 12 Jul 2020 13:50:40 +0000 (+0800) Subject: release V440 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=46cb11318a7009dcb7841d83c9a9c7b6b1aef363;p=protocol_srv.git release V440 1、强制 默认心跳时间为5分钟 2、H88 心率,体温默认60分钟。 L05 ,l03 根据硬件配置 设置体温心率检测与否。 --- diff --git a/app/release/ICSer_V439_2007121833_release.apk b/app/release/ICSer_V440_2007122146_release.apk similarity index 79% rename from app/release/ICSer_V439_2007121833_release.apk rename to app/release/ICSer_V440_2007122146_release.apk index dc102780..34534864 100644 Binary files a/app/release/ICSer_V439_2007121833_release.apk and b/app/release/ICSer_V440_2007122146_release.apk differ diff --git a/app/src/main/java/com/enqualcomm/support/Config.java b/app/src/main/java/com/enqualcomm/support/Config.java index c6a3b9ca..80cc05c5 100644 --- a/app/src/main/java/com/enqualcomm/support/Config.java +++ b/app/src/main/java/com/enqualcomm/support/Config.java @@ -18,6 +18,7 @@ import org.json.JSONStringer; import java.io.File; import java.util.concurrent.TimeUnit; +import static com.enqualcomm.support.utils.Util.connectWifiByReflectMethod; import static com.enqualcomm.support.utils.Util.getSystemProperties; public class Config { @@ -48,12 +49,16 @@ public class Config { public static final int WiFiLocationTimeoutInSeconds=12; public static String c43_branch_name="none"; + public static String c41_branch_name="none"; public static boolean noSMSNotifyDialog=false; public static boolean noPushTxtNotifyDialog=false; public static boolean noVoiceNotifyDialog=false; public static boolean SOSNoNeedDial=false; + public static boolean noTempSensor=false; + public static boolean noPPGSensor=false; + static { } @@ -369,20 +374,30 @@ public class Config { noPushTxtNotifyDialog=true; noSMSNotifyDialog=true; noVoiceNotifyDialog=true; - if (c43_branch_name.equals("l05")) SOSNoNeedDial=true; + noTempSensor=true; + if (c43_branch_name.equals("l05")) { + SOSNoNeedDial=true; + }else{ + noPPGSensor=true; + } } - String c41_branch_name=Util.getSystemProperties("persist.sys.c41.branch"); + c41_branch_name=Util.getSystemProperties("persist.sys.c41.branch"); if ((c41_branch_name.equals("H88")) ){ noPushTxtNotifyDialog=true; noSMSNotifyDialog=false; noVoiceNotifyDialog=false; + noPPGSensor=false; + noTempSensor=false; + }else if ((c41_branch_name.equals("AK")) ){ + noPPGSensor=false; + noTempSensor=false; } } public static void loadTemperatureSettings(Runtime runtime){ - runtime.temp_test_Cycle = SharPreferenceUtil.getPrefInt(runtime.getContextProxy().context, KeyTempTestCycle, 30); + runtime.temp_test_Cycle = SharPreferenceUtil.getPrefInt(runtime.getContextProxy().context, KeyTempTestCycle, 60); } public static void setTemperatureTestCycle(Runtime runtime,int cycle_minutes) { diff --git a/app/src/main/java/com/enqualcomm/support/CoreService.java b/app/src/main/java/com/enqualcomm/support/CoreService.java index e3113404..f634cc00 100644 --- a/app/src/main/java/com/enqualcomm/support/CoreService.java +++ b/app/src/main/java/com/enqualcomm/support/CoreService.java @@ -524,8 +524,11 @@ public class CoreService extends Service { } - - // Config.setHeartBeatCycle(this,3); //临时设置为3分钟,给L03测试用。测试断线问题未解决,取消测试。 + if (Config.c41_branch_name.equals("H88")){ + Config.setPPGTestCycle(this,60); + Config.setTemperatureTestCycle(runtime,60); + } + Config.setHeartBeatCycle(this,5); //临时设置为3分钟,给L03测试用。测试断线问题未解决,取消测试。 //初始化ServerHeartBeat Cycle Config.loadHearBeatSetting(runtime); //初始化PPG,LocationMod,LocationCycle @@ -645,6 +648,7 @@ public class CoreService extends Service { setLocationAlarm(runtime.getLocationInstance().getWorkingMod()); //设置温度测量间隔时间 + setTempAlarm(); //设置来电模式 @@ -842,7 +846,9 @@ public class CoreService extends Service { } public void setHeartRateDetectAlarm(int heartRateDetectAlarmCycle){ - if (heartRateDetectAlarmCycle>2) + if (Config.noPPGSensor) + return ; + if (heartRateDetectAlarmCycle>1) AlarmHelper.setRealTimeAlarm(runtime.getContextProxy().context,heartRateDetectAlarmCycle,ACTION_HEATR_RATE_START); } public void setAntiCheckAlarm(){ @@ -895,7 +901,7 @@ public class CoreService extends Service { StringBuilder sb=new StringBuilder(); int cycle=runtime.getHeartBeatCycle(); - //心跳指令默认设置为3分钟 + //心跳指令默认设置 AlarmHelper.setRealTimeAlarm(runtime.getContextProxy().context,cycle, HEART_ALARM); sb.append(" setHeartAlarm "+HEART_ALARM+", cycle "+cycle); // locationClient.triggerLocationProcess(); @@ -923,8 +929,14 @@ public class CoreService extends Service { StringBuilder sb=new StringBuilder(); int cycle=runtime.temp_test_Cycle; - AlarmHelper.setRealTimeAlarm(runtime.getContextProxy().context,cycle, TEMP_ALARM); - sb.append(" setTempAlarm "+TEMP_ALARM+", cycle "+cycle); + if(Config.noTempSensor) + return; + if (cycle>1) { + AlarmHelper.setRealTimeAlarm(runtime.getContextProxy().context, cycle, TEMP_ALARM); + sb.append(" setTempAlarm " + TEMP_ALARM + ", cycle " + cycle); + }else { + sb.append(" setTempAlarm " + TEMP_ALARM + ", cycle " + cycle+"<=1 skip!"); + } // locationClient.triggerLocationProcess(); ICLogger.i(sb.toString()); FileOutputUtil.fileOutput(runtime.getCacheDir(),"alarmCycle",sb.toString()); diff --git a/app/version_code.properties b/app/version_code.properties index f8849926..d37214c6 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Sun Jul 12 18:33:28 CST 2020 -VERSION_CODE=439 +#Sun Jul 12 21:46:55 CST 2020 +VERSION_CODE=440