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

Commit 91ec0b72 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Clean up InputChannel file descriptor data type."

parents 79952ee2 91e32898
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -199,9 +199,9 @@ static void android_view_InputChannel_nativeReadFromParcel(JNIEnv* env, jobject
        bool isInitialized = parcel->readInt32();
        if (isInitialized) {
            String8 name = parcel->readString8();
            int32_t rawFd = parcel->readFileDescriptor();
            int32_t dupFd = dup(rawFd);
            if (rawFd < 0) {
            int rawFd = parcel->readFileDescriptor();
            int dupFd = dup(rawFd);
            if (dupFd < 0) {
                ALOGE("Error %d dup channel fd %d.", errno, rawFd);
                jniThrowRuntimeException(env,
                        "Could not read input channel file descriptors from parcel.");
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ NativeInputEventReceiver::~NativeInputEventReceiver() {
}

status_t NativeInputEventReceiver::initialize() {
    int32_t receiveFd = mInputConsumer.getChannel()->getFd();
    int receiveFd = mInputConsumer.getChannel()->getFd();
    mLooper->addFd(receiveFd, 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this);
    return OK;
}
+3 −3
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ protected:
    virtual ~InputChannel();

public:
    InputChannel(const String8& name, int32_t fd);
    InputChannel(const String8& name, int fd);

    /* Creates a pair of input channels.
     *
@@ -133,7 +133,7 @@ public:
            sp<InputChannel>& outServerChannel, sp<InputChannel>& outClientChannel);

    inline String8 getName() const { return mName; }
    inline int32_t getFd() const { return mFd; }
    inline int getFd() const { return mFd; }

    /* Sends a message to the other endpoint.
     *
@@ -162,7 +162,7 @@ public:

private:
    String8 mName;
    int32_t mFd;
    int mFd;
};

/*
+1 −1
Original line number Diff line number Diff line
@@ -3105,7 +3105,7 @@ status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChan

        sp<Connection> connection = new Connection(inputChannel, inputWindowHandle, monitor);

        int32_t fd = inputChannel->getFd();
        int fd = inputChannel->getFd();
        mConnectionsByFd.add(fd, connection);

        if (monitor) {