mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Xiaomi Watch S4: Initial support
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
/* Copyright (C) 2025 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 <http://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.XiaomiCoordinator;
|
||||
|
||||
public class XiaomiWatchS4Coordinator extends XiaomiCoordinator {
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_xiaomi_watch_s4;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
// only seen without eSIM in #4924, but allowing both just in case
|
||||
return Pattern.compile("^Xiaomi Watch S4( eSIM)? [0-9A-F]{4}$");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultIconResource() {
|
||||
return R.drawable.ic_device_miwatch;
|
||||
}
|
||||
}
|
||||
@@ -386,6 +386,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS1ProCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.watches.XiaomiWatchS4Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xwatch.XWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.yawell.ring.ColmiR02Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.yawell.ring.ColmiR03Coordinator;
|
||||
@@ -479,6 +480,7 @@ public enum DeviceType {
|
||||
XIAOMI_WATCH_S1_PRO(XiaomiWatchS1ProCoordinator.class),
|
||||
XIAOMI_WATCH_S1(XiaomiWatchS1Coordinator.class),
|
||||
XIAOMI_WATCH_S3(XiaomiWatchS3Coordinator.class),
|
||||
XIAOMI_WATCH_S4(XiaomiWatchS4Coordinator.class),
|
||||
AMAZFITGTS3(AmazfitGTS3Coordinator.class),
|
||||
AMAZFITGTR3(AmazfitGTR3Coordinator.class),
|
||||
AMAZFITGTR4(AmazfitGTR4Coordinator.class),
|
||||
|
||||
@@ -3679,6 +3679,7 @@
|
||||
<string name="pref_sleep_mode_schedule_summary">Send a reminder and enter sleep mode at bedtime. At the scheduled wake-up time, the wake-up alarm will sound.</string>
|
||||
<string name="devicetype_xiaomi_watch_s1" translatable="false">Xiaomi Watch S1</string>
|
||||
<string name="devicetype_xiaomi_watch_s3" translatable="false">Xiaomi Watch S3</string>
|
||||
<string name="devicetype_xiaomi_watch_s4" translatable="false">Xiaomi Watch S4</string>
|
||||
<string name="devicetype_xiaomi_watch_s1_active" translatable="false">Xiaomi Watch S1 Active</string>
|
||||
<string name="devicetype_xiaomi_watch_s1_pro" translatable="false">Xiaomi Watch S1 Pro</string>
|
||||
<string name="devicetype_mi_watch_color_sport" translatable="false">Mi Watch Color Sport</string>
|
||||
|
||||
Reference in New Issue
Block a user