mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-01 14:32:54 +01:00
fixed button overwrite for commuter
This commit is contained in:
parent
c99a3c91b5
commit
e2a573e3e2
@ -385,6 +385,7 @@ public class QHybridSupport extends QHybridBaseSupport {
|
||||
switch (uploadFileRequest.state){
|
||||
case ERROR:
|
||||
buttonOverwriteListener.OnButtonOverwrite(false);
|
||||
uploadFileRequest = null;
|
||||
break;
|
||||
case UPLOAD:
|
||||
for(byte[] packet : this.uploadFileRequest.packets){
|
||||
|
@ -18,12 +18,12 @@ public class UploadFileRequest extends Request {
|
||||
public ArrayList<byte[]> packets = new ArrayList<>();
|
||||
|
||||
public UploadFileRequest(short handle, byte[] file) {
|
||||
int fileLength = file.length;
|
||||
int fileLength = file.length + 4;
|
||||
ByteBuffer buffer = this.createBuffer();
|
||||
buffer.putShort(1, handle);
|
||||
buffer.putInt(3, 0);
|
||||
buffer.putInt(7, fileLength - 10);
|
||||
buffer.putInt(11, fileLength - 10);
|
||||
buffer.putInt(7, fileLength);
|
||||
buffer.putInt(11, fileLength);
|
||||
|
||||
this.data = buffer.array();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user