mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Perform Watch X Plus authorization request on each connect
This commit is contained in:
@@ -53,15 +53,12 @@ public class InitOperation extends AbstractBTLEOperation<WatchXPlusDeviceSupport
|
|||||||
@Override
|
@Override
|
||||||
protected void doPerform() throws IOException {
|
protected void doPerform() throws IOException {
|
||||||
builder.notify(cmdCharacteristic, true);
|
builder.notify(cmdCharacteristic, true);
|
||||||
if (needsAuth) {
|
|
||||||
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.AUTHENTICATING, getContext()));
|
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.AUTHENTICATING, getContext()));
|
||||||
getSupport().authorizationRequest(builder, needsAuth);
|
getSupport().authorizationRequest(builder, needsAuth);
|
||||||
} else {
|
|
||||||
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.INITIALIZING, getContext()));
|
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.INITIALIZING, getContext()));
|
||||||
getSupport().initialize(builder);
|
getSupport().initialize(builder);
|
||||||
getSupport().performImmediately(builder);
|
getSupport().performImmediately(builder);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCharacteristicChanged(BluetoothGatt gatt,
|
public boolean onCharacteristicChanged(BluetoothGatt gatt,
|
||||||
|
Reference in New Issue
Block a user