Loading media/java/android/media/AudioService.java +29 −28 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading Loading @@ -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) { Loading Loading @@ -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); Loading Loading
media/java/android/media/AudioService.java +29 −28 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading Loading @@ -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) { Loading Loading @@ -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); Loading