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

Skip to content
Commit a6ab5b71 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Do not capture argument from ServiceListing.Callback

As the argument passed is the internal arraylist (mutable), capturing it
in the Runnable passed to the executor could cause a
ConcurrentModificationException.

Instead, map it before defining the Runnable so by the time the callback
returns, we don't have any copies of it.

The test checks that the original argument passed is the one that's
mapped and not a modified copy.

Test: atest ControlsListingControllerImpl
Fixes: 259222196
Change-Id: I6fff508dca50f0f9ac6981ad94e7cc9212cafda9
parent b4c05895
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