commit | 3c3216d85ade6d5db668c36fc48a6dd22fc393bb | [log] [tgz] |
---|---|---|
author | Ram Periathiruvadi <ramperry@google.com> | Tue Oct 15 18:01:12 2019 -0700 |
committer | Ram Periathiruvadi <ramperry@google.com> | Tue Oct 15 18:06:47 2019 -0700 |
tree | ed41630160126ff56498533efd58f9b4f479a37d | |
parent | 54ba230d8d98b5b83c63a753ef254e6ce1efc03d [diff] |
Fix concurrent modification exception. The callbacks registered with the BlePeripheralManager were not synchronized for thread safety. Hence a BLE disconnect removed listeners on one thread when data is still in transit on another thread causing a concurrent modification exception. Changing all callbacks and listeners to CopyOnWriteArrayList. Bug: 141983882 Test: make and ensure Trusted device feature works. Change-Id: Iaf04eb67f21d2581fbb6703e86efbcaa5c49e555
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.