1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-24 09:35:50 +01:00

GBDevice: Do not unset firmware from dynamic state

It is not clear why this was being done, but it is the source of issues
for multiple devices, since the ensureDeviceUpToDate function will
attempt to persist the null values, in non-nullable columns.
This commit is contained in:
José Rebelo 2024-11-10 22:16:10 +00:00
parent ce32ac7272
commit 7a0e43a4de

View File

@ -400,15 +400,12 @@ public class GBDevice implements Parcelable {
}
private void unsetDynamicState() {
setBatteryLevel(BATTERY_UNKNOWN, 0);
setBatteryLevel(BATTERY_UNKNOWN, 1);
setBatteryLevel(BATTERY_UNKNOWN, 2);
setBatteryState(UNKNOWN, 0);
setBatteryState(UNKNOWN, 1);
setBatteryState(UNKNOWN, 2);
setFirmwareVersion(null);
setFirmwareVersion2(null);
setRssi(RSSI_UNKNOWN);
resetExtraInfos();
if (mBusyTask != null) {