Compare commits

...

2 Commits

Author SHA1 Message Date
ahormann 5fa9fffb44 Soundcore: Fixed Values 2024-05-07 12:02:06 +02:00
ahormann 4db8e2e72e Soundcore: Finetuning UI 2024-05-07 11:38:18 +02:00
6 changed files with 11 additions and 20 deletions

View File

@ -69,6 +69,7 @@ public class SoundcoreLiberty3ProCoordinator extends AbstractDeviceCoordinator {
public DeviceSpecificSettings getDeviceSpecificSettings(final GBDevice device) {
final DeviceSpecificSettings deviceSpecificSettings = new DeviceSpecificSettings();
deviceSpecificSettings.addRootScreen(DeviceSpecificSettingsScreen.TOUCH_OPTIONS);
deviceSpecificSettings.addSubScreen(DeviceSpecificSettingsScreen.TOUCH_OPTIONS, R.xml.devicesettings_sony_headphones_ambient_sound_control_button_modes);
deviceSpecificSettings.addSubScreen(DeviceSpecificSettingsScreen.TOUCH_OPTIONS, R.xml.devicesettings_soundcore_touch_options);
deviceSpecificSettings.addRootScreen(R.xml.devicesettings_soundcore_headphones);
return deviceSpecificSettings;

View File

@ -86,7 +86,6 @@ public class SoundcoreLibertyProtocol extends GBDeviceProtocol {
} else if (Arrays.equals(command, new byte[]{0x06, 0x01})) { //Sound Mode Update
decodeAudioMode(data);
} else if (Arrays.equals(command, new byte[]{0x01, 0x03})) { // Battery Update
// unsure which battery is left and which is right
int batteryLeft = data[1] * 20;
int batteryRight = data[2] * 20;
int batteryCase = data[3] * 20;

View File

@ -1,9 +1,9 @@
package nodomain.freeyourgadget.gadgetbridge.service.devices.soundcore;
enum TapFunction {
VOLUMEDOWN(1),
VOLUMEUP(0),
NEXT( 3),
PREVIOUS(2),
VOLUME_DOWN(1),
VOLUME_UP(0),
MEDIA_NEXT( 3),
MEDIA_PREV(2),
PLAYPAUSE(6),
VOICE_ASSISTANT(5),
AMBIENT_SOUND_CONTROL(4)

View File

@ -3452,11 +3452,11 @@
</string-array>
<string-array name="soundcore_button_function_values">
<item>@string/pref_media_volumedown_value</item>
<item>@string/pref_media_volumeup_value</item>
<item>@string/pref_media_next_value</item>
<item>@string/pref_media_previous_value</item>
<item>@string/pref_media_playpause_value</item>
<item>VOLUME_DOWN</item>
<item>VOLUME_UP</item>
<item>MEDIA_NEXT</item>
<item>MEDIA_PREV</item>
<item>PLAYPAUSE</item>
<item>VOICE_ASSISTANT</item>
<item>AMBIENT_SOUND_CONTROL</item>
</string-array>

View File

@ -29,7 +29,7 @@
android:icon="@drawable/ic_hearing"
android:key="pref_sony_ambient_sound_level"
android:max="2"
android:title="@string/sony_ambient_sound_level" />
android:title="@string/prefs_active_noise_cancelling_level" />
<SwitchPreferenceCompat

View File

@ -1,14 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:defaultValue="nc_as_off"
android:entries="@array/sony_ambient_sound_control_button_mode_names"
android:entryValues="@array/sony_ambient_sound_control_button_mode_values"
android:icon="@drawable/ic_touch"
android:key="pref_sony_ambient_sound_control_button_mode"
android:summary="%s"
android:title="@string/sony_ambient_sound_control_button_modes" />
<PreferenceCategory android:title="@string/single_tap">
<SwitchPreferenceCompat
android:defaultValue="false"