Loading android/app/src/com/android/bluetooth/bass_client/BassClientService.java +9 −20 Original line number Diff line number Diff line Loading @@ -3928,10 +3928,7 @@ public class BassClientService extends ProfileService { for (BluetoothDevice device : devices) { for (BluetoothLeBroadcastReceiveState receiveState : getAllSources(device)) { for (int i = 0; i < receiveState.getNumSubgroups(); i++) { Long syncState = receiveState.getBisSyncState().get(i); /* Synced to BIS */ if (syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG) { if (isSyncedToBroadcastStream(receiveState.getBisSyncState().get(i))) { return true; } } Loading @@ -3948,10 +3945,7 @@ public class BassClientService extends ProfileService { for (BluetoothDevice device : devices) { for (BluetoothLeBroadcastReceiveState receiveState : getAllSources(device)) { for (int i = 0; i < receiveState.getNumSubgroups(); i++) { Long syncState = receiveState.getBisSyncState().get(i); /* Synced to BIS */ if (syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG) { if (isSyncedToBroadcastStream(receiveState.getBisSyncState().get(i))) { if (isLocalBroadcast(receiveState)) { return false; } else { Loading Loading @@ -3981,10 +3975,7 @@ public class BassClientService extends ProfileService { return true; } else { for (int i = 0; i < receiveState.getNumSubgroups(); i++) { Long syncState = receiveState.getBisSyncState().get(i); /* Synced to BIS */ if (syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG) { if (isSyncedToBroadcastStream(receiveState.getBisSyncState().get(i))) { return true; } } Loading Loading @@ -4034,14 +4025,7 @@ public class BassClientService extends ProfileService { .anyMatch( receiveState -> (receiveState.getBisSyncState().stream() .anyMatch( syncState -> syncState != BassConstants .BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants .BIS_SYNC_FAILED_SYNC_TO_BIG)))) { .anyMatch(this::isSyncedToBroadcastStream)))) { activeSinks.add(device); } } Loading @@ -4049,6 +4033,11 @@ public class BassClientService extends ProfileService { return activeSinks; } private boolean isSyncedToBroadcastStream(Long syncState) { return syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG; } /** Handle broadcast state changed */ public void notifyBroadcastStateChanged(int state, int broadcastId) { switch (state) { Loading Loading
android/app/src/com/android/bluetooth/bass_client/BassClientService.java +9 −20 Original line number Diff line number Diff line Loading @@ -3928,10 +3928,7 @@ public class BassClientService extends ProfileService { for (BluetoothDevice device : devices) { for (BluetoothLeBroadcastReceiveState receiveState : getAllSources(device)) { for (int i = 0; i < receiveState.getNumSubgroups(); i++) { Long syncState = receiveState.getBisSyncState().get(i); /* Synced to BIS */ if (syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG) { if (isSyncedToBroadcastStream(receiveState.getBisSyncState().get(i))) { return true; } } Loading @@ -3948,10 +3945,7 @@ public class BassClientService extends ProfileService { for (BluetoothDevice device : devices) { for (BluetoothLeBroadcastReceiveState receiveState : getAllSources(device)) { for (int i = 0; i < receiveState.getNumSubgroups(); i++) { Long syncState = receiveState.getBisSyncState().get(i); /* Synced to BIS */ if (syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG) { if (isSyncedToBroadcastStream(receiveState.getBisSyncState().get(i))) { if (isLocalBroadcast(receiveState)) { return false; } else { Loading Loading @@ -3981,10 +3975,7 @@ public class BassClientService extends ProfileService { return true; } else { for (int i = 0; i < receiveState.getNumSubgroups(); i++) { Long syncState = receiveState.getBisSyncState().get(i); /* Synced to BIS */ if (syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG) { if (isSyncedToBroadcastStream(receiveState.getBisSyncState().get(i))) { return true; } } Loading Loading @@ -4034,14 +4025,7 @@ public class BassClientService extends ProfileService { .anyMatch( receiveState -> (receiveState.getBisSyncState().stream() .anyMatch( syncState -> syncState != BassConstants .BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants .BIS_SYNC_FAILED_SYNC_TO_BIG)))) { .anyMatch(this::isSyncedToBroadcastStream)))) { activeSinks.add(device); } } Loading @@ -4049,6 +4033,11 @@ public class BassClientService extends ProfileService { return activeSinks; } private boolean isSyncedToBroadcastStream(Long syncState) { return syncState != BassConstants.BIS_SYNC_NOT_SYNC_TO_BIS && syncState != BassConstants.BIS_SYNC_FAILED_SYNC_TO_BIG; } /** Handle broadcast state changed */ public void notifyBroadcastStateChanged(int state, int broadcastId) { switch (state) { Loading