1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 13:26:50 +01:00

Zepp E: Address problems mentioned in #2180

Also move the package to huami
This commit is contained in:
Andreas Shimokawa 2021-01-31 22:55:22 +01:00
parent 3cfc6c596b
commit 1dc5164423
4 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ import android.net.Uri;
import java.io.IOException;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRFirmwareInfo;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe.ZeppEFirmwareInfo;
public class ZeppEFWHelper extends HuamiFWHelper {
@ -33,7 +33,7 @@ public class ZeppEFWHelper extends HuamiFWHelper {
@Override
protected void determineFirmwareInfo(byte[] wholeFirmwareBytes) {
firmwareInfo = new AmazfitGTRFirmwareInfo(wholeFirmwareBytes);
firmwareInfo = new ZeppEFirmwareInfo(wholeFirmwareBytes);
if (!firmwareInfo.isHeaderValid()) {
throw new IllegalArgumentException("Not a Zepp E firmware");
}

View File

@ -82,7 +82,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.tlw64.TLW64Support;
import nodomain.freeyourgadget.gadgetbridge.service.devices.vibratissimo.VibratissimoSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.watch9.Watch9DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.xwatch.XWatchSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.zeppe.ZeppESupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe.ZeppESupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.zetime.ZeTimeDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.util.GB;

View File

@ -15,7 +15,7 @@
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/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.zeppe;
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe;
import java.util.HashMap;
import java.util.Map;
@ -73,7 +73,7 @@ public class ZeppEFirmwareInfo extends HuamiFirmwareInfo {
return HuamiFirmwareType.RES_COMPRESSED;
}
if (ArrayUtils.equals(bytes, FW_HEADER, FW_OFFSET)) {
if (searchString32BitAligned(bytes, "Amazfit GTR 2")) {
if (searchString32BitAligned(bytes, "Zepp E")) {
return HuamiFirmwareType.FIRMWARE;
}
return HuamiFirmwareType.INVALID;

View File

@ -15,7 +15,7 @@
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/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.zeppe;
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe;
import android.content.Context;
import android.net.Uri;