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
diff --git a/sensors/2.1/default/SensorsV2_1.cpp b/sensors/2.1/default/SensorsV2_1.cpp
index 4c5386a..06446a2 100644
--- a/sensors/2.1/default/SensorsV2_1.cpp
+++ b/sensors/2.1/default/SensorsV2_1.cpp
@@ -46,7 +46,8 @@
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);
}
};