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

Commit ea9d7335 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Merge "Remove delay received from audio layer for A2DP state changes"

am: 1f81cd51

Change-Id: I8a639938129e7f994bc6d517f9e238b15f6cf78e
parents 475a047b 1f81cd51
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -887,17 +887,12 @@ final class A2dpStateMachine extends StateMachine {

    // This method does not check for error conditon (newState == prevState)
    private void broadcastConnectionState(BluetoothDevice device, int newState, int prevState) {

        int delay = mAudioManager.setBluetoothA2dpDeviceConnectionState(device, newState,
                BluetoothProfile.A2DP);
        mAudioManager.setBluetoothA2dpDeviceConnectionState(
                device, newState, BluetoothProfile.A2DP);

        mWakeLock.acquire();
        mIntentBroadcastHandler.sendMessageDelayed(mIntentBroadcastHandler.obtainMessage(
                                                        MSG_CONNECTION_STATE_CHANGED,
                                                        prevState,
                                                        newState,
                                                        device),
                                                        delay);
        mIntentBroadcastHandler.sendMessage(mIntentBroadcastHandler.obtainMessage(
                MSG_CONNECTION_STATE_CHANGED, prevState, newState, device));
    }

    private void broadcastAudioState(BluetoothDevice device, int state, int prevState) {