1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-26 03:46:49 +01:00

Fossil Hybrid: dont write buttons unauthenticated

This commit is contained in:
Daniel Dakhno 2021-01-28 11:33:47 +01:00
parent 0c6ce453b2
commit 3a4c5f6483

View File

@ -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, "[]")