summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputManager.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2021-06-07 14:15:52 -0500
committer chaviw <chaviw@google.com> 2021-07-28 17:04:23 -0500
commit15fab6f1b55595609cf88ee5c63432aa92bbe496 (patch)
tree4f0549dc69b15b37e72dc27a006e7fcf59057fcd /services/inputflinger/InputManager.cpp
parentf103edb57886fff1a2906c772347f1512cfaea6a (diff)
Add WindowInfosListener to Input
Register a WindowInfosListener in InputDispatcher to allow it to listen for window info changes rather than SurfaceFlinger having to talk directly to InputDispatcher. Test: Existing tests pass Bug: 188792659 Change-Id: If6ccfb0c8c5af0a7b3777c9002157128568cbb6e
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r--services/inputflinger/InputManager.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index e81dcfe4f1..693b1f977f 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -114,15 +114,6 @@ sp<InputDispatcherInterface> InputManager::getDispatcher() {
return mDispatcher;
}
-class BinderWindowHandle : public WindowInfoHandle {
-public:
- BinderWindowHandle(const WindowInfo& info) { mInfo = info; }
-
- bool updateInfo() override {
- return true;
- }
-};
-
binder::Status InputManager::setInputWindows(
const std::vector<WindowInfo>& infos,
const sp<ISetInputWindowsListener>& setInputWindowsListener) {
@@ -131,7 +122,7 @@ binder::Status InputManager::setInputWindows(
std::vector<sp<WindowInfoHandle>> handles;
for (const auto& info : infos) {
handlesPerDisplay.emplace(info.displayId, std::vector<sp<WindowInfoHandle>>());
- handlesPerDisplay[info.displayId].push_back(new BinderWindowHandle(info));
+ handlesPerDisplay[info.displayId].push_back(new WindowInfoHandle(info));
}
mDispatcher->setInputWindows(handlesPerDisplay);