diff options
| author | 2024-07-12 09:40:20 +0000 | |
|---|---|---|
| committer | 2024-07-12 09:40:20 +0000 | |
| commit | fe41386f9f3645a2c032dff9b5a152db80777412 (patch) | |
| tree | 2e51ae46c840be8e26185a8966e9762f2b576732 /services/inputflinger/reader | |
| parent | ba4079b0403dd6eb2960c220937bbffed01d8031 (diff) | |
| parent | c109d81d70eb5792209619dd3d689d6acc147d05 (diff) | |
Merge "Shift notifyConfigurationChanged policy call to InputReader" into main
Diffstat (limited to 'services/inputflinger/reader')
| -rw-r--r-- | services/inputflinger/reader/InputReader.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/inputflinger/reader/InputReader.cpp b/services/inputflinger/reader/InputReader.cpp index 0073fd1738..9e9e816c0c 100644 --- a/services/inputflinger/reader/InputReader.cpp +++ b/services/inputflinger/reader/InputReader.cpp @@ -212,6 +212,15 @@ void InputReader::loopOnce() { mPolicy->notifyInputDevicesChanged(inputDevices); } + // Notify the policy of configuration change. This must be after policy is notified about input + // device changes so that policy can fetch newly added input devices on configuration change. + for (const auto& args : notifyArgs) { + const auto* configArgs = std::get_if<NotifyConfigurationChangedArgs>(&args); + if (configArgs != nullptr) { + mPolicy->notifyConfigurationChanged(configArgs->eventTime); + } + } + // Notify the policy of the start of every new stylus gesture. for (const auto& args : notifyArgs) { const auto* motionArgs = std::get_if<NotifyMotionArgs>(&args); |