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

Commit 66d3d8e4 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am f8d9379b: am d76b67c3: IME events are now dispatched to native applications.

Merge commit 'f8d9379bd834573feca085284970cf686993c330'

* commit 'f8d9379bd834573feca085284970cf686993c330':
  IME events are now dispatched to native applications.
parents 31967eb8 54311fdc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -43,7 +43,9 @@ enum {
/*
 * Declare a concrete type for the NDK's input event forward declaration.
 */
struct AInputEvent { };
struct AInputEvent {
    virtual ~AInputEvent() { }
};

namespace android {

+0 −26
Original line number Diff line number Diff line
@@ -331,30 +331,4 @@ private:

} // namespace android

/*
 * NDK input queue API.
 */
struct AInputQueue {
public:
    /* Creates a consumer associated with an input channel. */
    explicit AInputQueue(const android::sp<android::InputChannel>& channel);

    /* Destroys the consumer and releases its input channel. */
    virtual ~AInputQueue();

    inline android::InputConsumer& getConsumer() { return mConsumer; }
    
    android::status_t consume(android::InputEvent** event);
    
    void setPollLoop(const android::sp<android::PollLoop>& pollLoop) { mPollLoop = pollLoop; }
    const android::sp<android::PollLoop> getPollLoop() const { return mPollLoop; }
    
    virtual void doDefaultKey(android::KeyEvent* keyEvent) = 0;
    
private:
    android::InputConsumer mConsumer;
    android::PreallocatedInputEventFactory mInputEventFactory;
    android::sp<android::PollLoop> mPollLoop;
};

#endif // _UI_INPUT_TRANSPORT_H
+0 −19
Original line number Diff line number Diff line
@@ -690,22 +690,3 @@ void InputConsumer::populateMotionEvent(MotionEvent* motionEvent) const {
}

} // namespace android

// --- AInputQueue ---

using android::InputEvent;
using android::InputChannel;
using android::InputConsumer;
using android::sp;
using android::status_t;

AInputQueue::AInputQueue(const sp<InputChannel>& channel) :
        mConsumer(channel) {
}

AInputQueue::~AInputQueue() {
}

status_t AInputQueue::consume(InputEvent** event) {
    return mConsumer.consume(&mInputEventFactory, event);
}