InputMapper refactor: Change readerconfig pointer to const ref
We are refactoring Input-mapper to ensure they are configured at the
time of initialisation.
In this CL we are changing InputReaderConfiguration raw pointer to
a const reference and rename it to readerConfig for clarity.
Test: build, inputflinger_tests, presubmit checks
Bug: 256009910
Change-Id: Iae22c8cfba836bd311a51fca13d680456a61e604
diff --git a/services/inputflinger/reader/mapper/KeyboardInputMapper.h b/services/inputflinger/reader/mapper/KeyboardInputMapper.h
index 52576c3..0cb130d 100644
--- a/services/inputflinger/reader/mapper/KeyboardInputMapper.h
+++ b/services/inputflinger/reader/mapper/KeyboardInputMapper.h
@@ -30,7 +30,7 @@
void populateDeviceInfo(InputDeviceInfo& deviceInfo) override;
void dump(std::string& dump) override;
[[nodiscard]] std::list<NotifyArgs> reconfigure(nsecs_t when,
- const InputReaderConfiguration* config,
+ const InputReaderConfiguration& config,
uint32_t changes) override;
[[nodiscard]] std::list<NotifyArgs> reset(nsecs_t when) override;
[[nodiscard]] std::list<NotifyArgs> process(const RawEvent* rawEvent) override;
@@ -96,7 +96,7 @@
void resetLedState();
void initializeLedState(LedState& ledState, int32_t led);
void updateLedStateForModifier(LedState& ledState, int32_t led, int32_t modifier, bool reset);
- std::optional<DisplayViewport> findViewport(const InputReaderConfiguration* config);
+ std::optional<DisplayViewport> findViewport(const InputReaderConfiguration& readerConfig);
[[nodiscard]] std::list<NotifyArgs> cancelAllDownKeys(nsecs_t when);
};