multi-device: only target connected devices

This commit is contained in:
Daniel Dakhno 2021-12-26 14:48:32 +01:00
parent 223e8a9110
commit 46acb7681e

View File

@ -512,7 +512,11 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
if(targetedDevice != null){
targetedDevices.add(targetedDevice);
}else{
targetedDevices.addAll(Arrays.asList(getGBDevices()));
for(GBDevice device : getGBDevices()){
if(isDeviceInitialized(device)){
targetedDevices.add(device);
}
}
}
for (GBDevice device1 : targetedDevices) {
try {