Allows injection for the default HINGE_ANGLE sensor.

This will allow cuttlefish to inject HINGE_ANGLE sensor data, to
simulate a hinge sensor on the virtual device.

Bug: 181157794
Test: Inject HINGE_ANGLE sensor data.
      Observe events with `dumpsys sensorservice`.
Change-Id: Ie267bcfdbc98ed017a673b9e38ceccbf75090dd1
This commit is contained in:
Daniel Norman
2021-04-07 16:51:23 -07:00
parent 49e5b5eacc
commit 56645759d3

View File

@@ -46,7 +46,8 @@ class HingeAngleSensor : public OnChangeSensor {
mSensorInfo.fifoMaxEventCount = 0;
mSensorInfo.requiredPermission = "";
mSensorInfo.flags = static_cast<uint32_t>(V1_0::SensorFlagBits::ON_CHANGE_MODE |
V1_0::SensorFlagBits::WAKE_UP);
V1_0::SensorFlagBits::WAKE_UP |
V1_0::SensorFlagBits::DATA_INJECTION);
}
};