2021-01-10 23:37:09 +01:00
|
|
|
/* Copyright (C) 2015-2021 Andreas Shimokawa, Carsten Pfeiffer
|
2017-08-25 00:21:47 +02:00
|
|
|
|
|
|
|
This file is part of Gadgetbridge.
|
|
|
|
|
|
|
|
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Gadgetbridge is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2017-10-23 10:28:54 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip;
|
2017-08-25 00:21:47 +02:00
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.net.Uri;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
2017-08-27 23:08:10 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
2017-08-25 00:21:47 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.devices.miband.AbstractMiBandFWHelper;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.devices.miband.AbstractMiBandFWInstallHandler;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
|
|
|
|
|
|
|
class AmazfitBipFWInstallHandler extends AbstractMiBandFWInstallHandler {
|
|
|
|
AmazfitBipFWInstallHandler(Uri uri, Context context) {
|
|
|
|
super(uri, context);
|
|
|
|
}
|
|
|
|
|
2017-08-27 23:08:10 +02:00
|
|
|
@Override
|
|
|
|
protected String getFwUpgradeNotice() {
|
|
|
|
return mContext.getString(R.string.fw_upgrade_notice_amazfitbip, helper.getHumanFirmwareVersion());
|
|
|
|
}
|
|
|
|
|
2017-08-25 00:21:47 +02:00
|
|
|
@Override
|
|
|
|
protected AbstractMiBandFWHelper createHelper(Uri uri, Context context) throws IOException {
|
|
|
|
return new AmazfitBipFWHelper(uri, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected boolean isSupportedDeviceType(GBDevice device) {
|
|
|
|
return device.getType() == DeviceType.AMAZFITBIP;
|
|
|
|
}
|
|
|
|
}
|