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

Skip to content
Commit 1577ff10 authored by tadvana's avatar tadvana
Browse files

AdapterService ConcurrentModificationException fix

There was an issue in the AdapterService where a synchronized HashMap
was being used, and removals were being done while puts could be done in
a separate thread.

This change updates the behavior to use a ConcurrentHashMap which
guarantees that ConcurrentModificationExceptions cannot be thrown so
long as iterators to views of the Map are accessed in the thread they
are created in.

Bug: 233703615
Test: Flashed a device with the latest Android Auto stub (which is the
only thing that currently invokes this API, and toggled the BT adapter a
few times. This is a bit difficult to test directly since this is a
pretty rare occurrence in the wild per the bug.
Ignore-AOSP-First: Fix required in tm-dev for T release.

Change-Id: I7329fc646d1a17df8773d3e1cc2ac26ae780e163
Merged-In: I7329fc646d1a17df8773d3e1cc2ac26ae780e163
parent 11e16a0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment