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

Commit edfacb8c authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Automerger Merge Worker
Browse files

Protect id generator with GUARDED_BY am: 59e302b8

parents 130b62c3 59e302b8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -4112,9 +4112,9 @@ std::unique_ptr<MotionEntry> InputDispatcher::splitMotionEvent(
        }
    }

    if (action == AMOTION_EVENT_ACTION_DOWN) {
        LOG_ALWAYS_FATAL_IF(splitDownTime != originalMotionEntry.eventTime,
                            "Split motion event has mismatching downTime and eventTime for "
    if (action == AMOTION_EVENT_ACTION_DOWN && splitDownTime != originalMotionEntry.eventTime) {
        logDispatchStateLocked();
        LOG_ALWAYS_FATAL("Split motion event has mismatching downTime and eventTime for "
                         "ACTION_DOWN, motionEntry=%s, splitDownTime=%" PRId64,
                         originalMotionEntry.getDescription().c_str(), splitDownTime);
    }
+2 −2
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ private:

    DropReason mLastDropReason GUARDED_BY(mLock);

    const IdGenerator mIdGenerator;
    const IdGenerator mIdGenerator GUARDED_BY(mLock);

    int64_t mWindowInfosVsyncId GUARDED_BY(mLock);

@@ -649,7 +649,7 @@ private:
    // splitDownTime refers to the time of first 'down' event on that particular target
    std::unique_ptr<MotionEntry> splitMotionEvent(const MotionEntry& originalMotionEntry,
                                                  std::bitset<MAX_POINTER_ID + 1> pointerIds,
                                                  nsecs_t splitDownTime);
                                                  nsecs_t splitDownTime) REQUIRES(mLock);

    // Reset and drop everything the dispatcher is doing.
    void resetAndDropEverythingLocked(const char* reason) REQUIRES(mLock);