use of nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.file.FileGetRawRequest in project Gadgetbridge by Freeyourgadget.
the class FossilHRWatchAdapter method downloadFile.
@Override
public void downloadFile(final FileHandle handle, boolean fileIsEncrypted) {
if (fileIsEncrypted) {
queueWrite((FileEncryptedInterface) new FileEncryptedGetRequest(handle, this) {
@Override
public void handleFileData(byte[] fileData) {
LOG.debug("downloaded encrypted file");
handleFileDownload(handle, fileData);
}
});
} else {
queueWrite(new FileGetRawRequest(handle, this) {
@Override
public void handleFileRawData(byte[] fileData) {
LOG.debug("downloaded regular file");
handleFileDownload(handle, fileData);
}
});
}
}
Aggregations