From: snickersun Date: Sun, 7 Feb 2021 06:37:21 +0000 (+0800) Subject: release V761 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=e3f2870d32d0a8c2a2598d49a31a16f908fd3cfc;p=protocol_srv.git release V761 添加对sensor 读取cutoff 消息的支持 --- diff --git a/app/release/ICSer_V760_2102062340_release.apk b/app/release/ICSer_V761_2102071435_release.apk similarity index 78% rename from app/release/ICSer_V760_2102062340_release.apk rename to app/release/ICSer_V761_2102071435_release.apk index 9be8e40d..4541d43f 100644 Binary files a/app/release/ICSer_V760_2102062340_release.apk and b/app/release/ICSer_V761_2102071435_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index b81fd0e4..f39c74ec 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":760,"versionName":"2102062340","enabled":true,"outputFile":"ICSer_V760_2102062340_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V760_2102062340_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":761,"versionName":"2102071435","enabled":true,"outputFile":"ICSer_V761_2102071435_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V761_2102071435_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java b/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java index 26832a5e..1993f452 100644 --- a/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java +++ b/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java @@ -60,7 +60,7 @@ public class AntiMonitorService extends AbstractInvokeHandlerService implements private static int ant_status_event_reported = 0; // 0 表示无消息, 1表示有消息需要发送, 大于1表示timeout时间内又有新消息,可以忽略不计 private static long anti_event_receivedTime = 0; private static int last_send_antoff_event = -1; - private static int current_cut_status = 12; //2 佩戴, 大于12 表示脱腕 + private static int current_cut_status = 12; //2 锁定, 大于12 表示解锁 private static int cut_status_event_reported = 0; // 0 表示无消息, 1表示有消息需要发送, 大于1表示timeout时间内又有新消息,可以忽略不计 private static long cut_event_receivedTime = 0; private static int last_send_cut_event = -1; @@ -594,11 +594,21 @@ public class AntiMonitorService extends AbstractInvokeHandlerService implements @Override public void onSensorChanged(SensorEvent sensorEvent) { - current_anti_status = (int) sensorEvent.values[0]; - ant_status_event_reported++; - ICLogger.i("近距离 " + current_anti_status + " get event " + ant_status_event_reported + " times !"); - anti_event_receivedTime = System.currentTimeMillis(); - reset_timer(); + int event = (int) sensorEvent.values[0]; + if(event==2 || event == 12){ + current_cut_status = event; + cut_status_event_reported++; + ICLogger.i("近距离 " + current_cut_status + " sensor event " + cut_status_event_reported + " times !"); + cut_event_receivedTime = System.currentTimeMillis(); + reset_timer_cut(); + + }else { + current_anti_status = event; + ant_status_event_reported++; + ICLogger.i("近距离 " + current_anti_status + " sensor event " + ant_status_event_reported + " times !"); + anti_event_receivedTime = System.currentTimeMillis(); + reset_timer(); + } } @Override diff --git a/app/version_code.properties b/app/version_code.properties index 6f5f547c..2d2c15a7 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Sat Feb 06 23:40:53 CST 2021 -VERSION_CODE=760 +#Sun Feb 07 14:35:41 CST 2021 +VERSION_CODE=761