mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 00:21:45 +01:00
Sony WH-1000XM3: Abstract common Sony Headphones logic
This commit is contained in:
parent
296dbb16aa
commit
f8e5b88231
@ -111,34 +111,34 @@ public class DeviceSettingsPreferenceConst {
|
||||
public static final String PREF_GALAXY_BUDS_LIVE_ANC = "pref_galaxy_buds_live_anc";
|
||||
public static final String PREF_GALAXY_BUDS_PRESSURE_RELIEF = "pref_galaxy_buds_live_pressure_relief";
|
||||
|
||||
public static final String PREF_SONY_WH1000XM3_AMBIENT_SOUND_CONTROL = "pref_sony_wh1000xm3_ambient_sound_control";
|
||||
public static final String PREF_SONY_WH1000XM3_FOCUS_VOICE = "pref_sony_wh1000xm3_focus_voice";
|
||||
public static final String PREF_SONY_WH1000XM3_AMBIENT_SOUND_LEVEL = "pref_sony_wh1000xm3_ambient_sound_level";
|
||||
public static final String PREF_SONY_WH1000XM3_SOUND_POSITION = "pref_sony_wh1000xm3_sound_position";
|
||||
public static final String PREF_SONY_WH1000XM3_SURROUND_MODE = "pref_sony_wh1000xm3_surround_mode";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MODE = "pref_sony_wh1000xm3_equalizer_mode";
|
||||
public static final String PREF_SONY_WH1000XM3_DSEE_HX = "pref_sony_wh1000xm3_dsee_hx";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_400 = "pref_sony_wh1000xm3_equalizer_manual_band_400";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_1000 = "pref_sony_wh1000xm3_equalizer_manual_band_1000";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_2500 = "pref_sony_wh1000xm3_equalizer_manual_band_2500";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_6300 = "pref_sony_wh1000xm3_equalizer_manual_band_6300";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_16000 = "pref_sony_wh1000xm3_equalizer_manual_band_16000";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_CLEAR_BASS = "pref_sony_wh1000xm3_equalizer_manual_clear_bass";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_400 = "pref_sony_wh1000xm3_equalizer_custom_1_band_400";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_1000 = "pref_sony_wh1000xm3_equalizer_custom_1_band_1000";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_2500 = "pref_sony_wh1000xm3_equalizer_custom_1_band_2500";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_6300 = "pref_sony_wh1000xm3_equalizer_custom_1_band_6300";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_16000 = "pref_sony_wh1000xm3_equalizer_custom_1_band_16000";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_CLEAR_BASS = "pref_sony_wh1000xm3_equalizer_custom_1_clear_bass";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_400 = "pref_sony_wh1000xm3_equalizer_custom_2_band_400";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_1000 = "pref_sony_wh1000xm3_equalizer_custom_2_band_1000";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_2500 = "pref_sony_wh1000xm3_equalizer_custom_2_band_2500";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_6300 = "pref_sony_wh1000xm3_equalizer_custom_2_band_6300";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_16000 = "pref_sony_wh1000xm3_equalizer_custom_2_band_16000";
|
||||
public static final String PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_CLEAR_BASS = "pref_sony_wh1000xm3_equalizer_custom_2_clear_bass";
|
||||
public static final String PREF_SONY_WH1000XM3_TOUCH_SENSOR = "pref_sony_wh1000xm3_touch_sensor";
|
||||
public static final String PREF_SONY_WH1000XM3_AUTOMATIC_POWER_OFF = "pref_sony_wh1000xm3_automatic_power_off";
|
||||
public static final String PREF_SONY_WH1000XM3_NOTIFICATION_VOICE_GUIDE = "pref_sony_wh1000xm3_notification_voice_guide";
|
||||
public static final String PREF_SONY_AMBIENT_SOUND_CONTROL = "pref_sony_ambient_sound_control";
|
||||
public static final String PREF_SONY_FOCUS_VOICE = "pref_sony_focus_voice";
|
||||
public static final String PREF_SONY_AMBIENT_SOUND_LEVEL = "pref_sony_ambient_sound_level";
|
||||
public static final String PREF_SONY_SOUND_POSITION = "pref_sony_sound_position";
|
||||
public static final String PREF_SONY_SURROUND_MODE = "pref_sony_surround_mode";
|
||||
public static final String PREF_SONY_EQUALIZER_MODE = "pref_sony_equalizer_mode";
|
||||
public static final String PREF_SONY_DSEE_HX = "pref_sony_dsee_hx";
|
||||
public static final String PREF_SONY_EQUALIZER_MANUAL_BAND_400 = "pref_sony_equalizer_manual_band_400";
|
||||
public static final String PREF_SONY_EQUALIZER_MANUAL_BAND_1000 = "pref_sony_equalizer_manual_band_1000";
|
||||
public static final String PREF_SONY_EQUALIZER_MANUAL_BAND_2500 = "pref_sony_equalizer_manual_band_2500";
|
||||
public static final String PREF_SONY_EQUALIZER_MANUAL_BAND_6300 = "pref_sony_equalizer_manual_band_6300";
|
||||
public static final String PREF_SONY_EQUALIZER_MANUAL_BAND_16000 = "pref_sony_equalizer_manual_band_16000";
|
||||
public static final String PREF_SONY_EQUALIZER_MANUAL_CLEAR_BASS = "pref_sony_equalizer_manual_clear_bass";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_1_BAND_400 = "pref_sony_equalizer_custom_1_band_400";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_1_BAND_1000 = "pref_sony_equalizer_custom_1_band_1000";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_1_BAND_2500 = "pref_sony_equalizer_custom_1_band_2500";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_1_BAND_6300 = "pref_sony_equalizer_custom_1_band_6300";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_1_BAND_16000 = "pref_sony_equalizer_custom_1_band_16000";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_1_CLEAR_BASS = "pref_sony_equalizer_custom_1_clear_bass";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_2_BAND_400 = "pref_sony_equalizer_custom_2_band_400";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_2_BAND_1000 = "pref_sony_equalizer_custom_2_band_1000";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_2_BAND_2500 = "pref_sony_equalizer_custom_2_band_2500";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_2_BAND_6300 = "pref_sony_equalizer_custom_2_band_6300";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_2_BAND_16000 = "pref_sony_equalizer_custom_2_band_16000";
|
||||
public static final String PREF_SONY_EQUALIZER_CUSTOM_2_CLEAR_BASS = "pref_sony_equalizer_custom_2_clear_bass";
|
||||
public static final String PREF_SONY_TOUCH_SENSOR = "pref_sony_touch_sensor";
|
||||
public static final String PREF_SONY_AUTOMATIC_POWER_OFF = "pref_sony_automatic_power_off";
|
||||
public static final String PREF_SONY_NOTIFICATION_VOICE_GUIDE = "pref_sony_notification_voice_guide";
|
||||
|
||||
public static final String PREFS_ACTIVITY_IN_DEVICE_CARD = "prefs_activity_in_device_card";
|
||||
public static final String PREFS_ACTIVITY_IN_DEVICE_CARD_STEPS = "prefs_activity_in_device_card_steps";
|
||||
|
@ -124,34 +124,34 @@ import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.Dev
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_VIBRATION_ENABLE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_NOTHING_EAR1_AUDIOMODE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_NOTHING_EAR1_INEAR;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AMBIENT_SOUND_CONTROL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_FOCUS_VOICE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AMBIENT_SOUND_LEVEL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_SOUND_POSITION;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_SURROUND_MODE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MODE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_400;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_1000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_2500;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_6300;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_16000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_CLEAR_BASS;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_400;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_1000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_2500;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_6300;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_16000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_CLEAR_BASS;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_400;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_1000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_2500;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_6300;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_16000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_CLEAR_BASS;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_DSEE_HX;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_TOUCH_SENSOR;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AUTOMATIC_POWER_OFF;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_NOTIFICATION_VOICE_GUIDE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_AMBIENT_SOUND_CONTROL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_FOCUS_VOICE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_AMBIENT_SOUND_LEVEL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_SOUND_POSITION;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_SURROUND_MODE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MODE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_400;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_1000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_2500;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_6300;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_16000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_CLEAR_BASS;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_400;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_1000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_2500;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_6300;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_16000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_CLEAR_BASS;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_400;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_1000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_2500;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_6300;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_16000;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_CLEAR_BASS;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_DSEE_HX;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_TOUCH_SENSOR;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_AUTOMATIC_POWER_OFF;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_SONY_NOTIFICATION_VOICE_GUIDE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREFS_ACTIVITY_IN_DEVICE_CARD;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREFS_ACTIVITY_IN_DEVICE_CARD_DISTANCE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREFS_ACTIVITY_IN_DEVICE_CARD_SLEEP;
|
||||
@ -526,34 +526,34 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat {
|
||||
addPreferenceHandlerFor(PREF_GALAXY_BUDS_PRESSURE_RELIEF);
|
||||
|
||||
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_AMBIENT_SOUND_CONTROL);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_FOCUS_VOICE);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_AMBIENT_SOUND_LEVEL);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_SOUND_POSITION);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_SURROUND_MODE);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MODE);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_400);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_1000);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_2500);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_6300);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_16000);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_CLEAR_BASS);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_400);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_1000);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_2500);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_6300);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_16000);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_CLEAR_BASS);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_400);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_1000);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_2500);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_6300);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_16000);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_CLEAR_BASS);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_DSEE_HX);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_TOUCH_SENSOR);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_AUTOMATIC_POWER_OFF);
|
||||
addPreferenceHandlerFor(PREF_SONY_WH1000XM3_NOTIFICATION_VOICE_GUIDE);
|
||||
addPreferenceHandlerFor(PREF_SONY_AMBIENT_SOUND_CONTROL);
|
||||
addPreferenceHandlerFor(PREF_SONY_FOCUS_VOICE);
|
||||
addPreferenceHandlerFor(PREF_SONY_AMBIENT_SOUND_LEVEL);
|
||||
addPreferenceHandlerFor(PREF_SONY_SOUND_POSITION);
|
||||
addPreferenceHandlerFor(PREF_SONY_SURROUND_MODE);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MODE);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MANUAL_BAND_400);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MANUAL_BAND_1000);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MANUAL_BAND_2500);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MANUAL_BAND_6300);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MANUAL_BAND_16000);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_MANUAL_CLEAR_BASS);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_1_BAND_400);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_1_BAND_1000);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_1_BAND_2500);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_1_BAND_6300);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_1_BAND_16000);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_1_CLEAR_BASS);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_2_BAND_400);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_2_BAND_1000);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_2_BAND_2500);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_2_BAND_6300);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_2_BAND_16000);
|
||||
addPreferenceHandlerFor(PREF_SONY_EQUALIZER_CUSTOM_2_CLEAR_BASS);
|
||||
addPreferenceHandlerFor(PREF_SONY_DSEE_HX);
|
||||
addPreferenceHandlerFor(PREF_SONY_TOUCH_SENSOR);
|
||||
addPreferenceHandlerFor(PREF_SONY_AUTOMATIC_POWER_OFF);
|
||||
addPreferenceHandlerFor(PREF_SONY_NOTIFICATION_VOICE_GUIDE);
|
||||
|
||||
String sleepTimeState = prefs.getString(PREF_SLEEP_TIME, PREF_DO_NOT_DISTURB_OFF);
|
||||
boolean sleepTimeScheduled = sleepTimeState.equals(PREF_DO_NOT_DISTURB_SCHEDULED);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
public enum AmbientSoundControl {
|
||||
OFF,
|
@ -14,14 +14,15 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
public enum AutomaticPowerOff {
|
||||
OFF(new byte[]{(byte) 0x11, (byte) 0x00}),
|
||||
AFTER_5_MIN(new byte[]{(byte) 0x00, (byte) 0x00}),
|
||||
AFTER_30_MIN(new byte[]{(byte) 0x01, (byte) 0x01}),
|
||||
AFTER_1_HOUR(new byte[]{(byte) 0x02, (byte) 0x02}),
|
||||
AFTER_3_HOUR(new byte[]{(byte) 0x03, (byte) 0x03});
|
||||
AFTER_3_HOUR(new byte[]{(byte) 0x03, (byte) 0x03}),
|
||||
WHEN_TAKEN_OFF(new byte[]{(byte) 0x10, (byte) 0x00});
|
||||
|
||||
public final byte[] code;
|
||||
|
@ -0,0 +1,30 @@
|
||||
/* Copyright (C) 2021 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.sony.headphones;
|
||||
|
||||
public enum ButtonMode {
|
||||
OFF((byte) 0xff),
|
||||
AMBIENT_SOUND_CONTROL((byte) 0x00),
|
||||
PLAYBACK_CONTROL((byte) 0x20),
|
||||
VOLUME_CONTROL((byte) 0x10);
|
||||
|
||||
public final byte code;
|
||||
|
||||
ButtonMode(final byte code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
public enum EqualizerPreset {
|
||||
OFF(new byte[] {(byte) 0x00, (byte) 0x00}),
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -23,38 +23,16 @@ import android.net.Uri;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class SonyWh1000Xm3Coordinator extends AbstractDeviceCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyWh1000Xm3Coordinator.class);
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
|
||||
if (candidate.getName().contains("WH-1000XM3")) {
|
||||
return DeviceType.SONY_WH_1000XM3;
|
||||
}
|
||||
return DeviceType.UNKNOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.SONY_WH_1000XM3;
|
||||
}
|
||||
|
||||
public abstract class SonyHeadphonesCoordinator extends AbstractDeviceCoordinator {
|
||||
@Override
|
||||
public String getManufacturer() {
|
||||
return "Sony";
|
||||
@ -139,11 +117,4 @@ public class SonyWh1000Xm3Coordinator extends AbstractDeviceCoordinator {
|
||||
public boolean supportsFindDevice() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSupportedDeviceSpecificSettings(final GBDevice device) {
|
||||
return new int[]{
|
||||
R.xml.devicesettings_sony_1000xm3
|
||||
};
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
public enum SoundPosition {
|
||||
OFF((byte) 0x00),
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones;
|
||||
|
||||
public enum SurroundMode {
|
||||
OFF((byte) 0x00),
|
@ -0,0 +1,52 @@
|
||||
/* Copyright (C) 2021 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.sony.headphones.wh1000xm3;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class SonyWh1000Xm3Coordinator extends SonyHeadphonesCoordinator {
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
|
||||
if (candidate.getName().contains("WH-1000XM3")) {
|
||||
return DeviceType.SONY_WH_1000XM3;
|
||||
}
|
||||
return DeviceType.UNKNOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.SONY_WH_1000XM3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSupportedDeviceSpecificSettings(final GBDevice device) {
|
||||
return new int[]{
|
||||
R.xml.devicesettings_sony_warning_wh1000xm3,
|
||||
R.xml.devicesettings_sony_headphones_ambient_sound_control,
|
||||
R.xml.devicesettings_sony_headphones_equalizer,
|
||||
R.xml.devicesettings_sony_headphones_other,
|
||||
R.xml.devicesettings_sony_wh_1000xm3
|
||||
};
|
||||
}
|
||||
}
|
@ -88,13 +88,13 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.pinetime.PineTimeJFS
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.QHybridSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.roidmi.RoidmiSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.smaq2oss.SMAQ2OSSSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.SonyHeadphonesSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sonyswr12.SonySWR12DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.tlw64.TLW64Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.um25.Support.UM25Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vibratissimo.VibratissimoSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.waspos.WaspOSDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.watch9.Watch9DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.wh1000xm3.SonyWh1000Xm3Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.xwatch.XWatchSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.zetime.ZeTimeDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
@ -369,9 +369,9 @@ public class DeviceSupportFactory {
|
||||
break;
|
||||
case GALAXY_BUDS_LIVE:
|
||||
deviceSupport = new ServiceDeviceSupport(new GalaxyBudsDeviceSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
break;
|
||||
break;
|
||||
case SONY_WH_1000XM3:
|
||||
deviceSupport = new ServiceDeviceSupport(new SonyWh1000Xm3Support(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
deviceSupport = new ServiceDeviceSupport(new SonyHeadphonesSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
break;
|
||||
}
|
||||
if (deviceSupport != null) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.service.devices.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Context;
|
||||
@ -34,11 +34,11 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.btclassic.BtClassicIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
public class SonyWh1000Xm3IoThread extends BtClassicIoThread {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyWh1000Xm3IoThread.class);
|
||||
public class SonyHeadphonesIoThread extends BtClassicIoThread {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyHeadphonesIoThread.class);
|
||||
|
||||
public SonyWh1000Xm3IoThread(GBDevice gbDevice, Context context, SonyWh1000Xm3Protocol xm3protocol, SonyWh1000Xm3Support xm3support, BluetoothAdapter roidmiBtAdapter) {
|
||||
super(gbDevice, context, xm3protocol, xm3support, roidmiBtAdapter);
|
||||
public SonyHeadphonesIoThread(GBDevice gbDevice, Context context, SonyHeadphonesProtocol protocol, SonyHeadphonesSupport support, BluetoothAdapter btAdapter) {
|
||||
super(gbDevice, context, protocol, support, btAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,12 +49,12 @@ public class SonyWh1000Xm3IoThread extends BtClassicIoThread {
|
||||
while (true) {
|
||||
inputStream.read(incoming);
|
||||
|
||||
if (incoming[0] == SonyWh1000Xm3Protocol.PACKET_HEADER) {
|
||||
if (incoming[0] == SonyHeadphonesProtocol.PACKET_HEADER) {
|
||||
msgStream.reset();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (incoming[0] == SonyWh1000Xm3Protocol.PACKET_TRAILER) {
|
||||
if (incoming[0] == SonyHeadphonesProtocol.PACKET_TRAILER) {
|
||||
break;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.service.devices.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
@ -31,18 +31,18 @@ import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
|
||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSendBytes;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.AmbientSoundControl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.AutomaticPowerOff;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.EqualizerCustomBands;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.EqualizerPreset;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.SoundPosition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.SurroundMode;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.AmbientSoundControl;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.AutomaticPowerOff;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.EqualizerCustomBands;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.EqualizerPreset;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SoundPosition;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SurroundMode;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.serial.GBDeviceProtocol;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
public class SonyWh1000Xm3Protocol extends GBDeviceProtocol {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyWh1000Xm3Protocol.class);
|
||||
public abstract class SonyHeadphonesProtocol extends GBDeviceProtocol {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyHeadphonesProtocol.class);
|
||||
|
||||
/**
|
||||
* Packet format:
|
||||
@ -71,7 +71,7 @@ public class SonyWh1000Xm3Protocol extends GBDeviceProtocol {
|
||||
|
||||
private byte sequenceNumber = 0;
|
||||
|
||||
public SonyWh1000Xm3Protocol(GBDevice device) {
|
||||
public SonyHeadphonesProtocol(GBDevice device) {
|
||||
super(device);
|
||||
}
|
||||
|
||||
@ -110,100 +110,100 @@ public class SonyWh1000Xm3Protocol extends GBDeviceProtocol {
|
||||
@Override
|
||||
public byte[] encodeSendConfiguration(String config) {
|
||||
final SharedPreferences prefs = GBApplication.getDeviceSpecificSharedPrefs(getDevice().getAddress());
|
||||
EqualizerPreset equalizerPreset = EqualizerPreset.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MODE, "off").toUpperCase());
|
||||
EqualizerPreset equalizerPreset = EqualizerPreset.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MODE, "off").toUpperCase());
|
||||
|
||||
switch (config) {
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AMBIENT_SOUND_CONTROL:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_FOCUS_VOICE:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AMBIENT_SOUND_LEVEL:
|
||||
String soundControl = prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AMBIENT_SOUND_CONTROL, "noise_cancelling");
|
||||
boolean focusVoice = prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_FOCUS_VOICE, false);
|
||||
int level = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AMBIENT_SOUND_LEVEL, 0);
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_AMBIENT_SOUND_CONTROL:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_FOCUS_VOICE:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_AMBIENT_SOUND_LEVEL:
|
||||
String soundControl = prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_AMBIENT_SOUND_CONTROL, "noise_cancelling");
|
||||
boolean focusVoice = prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_FOCUS_VOICE, false);
|
||||
int level = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_AMBIENT_SOUND_LEVEL, 0);
|
||||
return encodeSoundControl(AmbientSoundControl.valueOf(soundControl.toUpperCase()), focusVoice, level);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_SOUND_POSITION:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_SOUND_POSITION:
|
||||
return encodeSoundPosition(
|
||||
SoundPosition.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_SOUND_POSITION, "off").toUpperCase())
|
||||
SoundPosition.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_SOUND_POSITION, "off").toUpperCase())
|
||||
);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_SURROUND_MODE:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_SURROUND_MODE:
|
||||
return encodeSurroundMode(
|
||||
SurroundMode.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_SURROUND_MODE, "off").toUpperCase())
|
||||
SurroundMode.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_SURROUND_MODE, "off").toUpperCase())
|
||||
);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MODE:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MODE:
|
||||
return encodeEqualizerPreset(equalizerPreset);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_400:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_1000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_2500:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_6300:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_16000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_CLEAR_BASS:
|
||||
int m_band1 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_400, 10) - 10;
|
||||
int m_band2 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_1000, 10) - 10;
|
||||
int m_band3 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_2500, 10) - 10;
|
||||
int m_band4 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_6300, 10) - 10;
|
||||
int m_band5 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_BAND_16000, 10) - 10;
|
||||
int m_bass = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MANUAL_CLEAR_BASS, 10) - 10;
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_400:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_1000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_2500:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_6300:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_16000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_CLEAR_BASS:
|
||||
int m_band1 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_400, 10) - 10;
|
||||
int m_band2 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_1000, 10) - 10;
|
||||
int m_band3 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_2500, 10) - 10;
|
||||
int m_band4 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_6300, 10) - 10;
|
||||
int m_band5 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_BAND_16000, 10) - 10;
|
||||
int m_bass = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MANUAL_CLEAR_BASS, 10) - 10;
|
||||
|
||||
// Set the equalizer preset, since changing the bands will switch it
|
||||
// TODO: This is not updating the UI once the user returns to the previous screen
|
||||
prefs.edit().putString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MODE, EqualizerPreset.MANUAL.toString().toLowerCase()).apply();
|
||||
prefs.edit().putString(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MODE, EqualizerPreset.MANUAL.toString().toLowerCase()).apply();
|
||||
|
||||
return encodeEqualizerCustomBands(EqualizerPreset.MANUAL, equalizerPreset, new EqualizerCustomBands(Arrays.asList(m_band1, m_band2, m_band3, m_band4, m_band5), m_bass));
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_400:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_1000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_2500:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_6300:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_16000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_CLEAR_BASS:
|
||||
int c1_band1 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_400, 10) - 10;
|
||||
int c1_band2 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_1000, 10) - 10;
|
||||
int c1_band3 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_2500, 10) - 10;
|
||||
int c1_band4 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_6300, 10) - 10;
|
||||
int c1_band5 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_BAND_16000, 10) - 10;
|
||||
int c1_bass = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_1_CLEAR_BASS, 10) - 10;
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_400:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_1000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_2500:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_6300:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_16000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_CLEAR_BASS:
|
||||
int c1_band1 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_400, 10) - 10;
|
||||
int c1_band2 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_1000, 10) - 10;
|
||||
int c1_band3 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_2500, 10) - 10;
|
||||
int c1_band4 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_6300, 10) - 10;
|
||||
int c1_band5 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_BAND_16000, 10) - 10;
|
||||
int c1_bass = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_1_CLEAR_BASS, 10) - 10;
|
||||
|
||||
// Set the equalizer preset, since changing the bands will switch it
|
||||
// TODO: This is not updating the UI once the user returns to the previous screen
|
||||
prefs.edit().putString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MODE, EqualizerPreset.CUSTOM_1.toString().toLowerCase()).apply();
|
||||
prefs.edit().putString(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MODE, EqualizerPreset.CUSTOM_1.toString().toLowerCase()).apply();
|
||||
|
||||
return encodeEqualizerCustomBands(EqualizerPreset.CUSTOM_1, equalizerPreset, new EqualizerCustomBands(Arrays.asList(c1_band1, c1_band2, c1_band3, c1_band4, c1_band5), c1_bass));
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_400:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_1000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_2500:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_6300:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_16000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_CLEAR_BASS:
|
||||
int c2_band1 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_400, 10) - 10;
|
||||
int c2_band2 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_1000, 10) - 10;
|
||||
int c2_band3 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_2500, 10) - 10;
|
||||
int c2_band4 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_6300, 10) - 10;
|
||||
int c2_band5 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_BAND_16000, 10) - 10;
|
||||
int c2_bass = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_CUSTOM_2_CLEAR_BASS, 10) - 10;
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_400:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_1000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_2500:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_6300:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_16000:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_CLEAR_BASS:
|
||||
int c2_band1 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_400, 10) - 10;
|
||||
int c2_band2 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_1000, 10) - 10;
|
||||
int c2_band3 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_2500, 10) - 10;
|
||||
int c2_band4 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_6300, 10) - 10;
|
||||
int c2_band5 = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_BAND_16000, 10) - 10;
|
||||
int c2_bass = prefs.getInt(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_CUSTOM_2_CLEAR_BASS, 10) - 10;
|
||||
|
||||
// Set the equalizer preset, since changing the bands will switch it
|
||||
// TODO: This is not updating the UI once the user returns to the previous screen
|
||||
prefs.edit().putString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_EQUALIZER_MODE, EqualizerPreset.CUSTOM_2.toString().toLowerCase()).apply();
|
||||
prefs.edit().putString(DeviceSettingsPreferenceConst.PREF_SONY_EQUALIZER_MODE, EqualizerPreset.CUSTOM_2.toString().toLowerCase()).apply();
|
||||
|
||||
return encodeEqualizerCustomBands(EqualizerPreset.CUSTOM_2, equalizerPreset, new EqualizerCustomBands(Arrays.asList(c2_band1, c2_band2, c2_band3, c2_band4, c2_band5), c2_bass));
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_DSEE_HX:
|
||||
return encodeDSEEHX(prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_DSEE_HX, false));
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_DSEE_HX:
|
||||
return encodeDSEEHX(prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_DSEE_HX, false));
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_TOUCH_SENSOR:
|
||||
return encodeTouchSensor(prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_TOUCH_SENSOR, true));
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_TOUCH_SENSOR:
|
||||
return encodeTouchSensor(prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_TOUCH_SENSOR, true));
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AUTOMATIC_POWER_OFF:
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_AUTOMATIC_POWER_OFF:
|
||||
return encodeAutomaticPowerOff(
|
||||
AutomaticPowerOff.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_AUTOMATIC_POWER_OFF, "off").toUpperCase())
|
||||
AutomaticPowerOff.valueOf(prefs.getString(DeviceSettingsPreferenceConst.PREF_SONY_AUTOMATIC_POWER_OFF, "off").toUpperCase())
|
||||
);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_NOTIFICATION_VOICE_GUIDE:
|
||||
return encodeVoiceNotifications(prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_WH1000XM3_NOTIFICATION_VOICE_GUIDE, true));
|
||||
case DeviceSettingsPreferenceConst.PREF_SONY_NOTIFICATION_VOICE_GUIDE:
|
||||
return encodeVoiceNotifications(prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_SONY_NOTIFICATION_VOICE_GUIDE, true));
|
||||
|
||||
default:
|
||||
LOG.warn("Unknown config '{}'", config);
|
@ -14,7 +14,7 @@
|
||||
|
||||
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.service.devices.sony.wh1000xm3;
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
@ -25,12 +25,14 @@ import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.wh1000xm3.SonyWh1000Xm3Protocol;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.serial.AbstractSerialDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.serial.GBDeviceIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.serial.GBDeviceProtocol;
|
||||
|
||||
public class SonyWh1000Xm3Support extends AbstractSerialDeviceSupport {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyWh1000Xm3Support.class);
|
||||
public class SonyHeadphonesSupport extends AbstractSerialDeviceSupport {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SonyHeadphonesSupport.class);
|
||||
|
||||
@Override
|
||||
public boolean connect() {
|
||||
@ -41,17 +43,24 @@ public class SonyWh1000Xm3Support extends AbstractSerialDeviceSupport {
|
||||
|
||||
@Override
|
||||
protected GBDeviceProtocol createDeviceProtocol() {
|
||||
return new SonyWh1000Xm3Protocol(getDevice());
|
||||
DeviceType deviceType = getDevice().getType();
|
||||
switch (deviceType) {
|
||||
case SONY_WH_1000XM3:
|
||||
return new SonyWh1000Xm3Protocol(getDevice());
|
||||
default:
|
||||
LOG.error("Unsupported Sony device type '{}' with key '{}", deviceType, deviceType.getKey());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GBDeviceIoThread createDeviceIOThread() {
|
||||
return new SonyWh1000Xm3IoThread(getDevice(), getContext(), (SonyWh1000Xm3Protocol) getDeviceProtocol(), SonyWh1000Xm3Support.this, getBluetoothAdapter());
|
||||
return new SonyHeadphonesIoThread(getDevice(), getContext(), (SonyHeadphonesProtocol) getDeviceProtocol(), SonyHeadphonesSupport.this, getBluetoothAdapter());
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized SonyWh1000Xm3IoThread getDeviceIOThread() {
|
||||
return (SonyWh1000Xm3IoThread) super.getDeviceIOThread();
|
||||
public synchronized SonyHeadphonesIoThread getDeviceIOThread() {
|
||||
return (SonyHeadphonesIoThread) super.getDeviceIOThread();
|
||||
}
|
||||
|
||||
@Override
|
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 2021 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.service.devices.sony.headphones.wh1000xm3;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.SonyHeadphonesProtocol;
|
||||
|
||||
public class SonyWh1000Xm3Protocol extends SonyHeadphonesProtocol {
|
||||
public SonyWh1000Xm3Protocol(GBDevice device) {
|
||||
super(device);
|
||||
}
|
||||
}
|
@ -113,7 +113,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.um25.Coordinator.UM25Coordin
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.vibratissimo.VibratissimoCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.waspos.WaspOSCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.watch9.Watch9DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.wh1000xm3.SonyWh1000Xm3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.wh1000xm3.SonyWh1000Xm3Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.xwatch.XWatchCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.zetime.ZeTimeCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
|
@ -1188,7 +1188,7 @@
|
||||
<string name="sony_surround_mode_outdoor_stage">Palco exterior</string>
|
||||
<string name="sony_surround_mode_concert_hall">Sala de concertos</string>
|
||||
<string name="sony_surround_position_mutually_exclusive">Aviso: As preferencias de posição de som / modo surround são mutuamente exclusivas.</string>
|
||||
<string name="sony_warn_sbc_codec">Aviso: Estas preferencias só funcionam com o codec de audio SBC.</string>
|
||||
<string name="sony_warn_sbc_codec">Aviso: As preferencias de equalizador, modo surround e posição do som só funcionam com o codec de audio SBC.</string>
|
||||
<string name="sony_equalizer">Equalizador</string>
|
||||
<string name="sony_equalizer_preset_off">Desligado</string>
|
||||
<string name="sony_equalizer_preset_bright">Brilhante</string>
|
||||
@ -1220,6 +1220,7 @@
|
||||
<string name="sony_automatic_power_off_30_min">30 minutos</string>
|
||||
<string name="sony_automatic_power_off_1_hour">1 hora</string>
|
||||
<string name="sony_automatic_power_off_3_hour">3 horas</string>
|
||||
<string name="sony_automatic_power_off_when_taken_off">Quando retirar os auscultadores</string>
|
||||
<string name="uncheck_all_applications">Desmarcar todos as aplicações</string>
|
||||
<string name="fw_upgrade_notice_amazfitx">Está prestes a instalar o firmware %s no seu Amazfit X.
|
||||
\n
|
||||
|
@ -1853,21 +1853,21 @@
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_ambient_sound_control_names">
|
||||
<string-array name="sony_ambient_sound_control_names">
|
||||
<item>@string/sony_ambient_sound_off</item>
|
||||
<item>@string/sony_ambient_sound_noise_cancelling</item>
|
||||
<item>@string/sony_ambient_sound_wind_noise_reduction</item>
|
||||
<item>@string/sony_ambient_sound_ambient_sound</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_ambient_sound_control_values">
|
||||
<string-array name="sony_ambient_sound_control_values">
|
||||
<item>off</item>
|
||||
<item>noise_cancelling</item>
|
||||
<item>wind_noise_reduction</item>
|
||||
<item>ambient_sound</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_sound_position_names">
|
||||
<string-array name="sony_sound_position_names">
|
||||
<item>@string/sony_sound_position_off</item>
|
||||
<item>@string/sony_sound_position_front</item>
|
||||
<item>@string/sony_sound_position_front_left</item>
|
||||
@ -1876,7 +1876,7 @@
|
||||
<item>@string/sony_sound_position_rear_right</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_sound_position_values">
|
||||
<string-array name="sony_sound_position_values">
|
||||
<item>off</item>
|
||||
<item>front</item>
|
||||
<item>front_left</item>
|
||||
@ -1885,7 +1885,7 @@
|
||||
<item>rear_right</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_surround_mode_names">
|
||||
<string-array name="sony_surround_mode_names">
|
||||
<item>@string/sony_surround_mode_off</item>
|
||||
<item>@string/sony_surround_mode_arena</item>
|
||||
<item>@string/sony_surround_mode_club</item>
|
||||
@ -1893,7 +1893,7 @@
|
||||
<item>@string/sony_surround_mode_concert_hall</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_surround_mode_values">
|
||||
<string-array name="sony_surround_mode_values">
|
||||
<item>off</item>
|
||||
<item>arena</item>
|
||||
<item>club</item>
|
||||
@ -1901,7 +1901,7 @@
|
||||
<item>concert_hall</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_equalizer_mode_names">
|
||||
<string-array name="sony_equalizer_mode_names">
|
||||
<item>@string/sony_equalizer_preset_off</item>
|
||||
<item>@string/sony_equalizer_preset_bright</item>
|
||||
<item>@string/sony_equalizer_preset_excited</item>
|
||||
@ -1916,7 +1916,7 @@
|
||||
<item>@string/sony_equalizer_preset_custom_2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_equalizer_mode_values">
|
||||
<string-array name="sony_equalizer_mode_values">
|
||||
<item>off</item>
|
||||
<item>bright</item>
|
||||
<item>excited</item>
|
||||
@ -1931,7 +1931,7 @@
|
||||
<item>custom_2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_automatic_power_off_names">
|
||||
<string-array name="sony_automatic_power_off_names">
|
||||
<item>@string/sony_automatic_power_off_off</item>
|
||||
<item>@string/sony_automatic_power_off_5_min</item>
|
||||
<item>@string/sony_automatic_power_off_30_min</item>
|
||||
@ -1939,7 +1939,7 @@
|
||||
<item>@string/sony_automatic_power_off_3_hour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="sony_wh1000xm3_automatic_power_off_values">
|
||||
<string-array name="sony_automatic_power_off_values">
|
||||
<item>off</item>
|
||||
<item>after_5_min</item>
|
||||
<item>after_30_min</item>
|
||||
|
@ -1352,7 +1352,7 @@
|
||||
<string name="sony_surround_mode_outdoor_stage">Outdoor Stage</string>
|
||||
<string name="sony_surround_mode_concert_hall">Concert Hall</string>
|
||||
<string name="sony_surround_position_mutually_exclusive">Warning: The sound position / surround mode settings are mutually exclusive.</string>
|
||||
<string name="sony_warn_sbc_codec">Warning: These settings only work for the SBC audio codec.</string>
|
||||
<string name="sony_warn_sbc_codec">Warning: The equalizer, audio position and surround settings only work for the SBC audio codec.</string>
|
||||
<string name="sony_equalizer">Equalizer</string>
|
||||
<string name="sony_equalizer_preset_off">Off</string>
|
||||
<string name="sony_equalizer_preset_bright">Bright</string>
|
||||
@ -1384,6 +1384,7 @@
|
||||
<string name="sony_automatic_power_off_30_min">30 minutes</string>
|
||||
<string name="sony_automatic_power_off_1_hour">1 hour</string>
|
||||
<string name="sony_automatic_power_off_3_hour">3 hours</string>
|
||||
<string name="sony_automatic_power_off_when_taken_off">When taken off</string>
|
||||
<string name="watchface_widget_type_custom">Custom widget</string>
|
||||
|
||||
</resources>
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_header_sony_ambient_sound_control"
|
||||
android:title="@string/pref_header_sony_ambient_sound_control">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="noise_cancelling"
|
||||
android:entries="@array/sony_ambient_sound_control_names"
|
||||
android:entryValues="@array/sony_ambient_sound_control_values"
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="pref_sony_ambient_sound_control"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_ambient_sound" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="0"
|
||||
android:icon="@drawable/ic_volume_up"
|
||||
android:key="pref_sony_ambient_sound_level"
|
||||
android:max="19"
|
||||
android:title="@string/sony_ambient_sound_level" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_voice"
|
||||
android:key="pref_sony_focus_voice"
|
||||
android:title="@string/sony_ambient_sound_focus_voice" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
@ -1,48 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_header_sony_ambient_sound_control"
|
||||
android:title="@string/pref_header_sony_ambient_sound_control">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="noise_cancelling"
|
||||
android:entries="@array/sony_wh1000xm3_ambient_sound_control_names"
|
||||
android:entryValues="@array/sony_wh1000xm3_ambient_sound_control_values"
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="pref_sony_wh1000xm3_ambient_sound_control"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_ambient_sound" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="0"
|
||||
android:icon="@drawable/ic_volume_up"
|
||||
android:key="pref_sony_wh1000xm3_ambient_sound_level"
|
||||
android:max="19"
|
||||
android:title="@string/sony_ambient_sound_level" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_voice"
|
||||
android:key="pref_sony_wh1000xm3_focus_voice"
|
||||
android:title="@string/sony_ambient_sound_focus_voice" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_equalizer"
|
||||
android:title="@string/pref_header_equalizer">
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_warning"
|
||||
android:key="pref_sony_wh1000xm3_warning_sbc_codec_1"
|
||||
android:summary="@string/sony_warn_sbc_codec" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_wh1000xm3_equalizer_mode_names"
|
||||
android:entryValues="@array/sony_wh1000xm3_equalizer_mode_values"
|
||||
android:entries="@array/sony_equalizer_mode_names"
|
||||
android:entryValues="@array/sony_equalizer_mode_values"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_mode"
|
||||
android:key="pref_sony_equalizer_mode"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_equalizer" />
|
||||
|
||||
@ -59,37 +26,37 @@
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_manual_band_400"
|
||||
android:key="pref_sony_equalizer_manual_band_400"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_400" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_manual_band_1000"
|
||||
android:key="pref_sony_equalizer_manual_band_1000"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_1000" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_manual_band_2500"
|
||||
android:key="pref_sony_equalizer_manual_band_2500"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_2500" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_manual_band_6300"
|
||||
android:key="pref_sony_equalizer_manual_band_6300"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_6300" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_manual_band_16000"
|
||||
android:key="pref_sony_equalizer_manual_band_16000"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_16000" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_speaker"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_manual_clear_bass"
|
||||
android:key="pref_sony_equalizer_manual_clear_bass"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_clear_bass" />
|
||||
</PreferenceCategory>
|
||||
@ -108,37 +75,37 @@
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_1_band_400"
|
||||
android:key="pref_sony_equalizer_custom_1_band_400"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_400" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_1_band_1000"
|
||||
android:key="pref_sony_equalizer_custom_1_band_1000"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_1000" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_1_band_2500"
|
||||
android:key="pref_sony_equalizer_custom_1_band_2500"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_2500" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_1_band_6300"
|
||||
android:key="pref_sony_equalizer_custom_1_band_6300"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_6300" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_1_band_16000"
|
||||
android:key="pref_sony_equalizer_custom_1_band_16000"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_16000" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_speaker"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_1_clear_bass"
|
||||
android:key="pref_sony_equalizer_custom_1_clear_bass"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_clear_bass" />
|
||||
</PreferenceCategory>
|
||||
@ -157,105 +124,40 @@
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_2_band_400"
|
||||
android:key="pref_sony_equalizer_custom_2_band_400"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_400" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_2_band_1000"
|
||||
android:key="pref_sony_equalizer_custom_2_band_1000"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_1000" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_2_band_2500"
|
||||
android:key="pref_sony_equalizer_custom_2_band_2500"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_2500" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_2_band_6300"
|
||||
android:key="pref_sony_equalizer_custom_2_band_6300"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_6300" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_2_band_16000"
|
||||
android:key="pref_sony_equalizer_custom_2_band_16000"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_band_16000" />
|
||||
<SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:icon="@drawable/ic_speaker"
|
||||
android:key="pref_sony_wh1000xm3_equalizer_custom_2_clear_bass"
|
||||
android:key="pref_sony_equalizer_custom_2_clear_bass"
|
||||
android:max="20"
|
||||
android:title="@string/sony_equalizer_clear_bass" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_other"
|
||||
android:title="@string/pref_header_other">
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_warning"
|
||||
android:key="pref_sony_wh1000xm3_warning_position_surround"
|
||||
android:summary="@string/sony_surround_position_mutually_exclusive" />
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_warning"
|
||||
android:key="pref_sony_wh1000xm3_warning_sbc_codec_2"
|
||||
android:summary="@string/sony_warn_sbc_codec" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_wh1000xm3_sound_position_names"
|
||||
android:entryValues="@array/sony_wh1000xm3_sound_position_values"
|
||||
android:icon="@drawable/ic_switch_left"
|
||||
android:key="pref_sony_wh1000xm3_sound_position"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_sound_position" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_wh1000xm3_surround_mode_names"
|
||||
android:entryValues="@array/sony_wh1000xm3_surround_mode_values"
|
||||
android:icon="@drawable/ic_surround"
|
||||
android:key="pref_sony_wh1000xm3_surround_mode"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_surround_mode" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_extension"
|
||||
android:key="pref_sony_wh1000xm3_dsee_hx"
|
||||
android:title="@string/sony_dsee_hx" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_other"
|
||||
android:title="@string/pref_header_system">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_touch"
|
||||
android:key="pref_sony_wh1000xm3_touch_sensor"
|
||||
android:title="@string/sony_touch_sensor" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_wh1000xm3_automatic_power_off_names"
|
||||
android:entryValues="@array/sony_wh1000xm3_automatic_power_off_values"
|
||||
android:icon="@drawable/ic_power_settings_new"
|
||||
android:key="pref_sony_wh1000xm3_automatic_power_off"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_automatic_power_off" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_notifications"
|
||||
android:key="pref_sony_wh1000xm3_notification_voice_guide"
|
||||
android:title="@string/sony_notification_voice_guide" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_other"
|
||||
android:title="@string/pref_header_other">
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_warning"
|
||||
android:key="pref_sony_warning_position_surround"
|
||||
android:summary="@string/sony_surround_position_mutually_exclusive" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_sound_position_names"
|
||||
android:entryValues="@array/sony_sound_position_values"
|
||||
android:icon="@drawable/ic_switch_left"
|
||||
android:key="pref_sony_sound_position"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_sound_position" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_surround_mode_names"
|
||||
android:entryValues="@array/sony_surround_mode_values"
|
||||
android:icon="@drawable/ic_surround"
|
||||
android:key="pref_sony_surround_mode"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_surround_mode" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_extension"
|
||||
android:key="pref_sony_dsee_hx"
|
||||
android:title="@string/sony_dsee_hx" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Preference
|
||||
android:icon="@drawable/ic_warning"
|
||||
android:key="pref_sony_warning_sbc_codec_1"
|
||||
android:summary="@string/sony_warn_sbc_codec" />
|
||||
</androidx.preference.PreferenceScreen>
|
28
app/src/main/res/xml/devicesettings_sony_wh_1000xm3.xml
Normal file
28
app/src/main/res/xml/devicesettings_sony_wh_1000xm3.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_other"
|
||||
android:title="@string/pref_header_system">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_touch"
|
||||
android:key="pref_sony_touch_sensor"
|
||||
android:title="@string/sony_touch_sensor" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="off"
|
||||
android:entries="@array/sony_automatic_power_off_names"
|
||||
android:entryValues="@array/sony_automatic_power_off_values"
|
||||
android:icon="@drawable/ic_power_settings_new"
|
||||
android:key="pref_sony_automatic_power_off"
|
||||
android:summary="%s"
|
||||
android:title="@string/sony_automatic_power_off" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_notifications"
|
||||
android:key="pref_sony_notification_voice_guide"
|
||||
android:title="@string/sony_notification_voice_guide" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user