summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputManager.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2019-02-14 10:33:58 -0800
committer chaviw <chaviw@google.com> 2019-02-20 15:42:31 -0800
commit291d88aa7a94790b85dfa633166bc0aa356cccb4 (patch)
tree71285bc971b3d721679f0440b85b0603034fa616 /services/inputflinger/InputManager.cpp
parent751889981ec9b45c16a7c06746875746a9b321d4 (diff)
Add synchronous transaction to wait for setInputWindow to complete (3/n)
Added callback for InputDispatcher to report back to SF. Pass in an interface callback to setInputWindows so InputDispatcher can send a response when setInputWindows has completed. The callback can be null so InputDispatcher knows not to send a response on every setInputWindows call. Bug: 123041491 Test: Builds, runs Change-Id: I18b28141a0bb5f2e1ffb406d601dc7822ca89ecd
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r--services/inputflinger/InputManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index a7fd9bab95..b0157a166f 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -103,7 +103,8 @@ public:
}
};
-void InputManager::setInputWindows(const Vector<InputWindowInfo>& infos) {
+void InputManager::setInputWindows(const Vector<InputWindowInfo>& infos,
+ const sp<ISetInputWindowsListener>& setInputWindowsListener) {
std::unordered_map<int32_t, Vector<sp<InputWindowHandle>>> handlesPerDisplay;
Vector<sp<InputWindowHandle>> handles;
@@ -112,7 +113,7 @@ void InputManager::setInputWindows(const Vector<InputWindowInfo>& infos) {
handlesPerDisplay[info.displayId].add(new BinderWindowHandle(info));
}
for (auto const& i : handlesPerDisplay) {
- mDispatcher->setInputWindows(i.second, i.first);
+ mDispatcher->setInputWindows(i.second, i.first, setInputWindowsListener);
}
}