-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":891,"versionName":"2108131748","enabled":true,"outputFile":"ICSer_V891_2108131748_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V891_2108131748_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":892,"versionName":"2108141532","enabled":true,"outputFile":"ICSer_V892_2108141532_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V892_2108141532_release.apk","properties":{}}]
\ No newline at end of file
<protected-broadcast android:name="com.enqualcomm.support.ACTION_ISCONNECTED" />
<protected-broadcast android:name="com.eqc.deskclock.YUN_ALARM_CHANGE" />
<protected-broadcast android:name="com.enqualcomm.support.sos" />
+ <protected-broadcast android:name="com.ic.protocol.ACTION_IS_SERVER_CONNECTED" />
+
<application
android:name=".ICApplication"
public static int DefaultTemperatureTestCycle = 60 * 60;
public static int DefaultWifiStatus = 0; //0 close , 1 open, 2 open and connect using default wifi
+ public static boolean needHRSTestOnSOS = Util.getSystemProperties("persist.sys.needHRSOnSOS", "false").equals("true");
static void load_config_fromfile() {
try {
}
+ public static void ReloadModCycleSettingsWhenEmergencyStop(Runtime runtime) {
+ Context context = runtime.getContextProxy().context;
+ ICLogger.i("current Cycles PPG " + runtime.getPpgTestCycleInMinutes() + " , LocationCycle " + runtime.getLocationInstance().getLocation_cycle() + " LocationMode " + runtime.getLocationInstance().getWorkingMod());
+ runtime.setPpgTestCycleInMinutes(Config.getPPGTestCycleInMinutes(context));
+ runtime.getLocationInstance().setLocation_cycle(runtime.getLocationInstance().getLocation_cycle());
+ runtime.getLocationInstance().setWorkingMod(runtime.getLocationInstance().getLastWorkingMode());
+ ICLogger.i("current Cycles PPG " + runtime.getPpgTestCycleInMinutes() + " , LocationCycle " + runtime.getLocationInstance().getLocation_cycle() + " LocationMode " + runtime.getLocationInstance().getWorkingMod());
+ }
+
+
+
public static void loadHearBeatSetting(Runtime runtime) {
if(Config.protocol_no == Config.PROTOCOL_UNKNOWN){
Config.HeartBeatAlarmCycle = 65535; //不识别的协议,就设置一个很大的数据相当于没有心跳,这样更省电
stringBuilder2.append("broadcastReceiver action==");
stringBuilder2.append(param1Intent.getAction());
ICLogger.i(stringBuilder2.toString());
- boolean needHRSTestOnSOS = Util.getSystemProperties("persist.sys.needHRSOnSOS", "false").equals("true");
if (ACTION_SEND_EMEGENCY_LOCATION_START.equals(param1Intent.getAction())) {
+ if(runtime.getLocationInstance().getWorkingMod()!=EMERGNECY_MOD) {
+ //先保存需要恢复的模式, 并且防止出现多次进入紧急模式造成的无法恢复以往状态问题
+ runtime.getLocationInstance().setLastWorkingMode(runtime.getLocationInstance().getWorkingMod());
+ }
runtime.getLocationInstance().setWorkingMod(EMERGNECY_MOD);
//runtime.setPpgTestCycle(1);
setLocationAlarm(runtime.getLocationInstance().getWorkingMod());
- if (needHRSTestOnSOS) {
+ if (Config.needHRSTestOnSOS) {
//触发一次心率检测
ICLogger.d("ACTION_SEND_EMEGENCY_LOCATION_START == > setHeartRateDetectAlarm ");
setHeartRateDetectAlarm(1);
} else if (ACTION_LOCAL_SOS_ACTION.endsWith(param1Intent.getAction())) {
VibrateUtil.getInstance(runtime.getContextProxy().context).vibrateOn(true);
// if( param1Intent.getIntExtra("type", 1) == 1) {
- if (needHRSTestOnSOS) {
+ if (Config.needHRSTestOnSOS) {
//触发一次心率检测
ICLogger.d("needHRSTestOnSOS =}}= > setHeartRateDetectAlarm ");
setHeartRateDetectAlarm(1);
// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));
//开启紧急定位模式,GPS 优先1分钟一次定位,持续5分钟
+ if(runtime.getLocationInstance().getWorkingMod()!=EMERGNECY_MOD) {
+ //先保存需要恢复的模式, 并且防止出现多次进入紧急模式造成的无法恢复以往状态问题
+ runtime.getLocationInstance().setLastWorkingMode(runtime.getLocationInstance().getWorkingMod());
+ }
runtime.getLocationInstance().setWorkingMod(EMERGNECY_MOD);
setLocationAlarm(runtime.getLocationInstance().getWorkingMod());
//SOS模式,心率测试1分钟一次,持续5分钟
- if (needHRSTestOnSOS) {
+ if (Config.needHRSTestOnSOS) {
//只触发一次心率检测
ICLogger.d("needHRSTestOnSOS == > setHeartRateDetectAlarm ");
setHeartRateDetectAlarm(1);
} else if (ACTION_SEND_EMEGENCY_LOCATION_STOP.equals(paramIntent.getAction())) {
//stop Emegency location Stop
- Config.loadModCycleSettings(runtime); //回复之前的 工作模式即可
+ Config.ReloadModCycleSettingsWhenEmergencyStop(runtime); //回复之前的 工作模式即可
LocationClient.setForceLocation(1);
setLocationAlarm(runtime.getLocationInstance().getWorkingMod());//同时重置alarm并触发定位
public static final int MAX_GPS_NOSIGNAL_COUNT = 15;\r
public static final int MAX_GPS_SEARCH_TIMEOUT = 120;\r
\r
+ public void setLastWorkingMode(int wkmod){\r
+ last_workmode=wkmod;\r
+ }\r
public void setWorkingMod(int wkmod) {\r
mworkingMod = wkmod;\r
}\r
\r
+ public int getLastWorkingMode(){\r
+ return last_workmode;\r
+ }\r
+\r
public void setLocation_cycle(int _locatCycle) {\r
location_cycle = _locatCycle;\r
}\r
\r
+ private static int last_workmode=NORMAL_MOD; //上一次工作模式,主要用来EMERGENCY_MODE 结束后返回 使用。\r
+\r
public int getWorkingMod() {\r
return mworkingMod;\r
}\r
-#Fri Aug 13 17:48:49 CST 2021\r
-VERSION_CODE=891\r
+#Sat Aug 14 15:32:16 CST 2021\r
+VERSION_CODE=892\r