Let InputFlinger create the server InputChannel
We can be sure that server channel won't leave InputFlinger.
Bug: 167947395
Test: Touch events are still dispatched.
Test: m -j inputflinger
Test: atest inputflinger_tests
Test: atest inputflinger_benchmarks
Test: atest libgui_tests
Change-Id: I35f768c8a7b3bfe11e04577c028e52556b60ff14
diff --git a/services/inputflinger/InputManager.h b/services/inputflinger/InputManager.h
index 35d2d58..49bea13 100644
--- a/services/inputflinger/InputManager.h
+++ b/services/inputflinger/InputManager.h
@@ -108,8 +108,8 @@
const std::vector<InputWindowInfo>& handles,
const sp<ISetInputWindowsListener>& setInputWindowsListener) override;
- binder::Status registerInputChannel(const InputChannel& channel) override;
- binder::Status unregisterInputChannel(const sp<IBinder>& connectionToken) override;
+ binder::Status createInputChannel(const std::string& name, InputChannel* outChannel) override;
+ binder::Status removeInputChannel(const sp<IBinder>& connectionToken) override;
binder::Status setFocusedWindow(const FocusRequest&) override;
private: