From: TrillGates Date: Thu, 14 Jan 2021 02:26:20 +0000 (+0800) Subject: add some logs X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=bf8a0c1a9c67c328de3d045191714643ce2535d0;p=protocol_srv.git add some logs --- diff --git a/app/release/ICSer_V750_2101141023_release.apk b/app/release/ICSer_V750_2101141023_release.apk new file mode 100644 index 00000000..953b449a Binary files /dev/null and b/app/release/ICSer_V750_2101141023_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 87e77d44..f436f365 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":748,"versionName":"2101121100","enabled":true,"outputFile":"ICSer_V748_2101121100_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V748_2101121100_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":750,"versionName":"2101141023","enabled":true,"outputFile":"ICSer_V750_2101141023_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V750_2101141023_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 4e443595..45cd9223 100644 --- a/app/src/main/java/com/enqualcomm/support/CoreService.java +++ b/app/src/main/java/com/enqualcomm/support/CoreService.java @@ -668,7 +668,7 @@ public class CoreService extends Service { Config.ConfigAlarm(Runtime.AlarmType.ALARM_WEARED, true); if (Config.getConfigInitFlag(this) == 0) { Config.setLocationMode(this, CUSTOM_MOD8_GPS); - Config.setLocationCycle(this, 60*60); + Config.setLocationCycle(this, 60 * 60); Config.setPPGTestCycle(this, 60); Config.setTemperatureTestCycle(runtime, 60 * 60); Config.setConfigInitFlag(this, 1); @@ -680,7 +680,7 @@ public class CoreService extends Service { if (Config.getConfigInitFlag(this) == 0) { Config.setLocationMode(this, CUSTOM_MOD8_GPS); - Config.setLocationCycle(this, 10*60); + Config.setLocationCycle(this, 10 * 60); Config.setPPGTestCycle(this, 0); Config.setTemperatureTestCycle(runtime, 0); Config.setConfigInitFlag(this, 1); @@ -778,7 +778,7 @@ public class CoreService extends Service { Config.setConfigInitFlag(this, 1); } - } else if (Config.custom_name.equals("VitracK")||Config.custom_name.equals("wtsrui")) { + } else if (Config.custom_name.equals("VitracK") || Config.custom_name.equals("wtsrui")) { Config.ConfigAlarm(Runtime.AlarmType.ALARM_SOS, true); Config.ConfigAlarm(Runtime.AlarmType.ALARM_LOWBATTERY, true); @@ -788,7 +788,7 @@ public class CoreService extends Service { if (Config.getConfigInitFlag(this) == 0) { Config.setLocationMode(this, CUSTOM_MOD8_GPS); Config.setLocationCycle(this, 15 * 60); - Config.setPPGTestCycle(this, 15 ); + Config.setPPGTestCycle(this, 15); Config.setTemperatureTestCycle(runtime, 15 * 60); Config.setConfigInitFlag(this, 1); } @@ -1313,7 +1313,7 @@ public class CoreService extends Service { } else if (ACTION_CHECK_ANTIOFF_EVENT.equals(paramIntent.getAction())) { //只在中断式检测过程中延时用 antiservice.check_ant_event(); - }else if (ACTION_CHECK_CUTOFF_EVENT.equals(paramIntent.getAction())){ + } else if (ACTION_CHECK_CUTOFF_EVENT.equals(paramIntent.getAction())) { antiservice.check_cut_event(); } this.invokeHandlerServiceChain.processUserRequest(paramIntent, this.connection, this.runtime); @@ -1346,9 +1346,11 @@ public class CoreService extends Service { sb.append("自由锻炼中,跳过原有的循环心率检测!"); ICLogger.i("自由锻炼中,跳过原有的循环心率检测!"); } else { - sb.append("setHeartRateDetectAlarm " + heartRateDetectAlarmCycleMinutes+" minutes"); + sb.append("setHeartRateDetectAlarm " + heartRateDetectAlarmCycleMinutes + " minutes"); + ICLogger.d("server_starting == > " + server_starting); if (!server_starting) HeartRateManager.getInstance().triggerPPGTest(FROM_ALARM); + ICLogger.d(sb.toString()); } } if (Config.LOG_TOFILE) ICLogger.logToFile("alarmCycle", sb.toString()); @@ -1429,7 +1431,7 @@ public class CoreService extends Service { //心跳指令默认设置 AlarmHelper.setRealTimeAlarm(runtime.getContextProxy().context, cycle, HEARTBEAT_ALARM); - sb.append(" setHeartBeatAlarm " + HEARTBEAT_ALARM + ", cycle " + cycle +" minutes"); + sb.append(" setHeartBeatAlarm " + HEARTBEAT_ALARM + ", cycle " + cycle + " minutes"); // locationClient.triggerLocationProcess(); ICLogger.i(sb.toString()); FileOutputUtil.fileOutput(runtime.getCacheDir(), "alarmCycle", sb.toString()); diff --git a/app/src/main/java/com/enqualcomm/support/service/HeartRateManager.java b/app/src/main/java/com/enqualcomm/support/service/HeartRateManager.java index d16cde8f..c2ac4da6 100644 --- a/app/src/main/java/com/enqualcomm/support/service/HeartRateManager.java +++ b/app/src/main/java/com/enqualcomm/support/service/HeartRateManager.java @@ -305,9 +305,11 @@ public class HeartRateManager extends AbstractInvokeHandlerService { } //开始去测试 try { + ICLogger.d("from == > " + from + " HeartRateManager "); heartRateSensorService.getHeartRateInfo(from, HeartRateManager.class.getName()); } catch (Exception e) { e.printStackTrace(); + ICLogger.e("exception -- > ", e); } } diff --git a/app/src/main/java/com/enqualcomm/support/utils/AlarmHelper.java b/app/src/main/java/com/enqualcomm/support/utils/AlarmHelper.java index de3136ea..d8c9362e 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/AlarmHelper.java +++ b/app/src/main/java/com/enqualcomm/support/utils/AlarmHelper.java @@ -78,16 +78,19 @@ public class AlarmHelper { } public static void setRealTimeAlarm(Context context, int minutes, String actionname) { + ICLogger.d("minutes == > " + minutes + " action name is == > " + actionname); AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(context, com.enqualcomm.support.CoreService.class); intent.setAction(actionname); PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); alarmManager.cancel(pendingIntent); + ICLogger.d("pendingIntent cancel..."); long l = SystemClock.elapsedRealtime(); if (Build.VERSION.SDK_INT >= 19) { alarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, l + (minutes * 60 * 1000), pendingIntent); return; } + ICLogger.d("set alarm...."); alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, l + (minutes * 60 * 1000), pendingIntent); } diff --git a/app/version_code.properties b/app/version_code.properties index b4531303..dad5171f 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Tue Jan 12 11:00:06 CST 2021 -VERSION_CODE=748 +#Thu Jan 14 10:23:22 CST 2021 +VERSION_CODE=750 diff --git a/local.properties b/local.properties index a49f7abf..92965cb5 100644 --- a/local.properties +++ b/local.properties @@ -5,4 +5,4 @@ # For customization when using a Version Control System, please read the # header note. #Sat Jan 09 15:11:27 CST 2021 -sdk.dir=C\:\\Users\\incar\\AppData\\Local\\Android\\Sdk +sdk.dir=E\:\\Android\\Sdk