From 88d553771d4347ffed20125303625c9710130a47 Mon Sep 17 00:00:00 2001 From: Davis Mosenkovs Date: Mon, 2 Oct 2023 01:04:43 +0300 Subject: [PATCH] PineTime: Honor Sync time setting on connect --- .../service/devices/pinetime/PineTimeJFSupport.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pinetime/PineTimeJFSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pinetime/PineTimeJFSupport.java index f76c5cfb0..b683e6114 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pinetime/PineTimeJFSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pinetime/PineTimeJFSupport.java @@ -473,7 +473,9 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL protected TransactionBuilder initializeDevice(TransactionBuilder builder) { builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.INITIALIZING, getContext())); requestDeviceInfo(builder); - onSetTime(); + if (GBApplication.getPrefs().getBoolean("datetime_synconconnect", true)) { + onSetTime(); + } setWorldClocks(); builder.notify(getCharacteristic(PineTimeJFConstants.UUID_CHARACTERISTICS_MUSIC_EVENT), true); BluetoothGattCharacteristic alertNotificationEventCharacteristic = getCharacteristic(PineTimeJFConstants.UUID_CHARACTERISTIC_ALERT_NOTIFICATION_EVENT);