Use thread/iteration safe collection for proximity listeners
CopyOnWrite datastructures essentially do what the existing code did: they ensure that iteration operates on an immutable copy of the list and never throw ConcurrentModificationException. They're also more efficient because they do copy only on add, not each iteration. Bug: 354293532 Test: atest ProximitySensorImplDualTest ProximitySensorImplSingleTest Flag: EXEMPT inplace refactor Change-Id: If687969a7ef81e33e8f41b28a751ca60fd90349f
Loading
Please register or sign in to comment