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

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

Merge "Refactor input dispatcher use of window/app handles."

parents c6f4d928 9302c879
Loading
Loading
Loading
Loading
+18 −12
Original line number Diff line number Diff line
@@ -26,26 +26,32 @@
namespace android {

/*
 * A handle to an application that can receive input.
 * Used by the native input dispatcher to indirectly refer to the window manager objects
 * Describes the properties of an application that can receive input.
 *
 * Used by the native input dispatcher as a handle for the window manager objects
 * that describe an application.
 */
class InputApplicationHandle : public RefBase {
public:
    String8 name;
    nsecs_t dispatchingTimeout;

    /**
     * Requests that the state of this object be updated to reflect
     * the most current available information about the application.
     *
     * This method should only be called from within the input dispatcher's
     * critical section.
     *
     * Returns true on success, or false if the handle is no longer valid.
     */
    virtual bool update() = 0;

protected:
    InputApplicationHandle() { }
    virtual ~InputApplicationHandle() { }
};


/*
 * An input application describes properties of an application that can receive input.
 */
struct InputApplication {
    sp<InputApplicationHandle> inputApplicationHandle;
    String8 name;
    nsecs_t dispatchingTimeout;
};

} // namespace android

#endif // _UI_INPUT_APPLICATION_H
Loading