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

Commit 37dc71c0 authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "Fix code formatting issues." into cm-10.1

parents 94ca7dd8 e77b6efa
Loading
Loading
Loading
Loading
+29 −28
Original line number Diff line number Diff line
@@ -179,8 +179,8 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
    /** @see VolumeStreamState */
    private VolumeStreamState[] mStreamStates;
    private SettingsObserver mSettingsObserver;
    //nodelay in a2dp
    private boolean noDelayInATwoDP = Resources.getSystem().getBoolean(com.android.internal.R.bool.config_noDelayInATwoDP);
    private boolean noDelayInATwoDP =
            Resources.getSystem().getBoolean(com.android.internal.R.bool.config_noDelayInATwoDP);

    private int mMode;
    // protects mRingerMode
@@ -506,8 +506,9 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
        // Register for device connection intent broadcasts.
        IntentFilter intentFilter =
                new IntentFilter(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED);
        if (noDelayInATwoDP)
        if (noDelayInATwoDP) {
            intentFilter.addAction(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
        }
        intentFilter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
        intentFilter.addAction(Intent.ACTION_DOCK_EVENT);
        intentFilter.addAction(Intent.ACTION_USB_AUDIO_ACCESSORY_PLUG);
@@ -2626,8 +2627,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
        }
    }

    public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state)
    {
    public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state) {
        int delay;
        if (!noDelayInATwoDP) {
            synchronized (mConnectedDevices) {
@@ -3550,8 +3550,9 @@ public class AudioService extends IAudioService.Stub implements OnFinished {

    // must be called synchronized on mConnectedDevices
    private void makeA2dpDeviceUnavailableNow(String address) {
        if (noDelayInATwoDP)
        if (noDelayInATwoDP) {
            onSendBecomingNoisyIntent();
        }
        AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
                AudioSystem.DEVICE_STATE_UNAVAILABLE,
                address);