commit | bd698f156352aab2713381ffb78b8b5ce7d3444c | [log] [tgz] |
---|---|---|
author | Fabián Kozynski <kozynski@google.com> | Thu Jan 04 10:23:45 2024 -0500 |
committer | Fabián Kozynski <kozynski@google.com> | Thu Jan 04 11:16:07 2024 -0500 |
tree | 95fbd7e6d6611166404621b78eb0aaee97038b94 | |
parent | 77c5fef85b271c80da36dc24e92291934f01c3b8 [diff] |
Prevent ConcurrentModificationException While dispatching a change to callbacks, if one of them removes itself as part of the operation, it would cause a ConcurrentModificationException (because it's in the same thread, so it's re-entrant). Prevent this by copying the list before dispatching. Test: atest CastControllerImplTest Fixes: 317700495 Flag: None Change-Id: I8fed9957dd167437f3c3e9bde3ccbb48b0b4f6c3