-[{"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
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;
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);