Support native API to report sysfs nodes changes
When a sysfs node change is reported, check if any new
perpherals are added and if added, recreate input device.
Test: atest inputfliger_tests
Bug: 265057712
Change-Id: Ic6c0c00de9ae963f0651859bdbc57e45af7ccd07
diff --git a/services/inputflinger/include/InputReaderBase.h b/services/inputflinger/include/InputReaderBase.h
index 841c914..1750c64 100644
--- a/services/inputflinger/include/InputReaderBase.h
+++ b/services/inputflinger/include/InputReaderBase.h
@@ -149,6 +149,9 @@
/* Get the Bluetooth address of an input device, if known. */
virtual std::optional<std::string> getBluetoothAddress(int32_t deviceId) const = 0;
+
+ /* Sysfs node change reported. Recreate device if required to incorporate the new sysfs nodes */
+ virtual void sysfsNodeChanged(const std::string& sysfsNodePath) = 0;
};
// --- InputReaderConfiguration ---