mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
cketti points out that I was cloning improperly.
(Also, reading the docs for add, I don't need to check existence first)
This commit is contained in:
parent
014b6c19c3
commit
49c0601390
@ -359,8 +359,8 @@ public class MessagingController implements Runnable
|
|||||||
|
|
||||||
public Set<MessagingListener> getListeners(MessagingListener listener)
|
public Set<MessagingListener> getListeners(MessagingListener listener)
|
||||||
{
|
{
|
||||||
Set<MessagingListener> listeners = mListeners;
|
Set<MessagingListener> listeners = new CopyOnWriteArraySet<MessagingListener>(mListeners);
|
||||||
if (listener != null && getListeners().contains(listener) == false)
|
if (listener != null)
|
||||||
{
|
{
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user