From: k.liang Date: Mon, 25 Oct 2021 02:39:56 +0000 (+0800) Subject: AA-解决充电时不发送每隔5分钟的特征数据 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=ae95a4a63c7ab376a78c390cecf7efbb8a34c8e7;p=icsupport.git AA-解决充电时不发送每隔5分钟的特征数据 --- diff --git a/app/release/output.json b/app/release/output.json index 9e205da7..1ce30f53 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":988,"versionName":"2110222005","enabled":true,"outputFile":"ICSer_V988_2110222005_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V988_2110222005_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":990,"versionName":"2110251012","enabled":true,"outputFile":"ICSer_V990_2110251012_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V990_2110251012_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/enqualcomm/support/CoreService.java b/app/src/main/java/com/enqualcomm/support/CoreService.java index 8327c70e..7f6a13b4 100644 --- a/app/src/main/java/com/enqualcomm/support/CoreService.java +++ b/app/src/main/java/com/enqualcomm/support/CoreService.java @@ -13,6 +13,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.database.Cursor; import android.net.Uri; +import android.os.BatteryManager; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; @@ -1310,6 +1311,18 @@ public class CoreService extends Service { checkKeepSitting();//检查久坐 checkAlarmMessage();//检测是否有报警消息需要显示 checkUnreadMessage();//检查未读消息 + + IntentFilter intentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); + Intent intent = runtime.getContextProxy().context.registerReceiver(null, intentFilter); + int batteryChargeState = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1); + if(batteryChargeState != BatteryManager.BATTERY_PLUGGED_AC && batteryChargeState != BatteryManager.BATTERY_PLUGGED_USB && batteryChargeState != BatteryManager.BATTERY_PLUGGED_WIRELESS){ + if (runtime.check_stat_do_temp_test()) { + TemperatureUtil.getInstance().doTempTestInThread(FROM_SERVER); + } + if (runtime.check_stat_do_ppg_test()) { + HeartRateManager.getInstance().triggerPPGTest(FROM_SERVER); + } + } if (this.mKeepAlive != null) { if (connection.isServerConnected() && runtime.isServerProtocolConnected()) { this.mKeepAlive.onHeartAlarm(this.connection, this.runtime); diff --git a/app/version_code.properties b/app/version_code.properties index f294bbef..a2cdce1d 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Fri Oct 22 20:05:07 CST 2021 -VERSION_CODE=988 +#Mon Oct 25 10:12:46 CST 2021 +VERSION_CODE=990