Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2969d4e authored by Ben Fennema's avatar Ben Fennema
Browse files

Add missing LOW_LATENCY_OFFBODY_DETECT handling



Bug: 36580454
Test: unlock watch with LLOB sensor and verify no SensorService crash
Change-Id: Ib1d086efd80e829bb844521fa39325f095b1c2c9
Signed-off-by: default avatarBen Fennema <fennema@google.com>
parent 97cf2b75
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) {
      case SensorType::STATIONARY_DETECT:
      case SensorType::MOTION_DETECT:
      case SensorType::HEART_BEAT:
      case SensorType::LOW_LATENCY_OFFBODY_DETECT:
      {
          dst->u.scalar = src.data[0];
          break;
@@ -280,6 +281,7 @@ void convertToSensorEvent(const Event &src, sensors_event_t *dst) {
        case SensorType::STATIONARY_DETECT:
        case SensorType::MOTION_DETECT:
        case SensorType::HEART_BEAT:
        case SensorType::LOW_LATENCY_OFFBODY_DETECT:
        {
            dst->data[0] = src.u.scalar;
            break;
+2 −1
Original line number Diff line number Diff line
@@ -1148,7 +1148,8 @@ union EventPayload {
     * SensorType::TILT_DETECTOR, SensorType::WAKE_GESTURE,
     * SensorType::GLANCE_GESTURE, SensorType::PICK_UP_GESTURE,
     * SensorType::WRIST_TILT_GESTURE, SensorType::STATIONARY_DETECT,
     * SensorType::MOTION_DETECT, SensorType::HEART_BEAT
     * SensorType::MOTION_DETECT, SensorType::HEART_BEAT,
     * SensorType::LOW_LATENCY_OFFBODY_DETECT
     */
    float scalar;

+1 −0
Original line number Diff line number Diff line
@@ -722,6 +722,7 @@ SensorFlagBits SensorsHidlTest::expectedReportModeForType(SensorType type) {
    case SensorType::DEVICE_ORIENTATION:
    case SensorType::MOTION_DETECT:
    case SensorType::STEP_COUNTER:
    case SensorType::LOW_LATENCY_OFFBODY_DETECT:
      return SensorFlagBits::ON_CHANGE_MODE;

    case SensorType::SIGNIFICANT_MOTION: