mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-24 08:10:52 +02:00
Galaxy Buds Live: Update device settings to new structure
This commit is contained in:
parent
cb13c7bc05
commit
8ce0983cb4
@ -22,6 +22,7 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
|
||||
public enum DeviceSpecificSettingsScreen {
|
||||
ACTIVITY_INFO("pref_screen_activity_info", R.xml.devicesettings_root_activity_info),
|
||||
AUDIO("pref_screen_audio", R.xml.devicesettings_root_audio),
|
||||
AUTHENTICATION("pref_screen_authentication", R.xml.devicesettings_root_authentication),
|
||||
CALENDAR("pref_screen_calendar", R.xml.devicesettings_root_calendar),
|
||||
CONNECTION("pref_screen_connection", R.xml.devicesettings_root_connection),
|
||||
|
@ -16,15 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.galaxy_buds;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettings;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsScreen;
|
||||
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 GalaxyBudsLiveDeviceCoordinator extends GalaxyBudsGenericCoordinator {
|
||||
@Override
|
||||
@ -45,15 +44,14 @@ public class GalaxyBudsLiveDeviceCoordinator extends GalaxyBudsGenericCoordinato
|
||||
return new BatteryConfig[]{battery1, battery2, battery3};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
|
||||
return new int[]{
|
||||
R.xml.devicesettings_galaxy_buds_live,
|
||||
};
|
||||
public DeviceSpecificSettings getDeviceSpecificSettings(final GBDevice device) {
|
||||
final DeviceSpecificSettings deviceSpecificSettings = new DeviceSpecificSettings();
|
||||
final List<Integer> audio = deviceSpecificSettings.addRootScreen(DeviceSpecificSettingsScreen.AUDIO);
|
||||
audio.add(R.xml.devicesettings_galaxy_buds_live);
|
||||
return deviceSpecificSettings;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getDeviceNameResource() {
|
||||
return R.string.devicetype_galaxybuds_live;
|
||||
|
@ -195,6 +195,7 @@
|
||||
<string name="pref_header_general">General settings</string>
|
||||
<string name="pref_header_other">Other</string>
|
||||
<string name="pref_header_system">System</string>
|
||||
<string name="pref_header_audio">Audio</string>
|
||||
<string name="pref_header_calendar">Calendar</string>
|
||||
<string name="pref_header_connection">Connection</string>
|
||||
<string name="pref_header_display">Display</string>
|
||||
|
9
app/src/main/res/xml/devicesettings_root_audio.xml
Normal file
9
app/src/main/res/xml/devicesettings_root_audio.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen
|
||||
android:icon="@drawable/ic_music_note"
|
||||
android:key="pref_screen_audio"
|
||||
android:persistent="false"
|
||||
android:title="@string/pref_header_audio">
|
||||
</PreferenceScreen>
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user