From: TrillGates Date: Sat, 6 Feb 2021 08:05:23 +0000 (+0800) Subject: fixed fzd_c5 wear state default state. X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=be529181aadfdb7bf5bac9d2cf5ddb8d1931cbd6;p=protocol_srv.git fixed fzd_c5 wear state default state. --- diff --git a/app/src/main/java/com/enqualcomm/support/CoreService.java b/app/src/main/java/com/enqualcomm/support/CoreService.java index 4a6fab88..da09776c 100644 --- a/app/src/main/java/com/enqualcomm/support/CoreService.java +++ b/app/src/main/java/com/enqualcomm/support/CoreService.java @@ -742,7 +742,7 @@ public class CoreService extends Service { runtime.getDbHelper().saveContacts(contactArray, false, false, false, false, false, true); } } - } else if (Config.custom_name.equals("SGL")) { //C5项目 + } else if (Config.custom_name.equals("SGL") || Config.custom_name.equals("SGLF")) { //C5项目 Config.ConfigAlarm(Runtime.AlarmType.ALARM_ESCAPE, true); Config.ConfigAlarm(Runtime.AlarmType.ALARM_CUTOFF, true); Config.ConfigAlarm(Runtime.AlarmType.ALARM_ILLEGAL_CUTOFF, true); diff --git a/app/src/main/java/com/enqualcomm/support/bean/Runtime.java b/app/src/main/java/com/enqualcomm/support/bean/Runtime.java index 787df89c..1fd63ffd 100644 --- a/app/src/main/java/com/enqualcomm/support/bean/Runtime.java +++ b/app/src/main/java/com/enqualcomm/support/bean/Runtime.java @@ -130,22 +130,29 @@ public class Runtime { public boolean check_stat_do_ppg_test() { - if (debugflag || (Config.noPPGSensor == false //有心率 - && ((isNeedAntioff == true && isAntioff == false) || (isNeedAntioff == false)) //不支持脱腕,或者支持脱腕且佩戴中 + if (debugflag || (!Config.noPPGSensor //有心率 + && (!isNeedAntioff || !isAntioff) //不支持脱腕,或者支持脱腕且佩戴中 )) { return true; } - ICLogger.i("不符合条件,跳过 心率检测!" + (Config.noPPGSensor == true ? "无心率" : "有心率") + " 有佩戴检测?" + isNeedAntioff + " 脱落?" + isAntioff); + ICLogger.i("不符合条件,跳过 心率检测!" + (Config.noPPGSensor ? "无心率" : "有心率") + " 有佩戴检测?" + + isNeedAntioff + " 脱落?" + + isAntioff); return false; } public boolean check_stat_do_temp_test() { - if (debugflag || (Config.noTempSensor == false //有体温 - && ((isNeedAntioff == true && isAntioff == false) || (isNeedAntioff == false)) //不支持脱腕,或者支持脱腕且佩戴中 + if (debugflag || (!Config.noTempSensor //有体温 + && (!isNeedAntioff || !isAntioff) //不支持脱腕,或者支持脱腕且佩戴中 )) { return true; } - ICLogger.i("不符合条件,跳过 体温检测!" + (Config.noTempSensor == true ? "无体温" : "有体温") + " 充电?" + isPowerConnected() + " 移除充电器时间?" + getMsAfterLastPowerPlugout() + "ms, 需要佩戴检测?" + isNeedAntioff + ", 脱腕?" + isAntioff); + ICLogger.i("不符合条件,跳过 体温检测!" + + (Config.noTempSensor ? "无体温" : "有体温") + + " 充电?" + isPowerConnected() + + " 移除充电器时间?" + getMsAfterLastPowerPlugout() + + "ms, 需要佩戴检测?" + + isNeedAntioff + ", 脱腕?" + isAntioff); return false; } diff --git a/app/src/main/java/com/enqualcomm/support/service/InputEventReader.java b/app/src/main/java/com/enqualcomm/support/service/InputEventReader.java index bcb643be..30bf2f30 100644 --- a/app/src/main/java/com/enqualcomm/support/service/InputEventReader.java +++ b/app/src/main/java/com/enqualcomm/support/service/InputEventReader.java @@ -4,13 +4,7 @@ import com.enqualcomm.support.utils.ICLogger; import com.enqualcomm.support.utils.ThreadPool; import com.enqualcomm.support.utils.Util; -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.InputStream; public class InputEventReader { public static final int EVENT_TYPE_ANTI=0; @@ -250,6 +244,6 @@ public class InputEventReader { } public interface InputEventReceiver{ - public void onInputEventRecevied(int type,int event); + void onInputEventRecevied(int type,int event); } }