1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-30 16:56:22 +02:00

Remove inadvertently re-added busy-state handling

This commit is contained in:
cpfeiffer 2015-07-21 21:38:31 +02:00
parent 3c35f94a7e
commit 3590c7c853

View File

@ -741,11 +741,6 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
}
LOG.info("handleControlPoint got status:" + status);
if (getDevice().isBusy()) {
if (isActivityDataSyncFinished(value)) {
unsetBusy();
}
}
if (value != null) {
for (byte b : value) {
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() {
getDevice().unsetBusyTask();
getDevice().sendDeviceUpdateIntent(getContext());