diff options
author | 2021-05-19 16:45:23 -0500 | |
---|---|---|
committer | 2021-06-29 10:56:57 -0500 | |
commit | 3277faf86d598a2ee1080b0bb4dd476fe1fddba8 (patch) | |
tree | 4234f214c82163f62575a7570e0b877506c87475 /services/inputflinger/InputManager.cpp | |
parent | 438d352932acde680c1038e1827838aca3506845 (diff) |
Renamed and moved InputWindow and related files
In preparation for the hierarchy listener interface, moved the
InputWindow structs into libgui and have libinput dependant on libgui.
Also renamed InputWindow to exclude Input since it will be used for more
generic purposes.
Test: Builds and flashes
Bug: 188792659
Change-Id: I24262cbc14d409c00273de0024a672394a959e5f
Merged-In: I24262cbc14d409c00273de0024a672394a959e5f
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r-- | services/inputflinger/InputManager.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index a50e5c70f7..e81dcfe4f1 100644 --- a/services/inputflinger/InputManager.cpp +++ b/services/inputflinger/InputManager.cpp @@ -31,6 +31,10 @@ namespace android { +using gui::FocusRequest; +using gui::WindowInfo; +using gui::WindowInfoHandle; + static int32_t exceptionCodeFromStatusT(status_t status) { switch (status) { case OK: @@ -110,9 +114,9 @@ sp<InputDispatcherInterface> InputManager::getDispatcher() { return mDispatcher; } -class BinderWindowHandle : public InputWindowHandle { +class BinderWindowHandle : public WindowInfoHandle { public: - BinderWindowHandle(const InputWindowInfo& info) { mInfo = info; } + BinderWindowHandle(const WindowInfo& info) { mInfo = info; } bool updateInfo() override { return true; @@ -120,13 +124,13 @@ public: }; binder::Status InputManager::setInputWindows( - const std::vector<InputWindowInfo>& infos, + const std::vector<WindowInfo>& infos, const sp<ISetInputWindowsListener>& setInputWindowsListener) { - std::unordered_map<int32_t, std::vector<sp<InputWindowHandle>>> handlesPerDisplay; + std::unordered_map<int32_t, std::vector<sp<WindowInfoHandle>>> handlesPerDisplay; - std::vector<sp<InputWindowHandle>> handles; + std::vector<sp<WindowInfoHandle>> handles; for (const auto& info : infos) { - handlesPerDisplay.emplace(info.displayId, std::vector<sp<InputWindowHandle>>()); + handlesPerDisplay.emplace(info.displayId, std::vector<sp<WindowInfoHandle>>()); handlesPerDisplay[info.displayId].push_back(new BinderWindowHandle(info)); } mDispatcher->setInputWindows(handlesPerDisplay); |