mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 00:25:10 -04: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)
|
||||
{
|
||||
Set<MessagingListener> listeners = mListeners;
|
||||
if (listener != null && getListeners().contains(listener) == false)
|
||||
Set<MessagingListener> listeners = new CopyOnWriteArraySet<MessagingListener>(mListeners);
|
||||
if (listener != null)
|
||||
{
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user