Loading libs/gui/include/gui/WindowInfo.h +0 −12 Original line number Diff line number Diff line Loading @@ -241,18 +241,6 @@ public: return mInfo.token ? std::chrono::nanoseconds(mInfo.dispatchingTimeout) : defaultValue; } /** * Requests that the state of this object be updated to reflect * the most current available information about the application. * As this class is created as RefBase object, no pure virtual function is allowed. * * This method should only be called from within the input dispatcher's * critical section. * * Returns true on success, or false if the handle is no longer valid. */ virtual bool updateInfo() { return false; } /** * Updates from another input window handle. */ Loading services/inputflinger/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ cc_library_shared { "libinputflinger_base", "libinputreporter", "libinputreader", "libgui", ], static_libs: [ "libinputdispatcher", Loading services/inputflinger/InputManager.cpp +1 −10 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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); Loading services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -185,10 +185,11 @@ public: const sp<InputDispatcher>& dispatcher, const std::string name) : FakeInputReceiver(dispatcher, name), mFrame(Rect(0, 0, WIDTH, HEIGHT)) { inputApplicationHandle->updateInfo(); updateInfo(); mInfo.applicationInfo = *inputApplicationHandle->getInfo(); } virtual bool updateInfo() override { void updateInfo() { mInfo.token = mClientChannel->getConnectionToken(); mInfo.name = "FakeWindowHandle"; mInfo.type = WindowInfo::Type::APPLICATION; Loading @@ -207,8 +208,6 @@ public: mInfo.ownerPid = INJECTOR_PID; mInfo.ownerUid = INJECTOR_UID; mInfo.displayId = ADISPLAY_ID_DEFAULT; return true; } protected: Loading services/inputflinger/dispatcher/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ cc_defaults { "libstatspull", "libstatssocket", "libui", "libgui", "libutils", "lib-platform-compat-native-api", "server_configurable_flags", Loading Loading
libs/gui/include/gui/WindowInfo.h +0 −12 Original line number Diff line number Diff line Loading @@ -241,18 +241,6 @@ public: return mInfo.token ? std::chrono::nanoseconds(mInfo.dispatchingTimeout) : defaultValue; } /** * Requests that the state of this object be updated to reflect * the most current available information about the application. * As this class is created as RefBase object, no pure virtual function is allowed. * * This method should only be called from within the input dispatcher's * critical section. * * Returns true on success, or false if the handle is no longer valid. */ virtual bool updateInfo() { return false; } /** * Updates from another input window handle. */ Loading
services/inputflinger/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ cc_library_shared { "libinputflinger_base", "libinputreporter", "libinputreader", "libgui", ], static_libs: [ "libinputdispatcher", Loading
services/inputflinger/InputManager.cpp +1 −10 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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); Loading
services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -185,10 +185,11 @@ public: const sp<InputDispatcher>& dispatcher, const std::string name) : FakeInputReceiver(dispatcher, name), mFrame(Rect(0, 0, WIDTH, HEIGHT)) { inputApplicationHandle->updateInfo(); updateInfo(); mInfo.applicationInfo = *inputApplicationHandle->getInfo(); } virtual bool updateInfo() override { void updateInfo() { mInfo.token = mClientChannel->getConnectionToken(); mInfo.name = "FakeWindowHandle"; mInfo.type = WindowInfo::Type::APPLICATION; Loading @@ -207,8 +208,6 @@ public: mInfo.ownerPid = INJECTOR_PID; mInfo.ownerUid = INJECTOR_UID; mInfo.displayId = ADISPLAY_ID_DEFAULT; return true; } protected: Loading
services/inputflinger/dispatcher/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ cc_defaults { "libstatspull", "libstatssocket", "libui", "libgui", "libutils", "lib-platform-compat-native-api", "server_configurable_flags", Loading