Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +7 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class LeAudioService extends ProfileService { private HandlerThread mStateMachinesThread; private volatile BluetoothDevice mActiveAudioOutDevice; private volatile BluetoothDevice mActiveAudioInDevice; private BluetoothDevice mExposedActiveDevice; private LeAudioCodecConfig mLeAudioCodecConfig; private final Object mGroupLock = new Object(); ServiceFactory mServiceFactory = new ServiceFactory(); Loading Loading @@ -1121,6 +1122,11 @@ public class LeAudioService extends ProfileService { byte[] addressBytes = Utils.getBytesFromAddress(address); BluetoothDevice device = mAdapterService.getDeviceFromByte(addressBytes); /* Don't expose already exposed active device */ if (device.equals(mExposedActiveDevice)) { return; } if (DBG) { Log.d(TAG, " onAudioDevicesAdded: " + device + ", device type: " + deviceInfo.getType() + ", isSink: " + deviceInfo.isSink() Loading @@ -1135,6 +1141,7 @@ public class LeAudioService extends ProfileService { continue; } mExposedActiveDevice = device; notifyActiveDeviceChanged(device); return; } Loading Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +7 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class LeAudioService extends ProfileService { private HandlerThread mStateMachinesThread; private volatile BluetoothDevice mActiveAudioOutDevice; private volatile BluetoothDevice mActiveAudioInDevice; private BluetoothDevice mExposedActiveDevice; private LeAudioCodecConfig mLeAudioCodecConfig; private final Object mGroupLock = new Object(); ServiceFactory mServiceFactory = new ServiceFactory(); Loading Loading @@ -1121,6 +1122,11 @@ public class LeAudioService extends ProfileService { byte[] addressBytes = Utils.getBytesFromAddress(address); BluetoothDevice device = mAdapterService.getDeviceFromByte(addressBytes); /* Don't expose already exposed active device */ if (device.equals(mExposedActiveDevice)) { return; } if (DBG) { Log.d(TAG, " onAudioDevicesAdded: " + device + ", device type: " + deviceInfo.getType() + ", isSink: " + deviceInfo.isSink() Loading @@ -1135,6 +1141,7 @@ public class LeAudioService extends ProfileService { continue; } mExposedActiveDevice = device; notifyActiveDeviceChanged(device); return; } Loading