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

Commit 54d153c5 authored by Sanket Agarwal's avatar Sanket Agarwal
Browse files

Remove hashcode() override for Connection

hashCode is relying on the number of call which creates a race condition
when two phone calls with same number are created. It basically confuses
the stack about the object equality.

Bug: b/31271037
Change-Id: If009c2e0924fad540cf91bc8b0fa9b2f13404b7b
parent 7e3b7fee
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ public class HfpClientConnection extends Connection {
        if (mClosed) {
            return;
        }
        Log.d(TAG, "Setting " + mCurrentCall + " to disconnected");
        Log.d(TAG, "Setting " + mCurrentCall + " to disconnected " + getTelecomCallId());
        setDisconnected(new DisconnectCause(cause));

        mClosed = true;
@@ -273,11 +273,6 @@ public class HfpClientConnection extends Connection {
        return getAddress() == otherAddr || otherAddr != null && otherAddr.equals(getAddress());
    }

    @Override
    public int hashCode() {
        return getAddress() == null ? 0 : getAddress().hashCode();
    }

    @Override
    public String toString() {
        return "HfpClientConnection{" + getAddress() + "," + stateToString(getState()) + "," +