Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 91478b22 authored by Jernej Virag's avatar Jernej Virag
Browse files

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
parent b4eca62f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment