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

Commit 13955221 authored by Sailesh Nepal's avatar Sailesh Nepal Committed by Android Git Automerger
Browse files

am 375be76e: Merge "Use thread safe set for RemoteConnection.mListeners" into lmp-dev

* commit '375be76e3b6df46a7a680bcca9b6eb6e9b1aa59c':
  Use thread safe set for RemoteConnection.mListeners
parents df079607 ea201b31
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * RemoteConnection object used by RemoteConnectionService.
@@ -179,7 +180,8 @@ public final class RemoteConnection {

    private IConnectionService mConnectionService;
    private final String mConnectionId;
    private final Set<Listener> mListeners = new HashSet<>();
    private final Set<Listener> mListeners = Collections.newSetFromMap(
            new ConcurrentHashMap<Listener, Boolean>(2));
    private final Set<RemoteConnection> mConferenceableConnections = new HashSet<>();

    private int mState = Connection.State.NEW;