Loading services/core/java/com/android/server/audio/AudioDeviceInventory.java +1 −1 Original line number Diff line number Diff line Loading @@ -1992,7 +1992,7 @@ public class AudioDeviceInventory { // TODO: return; } else { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "A2DP source device addr=" + Utils.anonymizeBluetoothAddress(address) "A2DP sink device addr=" + Utils.anonymizeBluetoothAddress(address) + " now available").printLog(TAG)); } Loading services/core/java/com/android/server/audio/BtHelper.java +15 −11 Original line number Diff line number Diff line Loading @@ -634,17 +634,18 @@ public class BtHelper { return; } List<BluetoothDevice> activeDevices = adapter.getActiveDevices(profile); if (activeDevices.isEmpty() || activeDevices.get(0) == null) { return; BluetoothProfileConnectionInfo bpci = new BluetoothProfileConnectionInfo(profile); for (BluetoothDevice device : activeDevices) { if (device == null) { continue; } AudioDeviceBroker.BtDeviceChangedData data = new AudioDeviceBroker.BtDeviceChangedData( activeDevices.get(0), null, new BluetoothProfileConnectionInfo(profile), "mBluetoothProfileServiceListener"); AudioDeviceBroker.BtDeviceInfo info = mDeviceBroker.createBtDeviceInfo(data, activeDevices.get(0), BluetoothProfile.STATE_CONNECTED); device, null, bpci, "mBluetoothProfileServiceListener"); AudioDeviceBroker.BtDeviceInfo info = mDeviceBroker.createBtDeviceInfo( data, device, BluetoothProfile.STATE_CONNECTED); mDeviceBroker.postBluetoothActiveDevice(info, 0 /* delay */); } } // @GuardedBy("mDeviceBroker.mSetModeLock") @GuardedBy("AudioDeviceBroker.this.mDeviceStateLock") Loading Loading @@ -678,8 +679,11 @@ public class BtHelper { if (adapter != null) { List<BluetoothDevice> activeDevices = adapter.getActiveDevices(BluetoothProfile.HEADSET); if (activeDevices.size() > 0 && activeDevices.get(0) != null) { onSetBtScoActiveDevice(activeDevices.get(0)); for (BluetoothDevice device : activeDevices) { if (device == null) { continue; } onSetBtScoActiveDevice(device); } } else { Log.e(TAG, "onHeadsetProfileConnected: Null BluetoothAdapter"); Loading Loading
services/core/java/com/android/server/audio/AudioDeviceInventory.java +1 −1 Original line number Diff line number Diff line Loading @@ -1992,7 +1992,7 @@ public class AudioDeviceInventory { // TODO: return; } else { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "A2DP source device addr=" + Utils.anonymizeBluetoothAddress(address) "A2DP sink device addr=" + Utils.anonymizeBluetoothAddress(address) + " now available").printLog(TAG)); } Loading
services/core/java/com/android/server/audio/BtHelper.java +15 −11 Original line number Diff line number Diff line Loading @@ -634,17 +634,18 @@ public class BtHelper { return; } List<BluetoothDevice> activeDevices = adapter.getActiveDevices(profile); if (activeDevices.isEmpty() || activeDevices.get(0) == null) { return; BluetoothProfileConnectionInfo bpci = new BluetoothProfileConnectionInfo(profile); for (BluetoothDevice device : activeDevices) { if (device == null) { continue; } AudioDeviceBroker.BtDeviceChangedData data = new AudioDeviceBroker.BtDeviceChangedData( activeDevices.get(0), null, new BluetoothProfileConnectionInfo(profile), "mBluetoothProfileServiceListener"); AudioDeviceBroker.BtDeviceInfo info = mDeviceBroker.createBtDeviceInfo(data, activeDevices.get(0), BluetoothProfile.STATE_CONNECTED); device, null, bpci, "mBluetoothProfileServiceListener"); AudioDeviceBroker.BtDeviceInfo info = mDeviceBroker.createBtDeviceInfo( data, device, BluetoothProfile.STATE_CONNECTED); mDeviceBroker.postBluetoothActiveDevice(info, 0 /* delay */); } } // @GuardedBy("mDeviceBroker.mSetModeLock") @GuardedBy("AudioDeviceBroker.this.mDeviceStateLock") Loading Loading @@ -678,8 +679,11 @@ public class BtHelper { if (adapter != null) { List<BluetoothDevice> activeDevices = adapter.getActiveDevices(BluetoothProfile.HEADSET); if (activeDevices.size() > 0 && activeDevices.get(0) != null) { onSetBtScoActiveDevice(activeDevices.get(0)); for (BluetoothDevice device : activeDevices) { if (device == null) { continue; } onSetBtScoActiveDevice(device); } } else { Log.e(TAG, "onHeadsetProfileConnected: Null BluetoothAdapter"); Loading