Add pipeline to get the sysfs path for an InputDevice's battery
This will be used to listen to UEvent notifications coming from the
battery's device path that notify userspace about battery state changes.
Bug: 243005009
Test: atest inputflinger_tests
Test: manual with logs
Change-Id: I464c6212cdb33242cb319176d502b6e8431125fb
diff --git a/services/inputflinger/include/InputReaderBase.h b/services/inputflinger/include/InputReaderBase.h
index 77c9142..88aaa9d 100644
--- a/services/inputflinger/include/InputReaderBase.h
+++ b/services/inputflinger/include/InputReaderBase.h
@@ -114,6 +114,8 @@
virtual std::optional<int32_t> getBatteryCapacity(int32_t deviceId) = 0;
/* Get battery status of a particular input device. */
virtual std::optional<int32_t> getBatteryStatus(int32_t deviceId) = 0;
+ /* Get the device path for the battery of an input device. */
+ virtual std::optional<std::string> getBatteryDevicePath(int32_t deviceId) = 0;
virtual std::vector<InputDeviceLightInfo> getLights(int32_t deviceId) = 0;