Search in sources :

Example 1 with FirmwareType

use of nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.FirmwareType in project Gadgetbridge by Freeyourgadget.

the class MiBand2FWInstallHandler method maybeAddFw53Hint.

private void maybeAddFw53Hint(InstallActivity installActivity, GBDevice device) {
    FirmwareType type = getFirmwareType();
    if (type != FirmwareType.FIRMWARE) {
        return;
    }
    Version deviceVersion = getFirmwareVersionOf(device);
    if (deviceVersion != null) {
        Version v53 = MiBandConst.MI2_FW_VERSION_INTERMEDIATE_UPGRADE_53;
        if (deviceVersion.compareTo(v53) < 0) {
            String vInstall = getHelper().format(getHelper().getFirmwareVersion());
            if (vInstall == null || new Version(vInstall).compareTo(v53) > 0) {
                String newInfoText = getContext().getString(R.string.mi2_fw_installhandler_fw53_hint, v53.get()) + "\n\n" + installActivity.getInfoText();
                installActivity.setInfoText(newInfoText);
            }
        }
    }
}
Also used : FirmwareType(nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.FirmwareType) Version(nodomain.freeyourgadget.gadgetbridge.util.Version)

Example 2 with FirmwareType

use of nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.FirmwareType in project Gadgetbridge by Freeyourgadget.

the class MiBand2FWInstallHandler method maybeAddFontHint.

private void maybeAddFontHint(InstallActivity installActivity) {
    FirmwareType type = getFirmwareType();
    if (type == FirmwareType.FIRMWARE) {
        String newInfoText = installActivity.getInfoText() + "\n\n" + "Note: you may install Mili_pro.ft or Mili_pro.ft.en to enable text notifications.";
        installActivity.setInfoText(newInfoText);
    }
}
Also used : FirmwareType(nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.FirmwareType)

Aggregations

FirmwareType (nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.FirmwareType)2 Version (nodomain.freeyourgadget.gadgetbridge.util.Version)1