Deactivate some unsupported things for Mi2

This commit is contained in:
cpfeiffer 2016-10-11 20:23:25 +02:00
parent 24220ee5d3
commit f1243f52c1
2 changed files with 17 additions and 0 deletions

View File

@ -23,6 +23,7 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
return new GBDevice(candidate.getDevice().getAddress(), candidate.getName(), getDeviceType()); return new GBDevice(candidate.getDevice().getAddress(), candidate.getName(), getDeviceType());
} }
@Override
public boolean allowFetchActivityData(GBDevice device) { public boolean allowFetchActivityData(GBDevice device) {
return device.isInitialized() && !device.isBusy() && supportsActivityDataFetching(); return device.isInitialized() && !device.isBusy() && supportsActivityDataFetching();
} }

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler; import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
@ -35,6 +36,21 @@ public class MiBand2Coordinator extends MiBandCoordinator {
} }
@Override
public boolean supportsHeartRateMeasurement(GBDevice device) {
return false; // not yet
}
@Override
public boolean supportsAlarmConfiguration() {
return false; // not yet
}
@Override
public boolean supportsActivityDataFetching() {
return false; // not yet
}
@Override @Override
public InstallHandler findInstallHandler(Uri uri, Context context) { public InstallHandler findInstallHandler(Uri uri, Context context) {
return null; // not supported at the moment return null; // not supported at the moment