summaryrefslogtreecommitdiffstats
path: root/telecomm/java
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2014-08-10 02:50:35 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-09 00:40:15 +0000
commitea201b31a3675306efe3920380a0157bdb7f12fe (patch)
treef74f941bb42feb0c33d8fdc92ff20be0303666e5 /telecomm/java
parentc4d63d705cdaec4688f5617649b283298c6123a6 (diff)
parentd5bcb68cb7208ac9766570848c42a6e44e32dc10 (diff)
downloadframeworks_base-ea201b31a3675306efe3920380a0157bdb7f12fe.zip
frameworks_base-ea201b31a3675306efe3920380a0157bdb7f12fe.tar.gz
frameworks_base-ea201b31a3675306efe3920380a0157bdb7f12fe.tar.bz2
Merge "Use thread safe set for RemoteConnection.mListeners" into lmp-dev
Diffstat (limited to 'telecomm/java')
-rw-r--r--telecomm/java/android/telecomm/RemoteConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/telecomm/java/android/telecomm/RemoteConnection.java b/telecomm/java/android/telecomm/RemoteConnection.java
index 197e480..a8636d4 100644
--- a/telecomm/java/android/telecomm/RemoteConnection.java
+++ b/telecomm/java/android/telecomm/RemoteConnection.java
@@ -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;