diff options
author | Danny Baumann <dannybaumann@web.de> | 2013-01-28 17:12:52 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2013-01-28 17:12:52 +0100 |
commit | e77b6efa6e6917a4360ecfe10dff189d56da780a (patch) | |
tree | c3b53a2af8b529dc905a6ffee9f392ab1bf898ec /media/java | |
parent | 2ceeca1d02cc635d7781a5cb317593fafa1e0227 (diff) | |
download | frameworks_base-e77b6efa6e6917a4360ecfe10dff189d56da780a.zip frameworks_base-e77b6efa6e6917a4360ecfe10dff189d56da780a.tar.gz frameworks_base-e77b6efa6e6917a4360ecfe10dff189d56da780a.tar.bz2 |
Fix code formatting issues.
Change-Id: I5c3cde249cd5b514c616b8c42b8eb2549de247a6
Diffstat (limited to 'media/java')
-rwxr-xr-x | media/java/android/media/AudioService.java | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 6c264be..01c2c5b 100755 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -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); @@ -2196,18 +2197,18 @@ public class AudioService extends IAudioService.Stub implements OnFinished { deviceList = a2dp.getConnectedDevices(); if (deviceList.size() > 0) { btDevice = deviceList.get(0); - if (!noDelayInATwoDP){ - synchronized (mConnectedDevices) { - int state = a2dp.getConnectionState(btDevice); - int delay = checkSendBecomingNoisyIntent( - AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, - (state == BluetoothA2dp.STATE_CONNECTED) ? 1 : 0); - queueMsgUnderWakeLock(mAudioHandler, - MSG_SET_A2DP_CONNECTION_STATE, - state, - 0, - btDevice, - delay); + if (!noDelayInATwoDP) { + synchronized (mConnectedDevices) { + int state = a2dp.getConnectionState(btDevice); + int delay = checkSendBecomingNoisyIntent( + AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, + (state == BluetoothA2dp.STATE_CONNECTED) ? 1 : 0); + queueMsgUnderWakeLock(mAudioHandler, + MSG_SET_A2DP_CONNECTION_STATE, + state, + 0, + btDevice, + delay); } } else { onSetA2dpConnectionState(btDevice, a2dp.getConnectionState(btDevice)); @@ -2626,19 +2627,18 @@ 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) { - delay = checkSendBecomingNoisyIntent(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, - (state == BluetoothA2dp.STATE_CONNECTED) ? 1 : 0); - queueMsgUnderWakeLock(mAudioHandler, - MSG_SET_A2DP_CONNECTION_STATE, - state, - 0, - device, - delay); + if (!noDelayInATwoDP) { + synchronized (mConnectedDevices) { + delay = checkSendBecomingNoisyIntent(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, + (state == BluetoothA2dp.STATE_CONNECTED) ? 1 : 0); + queueMsgUnderWakeLock(mAudioHandler, + MSG_SET_A2DP_CONNECTION_STATE, + state, + 0, + device, + delay); } } else { delay = 0; @@ -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); |