Remove inadvertently re-added busy-state handling
This commit is contained in:
parent
3c35f94a7e
commit
3590c7c853
|
@ -741,11 +741,6 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
||||||
}
|
}
|
||||||
LOG.info("handleControlPoint got status:" + status);
|
LOG.info("handleControlPoint got status:" + status);
|
||||||
|
|
||||||
if (getDevice().isBusy()) {
|
|
||||||
if (isActivityDataSyncFinished(value)) {
|
|
||||||
unsetBusy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
for (byte b : value) {
|
for (byte b : value) {
|
||||||
LOG.info("handleControlPoint GOT DATA:" + String.format("0x%8x", b));
|
LOG.info("handleControlPoint GOT DATA:" + String.format("0x%8x", b));
|
||||||
|
@ -755,19 +750,6 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isActivityDataSyncFinished(byte[] value) {
|
|
||||||
// byte 0 is the kind of message
|
|
||||||
// byte 1 to 6 represent a timestamp
|
|
||||||
// byte 7 to 8 represent the amount of data left (0 = done)
|
|
||||||
LOG.info("finished?: " + GB.hexdump(value, 0, -1));
|
|
||||||
if (value.length == 9) {
|
|
||||||
if (value[0] == 0xa && value[7] == 0 && value[8] == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void unsetBusy() {
|
private void unsetBusy() {
|
||||||
getDevice().unsetBusyTask();
|
getDevice().unsetBusyTask();
|
||||||
getDevice().sendDeviceUpdateIntent(getContext());
|
getDevice().sendDeviceUpdateIntent(getContext());
|
||||||
|
|
Loading…
Reference in New Issue