summaryrefslogtreecommitdiff
path: root/libs/input/IInputFlinger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/IInputFlinger.cpp')
-rw-r--r--libs/input/IInputFlinger.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/input/IInputFlinger.cpp b/libs/input/IInputFlinger.cpp
index de3a23d76e..8ec51653a8 100644
--- a/libs/input/IInputFlinger.cpp
+++ b/libs/input/IInputFlinger.cpp
@@ -82,15 +82,13 @@ status_t BnInputFlinger::onTransact(
}
case REGISTER_INPUT_CHANNEL_TRANSACTION: {
CHECK_INTERFACE(IInputFlinger, data, reply);
- sp<InputChannel> channel = new InputChannel();
- channel->read(data);
+ sp<InputChannel> channel = InputChannel::read(data);
registerInputChannel(channel);
break;
}
case UNREGISTER_INPUT_CHANNEL_TRANSACTION: {
CHECK_INTERFACE(IInputFlinger, data, reply);
- sp<InputChannel> channel = new InputChannel();
- channel->read(data);
+ sp<InputChannel> channel = InputChannel::read(data);
unregisterInputChannel(channel);
break;
}