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

Commit 4e44cf52 authored by Peng Xu's avatar Peng Xu
Browse files

TYPE_DYNAMIC_SENSOR_META should be wake up sensor

This CL makes the default TYPE_DYNAMIC_SENSOR_META sensor a wake-up
type.

Test: m cts-verifier
Test: Run "Dynamic Sensor Discovery Test" with a sensor HAL that
      support dynamic sensor discovery (e.g. contexthub + ag/1189124)

Bug: 31068976

Change-Id: I97197df248a9e89af6b72af3bee3c536a58c8df2
parent b32a59e7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -220,7 +220,10 @@ Sensor::Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersi
        break;
    case SENSOR_TYPE_DYNAMIC_SENSOR_META:
        mStringType = SENSOR_STRING_TYPE_DYNAMIC_SENSOR_META;
        mFlags = SENSOR_FLAG_SPECIAL_REPORTING_MODE; // special trigger and non-wake up
        mFlags |= SENSOR_FLAG_SPECIAL_REPORTING_MODE; // special trigger
        if (halVersion < SENSORS_DEVICE_API_VERSION_1_3) {
            mFlags |= SENSOR_FLAG_WAKE_UP;
        }
        break;
    case SENSOR_TYPE_POSE_6DOF:
        mStringType = SENSOR_STRING_TYPE_POSE_6DOF;