mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei Watch Ultimate 2: Initial support
This commit is contained in:
+1
@@ -96,6 +96,7 @@ public final class HuaweiConstants {
|
|||||||
public static final String HU_WATCHFIT4_NAME = "huawei watch fit 4-";
|
public static final String HU_WATCHFIT4_NAME = "huawei watch fit 4-";
|
||||||
public static final String HU_WATCHFIT4PRO_NAME = "huawei watch fit 4 pro-";
|
public static final String HU_WATCHFIT4PRO_NAME = "huawei watch fit 4 pro-";
|
||||||
public static final String HU_WATCHULTIMATE_NAME = "huawei watch ultimate-";
|
public static final String HU_WATCHULTIMATE_NAME = "huawei watch ultimate-";
|
||||||
|
public static final String HU_WATCHULTIMATE2_NAME = "watch ultimate 2-";
|
||||||
public static final String HU_WATCH4_NAME = "huawei watch 4-";
|
public static final String HU_WATCH4_NAME = "huawei watch 4-";
|
||||||
public static final String HU_WATCH4PRO_NAME = "huawei watch 4 pro-";
|
public static final String HU_WATCH4PRO_NAME = "huawei watch 4 pro-";
|
||||||
public static final String HU_WATCH5_NAME = "huawei watch 5-";
|
public static final String HU_WATCH5_NAME = "huawei watch 5-";
|
||||||
|
|||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
/* Copyright (C) 2026 José Rebelo
|
||||||
|
|
||||||
|
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 <https://www.gnu.org/licenses/>. */
|
||||||
|
package nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate2;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiBRCoordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
|
|
||||||
|
public class HuaweiWatchUltimate2Coordinator extends HuaweiBRCoordinator {
|
||||||
|
@Override
|
||||||
|
public boolean isExperimental() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Pattern getSupportedDeviceName() {
|
||||||
|
return Pattern.compile("(" + HuaweiConstants.HU_WATCHULTIMATE2_NAME + ").*", Pattern.CASE_INSENSITIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDeviceNameResource() {
|
||||||
|
return R.string.devicetype_huawei_watchultimate2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||||
|
// HarmonyOS watch
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||||
|
return DeviceKind.WATCH;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -310,6 +310,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtcyber.Hu
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner.HuaweiWatchGTRunnerCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner.HuaweiWatchGTRunnerCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner2.HuaweiWatchGTRunner2Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtrunner2.HuaweiWatchGTRunner2Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate.HuaweiWatchUltimateCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate.HuaweiWatchUltimateCoordinator;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate2.HuaweiWatchUltimate2Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.id115.ID115Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.id115.ID115Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.idasen.IdasenCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.idasen.IdasenCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.itag.ITagCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.itag.ITagCoordinator;
|
||||||
@@ -842,6 +843,7 @@ public enum DeviceType {
|
|||||||
HUAWEIWATCHFIT3(HuaweiWatchFit3Coordinator.class),
|
HUAWEIWATCHFIT3(HuaweiWatchFit3Coordinator.class),
|
||||||
HUAWEIWATCHFIT4PRO(HuaweiWatchFit4ProCoordinator.class),
|
HUAWEIWATCHFIT4PRO(HuaweiWatchFit4ProCoordinator.class),
|
||||||
HUAWEIWATCHULTIMATE(HuaweiWatchUltimateCoordinator.class),
|
HUAWEIWATCHULTIMATE(HuaweiWatchUltimateCoordinator.class),
|
||||||
|
HUAWEIWATCHULTIMATE2(HuaweiWatchUltimate2Coordinator.class),
|
||||||
HUAWEIWATCH3(HuaweiWatch3Coordinator.class),
|
HUAWEIWATCH3(HuaweiWatch3Coordinator.class),
|
||||||
HUAWEIWATCH4PRO(HuaweiWatch4ProCoordinator.class),
|
HUAWEIWATCH4PRO(HuaweiWatch4ProCoordinator.class),
|
||||||
HUAWEIWATCH5(HuaweiWatch5Coordinator.class),
|
HUAWEIWATCH5(HuaweiWatch5Coordinator.class),
|
||||||
|
|||||||
@@ -2182,6 +2182,7 @@
|
|||||||
<string name="devicetype_huawei_watchfit3" translatable="false">Huawei Watch Fit 3</string>
|
<string name="devicetype_huawei_watchfit3" translatable="false">Huawei Watch Fit 3</string>
|
||||||
<string name="devicetype_huawei_watchfit4pro" translatable="false">Huawei Watch Fit 4 (Pro)</string>
|
<string name="devicetype_huawei_watchfit4pro" translatable="false">Huawei Watch Fit 4 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watchultimate" translatable="false">Huawei Watch Ultimate</string>
|
<string name="devicetype_huawei_watchultimate" translatable="false">Huawei Watch Ultimate</string>
|
||||||
|
<string name="devicetype_huawei_watchultimate2" translatable="false">Huawei Watch Ultimate 2</string>
|
||||||
<string name="devicetype_huawei_watch3" translatable="false">Huawei Watch 3 (Pro)</string>
|
<string name="devicetype_huawei_watch3" translatable="false">Huawei Watch 3 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watch4pro" translatable="false">Huawei Watch 4 (Pro)</string>
|
<string name="devicetype_huawei_watch4pro" translatable="false">Huawei Watch 4 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watch5" translatable="false">Huawei Watch 5</string>
|
<string name="devicetype_huawei_watch5" translatable="false">Huawei Watch 5</string>
|
||||||
|
|||||||
+1
@@ -180,6 +180,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
|||||||
put("Redmi Watch 2 Lite 31A5", DeviceType.REDMIWATCH2LITE); // #2637
|
put("Redmi Watch 2 Lite 31A5", DeviceType.REDMIWATCH2LITE); // #2637
|
||||||
put("honor Watch-7EE", DeviceType.HONORMAGICWATCH); // #5816
|
put("honor Watch-7EE", DeviceType.HONORMAGICWATCH); // #5816
|
||||||
put("HUAWEI Band 6-A47", DeviceType.HUAWEIBAND6); // #2569
|
put("HUAWEI Band 6-A47", DeviceType.HUAWEIBAND6); // #2569
|
||||||
|
put("WATCH Ultimate 2-D96", DeviceType.HUAWEIWATCHULTIMATE2); // matrix
|
||||||
put("716", DeviceType.FITPRO);
|
put("716", DeviceType.FITPRO);
|
||||||
put("LH716", DeviceType.FITPRO);
|
put("LH716", DeviceType.FITPRO);
|
||||||
put("Sunset 6", DeviceType.FITPRO);
|
put("Sunset 6", DeviceType.FITPRO);
|
||||||
|
|||||||
Reference in New Issue
Block a user