1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-20 12:00:51 +02:00

PineTime: Honor Sync time setting on connect

This commit is contained in:
Davis Mosenkovs 2023-10-02 01:04:43 +03:00 committed by José Rebelo
parent 66b36564ab
commit 88d553771d

View File

@ -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);