1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 10:05:49 +01:00

Fossil Hybrid: added device security version info

This commit is contained in:
Daniel Dakhno 2020-10-30 03:38:10 +01:00
parent 8e543d0b9c
commit 6b1d2cab50
2 changed files with 5 additions and 2 deletions

View File

@ -54,6 +54,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fos
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.alarm.AlarmsSetRequest;
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.configuration.ConfigurationPutRequest;
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.device_info.DeviceInfo;
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.device_info.DeviceSecurityVersionInfo;
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.device_info.GetDeviceInfoRequest;
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.device_info.SupportedFileVersionsInfo;
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.file.FilePutRequest;
@ -129,10 +130,11 @@ public class FossilWatchAdapter extends WatchAdapter {
for(DeviceInfo info : deviceInfos){
if(info instanceof SupportedFileVersionsInfo){
FossilWatchAdapter.this.supportedFileVersions = (SupportedFileVersionsInfo) info;
}else if(info instanceof DeviceSecurityVersionInfo){
getDeviceSupport().getDevice().addDeviceInfo(new GenericItem("DEVICE_SECURITY_VERSION", info.toString()));
}
}
initializeWithSupportedFileVersions();
return;
}
}
}
});
}

View File

@ -11,6 +11,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fos
public class GetDeviceInfoRequest extends FileGetRequest {
enum INFO_CLASS{
SUPPORTED_FILE_VERSIONS((short) 0x0a, SupportedFileVersionsInfo.class),
DEVICE_SECURITY_VERSION((short) 0x0e, DeviceSecurityVersionInfo.class),
;
private short identifier;
private Class<? extends DeviceInfo> itemClass;