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

Commit ae01115f authored by Rubin Xu's avatar Rubin Xu Committed by android-build-merger
Browse files

Merge "Merge "Do not compare ID when deduplicating SecurityEvent" into qt-dev...

Merge "Merge "Do not compare ID when deduplicating SecurityEvent" into qt-dev am: 8c10c286 am: 870c6e84" into qt-r1-dev-plus-aosp
am: 0d935a2c

Change-Id: I73901ff67980a4b89cd6bd247ff11b5455c4009c
parents 5830c45a 0d935a2c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -636,6 +636,11 @@ public class SecurityLog {
        public int hashCode() {
        public int hashCode() {
            return Objects.hash(mEvent, mId);
            return Objects.hash(mEvent, mId);
        }
        }

        /** @hide */
        public boolean eventEquals(SecurityEvent other) {
            return other != null && mEvent.equals(other.mEvent);
        }
    }
    }
    /**
    /**
     * Retrieve all security logs and return immediately.
     * Retrieve all security logs and return immediately.
+1 −1
Original line number Original line Diff line number Diff line
@@ -349,7 +349,7 @@ class SecurityLogMonitor implements Runnable {
                lastPos++;
                lastPos++;
            } else {
            } else {
                // Two events have the same timestamp, check if they are the same.
                // Two events have the same timestamp, check if they are the same.
                if (lastEvent.equals(curEvent)) {
                if (lastEvent.eventEquals(curEvent)) {
                    // Actual overlap, just skip the event.
                    // Actual overlap, just skip the event.
                    if (DEBUG) Slog.d(TAG, "Skipped dup event with timestamp: " + lastNanos);
                    if (DEBUG) Slog.d(TAG, "Skipped dup event with timestamp: " + lastNanos);
                } else {
                } else {