From: SnickerSun Date: Sun, 15 Aug 2021 12:43:34 +0000 (+0800) Subject: release ICSer_V892_2108141532_release.apk X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=e8b1cb4893ced5c24e0f2263f610b0b4a3c7c59a;p=protocol_srv.git release ICSer_V892_2108141532_release.apk 解决重启服务会注册出错问题。 --- diff --git a/app/release/ICSer_V891_2108131748_release.apk b/app/release/ICSer_V892_2108141532_release.apk similarity index 77% rename from app/release/ICSer_V891_2108131748_release.apk rename to app/release/ICSer_V892_2108141532_release.apk index 01c62190..cfca1e59 100644 Binary files a/app/release/ICSer_V891_2108131748_release.apk and b/app/release/ICSer_V892_2108141532_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 0afda80b..fce45f8a 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"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 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 74913071..521013f3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -98,6 +98,8 @@ + + setHeartRateDetectAlarm "); setHeartRateDetectAlarm(1); @@ -234,7 +237,7 @@ public class CoreService extends Service { } 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); @@ -246,11 +249,15 @@ public class CoreService extends Service { // 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); @@ -1258,7 +1265,7 @@ public class CoreService extends Service { } 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并触发定位 diff --git a/app/src/main/java/com/enqualcomm/support/bean/ICLocation.java b/app/src/main/java/com/enqualcomm/support/bean/ICLocation.java index 45ee3d86..d4c4baa3 100644 --- a/app/src/main/java/com/enqualcomm/support/bean/ICLocation.java +++ b/app/src/main/java/com/enqualcomm/support/bean/ICLocation.java @@ -101,14 +101,23 @@ public class ICLocation { public static final int MAX_GPS_NOSIGNAL_COUNT = 15; public static final int MAX_GPS_SEARCH_TIMEOUT = 120; + public void setLastWorkingMode(int wkmod){ + last_workmode=wkmod; + } public void setWorkingMod(int wkmod) { mworkingMod = wkmod; } + public int getLastWorkingMode(){ + return last_workmode; + } + public void setLocation_cycle(int _locatCycle) { location_cycle = _locatCycle; } + private static int last_workmode=NORMAL_MOD; //上一次工作模式,主要用来EMERGENCY_MODE 结束后返回 使用。 + public int getWorkingMod() { return mworkingMod; } diff --git a/app/version_code.properties b/app/version_code.properties index d165b4e1..bca60f06 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Fri Aug 13 17:48:49 CST 2021 -VERSION_CODE=891 +#Sat Aug 14 15:32:16 CST 2021 +VERSION_CODE=892