From ae95a4a63c7ab376a78c390cecf7efbb8a34c8e7 Mon Sep 17 00:00:00 2001 From: "k.liang" Date: Mon, 25 Oct 2021 10:39:56 +0800 Subject: [PATCH] =?utf8?q?AA-=E8=A7=A3=E5=86=B3=E5=85=85=E7=94=B5=E6=97=B6?= =?utf8?q?=E4=B8=8D=E5=8F=91=E9=80=81=E6=AF=8F=E9=9A=945=E5=88=86=E9=92=9F?= =?utf8?q?=E7=9A=84=E7=89=B9=E5=BE=81=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/release/output.json | 2 +- .../java/com/enqualcomm/support/CoreService.java | 13 +++++++++++++ app/version_code.properties | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) 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 -- 2.17.1