From 3a4c5f6483cdd930bbdeff5a1e1144955c16fa88 Mon Sep 17 00:00:00 2001 From: Daniel Dakhno Date: Thu, 28 Jan 2021 11:33:47 +0100 Subject: [PATCH] Fossil Hybrid: dont write buttons unauthenticated --- .../qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java index 05965ec75..cf2af3460 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java @@ -186,9 +186,9 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter { setVibrationStrength(); syncSettings(); setTime(); + overwriteButtons(null); } - overwriteButtons(null); loadBackground(); loadWidgets(); @@ -1081,6 +1081,10 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter { @Override public void overwriteButtons(String jsonConfigString) { + if (connectionMode == CONNECTION_MODE.NOT_AUTHENTICATED) { + GB.toast("not available in unauthenticated mode", Toast.LENGTH_LONG, GB.ERROR); + return; + } try { JSONArray jsonArray = new JSONArray( GBApplication.getPrefs().getString(HRConfigActivity.CONFIG_KEY_Q_ACTIONS, "[]")