Pebble: when reading app fetch uuid, do not switch to little endian too early

This commit is contained in:
Andreas Shimokawa 2015-08-17 12:55:17 +02:00
parent 0d0b3a87e1
commit f0924716fc
1 changed files with 1 additions and 1 deletions

View File

@ -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;