diff options
| author | 2023-04-05 23:51:23 +0000 | |
|---|---|---|
| committer | 2023-04-13 21:24:04 +0000 | |
| commit | e3da4bbc9c7e0f07a7241ee937c39f1007a9a449 (patch) | |
| tree | b3fb06f8647f8d06df3f97fe8928a0ab63fd84f6 /services/inputflinger/NotifyArgs.cpp | |
| parent | 71660f18f6312ce8fe2962e116d6a0533491c06f (diff) | |
Notify InputListener when there an changes to input devices
There are now more than one input listener stages that need to know when
the devices change. Notify listeners directly instead of routing it
through the policy.
Bug: 275726706
Test: atest inputflinger_tests
Change-Id: I37019f8069bad3bbc585805f792beb514faa8cb1
Diffstat (limited to 'services/inputflinger/NotifyArgs.cpp')
| -rw-r--r-- | services/inputflinger/NotifyArgs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/inputflinger/NotifyArgs.cpp b/services/inputflinger/NotifyArgs.cpp index 5f2a22f467..408fbed99e 100644 --- a/services/inputflinger/NotifyArgs.cpp +++ b/services/inputflinger/NotifyArgs.cpp @@ -29,6 +29,12 @@ using android::base::StringPrintf; namespace android { +// --- NotifyInputDevicesChangedArgs --- + +NotifyInputDevicesChangedArgs::NotifyInputDevicesChangedArgs(int32_t id, + std::vector<InputDeviceInfo> infos) + : id(id), inputDeviceInfos(std::move(infos)) {} + // --- NotifyConfigurationChangedArgs --- NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(int32_t id, nsecs_t eventTime) @@ -234,6 +240,7 @@ Visitor(V...) -> Visitor<V...>; const char* toString(const NotifyArgs& args) { Visitor toStringVisitor{ + [&](const NotifyInputDevicesChangedArgs&) { return "NotifyInputDevicesChangedArgs"; }, [&](const NotifyConfigurationChangedArgs&) { return "NotifyConfigurationChangedArgs"; }, [&](const NotifyKeyArgs&) { return "NotifyKeyArgs"; }, [&](const NotifyMotionArgs&) { return "NotifyMotionArgs"; }, |