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