Loading services/core/java/com/android/server/audio/AudioDeviceBroker.java +2 −1 Original line number Diff line number Diff line Loading @@ -1093,7 +1093,8 @@ public class AudioDeviceBroker { /*package*/ static BtDeviceInfo createBtDeviceInfo(@NonNull BtDeviceChangedData d, @NonNull BluetoothDevice device, int state) { int audioDevice = BtHelper.getTypeFromProfile(d.mInfo.getProfile(), d.mInfo.isLeOutput()); int audioDevice = BtHelper.getTypeFromProfile( d.mInfo.getProfile(), d.mInfo.isLeOutput(), device); return new BtDeviceInfo(d, device, state, audioDevice, AudioSystem.AUDIO_FORMAT_DEFAULT); } Loading services/core/java/com/android/server/audio/AudioDeviceInventory.java +2 −1 Original line number Diff line number Diff line Loading @@ -1041,7 +1041,8 @@ public class AudioDeviceInventory { "onBluetoothDeviceConfigChange addr=" + address + " event=" + BtHelper.deviceEventToString(event))); int deviceType = BtHelper.getTypeFromProfile(btInfo.mProfile, btInfo.mIsLeOutput); int deviceType = BtHelper.getTypeFromProfile( btInfo.mProfile, btInfo.mIsLeOutput, btDevice); boolean disconnectDevice = false; synchronized (mDevicesLock) { Loading services/core/java/com/android/server/audio/BtHelper.java +3 −2 Original line number Diff line number Diff line Loading @@ -1298,7 +1298,8 @@ public class BtHelper { return 0; // 0 is not a valid profile } /*package */ static int getTypeFromProfile(int profile, boolean isLeOutput) { /*package */ static int getTypeFromProfile( int profile, boolean isLeOutput, BluetoothDevice device) { switch (profile) { case BluetoothProfile.A2DP_SINK: return AudioSystem.DEVICE_IN_BLUETOOTH_A2DP; Loading @@ -1315,7 +1316,7 @@ public class BtHelper { case BluetoothProfile.LE_AUDIO_BROADCAST: return AudioSystem.DEVICE_OUT_BLE_BROADCAST; case BluetoothProfile.HEADSET: return AudioSystem.DEVICE_OUT_BLUETOOTH_SCO; return btHeadsetDeviceToAudioDevice(device).getInternalType(); default: throw new IllegalArgumentException("Invalid profile " + profile); } Loading Loading
services/core/java/com/android/server/audio/AudioDeviceBroker.java +2 −1 Original line number Diff line number Diff line Loading @@ -1093,7 +1093,8 @@ public class AudioDeviceBroker { /*package*/ static BtDeviceInfo createBtDeviceInfo(@NonNull BtDeviceChangedData d, @NonNull BluetoothDevice device, int state) { int audioDevice = BtHelper.getTypeFromProfile(d.mInfo.getProfile(), d.mInfo.isLeOutput()); int audioDevice = BtHelper.getTypeFromProfile( d.mInfo.getProfile(), d.mInfo.isLeOutput(), device); return new BtDeviceInfo(d, device, state, audioDevice, AudioSystem.AUDIO_FORMAT_DEFAULT); } Loading
services/core/java/com/android/server/audio/AudioDeviceInventory.java +2 −1 Original line number Diff line number Diff line Loading @@ -1041,7 +1041,8 @@ public class AudioDeviceInventory { "onBluetoothDeviceConfigChange addr=" + address + " event=" + BtHelper.deviceEventToString(event))); int deviceType = BtHelper.getTypeFromProfile(btInfo.mProfile, btInfo.mIsLeOutput); int deviceType = BtHelper.getTypeFromProfile( btInfo.mProfile, btInfo.mIsLeOutput, btDevice); boolean disconnectDevice = false; synchronized (mDevicesLock) { Loading
services/core/java/com/android/server/audio/BtHelper.java +3 −2 Original line number Diff line number Diff line Loading @@ -1298,7 +1298,8 @@ public class BtHelper { return 0; // 0 is not a valid profile } /*package */ static int getTypeFromProfile(int profile, boolean isLeOutput) { /*package */ static int getTypeFromProfile( int profile, boolean isLeOutput, BluetoothDevice device) { switch (profile) { case BluetoothProfile.A2DP_SINK: return AudioSystem.DEVICE_IN_BLUETOOTH_A2DP; Loading @@ -1315,7 +1316,7 @@ public class BtHelper { case BluetoothProfile.LE_AUDIO_BROADCAST: return AudioSystem.DEVICE_OUT_BLE_BROADCAST; case BluetoothProfile.HEADSET: return AudioSystem.DEVICE_OUT_BLUETOOTH_SCO; return btHeadsetDeviceToAudioDevice(device).getInternalType(); default: throw new IllegalArgumentException("Invalid profile " + profile); } Loading