mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
Galaxy Buds2 Pro support (this time proper) (#3049)
Mostly copied from the Buds Pro as those earbuds have a similar feature set and mostly the same protocol. Working: - Pairing - Earbud and case battery level - Finding lost device - Settings: - Noise control: - ANC/ambient/off - With one earbud - Voice detect and timeouts - Ambient sound during calls - Touch options: - Touch lock - Switch noise control, voice assistant, Spotify and volume actions - Double tap edge - Equalizer - Sound balance - Seamless earbud connection Can be improved: - ~~ANC level and ambient sound volume do nothing, and don't seem to be supported on this model as there is no toggle for either in the official app.~~ (fixed:26a9d274ae
) - Ambient sound customization has more options than on previous models, but I can't implement it properly as I can't really hear any difference between the options (my buds might be the issue though). - ~~The touch lock toggle is once again inverted, like on the [Buds2](d2c4990c48
)~~ (fixed:21db5390c1
). Untested: - Settings: - In-ear detection for calls - Ambient sound customization - Game mode This PR also makes some visual changes to the settings of various Galaxy Buds models. I'd also like to be added to the wiki's allow list. I want to add the Buds2 and Buds2 Pro to the list of supported devices. --- And sorry for creating this many pull requests. This is mostly due to Codeberg breaking the reference to the branch. Co-authored-by: Narek <narek.email@gmail.com> Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3049 Reviewed-by: José Rebelo <joserebelo@noreply.codeberg.org> Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org> Co-authored-by: narektor <narektor@noreply.codeberg.org> Co-committed-by: narektor <narektor@noreply.codeberg.org>
This commit is contained in:
parent
0101202a0a
commit
84e452bd6b
@ -60,6 +60,8 @@ vendor's servers.
|
||||
- [Galaxy Buds](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Galaxy-Buds#user-content-galaxy-buds)
|
||||
- [Galaxy Buds Live](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Galaxy-Buds#user-content-galaxy-buds-live)
|
||||
- [Galaxy Buds Pro](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Galaxy-Buds#galaxy-buds-pro)
|
||||
- [Galaxy Buds2](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Galaxy-Buds#galaxy-buds2)
|
||||
- [Galaxy Buds2 Pro](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Galaxy-Buds#galaxy-buds2-pro)
|
||||
|
||||
- [HPlus Devices (e.g. ZeBand)](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/HPlus)
|
||||
- ID115
|
||||
|
@ -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 GalaxyBuds2ProDeviceCoordinator extends GalaxyBudsGenericCoordinator {
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
|
||||
|
||||
String name = candidate.getName();
|
||||
|
||||
if (name != null && (
|
||||
name.startsWith("Galaxy Buds2 Pro")
|
||||
)) {
|
||||
return DeviceType.GALAXY_BUDS2_PRO;
|
||||
}
|
||||
return DeviceType.UNKNOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(final GBDevice device) {
|
||||
return new GalaxyBudsSettingsCustomizer(device);
|
||||
}
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.GALAXY_BUDS2_PRO;
|
||||
}
|
||||
|
||||
@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_pro,
|
||||
};
|
||||
}
|
||||
}
|
@ -77,19 +77,21 @@ public class GalaxyBudsSettingsCustomizer implements DeviceSpecificSettingsCusto
|
||||
|
||||
if (pref_galaxy_buds_pro_noise_control != null) {
|
||||
|
||||
switch (pref_galaxy_buds_pro_noise_control_value) {
|
||||
case "0":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "1":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(true);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "2":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(true);
|
||||
break;
|
||||
if (pref_galaxy_buds_pro_anc_level != null && pref_galaxy_buds_ambient_volume != null) {
|
||||
switch (pref_galaxy_buds_pro_noise_control_value) {
|
||||
case "0":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "1":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(true);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "2":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pref_galaxy_buds_pro_noise_control.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@ -98,16 +100,22 @@ public class GalaxyBudsSettingsCustomizer implements DeviceSpecificSettingsCusto
|
||||
handler.notifyPreferenceChanged(PREF_GALAXY_BUDS_PRO_NOISE_CONTROL);
|
||||
switch (newVal.toString()) {
|
||||
case "0":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
if (pref_galaxy_buds_pro_anc_level != null)
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
if (pref_galaxy_buds_ambient_volume != null)
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "1":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(true);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
if (pref_galaxy_buds_pro_anc_level != null)
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(true);
|
||||
if (pref_galaxy_buds_ambient_volume != null)
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(false);
|
||||
break;
|
||||
case "2":
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(true);
|
||||
if (pref_galaxy_buds_pro_anc_level != null)
|
||||
pref_galaxy_buds_pro_anc_level.setEnabled(false);
|
||||
if (pref_galaxy_buds_ambient_volume != null)
|
||||
pref_galaxy_buds_ambient_volume.setEnabled(true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,7 @@ public enum DeviceType {
|
||||
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),
|
||||
GALAXY_BUDS2_PRO(422, R.drawable.ic_device_galaxy_buds_pro, R.drawable.ic_device_galaxy_buds_pro_disabled, R.string.devicetype_galaxybuds_2_pro),
|
||||
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),
|
||||
|
@ -333,6 +333,7 @@ public class DeviceSupportFactory {
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport());
|
||||
case GALAXY_BUDS_PRO:
|
||||
case GALAXY_BUDS2:
|
||||
case GALAXY_BUDS2_PRO:
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport(), ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case SONY_WH_1000XM3:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
|
@ -31,13 +31,7 @@ public class GalaxyBudsIOThread extends BtClassicIoThread {
|
||||
if (gbDevice.getType().equals(DeviceType.GALAXY_BUDS)) {
|
||||
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_BUDS2)) {
|
||||
return galaxyBudsProtocol.UUID_GALAXY_BUDS_LIVE_DEVICE_CTRL;
|
||||
}
|
||||
return galaxyBudsProtocol.UUID_GALAXY_BUDS_DEVICE_CTRL;
|
||||
|
||||
return galaxyBudsProtocol.UUID_GALAXY_BUDS_LIVE_DEVICE_CTRL;
|
||||
}
|
||||
|
||||
public GalaxyBudsIOThread(GBDevice device, Context context, GalaxyBudsProtocol deviceProtocol,
|
||||
|
@ -520,9 +520,11 @@ 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_BUDS2)) {
|
||||
DeviceType type = device.getType();
|
||||
if (type.equals(DeviceType.GALAXY_BUDS_LIVE)
|
||||
|| type.equals(DeviceType.GALAXY_BUDS_PRO)
|
||||
|| type.equals(DeviceType.GALAXY_BUDS2)
|
||||
|| type.equals(DeviceType.GALAXY_BUDS2_PRO)) {
|
||||
StartOfMessage = SOM_BUDS_PLUS;
|
||||
EndOfMessage = EOM_BUDS_PLUS;
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.flipper.zero.FlipperZeroCoor
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsLiveDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBudsProDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds.GalaxyBuds2ProDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.EXRIZUK8Coordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.HPlusCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.MakibesF68Coordinator;
|
||||
@ -350,6 +351,7 @@ public class DeviceHelper {
|
||||
result.add(new GalaxyBudsLiveDeviceCoordinator());
|
||||
result.add(new GalaxyBudsProDeviceCoordinator());
|
||||
result.add(new GalaxyBuds2DeviceCoordinator());
|
||||
result.add(new GalaxyBuds2ProDeviceCoordinator());
|
||||
result.add(new VescCoordinator());
|
||||
result.add(new SonyLinkBudsSCoordinator());
|
||||
result.add(new SonyWH1000XM3Coordinator());
|
||||
|
@ -1730,6 +1730,8 @@
|
||||
<string name="devicetype_galaxybuds">Galaxy Buds</string>
|
||||
<string name="devicetype_galaxybuds_live">Galaxy Buds Live</string>
|
||||
<string name="devicetype_galaxybuds_pro">Galaxy Buds Pro</string>
|
||||
<string name="devicetype_galaxybuds_2">Galaxy Buds2</string>
|
||||
<string name="devicetype_galaxybuds_2_pro">Galaxy Buds2 Pro</string>
|
||||
<string name="nothing_prefs_inear_summary">Play/pause the music depending if you wear the earbuds</string>
|
||||
<string name="nothing_prefs_inear_title">In-Ear detection</string>
|
||||
<string name="prefs_in_ear_detection_summary">Play calls through your earbuds when they are in your ears</string>
|
||||
@ -1748,6 +1750,7 @@
|
||||
<string name="prefs_game_mode">Game mode</string>
|
||||
<string name="prefs_game_mode_summary">Only if your phone supports game mode</string>
|
||||
<string name="prefs_touch_lock">Touch Lock</string>
|
||||
<string name="prefs_touch_lock_buds2">Touch controls</string>
|
||||
<string name="prefs_touch_lock_summary">Disable touch events</string>
|
||||
<string name="prefs_galaxy_buds_experimental">Experimental</string>
|
||||
<string name="prefs_seamless_connection_switch_title">Seamless connection switch</string>
|
||||
@ -1987,8 +1990,6 @@
|
||||
<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>
|
||||
|
@ -28,6 +28,60 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_hearing"
|
||||
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_phone"
|
||||
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:title="@string/prefs_customize_ambient_sound_summary" />
|
||||
|
||||
<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>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/galaxy_buds_live_equalizer_modes"
|
||||
@ -147,59 +201,4 @@
|
||||
-->
|
||||
|
||||
</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>
|
||||
|
204
app/src/main/res/xml/devicesettings_galaxy_buds_2_pro.xml
Normal file
204
app/src/main/res/xml/devicesettings_galaxy_buds_2_pro.xml
Normal file
@ -0,0 +1,204 @@
|
||||
<?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">
|
||||
<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_pro_noise_control"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_noise_control" />
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="prefs_accessibility"
|
||||
android:persistent="false"
|
||||
android:title="@string/prefs_ambient_settings_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/prefs_voice_detect">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_voice"
|
||||
android:key="pref_galaxy_buds_pro_voice_detect"
|
||||
android:summary="@string/prefs_voice_detect_summary"
|
||||
android:title="@string/prefs_voice_detect" />
|
||||
<ListPreference
|
||||
android:defaultValue="5"
|
||||
android:dependency="pref_galaxy_buds_pro_voice_detect"
|
||||
android:entries="@array/galaxy_pro_voice_detect_duration_options"
|
||||
android:entryValues="@array/galaxy_pro_voice_detect_duration_values"
|
||||
android:icon="@drawable/ic_timer"
|
||||
android:key="pref_galaxy_buds_pro_voice_detect_duration"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_voice_detect_duration" />
|
||||
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/prefs_ambient_sound">
|
||||
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_phone"
|
||||
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:title="@string/prefs_customize_ambient_sound_summary" />
|
||||
|
||||
<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="4"
|
||||
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="4"
|
||||
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>
|
||||
<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>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
@ -38,6 +38,80 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_hearing"
|
||||
android:key="prefs_accessibility"
|
||||
android:persistent="false"
|
||||
android:title="@string/prefs_ambient_settings_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/prefs_voice_detect">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_voice"
|
||||
android:key="pref_galaxy_buds_pro_voice_detect"
|
||||
android:summary="@string/prefs_voice_detect_summary"
|
||||
android:title="@string/prefs_voice_detect" />
|
||||
<ListPreference
|
||||
android:defaultValue="5"
|
||||
android:dependency="pref_galaxy_buds_pro_voice_detect"
|
||||
android:entries="@array/galaxy_pro_voice_detect_duration_options"
|
||||
android:entryValues="@array/galaxy_pro_voice_detect_duration_values"
|
||||
android:icon="@drawable/ic_timer"
|
||||
android:key="pref_galaxy_buds_pro_voice_detect_duration"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_voice_detect_duration" />
|
||||
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/prefs_ambient_sound">
|
||||
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_phone"
|
||||
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:title="@string/prefs_customize_ambient_sound_summary" />
|
||||
|
||||
<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="4"
|
||||
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="4"
|
||||
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>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/galaxy_buds_live_equalizer_modes"
|
||||
@ -161,79 +235,4 @@
|
||||
-->
|
||||
|
||||
</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_voice_detect">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_voice"
|
||||
android:key="pref_galaxy_buds_pro_voice_detect"
|
||||
android:summary="@string/prefs_voice_detect_summary"
|
||||
android:title="@string/prefs_voice_detect" />
|
||||
<ListPreference
|
||||
android:defaultValue="5"
|
||||
android:dependency="pref_galaxy_buds_pro_voice_detect"
|
||||
android:entries="@array/galaxy_pro_voice_detect_duration_options"
|
||||
android:entryValues="@array/galaxy_pro_voice_detect_duration_values"
|
||||
android:icon="@drawable/ic_timer"
|
||||
android:key="pref_galaxy_buds_pro_voice_detect_duration"
|
||||
android:summary="%s"
|
||||
android:title="@string/prefs_voice_detect_duration" />
|
||||
|
||||
</PreferenceCategory>
|
||||
<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="4"
|
||||
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="4"
|
||||
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