mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 11:17:33 +01:00
Perform battery config when new device is being paired
This commit is contained in:
parent
aa7c7f785a
commit
77cf6f8ba4
@ -73,7 +73,12 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
|
||||
@Override
|
||||
public GBDevice createDevice(GBDeviceCandidate candidate) {
|
||||
return new GBDevice(candidate.getDevice().getAddress(), candidate.getName(), null, getDeviceType());
|
||||
GBDevice gbDevice = new GBDevice(candidate.getDevice().getAddress(), candidate.getName(), null, getDeviceType());
|
||||
for (BatteryConfig batteryConfig : getBatteryConfig()) {
|
||||
gbDevice.setBatteryIcon(batteryConfig.getBatteryIcon(), batteryConfig.getBatteryIndex());
|
||||
gbDevice.setBatteryLabel(batteryConfig.getBatteryLabel(), batteryConfig.getBatteryIndex());
|
||||
}
|
||||
return gbDevice;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user