summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputManager.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2020-09-02 22:28:29 -0500
committer Siarhei Vishniakou <svv@google.com> 2020-09-09 10:00:48 -0500
commitadefc3e2ae3ea23d78693a4c32c7a20e0409ef12 (patch)
tree4cd05daa1c9a7ff3ba0fb3a9cdcd6a481b9d1831 /services/inputflinger/InputManager.cpp
parent24e1e94c748b2be160aaf534a9ffb374f7c13927 (diff)
Unregister input channel by token
An input channel is uniquely identified by its token. Once the input channel exists, you can unregister it simply using its token. There's no need to pass back the entire input channel, including its id, to input dispatcher. We will look for the server-side input channel using the token anyways. Bug: 167947395 Test: atest libinput_tests Change-Id: I009da372bd6cc897b019a66e9c3bbed78cc91223
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r--services/inputflinger/InputManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index e49667e549..8af9bcba89 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -132,8 +132,8 @@ binder::Status InputManager::registerInputChannel(const InputChannel& channel) {
return binder::Status::ok();
}
-binder::Status InputManager::unregisterInputChannel(const InputChannel& channel) {
- mDispatcher->unregisterInputChannel(channel);
+binder::Status InputManager::unregisterInputChannel(const sp<IBinder>& connectionToken) {
+ mDispatcher->unregisterInputChannel(connectionToken);
return binder::Status::ok();
}