From 5fc2a704a3c008271f00f244b70df17306be7e59 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Thu, 1 Nov 2018 17:02:33 +0100 Subject: [PATCH] Pebble: Always allow reply action even if untested features are turned off --- .../service/DeviceCommunicationService.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java index e96c59935..9cb183328 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java @@ -379,18 +379,16 @@ public class DeviceCommunicationService extends Service implements SharedPrefere if (((notificationSpec.flags & NotificationSpec.FLAG_WEARABLE_ACTIONS) > 0) || (notificationSpec.type == NotificationType.GENERIC_SMS && notificationSpec.phoneNumber != null)) { // NOTE: maybe not where it belongs - if (prefs.getBoolean("pebble_force_untested", false)) { - // I would rather like to save that as an array in SharedPreferences - // this would work but I dont know how to do the same in the Settings Activity's xml - ArrayList replies = new ArrayList<>(); - for (int i = 1; i <= 16; i++) { - String reply = prefs.getString("canned_reply_" + i, null); - if (reply != null && !reply.equals("")) { - replies.add(reply); - } + // I would rather like to save that as an array in SharedPreferences + // this would work but I dont know how to do the same in the Settings Activity's xml + ArrayList replies = new ArrayList<>(); + for (int i = 1; i <= 16; i++) { + String reply = prefs.getString("canned_reply_" + i, null); + if (reply != null && !reply.equals("")) { + replies.add(reply); } - notificationSpec.cannedReplies = replies.toArray(new String[replies.size()]); } + notificationSpec.cannedReplies = replies.toArray(new String[replies.size()]); } mDeviceSupport.onNotification(notificationSpec);