From 15fab6f1b55595609cf88ee5c63432aa92bbe496 Mon Sep 17 00:00:00 2001 From: chaviw Date: Mon, 7 Jun 2021 14:15:52 -0500 Subject: 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 --- services/inputflinger/InputManager.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'services/inputflinger/InputManager.cpp') 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 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& infos, const sp& setInputWindowsListener) { @@ -131,7 +122,7 @@ binder::Status InputManager::setInputWindows( std::vector> handles; for (const auto& info : infos) { handlesPerDisplay.emplace(info.displayId, std::vector>()); - handlesPerDisplay[info.displayId].push_back(new BinderWindowHandle(info)); + handlesPerDisplay[info.displayId].push_back(new WindowInfoHandle(info)); } mDispatcher->setInputWindows(handlesPerDisplay); -- cgit v1.2.3-59-g8ed1b