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
Loading
Please register or sign in to comment