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

changed file handle handling

This commit is contained in:
Daniel Dakhno 2020-01-06 15:28:24 +01:00
parent 337c54498c
commit 02fb7a0e43
2 changed files with 4 additions and 3 deletions

View File

@ -203,6 +203,7 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
this
));
queueWrite(new FileDeleteRequest((short) 0x0503));
queueWrite(new ImagesSetRequest(
widgetImages,
this

View File

@ -11,14 +11,14 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.utils.String
public class AssetFilePutRequest extends FilePutRequest {
public AssetFilePutRequest(AssetFile[] files, FossilWatchAdapter adapter) throws IOException {
super((short) 0x0700, prepareFileData(files), adapter);
super((short) 0x0701, prepareFileData(files), adapter);
}
public AssetFilePutRequest(AssetFile file, FossilWatchAdapter adapter) throws IOException {
super((short) 0x0700, prepareFileData(file), adapter);
super((short) 0x0701, prepareFileData(file), adapter);
}
public AssetFilePutRequest(AssetFile file, int subHandle, FossilWatchAdapter adapter) throws IOException {
super((short) (0x0700 | subHandle), prepareFileData(file), adapter);
super((short) (0x0701 | subHandle), prepareFileData(file), adapter);
}
private static byte[] prepareFileData(AssetFile[] files) throws IOException {