mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Sony WH-1000XM6: Experimental support
This commit is contained in:
+68
@@ -0,0 +1,68 @@
|
||||
/* 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.sony.headphones.coordinators;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCapabilities;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
|
||||
public class SonyWH1000XM6Coordinator extends SonyHeadphonesCoordinator {
|
||||
@Override
|
||||
public boolean isExperimental() {
|
||||
// Battery, equalizer, and quite a few others probably not working
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile(".*WH-1000XM6.*");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_sony_wh_1000xm6;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<SonyHeadphonesCapabilities> getCapabilities() {
|
||||
return new HashSet<>(Arrays.asList(
|
||||
SonyHeadphonesCapabilities.BatterySingle,
|
||||
SonyHeadphonesCapabilities.AmbientSoundControl,
|
||||
SonyHeadphonesCapabilities.SpeakToChatEnabled,
|
||||
SonyHeadphonesCapabilities.SpeakToChatConfig,
|
||||
// TODO SonyHeadphonesCapabilities.AudioUpsampling, // DSEE Extreme
|
||||
// TODO SonyHeadphonesCapabilities.VoiceNotifications,
|
||||
SonyHeadphonesCapabilities.AutomaticPowerOffWhenTakenOff,
|
||||
// TODO SonyHeadphonesCapabilities.TouchSensorSingle,
|
||||
// TODO 9 bands SonyHeadphonesCapabilities.EqualizerWithCustomBands,
|
||||
SonyHeadphonesCapabilities.PauseWhenTakenOff
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceKind getDeviceKind(@NonNull GBDevice device) {
|
||||
return DeviceKind.HEADPHONES;
|
||||
}
|
||||
}
|
||||
@@ -403,6 +403,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM4Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM5Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWH1000XM6Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWHCH720NCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWHULT900NCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.coordinators.SonyWIC100Coordinator;
|
||||
@@ -779,6 +780,7 @@ public enum DeviceType {
|
||||
SONY_LINKBUDS(SonyLinkBudsCoordinator.class),
|
||||
SONY_LINKBUDS_S(SonyLinkBudsSCoordinator.class),
|
||||
SONY_WH_1000XM5(SonyWH1000XM5Coordinator.class),
|
||||
SONY_WH_1000XM6(SonyWH1000XM6Coordinator.class),
|
||||
SONY_WH_ULT900N(SonyWHULT900NCoordinator.class),
|
||||
SONY_WF_1000XM5(SonyWF1000XM5Coordinator.class),
|
||||
SONY_WF_C500(SonyWFC500Coordinator.class),
|
||||
|
||||
@@ -2113,6 +2113,7 @@
|
||||
<string name="devicetype_sony_wh_1000xm3" translatable="false">Sony WH-1000XM3</string>
|
||||
<string name="devicetype_sony_wh_1000xm4" translatable="false">Sony WH-1000XM4</string>
|
||||
<string name="devicetype_sony_wh_1000xm5" translatable="false">Sony WH-1000XM5</string>
|
||||
<string name="devicetype_sony_wh_1000xm6" translatable="false">Sony WH-1000XM6</string>
|
||||
<string name="devicetype_sony_wh_ult900n" translatable="false">Sony WH-ULT900N</string>
|
||||
<string name="devicetype_sony_wh_ch720n" translatable="false">Sony WH-CH720N</string>
|
||||
<string name="devicetype_sony_wf_sp800n" translatable="false">Sony WF-SP800N</string>
|
||||
|
||||
Reference in New Issue
Block a user