summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragment.java
diff options
context:
space:
mode:
authorJeff Blattman <jeffrey.blattman@gmail.com>2020-02-28 14:58:08 -0800
committerJulia Reynolds <juliacr@google.com>2020-09-11 13:33:57 +0000
commit2ab3cc241eb8592de3a5bfb4cf411a7a81a92883 (patch)
treec23f897499ca5b06eaefe3e4ece831b7a812f15e /rs/java/android/renderscript/ProgramFragment.java
parent68ca4e10b01dbd734b9430c18b25b068bd5df0d3 (diff)
Use a concurrent hash map to access VolumeDialogControllerImpl's callbacks
The issue is that the VolumeDialogControllerImpl.C's mCallbackMap is accessed from two different threads. Instrumentation shows that via add() and remove() it is modified on the main thread, and methods like C.onConfigurationChanged() are called from VolumeDialogControllerImpl.Receiver, which registers with on a handler tied to a background thread (VolumeDialogControllerImpl.W/mWorker). C.onConfigurationChanged() is called directly from that thread. Use a concurrent hash map in place of hash map to avoid the concurrent modification exception. Test: manual. Ensure device boots. Ensure basic volume control functions. Ensure a configuration change (via locale change) does not result in any crash. Bug: https://issuetracker.google.com/issues/150402778 Change-Id: I26bb8533c30d57e48f500e6863d0f522e1559567
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragment.java')
0 files changed, 0 insertions, 0 deletions