mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
jyou: fix setUpdateState
This commit is contained in:
committed by
José Rebelo
parent
d48bea3003
commit
cc41bcac2a
+2
-4
@@ -102,8 +102,7 @@ public class BFH16DeviceSupport extends AbstractBTLESingleDeviceSupport {
|
||||
protected TransactionBuilder initializeDevice(TransactionBuilder builder) {
|
||||
LOG.info("Initializing BFH16");
|
||||
|
||||
gbDevice.setState(GBDevice.State.INITIALIZING);
|
||||
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
|
||||
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
|
||||
|
||||
measureCharacteristic = getCharacteristic(BFH16Constants.BFH16_SERVICE1_NOTIFY);
|
||||
ctrlCharacteristic = getCharacteristic(BFH16Constants.BFH16_SERVICE1_WRITE);
|
||||
@@ -113,8 +112,7 @@ public class BFH16DeviceSupport extends AbstractBTLESingleDeviceSupport {
|
||||
|
||||
syncSettings(builder);
|
||||
|
||||
gbDevice.setState(GBDevice.State.INITIALIZED);
|
||||
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
|
||||
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
|
||||
|
||||
LOG.info("Initialization BFH16 Done");
|
||||
|
||||
|
||||
+2
-4
@@ -63,8 +63,7 @@ public class JYouSupport extends AbstractBTLESingleDeviceSupport {
|
||||
protected TransactionBuilder initializeDevice(TransactionBuilder builder) {
|
||||
logger.info("Initializing");
|
||||
|
||||
gbDevice.setState(GBDevice.State.INITIALIZING);
|
||||
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
|
||||
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
|
||||
|
||||
BluetoothGattCharacteristic measureCharacteristic = getCharacteristic(JYouConstants.UUID_CHARACTERISTIC_MEASURE);
|
||||
ctrlCharacteristic = getCharacteristic(JYouConstants.UUID_CHARACTERISTIC_CONTROL);
|
||||
@@ -74,8 +73,7 @@ public class JYouSupport extends AbstractBTLESingleDeviceSupport {
|
||||
|
||||
syncSettings(builder);
|
||||
|
||||
gbDevice.setState(GBDevice.State.INITIALIZED);
|
||||
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
|
||||
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
|
||||
|
||||
logger.info("Initialization Done");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user