Commit e4297a33 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Simplify AbstractPreferences.

There's no need for a complicated re-implementation of copy
on write lists. Simple ArrayLists will suffice; all operations
are guarded by |lock| and we can return a copy of the list to
the Event processor thread to avoid concurrent modification of
the list while that thread is dispatching events.

Fixes various preference tests related to adding / removing
duplicate listeners.

A notable difference in behaviour here is that listeners are
now compared using their equals() method and not using reference
equality.

bug: 26023763
bug: 25996530

Change-Id: I57ee723cf926786e1f119ec1e7740c66162ab749
parent 31651e7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment