From c5db816cd1f808f25b04eba03a109042c413116e Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Tue, 1 Sep 2015 22:53:20 +0200 Subject: [PATCH] Pass shorts along to avoid implicit signed conversion. --- .../service/devices/pebble/GadgetbridgePblSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/GadgetbridgePblSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/GadgetbridgePblSupport.java index f12bba39..099fd8fc 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/GadgetbridgePblSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/GadgetbridgePblSupport.java @@ -57,7 +57,7 @@ public class GadgetbridgePblSupport { byte type = (byte) ((sample & 0xe000) >>> 13); byte intensity = (byte) ((sample & 0x1f80) >>> 7); byte steps = (byte) (sample & 0x007f); - db.addGBActivitySample(timestamp + offset_seconds, SampleProvider.PROVIDER_PEBBLE_GADGETBRIDGE, intensity, steps, type); + db.addGBActivitySample(timestamp + offset_seconds, SampleProvider.PROVIDER_PEBBLE_GADGETBRIDGE, (short) (intensity & 0xff), (short) (steps & 0xff), type); offset_seconds += 60; } } catch (GBException e) {