mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-14 19:57:32 +01:00
Amazfit Bip: request GPS fw version earlier
(to avoid recreation of DeviceAttributes because fw2 is sometimes available and sometimes not.)
This commit is contained in:
parent
f6ce0c1a0e
commit
1ddea9268d
@ -1309,8 +1309,11 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
|||||||
|
|
||||||
public void phase2Initialize(TransactionBuilder builder) {
|
public void phase2Initialize(TransactionBuilder builder) {
|
||||||
LOG.info("phase2Initialize...");
|
LOG.info("phase2Initialize...");
|
||||||
enableFurtherNotifications(builder, true);
|
|
||||||
requestBatteryInfo(builder);
|
requestBatteryInfo(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void phase3Initialize(TransactionBuilder builder) {
|
||||||
|
LOG.info("phase3Initialize...");
|
||||||
setDateDisplay(builder);
|
setDateDisplay(builder);
|
||||||
setTimeFormat(builder);
|
setTimeFormat(builder);
|
||||||
setWearLocation(builder);
|
setWearLocation(builder);
|
||||||
|
@ -117,7 +117,9 @@ public class InitOperation extends AbstractBTLEOperation<MiBand2Support> {
|
|||||||
TransactionBuilder builder = createTransactionBuilder("Authenticated, now initialize phase 2");
|
TransactionBuilder builder = createTransactionBuilder("Authenticated, now initialize phase 2");
|
||||||
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.INITIALIZING, getContext()));
|
builder.add(new SetDeviceStateAction(getDevice(), GBDevice.State.INITIALIZING, getContext()));
|
||||||
getSupport().requestDeviceInfo(builder);
|
getSupport().requestDeviceInfo(builder);
|
||||||
|
getSupport().enableFurtherNotifications(builder, true);
|
||||||
getSupport().phase2Initialize(builder);
|
getSupport().phase2Initialize(builder);
|
||||||
|
getSupport().phase3Initialize(builder);
|
||||||
getSupport().setInitialized(builder);
|
getSupport().setInitialized(builder);
|
||||||
getSupport().performImmediately(builder);
|
getSupport().performImmediately(builder);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user