mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-09 06:38:01 +02:00
Compare commits
2 Commits
164c5e52a4
...
2a47dc863a
Author | SHA1 | Date | |
---|---|---|---|
|
2a47dc863a | ||
|
2216b6b76a |
|
@ -233,6 +233,7 @@ public class DeviceSettingsPreferenceConst {
|
|||
public static final String PREF_GALAXY_BUDS_PRESSURE_RELIEF = "pref_galaxy_buds_live_pressure_relief";
|
||||
public static final String PREF_GALAXY_BUDS_AMBIENT_SOUND = "pref_galaxy_buds_ambient_sound";
|
||||
public static final String PREF_GALAXY_BUDS_PRO_NOISE_CONTROL="pref_galaxy_buds_pro_noise_control";
|
||||
public static final String PREF_GALAXY_BUDS_2_NOISE_CONTROL="pref_galaxy_buds_2_noise_control";
|
||||
public static final String PREF_GALAXY_PRO_DOUBLE_TAP_EDGE ="pref_galaxy_pro_double_tap_edge";
|
||||
public static final String PREF_GALAXY_BUDS_PRO_IN_EAR_DETECTION ="pref_galaxy_buds_pro_in_ear_detection";
|
||||
public static final String PREF_GALAXY_BUDS_PRO_VOICE_DETECT ="pref_galaxy_buds_pro_voice_detect";
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsCustomizer;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.BatteryConfig;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class GalaxyBuds2DeviceCoordinator extends GalaxyBudsGenericCoordinator {
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
|
||||
|
||||
String name = candidate.getName();
|
||||
|
||||
if (name != null && (
|
||||
name.startsWith("Galaxy Buds2 (")
|
||||
)) {
|
||||
return DeviceType.GALAXY_BUDS2;
|
||||
}
|
||||
return DeviceType.UNKNOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(final GBDevice device) {
|
||||
return new GalaxyBudsSettingsCustomizer(device);
|
||||
}
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.GALAXY_BUDS2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBatteryCount() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BatteryConfig[] getBatteryConfig() {
|
||||
BatteryConfig battery1 = new BatteryConfig(0, R.drawable.ic_buds_pro_case, R.string.battery_case);
|
||||
BatteryConfig battery2 = new BatteryConfig(1, R.drawable.ic_buds_pro_left, R.string.left_earbud);
|
||||
BatteryConfig battery3 = new BatteryConfig(2, R.drawable.ic_buds_pro_right, R.string.right_earbud);
|
||||
return new BatteryConfig[]{battery1, battery2, battery3};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
|
||||
return new int[]{
|
||||
R.xml.devicesettings_galaxy_buds_2,
|
||||
};
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.Dev
|
|||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_ANC_LEVEL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_BALANCE;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_NOISE_CONTROL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_2_NOISE_CONTROL;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_LEFT;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_LEFT_SWITCH;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_TOUCH_RIGHT;
|
||||
|
@ -69,6 +70,8 @@ public class GalaxyBudsSettingsCustomizer implements DeviceSpecificSettingsCusto
|
|||
|
||||
final Preference pref_galaxy_buds_pro_noise_control = handler.findPreference(PREF_GALAXY_BUDS_PRO_NOISE_CONTROL);
|
||||
String pref_galaxy_buds_pro_noise_control_value = prefs.getString(PREF_GALAXY_BUDS_PRO_NOISE_CONTROL, "0");
|
||||
final Preference pref_galaxy_buds_2_noise_control = handler.findPreference(PREF_GALAXY_BUDS_2_NOISE_CONTROL);
|
||||
String pref_galaxy_buds_2_noise_control_value = prefs.getString(PREF_GALAXY_BUDS_2_NOISE_CONTROL, "0");
|
||||
final Preference pref_galaxy_buds_pro_anc_level = handler.findPreference(PREF_GALAXY_BUDS_PRO_ANC_LEVEL);
|
||||
final Preference pref_galaxy_buds_ambient_volume = handler.findPreference(PREF_GALAXY_BUDS_AMBIENT_VOLUME);
|
||||
|
||||
|
@ -113,6 +116,36 @@ public class GalaxyBudsSettingsCustomizer implements DeviceSpecificSettingsCusto
|
|||
});
|
||||
}
|
||||
|
||||
if (pref_galaxy_buds_2_noise_control != null) {
|
||||
|
||||
switch (pref_galaxy_buds_2_noise_control_value) {
|
||||
case "0":
|
||||
case "1":
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "2":
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(true);
|
||||
break;
|
||||
}
|
||||
|
||||
pref_galaxy_buds_2_noise_control.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newVal) {
|
||||
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_2_NOISE_CONTROL);
|
||||
switch (newVal.toString()) {
|
||||
case "0":
|
||||
case "1":
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "2":
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(true);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
final Preference pref_galaxy_buds_touch_right = handler.findPreference(PREF_GALAXY_BUDS_TOUCH_RIGHT);
|
||||
String pref_galaxy_buds_touch_right_value = prefs.getString(PREF_GALAXY_BUDS_TOUCH_RIGHT, "1");
|
||||
|
|
|
@ -120,6 +120,7 @@ public class AmazfitBand5Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ public class AmazfitBipCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_buttonactions_with_longpress,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ public class AmazfitBipLiteCoordinator extends AmazfitBipCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_relax_firmware_checks,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ public class AmazfitBipSCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ public class AmazfitBipUProCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ public class AmazfitCorCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_bt_connected_advertisement,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ public class AmazfitCor2Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_bt_connected_advertisement,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ public class AmazfitGTRCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ public class AmazfitGTRLiteCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_expose_hr_thirdparty,
|
||||
R.xml.devicesettings_bt_connected_advertisement,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public class AmazfitGTR2Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public class AmazfitGTR2eCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ public class AmazfitGTSCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public class AmazfitGTS2Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ public class AmazfitGTS2MiniCoordinator extends AmazfitGTS2Coordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public class AmazfitGTS2eCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ public class AmazfitNeoCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ public class AmazfitTRexCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ public class AmazfitTRexProCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ public class AmazfitVergeLCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_bt_connected_advertisement,
|
||||
R.xml.devicesettings_buttonactions_with_longpress,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public class AmazfitXCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ public class MiBand2Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_reserve_alarms_calendar,
|
||||
R.xml.devicesettings_bt_connected_advertisement,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ public class MiBand2HRXCoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_inactivity_dnd,
|
||||
R.xml.devicesettings_rotatewrist_cycleinfo,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ public class MiBand3Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_bt_connected_advertisement,
|
||||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ public class MiBand4Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -129,6 +129,7 @@ public class MiBand5Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public class MiBand6Coordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_expose_hr_thirdparty,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ public class ZeppECoordinator extends HuamiCoordinator {
|
|||
R.xml.devicesettings_device_actions,
|
||||
R.xml.devicesettings_high_mtu,
|
||||
R.xml.devicesettings_overwrite_settings_on_connection,
|
||||
R.xml.devicesettings_huami2021_fetch_operation_time_unit,
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ public enum DeviceType {
|
|||
GALAXY_BUDS_PRO(418, R.drawable.ic_device_galaxy_buds_pro, R.drawable.ic_device_galaxy_buds_pro_disabled, R.string.devicetype_galaxybuds_pro),
|
||||
GALAXY_BUDS_LIVE(419, R.drawable.ic_device_galaxy_buds_live, R.drawable.ic_device_galaxy_buds_live_disabled, R.string.devicetype_galaxybuds_live),
|
||||
GALAXY_BUDS(420, R.drawable.ic_device_galaxy_buds, R.drawable.ic_device_galaxy_buds_disabled, R.string.devicetype_galaxybuds),
|
||||
GALAXY_BUDS2(421, R.drawable.ic_device_galaxy_buds_pro, R.drawable.ic_device_galaxy_buds_pro_disabled, R.string.devicetype_galaxybuds_2),
|
||||
SONY_WH_1000XM3(430, R.drawable.ic_device_sony_overhead, R.drawable.ic_device_sony_overhead_disabled, R.string.devicetype_sony_wh_1000xm3),
|
||||
SONY_WF_SP800N(431, R.drawable.ic_device_sony_wf_800n, R.drawable.ic_device_sony_wf_800n_disabled, R.string.devicetype_sony_wf_sp800n),
|
||||
SONY_WH_1000XM4(432, R.drawable.ic_device_sony_overhead, R.drawable.ic_device_sony_overhead_disabled, R.string.devicetype_sony_wh_1000xm4),
|
||||
|
|
|
@ -322,6 +322,7 @@ public class DeviceSupportFactory {
|
|||
case GALAXY_BUDS_LIVE:
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport());
|
||||
case GALAXY_BUDS_PRO:
|
||||
case GALAXY_BUDS2:
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport(), ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case SONY_WH_1000XM3:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
|
|
|
@ -32,7 +32,8 @@ public class GalaxyBudsIOThread extends BtClassicIoThread {
|
|||
return galaxyBudsProtocol.UUID_GALAXY_BUDS_DEVICE_CTRL;
|
||||
}
|
||||
if (gbDevice.getType().equals(DeviceType.GALAXY_BUDS_LIVE)
|
||||
|| gbDevice.getType().equals(DeviceType.GALAXY_BUDS_PRO)) {
|
||||
|| gbDevice.getType().equals(DeviceType.GALAXY_BUDS_PRO)
|
||||
|| gbDevice.getType().equals(DeviceType.GALAXY_BUDS2)) {
|
||||
return galaxyBudsProtocol.UUID_GALAXY_BUDS_LIVE_DEVICE_CTRL;
|
||||
}
|
||||
return galaxyBudsProtocol.UUID_GALAXY_BUDS_DEVICE_CTRL;
|
||||
|
|
|
@ -107,8 +107,8 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
|
|||
// "Use ambient sound during calls"
|
||||
|
||||
private static final byte set_noise_controls_with_one_earbud = (byte) 0x6f; //0x0/0x1
|
||||
// "Noise controls with one earbud" in Accessibility menu. I'm not exactly sure what it means,
|
||||
// my guess is that it allows ANC even if only one earbuds is in-ear
|
||||
// "Noise controls with one earbud" in Accessibility menu.
|
||||
// It allows ANC and ambient sound even if only one earbud is in-ear.
|
||||
|
||||
private static final byte set_balance = (byte) 0x8f;
|
||||
// takes value in 0-32 range, it is used to change left/right balance
|
||||
|
@ -361,6 +361,10 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
|
|||
int noise_controls = Integer.parseInt(prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_NOISE_CONTROL, "0"));
|
||||
return encodeMessage(set_noise_controls, (byte) noise_controls);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_2_NOISE_CONTROL:
|
||||
int b2_noise_controls = Integer.parseInt(prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_2_NOISE_CONTROL, "0"));
|
||||
return encodeMessage(set_noise_controls, (byte) b2_noise_controls);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_ANC_LEVEL:
|
||||
int anc_level = Integer.parseInt(prefs.getString(DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_PRO_ANC_LEVEL, "0"));
|
||||
return encodeMessage(set_noise_reduction_level, (byte) anc_level);
|
||||
|
@ -380,7 +384,7 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
|
|||
return encodeMessage(set_ambient_mode, enable_ambient);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION:
|
||||
byte seamless_switch = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION, false) ? 0x01 : 0x00);
|
||||
byte seamless_switch = (byte) (prefs.getBoolean(DeviceSettingsPreferenceConst.PREFS_GALAXY_BUDS_SEAMLESS_CONNECTION, false) ? 0x00 : 0x01);
|
||||
return encodeMessage(set_seamless_connection, seamless_switch);
|
||||
|
||||
case DeviceSettingsPreferenceConst.PREF_GALAXY_BUDS_AMBIENT_VOICE_FOCUS:
|
||||
|
@ -517,7 +521,8 @@ public class GalaxyBudsProtocol extends GBDeviceProtocol {
|
|||
protected GalaxyBudsProtocol(GBDevice device) {
|
||||
super(device);
|
||||
if (device.getType().equals(DeviceType.GALAXY_BUDS_LIVE)
|
||||
|| device.getType().equals(DeviceType.GALAXY_BUDS_PRO)) {
|
||||
|| device.getType().equals(DeviceType.GALAXY_BUDS_PRO)
|
||||
|| device.getType().equals(DeviceType.GALAXY_BUDS2)) {
|
||||
StartOfMessage = SOM_BUDS_PLUS;
|
||||
EndOfMessage = EOM_BUDS_PLUS;
|
||||
}
|
||||
|
|
|
@ -910,18 +910,6 @@ public abstract class Huami2021Support extends HuamiSupport {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getTimeBytes(final Calendar calendar, final TimeUnit precision) {
|
||||
final byte[] bytes = BLETypeConversions.shortCalendarToRawBytes(calendar);
|
||||
|
||||
if (precision != TimeUnit.MINUTES && precision != TimeUnit.SECONDS) {
|
||||
throw new IllegalArgumentException("Unsupported precision, only MINUTES and SECONDS are supported");
|
||||
}
|
||||
final byte seconds = precision == TimeUnit.SECONDS ? fromUint8(calendar.get(Calendar.SECOND)) : 0;
|
||||
final byte tz = BLETypeConversions.mapTimeZone(calendar, BLETypeConversions.TZ_FLAG_INCLUDE_DST_IN_TZ);
|
||||
return BLETypeConversions.join(bytes, new byte[]{seconds, tz});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Huami2021Support setCurrentTimeWithService(TransactionBuilder builder) {
|
||||
// It seems that the format sent to the Current Time characteristic changed in newer devices
|
||||
|
@ -1398,15 +1386,6 @@ public abstract class Huami2021Support extends HuamiSupport {
|
|||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimeUnit getFetchOperationsTimeUnit() {
|
||||
// This is configurable because using seconds was causing issues on Amazfit GTR 3
|
||||
// However, using minutes can cause issues while fetching workouts shorter than 1 minute
|
||||
final Prefs devicePrefs = getDevicePrefs();
|
||||
final boolean truncate = devicePrefs.getBoolean("huami_truncate_fetch_operation_timestamps", true);
|
||||
return truncate ? TimeUnit.MINUTES : TimeUnit.SECONDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean force2021Protocol() {
|
||||
return true;
|
||||
|
|
|
@ -275,6 +275,7 @@ import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_
|
|||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_NAME;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_WEIGHT_KG;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_YEAR_OF_BIRTH;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions.fromUint8;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL;
|
||||
|
||||
public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements Huami2021Handler {
|
||||
|
@ -402,29 +403,15 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
|
|||
return weatherSpec.windSpeedAsBeaufort() + ""; // cast to string
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the given date/time (calendar) as a byte sequence, suitable for sending to the
|
||||
* Mi Band 2 (or derivative). The band appears to not handle DST offsets, so we simply add this
|
||||
* to the timezone.
|
||||
*
|
||||
* @param calendar
|
||||
* @param precision
|
||||
* @return
|
||||
*/
|
||||
public byte[] getTimeBytes(Calendar calendar, TimeUnit precision) {
|
||||
byte[] bytes;
|
||||
if (precision == TimeUnit.MINUTES) {
|
||||
bytes = BLETypeConversions.shortCalendarToRawBytes(calendar);
|
||||
} else if (precision == TimeUnit.SECONDS) {
|
||||
bytes = BLETypeConversions.calendarToRawBytes(calendar);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported precision, only MINUTES and SECONDS are supported till now");
|
||||
public byte[] getTimeBytes(final Calendar calendar, final TimeUnit precision) {
|
||||
final byte[] bytes = BLETypeConversions.shortCalendarToRawBytes(calendar);
|
||||
|
||||
if (precision != TimeUnit.MINUTES && precision != TimeUnit.SECONDS) {
|
||||
throw new IllegalArgumentException("Unsupported precision, only MINUTES and SECONDS are supported");
|
||||
}
|
||||
byte[] tail = new byte[] { 0, BLETypeConversions.mapTimeZone(calendar, BLETypeConversions.TZ_FLAG_INCLUDE_DST_IN_TZ) };
|
||||
// 0 = adjust reason bitflags? or DST offset?? , timezone
|
||||
// byte[] tail = new byte[] { 0x2 }; // reason
|
||||
byte[] all = BLETypeConversions.join(bytes, tail);
|
||||
return all;
|
||||
final byte seconds = precision == TimeUnit.SECONDS ? fromUint8(calendar.get(Calendar.SECOND)) : 0;
|
||||
final byte tz = BLETypeConversions.mapTimeZone(calendar, BLETypeConversions.TZ_FLAG_INCLUDE_DST_IN_TZ);
|
||||
return BLETypeConversions.join(bytes, new byte[]{seconds, tz});
|
||||
}
|
||||
|
||||
public Calendar fromTimeBytes(byte[] bytes) {
|
||||
|
@ -434,7 +421,9 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
|
|||
|
||||
public HuamiSupport setCurrentTimeWithService(TransactionBuilder builder) {
|
||||
GregorianCalendar now = BLETypeConversions.createCalendar();
|
||||
byte[] bytes = getTimeBytes(now, TimeUnit.SECONDS);
|
||||
byte[] head = BLETypeConversions.calendarToRawBytes(now);
|
||||
byte[] tail = new byte[] { 0, BLETypeConversions.mapTimeZone(now, BLETypeConversions.TZ_FLAG_INCLUDE_DST_IN_TZ) };
|
||||
byte[] bytes = BLETypeConversions.join(head, tail);
|
||||
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_CURRENT_TIME), bytes);
|
||||
return this;
|
||||
}
|
||||
|
@ -4107,7 +4096,11 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
|
|||
}
|
||||
|
||||
public TimeUnit getFetchOperationsTimeUnit() {
|
||||
return TimeUnit.MINUTES;
|
||||
// This is configurable because using seconds was causing issues on Amazfit GTR 3
|
||||
// However, using minutes can cause issues while fetching workouts shorter than 1 minute
|
||||
final Prefs devicePrefs = getDevicePrefs();
|
||||
final boolean truncate = devicePrefs.getBoolean("huami_truncate_fetch_operation_timestamps", true);
|
||||
return truncate ? TimeUnit.MINUTES : TimeUnit.SECONDS;
|
||||
}
|
||||
|
||||
public boolean force2021Protocol() {
|
||||
|
|
|
@ -50,6 +50,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.banglejs.BangleJSCoordinator
|
|||
import nodomain.freeyourgadget.gadgetbridge.devices.casio.gb6900.CasioGB6900DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.casio.gbx100.CasioGBX100DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.domyos.DomyosT540Cooridnator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBuds2DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.flipper.zero.FlipperZeroCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsLiveDeviceCoordinator;
|
||||
|
@ -338,6 +339,7 @@ public class DeviceHelper {
|
|||
result.add(new GalaxyBudsDeviceCoordinator());
|
||||
result.add(new GalaxyBudsLiveDeviceCoordinator());
|
||||
result.add(new GalaxyBudsProDeviceCoordinator());
|
||||
result.add(new GalaxyBuds2DeviceCoordinator());
|
||||
result.add(new VescCoordinator());
|
||||
result.add(new SonyWH1000XM3Coordinator());
|
||||
result.add(new SonyWH1000XM4Coordinator());
|
||||
|
|
|
@ -2491,14 +2491,14 @@
|
|||
<item>@string/pref_switch_noise_control</item>
|
||||
<item>@string/pref_title_touch_voice_assistant</item>
|
||||
<item>@string/pref_media_volumedown</item>
|
||||
<item>@string/pref_title_touch_spotify</item>
|
||||
<item>@string/pref_title_touch_spotify_official_app</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="galaxy_pro_touch_options_right">
|
||||
<item>@string/pref_switch_noise_control</item>
|
||||
<item>@string/pref_title_touch_voice_assistant</item>
|
||||
<item>@string/pref_media_volumeup</item>
|
||||
<item>@string/pref_title_touch_spotify</item>
|
||||
<item>@string/pref_title_touch_spotify_official_app</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="galaxy_pro_touch_options_values">
|
||||
|
|
|
@ -1735,7 +1735,7 @@
|
|||
<string name="prefs_ambient_sound">Ambient Sound</string>
|
||||
<string name="prefs_customize_ambient_sound_summary">Customize Ambient Sound</string>
|
||||
<string name="prefs_ambient_sound_during_call_title">Ambient Sound during call</string>
|
||||
<string name="prefs_ambient_sound_during_call_summary">Hear own voice during call</string>
|
||||
<string name="prefs_ambient_sound_during_call_summary">Hear own voice clearly during calls</string>
|
||||
<string name="prefs_ambient_mode">Ambient Mode</string>
|
||||
<string name="prefs_ambient_settings_title">Ambient Sound Options</string>
|
||||
<string name="prefs_active_noise_cancelling">Active Noise Cancelling</string>
|
||||
|
@ -1760,6 +1760,8 @@
|
|||
<string name="pref_title_touch_volume">Volume</string>
|
||||
<string name="pref_title_touch_ambient">Ambient Sound</string>
|
||||
<string name="pref_title_touch_spotify">Spotify</string>
|
||||
<string name="pref_title_touch_spotify_official_app">Spotify (official app only)</string>
|
||||
<string name="pref_title_touch_spotify_galaxy_app">Spotify (Galaxy Wearable app only)</string>
|
||||
<string name="pref_switch_noise_control">Switch Noise Control</string>
|
||||
<string name="prefs_noise_control_with_one_earbud">Noise Control with one earbud</string>
|
||||
<string name="prefs_noise_control_with_one_earbud_summary">Allow noise control when using one earbud only</string>
|
||||
|
@ -1773,7 +1775,7 @@
|
|||
<string name="prefs_voice_detect">Voice detect</string>
|
||||
<string name="prefs_voice_detect_summary">Enable Ambient sound and lower playback automatically after voice has been detected</string>
|
||||
<string name="prefs_double_tap_edge">Double tap edge</string>
|
||||
<string name="prefs_double_tap_edge_summary">Detect double tap even when not taped on touch pad</string>
|
||||
<string name="prefs_double_tap_edge_summary">Detect double tap even when not tapped on touch pad</string>
|
||||
<string name="prefs_voice_detect_duration">End after quiet for:</string>
|
||||
<string name="pref_voice_detect_duration_5">5 seconds</string>
|
||||
<string name="pref_voice_detect_duration_10">10 seconds</string>
|
||||
|
@ -1816,7 +1818,7 @@
|
|||
<string name="sony_anc_optimizer_status_starting">Starting…</string>
|
||||
<string name="sony_anc_optimizer_status_not_running">Not Running</string>
|
||||
<string name="sony_anc_optimizer_status_wearing_condition">Measuring wearing condition…</string>
|
||||
<string name="sony_anc_optimizer_status_atmospheric_pressure">Measuring atmostpheric pressure…</string>
|
||||
<string name="sony_anc_optimizer_status_atmospheric_pressure">Measuring atmospheric pressure…</string>
|
||||
<string name="sony_anc_optimizer_status_analyzing">Analyzing…</string>
|
||||
<string name="sony_anc_optimizer_status_finished">Finishing…</string>
|
||||
<string name="sony_equalizer_preset_off">Off</string>
|
||||
|
@ -1962,6 +1964,8 @@
|
|||
<string name="step_streaks_achievements_sharing_title">Steps Achievements</string>
|
||||
<string name="prefs_hourly_chime">Hourly chime</string>
|
||||
<string name="prefs_hourly_chime_summary">The watch will beep once an hour</string>
|
||||
<string name="devicetype_galaxybuds_2">Galaxy Buds2</string>
|
||||
<string name="prefs_touch_lock_buds2">Touch controls</string>
|
||||
<string name="devicetype_flipper_zero">Flipper zero</string>
|
||||
<string name="activity_prefs_allow_bluetooth_intent_api">Bluetooth Intent API</string>
|
||||
<string name="activity_prefs_summary_allow_bluetooth_intent_api">Allow controlling Bluetooth connection via Intent API</string>
|
||||
|
|
205
app/src/main/res/xml/devicesettings_galaxy_buds_2.xml
Normal file
205
app/src/main/res/xml/devicesettings_galaxy_buds_2.xml
Normal file
|
@ -0,0 +1,205 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_surround"
|
||||
android:key="pref_galaxy_buds_pro_noise_control_preference"
|
||||
android:persistent="false"
|
||||
android:title="@string/prefs_noise_control">
|
||||
<PreferenceCategory android:title="@string/prefs_noise_control">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/galaxy_pro_noise_controls_options"
|
||||
android:entryValues="@array/galaxy_pro_noise_controls_options_values"
|
||||
android:icon="@drawable/ic_surround"
|
||||
android:key="pref_galaxy_buds_2_noise_control"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_noise_control" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:icon="@drawable/ic_volume_up"
|
||||
android:key="pref_galaxy_buds_ambient_volume"
|
||||
android:max="2"
|
||||
android:min="0"
|
||||
android:title="@string/prefs_ambient_volume"
|
||||
app:showSeekBarValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/galaxy_buds_live_equalizer_modes"
|
||||
android:entryValues="@array/galaxy_buds_live_equalizer_values"
|
||||
android:icon="@drawable/ic_equalizer"
|
||||
android:key="pref_galaxy_buds_equalizer_mode"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_equalizer_preset" />
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_touch"
|
||||
android:key="prefs_galaxy_touch_options"
|
||||
android:persistent="false"
|
||||
android:title="@string/prefs_galaxy_touch_options">
|
||||
<PreferenceCategory android:title="@string/prefs_galaxy_touch_options">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_touch"
|
||||
android:key="pref_galaxy_buds_lock_touch"
|
||||
android:title="@string/prefs_touch_lock_buds2" />
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:dependency="pref_galaxy_buds_lock_touch"
|
||||
android:entries="@array/galaxy_pro_touch_options_left"
|
||||
android:entryValues="@array/galaxy_pro_touch_options_values"
|
||||
android:icon="@drawable/ic_switch_left"
|
||||
android:key="pref_galaxy_buds_touch_left"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_left" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:dependency="pref_galaxy_buds_lock_touch"
|
||||
android:entries="@array/galaxy_pro_touch_switch_controls_options"
|
||||
android:entryValues="@array/galaxy_pro_touch_switch_controls_values"
|
||||
android:key="pref_galaxy_buds_touch_left_switch"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_switch_control_left" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:dependency="pref_galaxy_buds_lock_touch"
|
||||
android:entries="@array/galaxy_pro_touch_options_right"
|
||||
android:entryValues="@array/galaxy_pro_touch_options_values"
|
||||
android:icon="@drawable/ic_switch_right"
|
||||
android:key="pref_galaxy_buds_touch_right"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_right" />
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:dependency="pref_galaxy_buds_lock_touch"
|
||||
android:entries="@array/galaxy_pro_touch_switch_controls_options"
|
||||
android:entryValues="@array/galaxy_pro_touch_switch_controls_values"
|
||||
android:key="pref_galaxy_buds_touch_right_switch"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_switch_control_right" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="pref_galaxy_buds_lock_touch"
|
||||
android:icon="@drawable/ic_touch"
|
||||
android:key="pref_galaxy_pro_double_tap_edge"
|
||||
android:summary="@string/prefs_double_tap_edge_summary"
|
||||
android:title="@string/prefs_double_tap_edge" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:key="prefs_settings"
|
||||
android:persistent="false"
|
||||
android:title="@string/title_activity_settings">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="pref_galaxy_buds_pro_in_ear_detection"
|
||||
android:summary="@string/prefs_in_ear_detection_summary"
|
||||
android:title="@string/nothing_prefs_inear_title" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_auto_awesome"
|
||||
android:key="prefs_galaxy_buds_seamless_connection"
|
||||
android:summary="@string/prefs_seamless_connection_switch_summary"
|
||||
android:title="@string/prefs_seamless_connection_switch_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="pref_galaxy_buds_noise_controls_with_one_earbud"
|
||||
android:summary="@string/prefs_noise_control_with_one_earbud_summary"
|
||||
android:title="@string/prefs_noise_control_with_one_earbud" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="50"
|
||||
android:icon="@drawable/ic_volume_up"
|
||||
android:key="pref_galaxy_buds_pro_balance"
|
||||
android:max="32"
|
||||
android:min="0"
|
||||
android:title="@string/pref_balance"
|
||||
app:defaultValue="16"
|
||||
app:showSeekBarValue="true" />
|
||||
|
||||
<PreferenceCategory android:title="@string/prefs_galaxy_buds_experimental">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_videogame"
|
||||
android:key="pref_galaxy_buds_game_mode"
|
||||
android:summary="@string/prefs_game_mode_summary"
|
||||
android:title="@string/prefs_game_mode" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- <SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_graphic_eq"
|
||||
android:key="pref_galaxy_buds_pro_read_notifications_outloud"
|
||||
android:title="@string/prefs_read_notification_outloud" />
|
||||
-->
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_settings_applications"
|
||||
android:key="prefs_accessibility"
|
||||
android:persistent="false"
|
||||
android:title="@string/prefs_ambient_settings_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/prefs_ambient_sound">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="pref_galaxy_buds_ambient_mode_during_call"
|
||||
android:summary="@string/prefs_ambient_sound_during_call_summary"
|
||||
android:title="@string/prefs_ambient_sound_during_call_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="pref_galaxy_buds_ambient_sound"
|
||||
android:summary="@string/prefs_customize_ambient_sound_summary"
|
||||
android:title="@string/prefs_ambient_sound" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="1"
|
||||
android:dependency="pref_galaxy_buds_ambient_sound"
|
||||
android:icon="@drawable/ic_volume_up"
|
||||
android:key="pref_galaxy_buds_pro_ambient_volume_right"
|
||||
android:max="2"
|
||||
android:min="0"
|
||||
android:title="@string/prefs_ambient_volume_right"
|
||||
app:showSeekBarValue="false" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="1"
|
||||
android:dependency="pref_galaxy_buds_ambient_sound"
|
||||
android:icon="@drawable/ic_volume_up"
|
||||
android:key="pref_galaxy_buds_pro_ambient_volume_left"
|
||||
android:max="2"
|
||||
android:min="0"
|
||||
android:title="@string/prefs_ambient_volume_left"
|
||||
app:showSeekBarValue="false" />
|
||||
|
||||
<SeekBarPreference
|
||||
android:defaultValue="1"
|
||||
android:dependency="pref_galaxy_buds_ambient_sound"
|
||||
android:icon="@drawable/ic_surround"
|
||||
android:key="pref_galaxy_buds_pro_ambient_sound_tone"
|
||||
android:max="4"
|
||||
android:min="0"
|
||||
android:summary="@string/pref_ambient_sound_tone_summary"
|
||||
android:title="@string/pref_ambient_sound_tone"
|
||||
app:showSeekBarValue="false" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user