Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb5a1a01 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Update usage of InputPublisher.getInputChannel

This API now returns a reference instead of smart pointer.

Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Bug: 161009324
Change-Id: I732efeac07ba0b0138b955d28a111298d244f402
parent df8815f0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ private:
    uint32_t mNextPublishedSeq;

    const std::string getInputChannelName() {
        return mInputPublisher.getChannel()->getName();
        return mInputPublisher.getChannel().getName();
    }

    int handleEvent(int receiveFd, int events, void* data) override;
@@ -102,7 +102,7 @@ NativeInputEventSender::~NativeInputEventSender() {
}

status_t NativeInputEventSender::initialize() {
    const int receiveFd = mInputPublisher.getChannel()->getFd();
    const int receiveFd = mInputPublisher.getChannel().getFd();
    mMessageQueue->getLooper()->addFd(receiveFd, 0, ALOOPER_EVENT_INPUT, this, NULL);
    return OK;
}
@@ -112,7 +112,7 @@ void NativeInputEventSender::dispose() {
        LOG(DEBUG) << "channel '" << getInputChannelName() << "' ~ Disposing input event sender.";
    }

    mMessageQueue->getLooper()->removeFd(mInputPublisher.getChannel()->getFd());
    mMessageQueue->getLooper()->removeFd(mInputPublisher.getChannel().getFd());
}

status_t NativeInputEventSender::sendKeyEvent(uint32_t seq, const KeyEvent* event) {