1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-10 15:18:23 +02:00

Fossil Q Hybrid: Fix config activity after multi-device merge

This commit is contained in:
Arjan Schrijver 2022-08-17 22:14:37 +02:00
parent 01a3639199
commit 319a11e99d

View File

@ -303,9 +303,13 @@ public class ConfigActivity extends AbstractGBActivity {
}
});
// NOTE: this code always selects the first connected Q Hybrid device
// because currently this class is unable to handle multiple
// connected Q Hybrid devices
List<GBDevice> devices = GBApplication.app().getDeviceManager().getSelectedDevices();
for(GBDevice device : devices){
if (device.getType() == DeviceType.FOSSILQHYBRID && device.getFirmwareVersion().charAt(2) == '0') {
for(GBDevice candidate : devices){
if (candidate.getType() == DeviceType.FOSSILQHYBRID && candidate.getFirmwareVersion().charAt(2) == '0') {
device = candidate;
updateSettings();
return;
}