From 53d0dea9dbea6799c7e4aa72ba83b46ee955df2f Mon Sep 17 00:00:00 2001 From: Daniel Dakhno Date: Mon, 6 Jan 2020 15:06:29 +0100 Subject: [PATCH] fixed crash --- .../qhybrid/requests/fossil_hr/music/MusicInfoSetRequest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/requests/fossil_hr/music/MusicInfoSetRequest.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/requests/fossil_hr/music/MusicInfoSetRequest.java index f9011fc88..7331b90e0 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/requests/fossil_hr/music/MusicInfoSetRequest.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/requests/fossil_hr/music/MusicInfoSetRequest.java @@ -1,5 +1,6 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil_hr.music; +import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -11,7 +12,7 @@ public class MusicInfoSetRequest extends FilePutRequest { super((short) 0x0400, createFile(artist, album, title), adapter); } - private static byte[] createFile(String artist, String album, String title){ + private static byte[] createFile(String artist, String album, String title) { int length = artist.length() + album.length() + title.length() + 3 // null terminators + 8; // length and header