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

Commit 1f81cd51 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 4f9a610a 3822a515
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) {