Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c91cdd5 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "AudioService: fix missing AUDIO_BECOMING_NOISY intent" into oc-dev am: d91cedb7

am: 82c6833c

Change-Id: I7c56552a093b8181241dc05584a0e756241921ca
parents d3439c7a 82c6833c
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -5149,7 +5149,7 @@ public class AudioService extends IAudioService.Stub

    private void onBluetoothA2dpDeviceConfigChange(BluetoothDevice btDevice)
    {
        if (DEBUG_VOL) {
        if (DEBUG_DEVICES) {
            Log.d(TAG, "onBluetoothA2dpDeviceConfigChange btDevice=" + btDevice);
        }
        if (btDevice == null) {
@@ -5166,8 +5166,13 @@ public class AudioService extends IAudioService.Stub
            final DeviceListSpec deviceSpec = mConnectedDevices.get(key);
            if (deviceSpec != null) {
                // Device is connected
                AudioSystem.handleDeviceConfigChange(device, address,
                        btDevice.getName());
               if (AudioSystem.handleDeviceConfigChange(device, address,
                        btDevice.getName()) != AudioSystem.AUDIO_STATUS_OK) {
                   // force A2DP device disconnection in case of error so that AudioService state is
                   // consistent with audio policy manager state
                   setBluetoothA2dpDeviceConnectionState(
                           btDevice, BluetoothA2dp.STATE_DISCONNECTED, BluetoothProfile.A2DP_SINK);
               }
            }
        }
    }