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

Commit 8d621cc0 authored by Etan Cohen's avatar Etan Cohen Committed by Gerrit Code Review
Browse files

Merge "[AWARE] Make PeerHandle comparable/hashable"

parents 1801711c 5a49329a
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -32,4 +32,22 @@ public class PeerHandle {

    /** @hide */
    public int peerId;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof PeerHandle)) {
            return false;
        }

        return peerId == ((PeerHandle) o).peerId;
    }

    @Override
    public int hashCode() {
        return peerId;
    }
}