commit | 6cd937c48870b18cbf6575a2019c21e523afbc86 | [log] [tgz] |
---|---|---|
author | Robert Wu <robertwu@google.com> | Wed May 18 18:35:04 2022 +0000 |
committer | Robert Wu <robertwu@google.com> | Thu May 19 16:01:52 2022 +0000 |
tree | 6707bc9da0e16b1294f8da859397a7c5881a3afa | |
parent | 96ad5ccad955dc5fc852d9cd2af9c1cfd4053bbf [diff] |
USB MIDI: Use Thread.interrupt() to close threads We start input threads before setting mIsOpen. This means that sometimes, input threads immediately exit due to a race condition. The fix here is to remove the use of mIsOpen and use a new mechanism with Thread.interrupt() and Thread.interrupted() to mark a thread to be closed. Bug: 223316278 Test: MidiScope/MidiKeyboard Test: CTS Verifier Bluetooth Tests Change-Id: I7c221504ae8a8814c1aa5598552494c80c202eb2