From f0924716fc9a075c9f2ade26291f066964347cdf Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Mon, 17 Aug 2015 12:55:17 +0200 Subject: [PATCH] Pebble: when reading app fetch uuid, do not switch to little endian too early --- .../gadgetbridge/service/devices/pebble/PebbleProtocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java index b441d031..d129673d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java @@ -966,12 +966,12 @@ public class PebbleProtocol extends GBDeviceProtocol { } private GBDeviceEventAppManagement decodeAppFetch(ByteBuffer buf) { - buf.order(ByteOrder.LITTLE_ENDIAN); byte command = buf.get(); if (command == 0x01) { long uuid_high = buf.getLong(); long uuid_low = buf.getLong(); UUID uuid = new UUID(uuid_high, uuid_low); + buf.order(ByteOrder.LITTLE_ENDIAN); int app_id = buf.getInt(); GBDeviceEventAppManagement fetchRequest = new GBDeviceEventAppManagement(); fetchRequest.type = GBDeviceEventAppManagement.EventType.INSTALL;