Loading services/core/java/com/android/server/audio/AudioService.java +11 −5 Original line number Diff line number Diff line Loading @@ -4746,13 +4746,19 @@ public class AudioService extends IAudioService.Stub private int getA2dpCodec(BluetoothDevice device) { synchronized (mA2dpAvrcpLock) { if (mA2dp != null) { if (mA2dp == null) { return AudioSystem.AUDIO_FORMAT_DEFAULT; } BluetoothCodecStatus btCodecStatus = mA2dp.getCodecStatus(device); BluetoothCodecConfig btCodecConfig = btCodecStatus.getCodecConfig(); return mapBluetoothCodecToAudioFormat(btCodecConfig.getCodecType()); if (btCodecStatus == null) { return AudioSystem.AUDIO_FORMAT_DEFAULT; } BluetoothCodecConfig btCodecConfig = btCodecStatus.getCodecConfig(); if (btCodecConfig == null) { return AudioSystem.AUDIO_FORMAT_DEFAULT; } return mapBluetoothCodecToAudioFormat(btCodecConfig.getCodecType()); } } /* Loading Loading
services/core/java/com/android/server/audio/AudioService.java +11 −5 Original line number Diff line number Diff line Loading @@ -4746,13 +4746,19 @@ public class AudioService extends IAudioService.Stub private int getA2dpCodec(BluetoothDevice device) { synchronized (mA2dpAvrcpLock) { if (mA2dp != null) { if (mA2dp == null) { return AudioSystem.AUDIO_FORMAT_DEFAULT; } BluetoothCodecStatus btCodecStatus = mA2dp.getCodecStatus(device); BluetoothCodecConfig btCodecConfig = btCodecStatus.getCodecConfig(); return mapBluetoothCodecToAudioFormat(btCodecConfig.getCodecType()); if (btCodecStatus == null) { return AudioSystem.AUDIO_FORMAT_DEFAULT; } BluetoothCodecConfig btCodecConfig = btCodecStatus.getCodecConfig(); if (btCodecConfig == null) { return AudioSystem.AUDIO_FORMAT_DEFAULT; } return mapBluetoothCodecToAudioFormat(btCodecConfig.getCodecType()); } } /* Loading