InputMapper refactor: Configure empty InputDevice
Configure the Device prior to populating mappers for mappers to
receive correct property map
Test: atest inputflinger_tests
Bug: 256009910
Change-Id: I0a7d2bf4d64b3d120d9050e9154b3f3a0f54657a
diff --git a/services/inputflinger/reader/include/InputDevice.h b/services/inputflinger/reader/include/InputDevice.h
index ec37cdc..31dcb2e 100644
--- a/services/inputflinger/reader/include/InputDevice.h
+++ b/services/inputflinger/reader/include/InputDevice.h
@@ -80,7 +80,8 @@
void dump(std::string& dump, const std::string& eventHubDevStr);
void addEmptyEventHubDevice(int32_t eventHubId);
- void addEventHubDevice(int32_t eventHubId, const InputReaderConfiguration& readerConfig);
+ [[nodiscard]] std::list<NotifyArgs> addEventHubDevice(
+ nsecs_t when, int32_t eventHubId, const InputReaderConfiguration& readerConfig);
void removeEventHubDevice(int32_t eventHubId);
[[nodiscard]] std::list<NotifyArgs> configure(nsecs_t when,
const InputReaderConfiguration& readerConfig,
@@ -205,8 +206,12 @@
std::vector<std::unique_ptr<InputMapper>> createMappers(
InputDeviceContext& contextPtr, const InputReaderConfiguration& readerConfig);
+ [[nodiscard]] std::list<NotifyArgs> configureInternal(
+ nsecs_t when, const InputReaderConfiguration& readerConfig,
+ ConfigurationChanges changes, bool forceEnable = false);
+
[[nodiscard]] std::list<NotifyArgs> updateEnableState(
- nsecs_t when, const InputReaderConfiguration& readerConfig);
+ nsecs_t when, const InputReaderConfiguration& readerConfig, bool forceEnable = false);
PropertyMap mConfiguration;