mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Add Huawei Watch GT Runner 2
This commit is contained in:
+1
@@ -81,6 +81,7 @@ public final class HuaweiConstants {
|
|||||||
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
public static final String HU_WATCHGT3SE_NAME = "huawei watch gt 3 se-";
|
||||||
public static final String HU_WATCHGT3PRO_NAME = "huawei watch gt 3 pro-";
|
public static final String HU_WATCHGT3PRO_NAME = "huawei watch gt 3 pro-";
|
||||||
public static final String HU_WATCHGTRUNNER_NAME = "huawei watch gt runner-";
|
public static final String HU_WATCHGTRUNNER_NAME = "huawei watch gt runner-";
|
||||||
|
public static final String HU_WATCHGTRUNNER2_NAME = "watch gt runner 2-";
|
||||||
public static final String HU_WATCHGTCYBER_NAME = "huawei watch gt cyber-";
|
public static final String HU_WATCHGTCYBER_NAME = "huawei watch gt cyber-";
|
||||||
public static final String HU_WATCH3_NAME = "huawei watch 3-";
|
public static final String HU_WATCH3_NAME = "huawei watch 3-";
|
||||||
public static final String HU_WATCH3PRO_NAME = "huawei watch 3 pro-";
|
public static final String HU_WATCH3PRO_NAME = "huawei watch 3 pro-";
|
||||||
|
|||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
/* Copyright (C) 2026 liberodark
|
||||||
|
|
||||||
|
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.huaweiwatchgtrunner2;
|
||||||
|
|
||||||
|
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 HuaweiWatchGTRunner2Coordinator extends HuaweiBRCoordinator {
|
||||||
|
@Override
|
||||||
|
protected Pattern getSupportedDeviceName() {
|
||||||
|
return Pattern.compile("(" + HuaweiConstants.HU_WATCHGTRUNNER2_NAME + ").*", Pattern.CASE_INSENSITIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDeviceNameResource() {
|
||||||
|
return R.string.devicetype_huawei_watchgtrunner2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsUnicodeEmojis(@NonNull GBDevice device) {
|
||||||
|
// HarmonyOS watch
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||||
|
return DeviceKind.WATCH;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -308,6 +308,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt5.Huawei
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt6.HuaweiWatchGT6Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgt6.HuaweiWatchGT6Coordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtcyber.HuaweiWatchGTCyberCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchgtcyber.HuaweiWatchGTCyberCoordinator;
|
||||||
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.huaweiwatchultimate.HuaweiWatchUltimateCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.huaweiwatchultimate.HuaweiWatchUltimateCoordinator;
|
||||||
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;
|
||||||
@@ -829,6 +830,7 @@ public enum DeviceType {
|
|||||||
HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class),
|
HUAWEIWATCHGT5(HuaweiWatchGT5Coordinator.class),
|
||||||
HUAWEIWATCHGT6(HuaweiWatchGT6Coordinator.class),
|
HUAWEIWATCHGT6(HuaweiWatchGT6Coordinator.class),
|
||||||
HUAWEIWATCHGTRUNNER(HuaweiWatchGTRunnerCoordinator.class),
|
HUAWEIWATCHGTRUNNER(HuaweiWatchGTRunnerCoordinator.class),
|
||||||
|
HUAWEIWATCHGTRUNNER2(HuaweiWatchGTRunner2Coordinator.class),
|
||||||
HUAWEIWATCHGTCYBER(HuaweiWatchGTCyberCoordinator.class),
|
HUAWEIWATCHGTCYBER(HuaweiWatchGTCyberCoordinator.class),
|
||||||
HUAWEIBAND8(HuaweiBand8Coordinator.class),
|
HUAWEIBAND8(HuaweiBand8Coordinator.class),
|
||||||
HUAWEIBAND9(HuaweiBand9Coordinator.class),
|
HUAWEIBAND9(HuaweiBand9Coordinator.class),
|
||||||
|
|||||||
@@ -2175,6 +2175,7 @@
|
|||||||
<string name="devicetype_huawei_watchgt5" translatable="false">Huawei Watch GT 5 (Pro)</string>
|
<string name="devicetype_huawei_watchgt5" translatable="false">Huawei Watch GT 5 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watchgt6" translatable="false">Huawei Watch GT 6 (Pro)</string>
|
<string name="devicetype_huawei_watchgt6" translatable="false">Huawei Watch GT 6 (Pro)</string>
|
||||||
<string name="devicetype_huawei_watchgtrunner" translatable="false">Huawei Watch GT Runner</string>
|
<string name="devicetype_huawei_watchgtrunner" translatable="false">Huawei Watch GT Runner</string>
|
||||||
|
<string name="devicetype_huawei_watchgtrunner2" translatable="false">Huawei Watch GT Runner 2</string>
|
||||||
<string name="devicetype_huawei_watchgtcyber" translatable="false">Huawei Watch GT Cyber</string>
|
<string name="devicetype_huawei_watchgtcyber" translatable="false">Huawei Watch GT Cyber</string>
|
||||||
<string name="devicetype_huawei_watchfit" translatable="false">Huawei Watch Fit</string>
|
<string name="devicetype_huawei_watchfit" translatable="false">Huawei Watch Fit</string>
|
||||||
<string name="devicetype_huawei_watchfit2" translatable="false">Huawei Watch Fit 2</string>
|
<string name="devicetype_huawei_watchfit2" translatable="false">Huawei Watch Fit 2</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user