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

Commit b83e3d5c authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Rename sequenceNum to ID. am: c51d1ba0 am: 64970eae

Change-Id: I9e7aff934f1219264aaffd26c2d8180adb40027b
parents d88233bb 64970eae
Loading
Loading
Loading
Loading
+70 −76
Original line number Original line Diff line number Diff line
@@ -27,18 +27,15 @@ namespace android {


// --- NotifyConfigurationChangedArgs ---
// --- NotifyConfigurationChangedArgs ---


NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(
NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(int32_t id, nsecs_t eventTime)
        uint32_t sequenceNum, nsecs_t eventTime) :
      : NotifyArgs(id, eventTime) {}
        NotifyArgs(sequenceNum, eventTime) {
}


NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(
NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(
        const NotifyConfigurationChangedArgs& other) :
        const NotifyConfigurationChangedArgs& other)
        NotifyArgs(other.sequenceNum, other.eventTime) {
      : NotifyArgs(other.id, other.eventTime) {}
}


bool NotifyConfigurationChangedArgs::operator==(const NotifyConfigurationChangedArgs& rhs) const {
bool NotifyConfigurationChangedArgs::operator==(const NotifyConfigurationChangedArgs& rhs) const {
    return sequenceNum == rhs.sequenceNum && eventTime == rhs.eventTime;
    return id == rhs.id && eventTime == rhs.eventTime;
}
}


void NotifyConfigurationChangedArgs::notify(const sp<InputListenerInterface>& listener) const {
void NotifyConfigurationChangedArgs::notify(const sp<InputListenerInterface>& listener) const {
@@ -48,37 +45,39 @@ void NotifyConfigurationChangedArgs::notify(const sp<InputListenerInterface>& li


// --- NotifyKeyArgs ---
// --- NotifyKeyArgs ---


NotifyKeyArgs::NotifyKeyArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId,
NotifyKeyArgs::NotifyKeyArgs(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source,
        uint32_t source, int32_t displayId, uint32_t policyFlags,
                             int32_t displayId, uint32_t policyFlags, int32_t action, int32_t flags,
        int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode,
                             int32_t keyCode, int32_t scanCode, int32_t metaState, nsecs_t downTime)
        int32_t metaState, nsecs_t downTime) :
      : NotifyArgs(id, eventTime),
        NotifyArgs(sequenceNum, eventTime), deviceId(deviceId), source(source),
        deviceId(deviceId),
        displayId(displayId), policyFlags(policyFlags),
        source(source),
        action(action), flags(flags), keyCode(keyCode), scanCode(scanCode),
        displayId(displayId),
        metaState(metaState), downTime(downTime) {
        policyFlags(policyFlags),
}
        action(action),
        flags(flags),
        keyCode(keyCode),
        scanCode(scanCode),
        metaState(metaState),
        downTime(downTime) {}


NotifyKeyArgs::NotifyKeyArgs(const NotifyKeyArgs& other) :
NotifyKeyArgs::NotifyKeyArgs(const NotifyKeyArgs& other)
        NotifyArgs(other.sequenceNum, other.eventTime), deviceId(other.deviceId),
      : NotifyArgs(other.id, other.eventTime),
        source(other.source), displayId(other.displayId), policyFlags(other.policyFlags),
        deviceId(other.deviceId),
        action(other.action), flags(other.flags),
        source(other.source),
        keyCode(other.keyCode), scanCode(other.scanCode),
        displayId(other.displayId),
        metaState(other.metaState), downTime(other.downTime) {
        policyFlags(other.policyFlags),
}
        action(other.action),
        flags(other.flags),
        keyCode(other.keyCode),
        scanCode(other.scanCode),
        metaState(other.metaState),
        downTime(other.downTime) {}


bool NotifyKeyArgs::operator==(const NotifyKeyArgs& rhs) const {
bool NotifyKeyArgs::operator==(const NotifyKeyArgs& rhs) const {
    return sequenceNum == rhs.sequenceNum
    return id == rhs.id && eventTime == rhs.eventTime && deviceId == rhs.deviceId &&
            && eventTime == rhs.eventTime
            source == rhs.source && displayId == rhs.displayId && policyFlags == rhs.policyFlags &&
            && deviceId == rhs.deviceId
            action == rhs.action && flags == rhs.flags && keyCode == rhs.keyCode &&
            && source == rhs.source
            scanCode == rhs.scanCode && metaState == rhs.metaState && downTime == rhs.downTime;
            && displayId == rhs.displayId
            && policyFlags == rhs.policyFlags
            && action == rhs.action
            && flags == rhs.flags
            && keyCode == rhs.keyCode
            && scanCode == rhs.scanCode
            && metaState == rhs.metaState
            && downTime == rhs.downTime;
}
}


void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const {
void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const {
@@ -88,15 +87,17 @@ void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const {


// --- NotifyMotionArgs ---
// --- NotifyMotionArgs ---


NotifyMotionArgs::NotifyMotionArgs(
NotifyMotionArgs::NotifyMotionArgs(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source,
        uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
                                   int32_t displayId, uint32_t policyFlags, int32_t action,
        int32_t displayId, uint32_t policyFlags, int32_t action, int32_t actionButton,
                                   int32_t actionButton, int32_t flags, int32_t metaState,
        int32_t flags, int32_t metaState, int32_t buttonState, MotionClassification classification,
                                   int32_t buttonState, MotionClassification classification,
        int32_t edgeFlags, uint32_t pointerCount, const PointerProperties* pointerProperties,
                                   int32_t edgeFlags, uint32_t pointerCount,
        const PointerCoords* pointerCoords, float xPrecision, float yPrecision,
                                   const PointerProperties* pointerProperties,
        float xCursorPosition, float yCursorPosition, nsecs_t downTime,
                                   const PointerCoords* pointerCoords, float xPrecision,
                                   float yPrecision, float xCursorPosition, float yCursorPosition,
                                   nsecs_t downTime,
                                   const std::vector<TouchVideoFrame>& videoFrames)
                                   const std::vector<TouchVideoFrame>& videoFrames)
      : NotifyArgs(sequenceNum, eventTime),
      : NotifyArgs(id, eventTime),
        deviceId(deviceId),
        deviceId(deviceId),
        source(source),
        source(source),
        displayId(displayId),
        displayId(displayId),
@@ -122,7 +123,7 @@ NotifyMotionArgs::NotifyMotionArgs(
}
}


NotifyMotionArgs::NotifyMotionArgs(const NotifyMotionArgs& other)
NotifyMotionArgs::NotifyMotionArgs(const NotifyMotionArgs& other)
      : NotifyArgs(other.sequenceNum, other.eventTime),
      : NotifyArgs(other.id, other.eventTime),
        deviceId(other.deviceId),
        deviceId(other.deviceId),
        source(other.source),
        source(other.source),
        displayId(other.displayId),
        displayId(other.displayId),
@@ -152,12 +153,11 @@ static inline bool isCursorPositionEqual(float lhs, float rhs) {
}
}


bool NotifyMotionArgs::operator==(const NotifyMotionArgs& rhs) const {
bool NotifyMotionArgs::operator==(const NotifyMotionArgs& rhs) const {
    bool equal = sequenceNum == rhs.sequenceNum && eventTime == rhs.eventTime &&
    bool equal = id == rhs.id && eventTime == rhs.eventTime && deviceId == rhs.deviceId &&
            deviceId == rhs.deviceId && source == rhs.source && displayId == rhs.displayId &&
            source == rhs.source && displayId == rhs.displayId && policyFlags == rhs.policyFlags &&
            policyFlags == rhs.policyFlags && action == rhs.action &&
            action == rhs.action && actionButton == rhs.actionButton && flags == rhs.flags &&
            actionButton == rhs.actionButton && flags == rhs.flags && metaState == rhs.metaState &&
            metaState == rhs.metaState && buttonState == rhs.buttonState &&
            buttonState == rhs.buttonState && classification == rhs.classification &&
            classification == rhs.classification && edgeFlags == rhs.edgeFlags &&
            edgeFlags == rhs.edgeFlags &&
            pointerCount == rhs.pointerCount
            pointerCount == rhs.pointerCount
            // PointerProperties and PointerCoords are compared separately below
            // PointerProperties and PointerCoords are compared separately below
            && xPrecision == rhs.xPrecision && yPrecision == rhs.yPrecision &&
            && xPrecision == rhs.xPrecision && yPrecision == rhs.yPrecision &&
@@ -186,23 +186,22 @@ void NotifyMotionArgs::notify(const sp<InputListenerInterface>& listener) const


// --- NotifySwitchArgs ---
// --- NotifySwitchArgs ---


NotifySwitchArgs::NotifySwitchArgs(uint32_t sequenceNum, nsecs_t eventTime, uint32_t policyFlags,
NotifySwitchArgs::NotifySwitchArgs(int32_t id, nsecs_t eventTime, uint32_t policyFlags,
        uint32_t switchValues, uint32_t switchMask) :
                                   uint32_t switchValues, uint32_t switchMask)
        NotifyArgs(sequenceNum, eventTime), policyFlags(policyFlags),
      : NotifyArgs(id, eventTime),
        switchValues(switchValues), switchMask(switchMask) {
        policyFlags(policyFlags),
}
        switchValues(switchValues),
        switchMask(switchMask) {}


NotifySwitchArgs::NotifySwitchArgs(const NotifySwitchArgs& other) :
NotifySwitchArgs::NotifySwitchArgs(const NotifySwitchArgs& other)
        NotifyArgs(other.sequenceNum, other.eventTime), policyFlags(other.policyFlags),
      : NotifyArgs(other.id, other.eventTime),
        switchValues(other.switchValues), switchMask(other.switchMask) {
        policyFlags(other.policyFlags),
}
        switchValues(other.switchValues),
        switchMask(other.switchMask) {}


bool NotifySwitchArgs::operator==(const NotifySwitchArgs rhs) const {
bool NotifySwitchArgs::operator==(const NotifySwitchArgs rhs) const {
    return sequenceNum == rhs.sequenceNum
    return id == rhs.id && eventTime == rhs.eventTime && policyFlags == rhs.policyFlags &&
            && eventTime == rhs.eventTime
            switchValues == rhs.switchValues && switchMask == rhs.switchMask;
            && policyFlags == rhs.policyFlags
            && switchValues == rhs.switchValues
            && switchMask == rhs.switchMask;
}
}


void NotifySwitchArgs::notify(const sp<InputListenerInterface>& listener) const {
void NotifySwitchArgs::notify(const sp<InputListenerInterface>& listener) const {
@@ -212,19 +211,14 @@ void NotifySwitchArgs::notify(const sp<InputListenerInterface>& listener) const


// --- NotifyDeviceResetArgs ---
// --- NotifyDeviceResetArgs ---


NotifyDeviceResetArgs::NotifyDeviceResetArgs(
NotifyDeviceResetArgs::NotifyDeviceResetArgs(int32_t id, nsecs_t eventTime, int32_t deviceId)
        uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId) :
      : NotifyArgs(id, eventTime), deviceId(deviceId) {}
        NotifyArgs(sequenceNum, eventTime), deviceId(deviceId) {
}


NotifyDeviceResetArgs::NotifyDeviceResetArgs(const NotifyDeviceResetArgs& other) :
NotifyDeviceResetArgs::NotifyDeviceResetArgs(const NotifyDeviceResetArgs& other)
        NotifyArgs(other.sequenceNum, other.eventTime), deviceId(other.deviceId) {
      : NotifyArgs(other.id, other.eventTime), deviceId(other.deviceId) {}
}


bool NotifyDeviceResetArgs::operator==(const NotifyDeviceResetArgs& rhs) const {
bool NotifyDeviceResetArgs::operator==(const NotifyDeviceResetArgs& rhs) const {
    return sequenceNum == rhs.sequenceNum
    return id == rhs.id && eventTime == rhs.eventTime && deviceId == rhs.deviceId;
            && eventTime == rhs.eventTime
            && deviceId == rhs.deviceId;
}
}


void NotifyDeviceResetArgs::notify(const sp<InputListenerInterface>& listener) const {
void NotifyDeviceResetArgs::notify(const sp<InputListenerInterface>& listener) const {
+3 −3
Original line number Original line Diff line number Diff line
@@ -229,7 +229,7 @@ static NotifyMotionArgs generateMotionArgs() {


    const nsecs_t currentTime = now();
    const nsecs_t currentTime = now();
    // Define a valid motion event.
    // Define a valid motion event.
    NotifyMotionArgs args(/* sequenceNum */ 0, currentTime, DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
    NotifyMotionArgs args(/* id */ 0, currentTime, DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
                          ADISPLAY_ID_DEFAULT, POLICY_FLAG_PASS_TO_USER, AMOTION_EVENT_ACTION_DOWN,
                          ADISPLAY_ID_DEFAULT, POLICY_FLAG_PASS_TO_USER, AMOTION_EVENT_ACTION_DOWN,
                          /* actionButton */ 0, /* flags */ 0, AMETA_NONE, /* buttonState */ 0,
                          /* actionButton */ 0, /* flags */ 0, AMETA_NONE, /* buttonState */ 0,
                          MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, 1,
                          MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, 1,
@@ -259,14 +259,14 @@ static void benchmarkNotifyMotion(benchmark::State& state) {
    for (auto _ : state) {
    for (auto _ : state) {
        // Send ACTION_DOWN
        // Send ACTION_DOWN
        motionArgs.action = AMOTION_EVENT_ACTION_DOWN;
        motionArgs.action = AMOTION_EVENT_ACTION_DOWN;
        motionArgs.sequenceNum = 0;
        motionArgs.id = 0;
        motionArgs.downTime = now();
        motionArgs.downTime = now();
        motionArgs.eventTime = motionArgs.downTime;
        motionArgs.eventTime = motionArgs.downTime;
        dispatcher->notifyMotion(&motionArgs);
        dispatcher->notifyMotion(&motionArgs);


        // Send ACTION_UP
        // Send ACTION_UP
        motionArgs.action = AMOTION_EVENT_ACTION_UP;
        motionArgs.action = AMOTION_EVENT_ACTION_UP;
        motionArgs.sequenceNum = 1;
        motionArgs.id = 1;
        motionArgs.eventTime = now();
        motionArgs.eventTime = now();
        dispatcher->notifyMotion(&motionArgs);
        dispatcher->notifyMotion(&motionArgs);


+12 −13
Original line number Original line Diff line number Diff line
@@ -86,8 +86,8 @@ VerifiedMotionEvent verifiedMotionEventFromMotionEntry(const MotionEntry& entry)


// --- EventEntry ---
// --- EventEntry ---


EventEntry::EventEntry(uint32_t sequenceNum, Type type, nsecs_t eventTime, uint32_t policyFlags)
EventEntry::EventEntry(int32_t id, Type type, nsecs_t eventTime, uint32_t policyFlags)
      : sequenceNum(sequenceNum),
      : id(id),
        refCount(1),
        refCount(1),
        type(type),
        type(type),
        eventTime(eventTime),
        eventTime(eventTime),
@@ -117,8 +117,8 @@ void EventEntry::releaseInjectionState() {


// --- ConfigurationChangedEntry ---
// --- ConfigurationChangedEntry ---


ConfigurationChangedEntry::ConfigurationChangedEntry(uint32_t sequenceNum, nsecs_t eventTime)
ConfigurationChangedEntry::ConfigurationChangedEntry(int32_t id, nsecs_t eventTime)
      : EventEntry(sequenceNum, Type::CONFIGURATION_CHANGED, eventTime, 0) {}
      : EventEntry(id, Type::CONFIGURATION_CHANGED, eventTime, 0) {}


ConfigurationChangedEntry::~ConfigurationChangedEntry() {}
ConfigurationChangedEntry::~ConfigurationChangedEntry() {}


@@ -128,8 +128,8 @@ void ConfigurationChangedEntry::appendDescription(std::string& msg) const {


// --- DeviceResetEntry ---
// --- DeviceResetEntry ---


DeviceResetEntry::DeviceResetEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId)
DeviceResetEntry::DeviceResetEntry(int32_t id, nsecs_t eventTime, int32_t deviceId)
      : EventEntry(sequenceNum, Type::DEVICE_RESET, eventTime, 0), deviceId(deviceId) {}
      : EventEntry(id, Type::DEVICE_RESET, eventTime, 0), deviceId(deviceId) {}


DeviceResetEntry::~DeviceResetEntry() {}
DeviceResetEntry::~DeviceResetEntry() {}


@@ -140,9 +140,8 @@ void DeviceResetEntry::appendDescription(std::string& msg) const {
// --- FocusEntry ---
// --- FocusEntry ---


// Focus notifications always go to apps, so set the flag POLICY_FLAG_PASS_TO_USER for all entries
// Focus notifications always go to apps, so set the flag POLICY_FLAG_PASS_TO_USER for all entries
FocusEntry::FocusEntry(uint32_t sequenceNum, nsecs_t eventTime, sp<IBinder> connectionToken,
FocusEntry::FocusEntry(int32_t id, nsecs_t eventTime, sp<IBinder> connectionToken, bool hasFocus)
                       bool hasFocus)
      : EventEntry(id, Type::FOCUS, eventTime, POLICY_FLAG_PASS_TO_USER),
      : EventEntry(sequenceNum, Type::FOCUS, eventTime, POLICY_FLAG_PASS_TO_USER),
        connectionToken(connectionToken),
        connectionToken(connectionToken),
        hasFocus(hasFocus) {}
        hasFocus(hasFocus) {}


@@ -154,11 +153,11 @@ void FocusEntry::appendDescription(std::string& msg) const {


// --- KeyEntry ---
// --- KeyEntry ---


KeyEntry::KeyEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
KeyEntry::KeyEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source,
                   int32_t displayId, uint32_t policyFlags, int32_t action, int32_t flags,
                   int32_t displayId, uint32_t policyFlags, int32_t action, int32_t flags,
                   int32_t keyCode, int32_t scanCode, int32_t metaState, int32_t repeatCount,
                   int32_t keyCode, int32_t scanCode, int32_t metaState, int32_t repeatCount,
                   nsecs_t downTime)
                   nsecs_t downTime)
      : EventEntry(sequenceNum, Type::KEY, eventTime, policyFlags),
      : EventEntry(id, Type::KEY, eventTime, policyFlags),
        deviceId(deviceId),
        deviceId(deviceId),
        source(source),
        source(source),
        displayId(displayId),
        displayId(displayId),
@@ -198,7 +197,7 @@ void KeyEntry::recycle() {


// --- MotionEntry ---
// --- MotionEntry ---


MotionEntry::MotionEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
MotionEntry::MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source,
                         int32_t displayId, uint32_t policyFlags, int32_t action,
                         int32_t displayId, uint32_t policyFlags, int32_t action,
                         int32_t actionButton, int32_t flags, int32_t metaState,
                         int32_t actionButton, int32_t flags, int32_t metaState,
                         int32_t buttonState, MotionClassification classification,
                         int32_t buttonState, MotionClassification classification,
@@ -206,7 +205,7 @@ MotionEntry::MotionEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t device
                         float xCursorPosition, float yCursorPosition, nsecs_t downTime,
                         float xCursorPosition, float yCursorPosition, nsecs_t downTime,
                         uint32_t pointerCount, const PointerProperties* pointerProperties,
                         uint32_t pointerCount, const PointerProperties* pointerProperties,
                         const PointerCoords* pointerCoords, float xOffset, float yOffset)
                         const PointerCoords* pointerCoords, float xOffset, float yOffset)
      : EventEntry(sequenceNum, Type::MOTION, eventTime, policyFlags),
      : EventEntry(id, Type::MOTION, eventTime, policyFlags),
        eventTime(eventTime),
        eventTime(eventTime),
        deviceId(deviceId),
        deviceId(deviceId),
        source(source),
        source(source),
+17 −20
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@
namespace android::inputdispatcher {
namespace android::inputdispatcher {


// Sequence number for synthesized or injected events.
// Sequence number for synthesized or injected events.
constexpr uint32_t SYNTHESIZED_EVENT_SEQUENCE_NUM = 0;
constexpr int32_t SYNTHESIZED_EVENT_ID = 0;


struct EventEntry {
struct EventEntry {
    enum class Type {
    enum class Type {
@@ -56,7 +56,7 @@ struct EventEntry {
        }
        }
    }
    }


    uint32_t sequenceNum;
    int32_t id;
    mutable int32_t refCount;
    mutable int32_t refCount;
    Type type;
    Type type;
    nsecs_t eventTime;
    nsecs_t eventTime;
@@ -78,22 +78,20 @@ struct EventEntry {
     * Key repeat is a synthesized event, because it is related to an actual hardware state
     * Key repeat is a synthesized event, because it is related to an actual hardware state
     * (a key is currently pressed), but the repeat itself is generated by the framework.
     * (a key is currently pressed), but the repeat itself is generated by the framework.
     */
     */
    inline bool isSynthesized() const {
    inline bool isSynthesized() const { return isInjected() || id == SYNTHESIZED_EVENT_ID; }
        return isInjected() || sequenceNum == SYNTHESIZED_EVENT_SEQUENCE_NUM;
    }


    void release();
    void release();


    virtual void appendDescription(std::string& msg) const = 0;
    virtual void appendDescription(std::string& msg) const = 0;


protected:
protected:
    EventEntry(uint32_t sequenceNum, Type type, nsecs_t eventTime, uint32_t policyFlags);
    EventEntry(int32_t id, Type type, nsecs_t eventTime, uint32_t policyFlags);
    virtual ~EventEntry();
    virtual ~EventEntry();
    void releaseInjectionState();
    void releaseInjectionState();
};
};


struct ConfigurationChangedEntry : EventEntry {
struct ConfigurationChangedEntry : EventEntry {
    explicit ConfigurationChangedEntry(uint32_t sequenceNum, nsecs_t eventTime);
    explicit ConfigurationChangedEntry(int32_t id, nsecs_t eventTime);
    virtual void appendDescription(std::string& msg) const;
    virtual void appendDescription(std::string& msg) const;


protected:
protected:
@@ -103,7 +101,7 @@ protected:
struct DeviceResetEntry : EventEntry {
struct DeviceResetEntry : EventEntry {
    int32_t deviceId;
    int32_t deviceId;


    DeviceResetEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId);
    DeviceResetEntry(int32_t id, nsecs_t eventTime, int32_t deviceId);
    virtual void appendDescription(std::string& msg) const;
    virtual void appendDescription(std::string& msg) const;


protected:
protected:
@@ -114,7 +112,7 @@ struct FocusEntry : EventEntry {
    sp<IBinder> connectionToken;
    sp<IBinder> connectionToken;
    bool hasFocus;
    bool hasFocus;


    FocusEntry(uint32_t sequenceNum, nsecs_t eventTime, sp<IBinder> connectionToken, bool hasFocus);
    FocusEntry(int32_t id, nsecs_t eventTime, sp<IBinder> connectionToken, bool hasFocus);
    virtual void appendDescription(std::string& msg) const;
    virtual void appendDescription(std::string& msg) const;


protected:
protected:
@@ -144,10 +142,9 @@ struct KeyEntry : EventEntry {
    InterceptKeyResult interceptKeyResult; // set based on the interception result
    InterceptKeyResult interceptKeyResult; // set based on the interception result
    nsecs_t interceptKeyWakeupTime;        // used with INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER
    nsecs_t interceptKeyWakeupTime;        // used with INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER


    KeyEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
    KeyEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId,
             int32_t displayId, uint32_t policyFlags, int32_t action, int32_t flags,
             uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode,
             int32_t keyCode, int32_t scanCode, int32_t metaState, int32_t repeatCount,
             int32_t metaState, int32_t repeatCount, nsecs_t downTime);
             nsecs_t downTime);
    virtual void appendDescription(std::string& msg) const;
    virtual void appendDescription(std::string& msg) const;
    void recycle();
    void recycle();


@@ -176,13 +173,13 @@ struct MotionEntry : EventEntry {
    PointerProperties pointerProperties[MAX_POINTERS];
    PointerProperties pointerProperties[MAX_POINTERS];
    PointerCoords pointerCoords[MAX_POINTERS];
    PointerCoords pointerCoords[MAX_POINTERS];


    MotionEntry(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
    MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId,
                int32_t displayId, uint32_t policyFlags, int32_t action, int32_t actionButton,
                uint32_t policyFlags, int32_t action, int32_t actionButton, int32_t flags,
                int32_t flags, int32_t metaState, int32_t buttonState,
                int32_t metaState, int32_t buttonState, MotionClassification classification,
                MotionClassification classification, int32_t edgeFlags, float xPrecision,
                int32_t edgeFlags, float xPrecision, float yPrecision, float xCursorPosition,
                float yPrecision, float xCursorPosition, float yCursorPosition, nsecs_t downTime,
                float yCursorPosition, nsecs_t downTime, uint32_t pointerCount,
                uint32_t pointerCount, const PointerProperties* pointerProperties,
                const PointerProperties* pointerProperties, const PointerCoords* pointerCoords,
                const PointerCoords* pointerCoords, float xOffset, float yOffset);
                float xOffset, float yOffset);
    virtual void appendDescription(std::string& msg) const;
    virtual void appendDescription(std::string& msg) const;


protected:
protected:
+32 −34

File changed.

Preview size limit exceeded, changes collapsed.

Loading