summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2019-06-24 10:39:19 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2019-09-10 15:47:17 +0000
commitb3580a89daff709ca845e5e4652d6ca0057a6016 (patch)
treebf629b2c44b6185bbc2d30ad8e0f92c5adf269aa /rs/java/android/renderscript/ProgramStore.java
parent0ea0da634e00c8c27da17f8b90bb2b79736eed01 (diff)
AudioService: fix disconnect/connect of A2DP device
Due to the expected BECOMING_NOISY behavior associated with a device disconnection, the disconnection is handled asynchronously after a fixed delay. This delay caused an inversion of commands in the processing order of the disconnection of a device closely followed by connection of the same device. The fix consists in: - overriding the equals() operator for BtDeviceConnectionInfo so messages for a given device in the message queue can be checked / removed. - when AudioDeviceBroker receives a command for A2DP connection or disconnection, remove all upcoming connection and disconnection commands in the queue for this device (see postBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent) - remove AudioDeviceBroker.handleSetA2dpSinkConnectionState, which was only used in BtHelper.onA2dpProfileConnected() with a CONNECTED state, and have this method perform a regular device connection (just like when coming from AM->AS). - in AudioDeviceInventory.onSetA2dpSinkConnectionState(), support receiving a connection event for an already connected device, to support codec changes. This change also includes modifications to the classes involved in the device connection to make them support mocking/spying to reproduce the bug conditions (see AudioDeviceBrokerTest). Bug: 134932649 Test: atest AudioDeviceBrokerTest Change-Id: If2b3b41409c77467a181a2f9b42310db9b9de8c5 Merged-In: If2b3b41409c77467a181a2f9b42310db9b9de8c5
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions