release 774
authorsnickersun <scy@incartech.cn>
Tue, 6 Apr 2021 12:53:04 +0000 (20:53 +0800)
committersnickersun <scy@incartech.cn>
Tue, 6 Apr 2021 12:53:04 +0000 (20:53 +0800)
修正 CUT 和 ANTI EVENT_TYPE value ,解决佩戴消息误报成剪断的问题。

app/release/ICSer_V774_2104062040_release.apk [moved from app/release/ICSer_V773_2104021759_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java
app/src/main/java/com/enqualcomm/support/service/InputEventReader.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V773_2104021759_release.apk
rename to app/release/ICSer_V774_2104062040_release.apk
index aa3598a..e419b45 100644 (file)
Binary files a/app/release/ICSer_V773_2104021759_release.apk and b/app/release/ICSer_V774_2104062040_release.apk differ
index b7f13cb..3e6cc5a 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":773,"versionName":"2104021759","enabled":true,"outputFile":"ICSer_V773_2104021759_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V773_2104021759_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":774,"versionName":"2104062040","enabled":true,"outputFile":"ICSer_V774_2104062040_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V774_2104062040_release.apk","properties":{}}]
\ No newline at end of file
index 1993f45..17267be 100644 (file)
@@ -34,6 +34,8 @@ import static com.enqualcomm.support.Constants.ACTION_CHECK_CUTOFF_EVENT;
 import static com.enqualcomm.support.Constants.ACTION_CUT_OFF;
 import static com.enqualcomm.support.Constants.KEY_ANTI_EVENT;
 import static com.enqualcomm.support.Constants.KEY_ANTI_TXT;
+import static com.enqualcomm.support.service.InputEventReader.EVENT_TYPE_ANTI;
+import static com.enqualcomm.support.service.InputEventReader.EVENT_TYPE_CUT;
 import static java.lang.Thread.sleep;
 
 
@@ -69,14 +71,14 @@ public class AntiMonitorService extends AbstractInvokeHandlerService implements
 
     @Override
     public void onInputEventRecevied(int type, int event) {
-        if(event==2 || event == 12){
+        if(type==EVENT_TYPE_CUT && event >0 ){
             current_cut_status = event;
             cut_status_event_reported++;
             ICLogger.i("近距离 " + current_cut_status + " input event " + cut_status_event_reported + " times !");
             cut_event_receivedTime = System.currentTimeMillis();
             reset_timer_cut();
 
-        }else {
+        }else if (type==EVENT_TYPE_ANTI && event >0){
             current_anti_status = event;
             ant_status_event_reported++;
             ICLogger.i("近距离 " + current_anti_status + " input event " + ant_status_event_reported + " times !");
index 30bf2f3..5cb33f3 100644 (file)
@@ -8,7 +8,7 @@ import java.io.FileInputStream;
 
 public class InputEventReader {
     public static final int EVENT_TYPE_ANTI=0;
-    public static final int EVENT_TYPE_CUT=0;
+    public static final int EVENT_TYPE_CUT=1;
     public static final int EVENT_ANTI_OFF=10;
     public static final int EVENT_WEARED=1;
     public static final int EVENT_CUT_OFF=12;
@@ -88,7 +88,7 @@ public class InputEventReader {
      */
         int ret=0;
         byte int_bytes[]=new byte[4];
-        if(eventMsgs.length==48){
+        if(eventMsgs.length%16==0){
             int eventtype,eventvalue;
             long eventcode;
             for(int i=0;i<eventMsgs.length/16;i++)
index 51ebd3f..8bf0c10 100644 (file)
@@ -1,2 +1,2 @@
-#Fri Apr 02 17:59:55 CST 2021
-VERSION_CODE=773
+#Tue Apr 06 20:40:30 CST 2021
+VERSION_CODE=774