Add vibrator state listener support for input device vibrator
Extend Vibrator state and listener support to InputDevice vibrator.
InputDevice users can use the Vibrator listener API to register listener
to vibrator for state change.
Bug: 161634264
Test: atest InputDeviceVibratorTest
Change-Id: I8823fb861a35ef8f4bbbb0dd48bdc5d49bc1eef9
diff --git a/services/inputflinger/reader/include/InputReader.h b/services/inputflinger/reader/include/InputReader.h
index e2558bc..5f78149 100644
--- a/services/inputflinger/reader/include/InputReader.h
+++ b/services/inputflinger/reader/include/InputReader.h
@@ -152,6 +152,7 @@
void notifySensor(nsecs_t when, int32_t deviceId, InputDeviceSensorType sensorType,
InputDeviceSensorAccuracy accuracy, bool accuracyChanged,
nsecs_t timestamp, std::vector<float> values) override;
+ void notifyVibratorState(nsecs_t when, int32_t deviceId, bool isOn) override;
void notifyDeviceReset(nsecs_t when, int32_t deviceId) override;
void notifyPointerCaptureChanged(nsecs_t when, bool hasCapture) override;