mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Redmi Buds 6: Initial support
This commit is contained in:
+55
@@ -0,0 +1,55 @@
|
||||
/* 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.redmibuds;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettings;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsCustomizer;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsScreen;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class RedmiBuds6Coordinator extends AbstractRedmiBudsCoordinator {
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_redmi_buds_6;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("Redmi Buds 6");
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceSpecificSettings getDeviceSpecificSettings(final GBDevice device) {
|
||||
final DeviceSpecificSettings deviceSpecificSettings = new DeviceSpecificSettings();
|
||||
deviceSpecificSettings.addRootScreen(R.xml.devicesettings_redmibuds5pro_headphones);
|
||||
deviceSpecificSettings.addRootScreen(R.xml.devicesettings_redmibuds5pro_gestures);
|
||||
deviceSpecificSettings.addRootScreen(R.xml.devicesettings_redmibuds5pro_sound);
|
||||
deviceSpecificSettings.addSubScreen(
|
||||
DeviceSpecificSettingsScreen.CALLS_AND_NOTIFICATIONS,
|
||||
R.xml.devicesettings_headphones
|
||||
);
|
||||
return deviceSpecificSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(final GBDevice device) {
|
||||
return new RedmiBudsSettingsCustomizer(device);
|
||||
}
|
||||
}
|
||||
@@ -396,6 +396,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds3ProCoord
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds4ActiveCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds5ProCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds6ActiveCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds6Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds6ProCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.redmibuds.RedmiBuds8ActiveCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.roidmi.Roidmi1Coordinator;
|
||||
@@ -550,6 +551,7 @@ public enum DeviceType {
|
||||
REDMIBUDS3PRO(RedmiBuds3ProCoordinator.class),
|
||||
REDMIBUDS4ACTIVE(RedmiBuds4ActiveCoordinator.class),
|
||||
REDMIBUDS5PRO(RedmiBuds5ProCoordinator.class),
|
||||
REDMIBUDS6(RedmiBuds6Coordinator.class),
|
||||
REDMIBUDS6ACTIVE(RedmiBuds6ActiveCoordinator.class),
|
||||
REDMIBUDS6PRO(RedmiBuds6ProCoordinator.class),
|
||||
REDMIBUDS8ACTIVE(RedmiBuds8ActiveCoordinator.class),
|
||||
|
||||
@@ -2203,6 +2203,7 @@
|
||||
<string name="devicetype_redmi_buds_4_active" translatable="false">Redmi Buds 4 Active</string>
|
||||
<string name="devicetype_redmi_buds_5_pro" translatable="false">Redmi Buds 5 Pro</string>
|
||||
<string name="devicetype_redmi_buds_6_active" translatable="false">Redmi Buds 6 Active</string>
|
||||
<string name="devicetype_redmi_buds_6" translatable="false">Redmi Buds 6</string>
|
||||
<string name="devicetype_redmi_buds_6_pro" translatable="false">Redmi Buds 6 Pro</string>
|
||||
<string name="devicetype_redmi_buds_8_active" translatable="false">Redmi Buds 8 Active</string>
|
||||
<string name="devicetype_redmi_smart_band_2" translatable="false">Redmi Smart Band 2</string>
|
||||
|
||||
+1
@@ -69,6 +69,7 @@ public class AbstractDeviceCoordinatorTest extends TestBase {
|
||||
put("Descent G1", DeviceType.GARMIN_DESCENT_G1); // #5915
|
||||
put("Descent G2", DeviceType.GARMIN_DESCENT_G2);
|
||||
put("Active 2 NFC (Round)-4B84", DeviceType.AMAZFITACTIVE2NFC);
|
||||
put("Redmi Buds 6", DeviceType.REDMIBUDS6); // #6061
|
||||
put("Redmi Buds 6 Pro", DeviceType.REDMIBUDS6PRO);
|
||||
put("Xiaomi Watch S4 AB01", DeviceType.XIAOMI_WATCH_S4);
|
||||
put("HUAWEI WATCH FIT 4 Pro-CC6", DeviceType.HUAWEIWATCHFIT4PRO);
|
||||
|
||||
Reference in New Issue
Block a user