handle jx result.
authorkfl_614 <kfl_614@163.com>
Wed, 6 Jan 2021 08:38:06 +0000 (16:38 +0800)
committerkfl_614 <kfl_614@163.com>
Wed, 6 Jan 2021 08:38:06 +0000 (16:38 +0800)
app/src/main/java/com/ic/work/SensorDataService.java

index 865d1bb..8b59862 100644 (file)
@@ -583,11 +583,16 @@ public class SensorDataService extends Service implements TemperatureHelper.Temp
                 isSuccess + " wrist == >  " + value
                 + "body == > " + animal);
         Intent intent = new Intent();
+        //ACTION_AEE_TEMPERATURE == > com.jx.lanucher.temperature.checkend
         intent.setAction(ACTION_AEE_TEMPERATURE);
+        //JX_KEY_RESULT ==> result
         intent.putExtra(JX_KEY_RESULT, isSuccess ? "1" : "0");
+        //JX_KEY_MODE ==> mode
         intent.putExtra(JX_KEY_MODE, jxTempMode);
+        //JX_KEY_HEART_TEMPERATURE ==> temp
         intent.putExtra(JX_KEY_HEART_TEMPERATURE, animal);
         //类型0:手腕模式 1:额头模式
+        //JX_KEY_HEART_TEMPERATURE_TYPE ==> type
         intent.putExtra(JX_KEY_HEART_TEMPERATURE_TYPE, "1");
         sendBroadcast(intent);
     }
@@ -633,9 +638,6 @@ public class SensorDataService extends Service implements TemperatureHelper.Temp
         IcLog.d(TAG, "low == > " + low);
         IcLog.d(TAG, "heart == > " + heart);
         IcLog.d(TAG, "oxygen == > " + oxygen);
-        if (heart == 0) {
-            return;
-        }
         //处理心率测量数据给掌育的
         //发广播给掌育,如果不为-1,说明有掌育的份
         IcLog.d(TAG, "jxHeartRateMode..." + jxHeartRateMode);
@@ -643,7 +645,7 @@ public class SensorDataService extends Service implements TemperatureHelper.Temp
         String isSupportHeartRate = IcSystemProperty.getSystemProperties("jx.heartrate", "false");
         IcLog.d(TAG, "isSupportHeartRate == > " + isSupportHeartRate);
         if (jxHeartRateMode != -1 && "true".equals(isSupportHeartRate)) {
-            sendHeartRateBroadcast2Jx(true, high,
+            sendHeartRateBroadcast2Jx(heart != 0, high,
                     low, heart, oxygen);
             jxHeartRateMode = -1;
         }