summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-05-16 10:21:50 -0700
committerLinux Build Service Account <lnxbuild@localhost>2022-05-16 10:21:50 -0700
commite76785ff394a3a44c820c6bd90aa139f6a029d30 (patch)
tree77ccf8af533515d6266bed632a3fa4f1690abea0 /services
parent62e459a860e81fca0780c81c0af3edc0e5b925ee (diff)
parent0878d97504479f56b5b2b856fddb6fa4854cda85 (diff)
Merge 0878d97504479f56b5b2b856fddb6fa4854cda85 on remote branch
Change-Id: I2bd88f7d22970d90c31b710956d1285458ec4c3b
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/audio/AudioDeviceBroker.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
index 3817ceaa1d15..5d2076fd570b 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -585,7 +585,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
/** remove all previously scheduled connection and state change events for the given device */
@GuardedBy("mDeviceStateLock")
private void removeScheduledA2dpEvents(@NonNull BluetoothDevice device, int profile) {
- mBrokerHandler.removeEqualMessages(MSG_L_A2DP_DEVICE_CONFIG_CHANGE, device);
+ if (profile == BluetoothProfile.A2DP) {
+ mBrokerHandler.removeEqualMessages(MSG_L_A2DP_DEVICE_CONFIG_CHANGE, device);
+ }
final BtDeviceConnectionInfo connectionInfoToRemove = new BtDeviceConnectionInfo(device,
// the next parameters of the constructor will be ignored when finding the message