From 96e21dbf21e5e0654b31955b8a755907de2c35bf Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 20 Dec 2015 00:58:14 +0100 Subject: [PATCH] Pebble: fix "[Action]" being displayed as SMS action when no canned replies are defined --- .../gadgetbridge/service/devices/pebble/PebbleProtocol.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 247eb3b9..fadec9b9 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 @@ -513,7 +513,7 @@ public class PebbleProtocol extends GBDeviceProtocol { } int replies_length = -1; - if (cannedReplies != null) { + if (cannedReplies != null && cannedReplies.length > 0) { actions_count++; for (String reply : cannedReplies) { replies_length += reply.getBytes().length + 1; @@ -774,7 +774,7 @@ public class PebbleProtocol extends GBDeviceProtocol { } int replies_length = -1; - if (cannedReplies != null) { + if (cannedReplies != null && cannedReplies.length > 0) { actions_count++; for (String reply : cannedReplies) { replies_length += reply.getBytes().length + 1;