mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-12 02:45:49 +01:00
Zepp OS: Add config to keep screen on during workout
This commit is contained in:
parent
ac002f8db9
commit
00954dfa6d
@ -208,6 +208,7 @@ public class DeviceSettingsPreferenceConst {
|
||||
public static final String PREF_AUTOREMOVE_MESSAGE = "autoremove_message";
|
||||
public static final String PREF_AUTOREMOVE_NOTIFICATIONS = "autoremove_notifications";
|
||||
public static final String PREF_SCREEN_ON_ON_NOTIFICATIONS = "screen_on_on_notifications";
|
||||
public static final String PREF_WORKOUT_KEEP_SCREEN_ON = "workout_keep_screen_on";
|
||||
public static final String PREF_OPERATING_SOUNDS = "operating_sounds";
|
||||
public static final String PREF_KEY_VIBRATION = "key_vibration";
|
||||
public static final String PREF_FAKE_RING_DURATION = "fake_ring_duration";
|
||||
|
@ -427,6 +427,7 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
|
||||
addPreferenceHandlerFor(PREF_AUTOREMOVE_MESSAGE);
|
||||
addPreferenceHandlerFor(PREF_AUTOREMOVE_NOTIFICATIONS);
|
||||
addPreferenceHandlerFor(PREF_SCREEN_ON_ON_NOTIFICATIONS);
|
||||
addPreferenceHandlerFor(PREF_WORKOUT_KEEP_SCREEN_ON);
|
||||
addPreferenceHandlerFor(PREF_KEY_VIBRATION);
|
||||
addPreferenceHandlerFor(PREF_OPERATING_SOUNDS);
|
||||
addPreferenceHandlerFor(PREF_FAKE_RING_DURATION);
|
||||
|
@ -222,6 +222,7 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
||||
settings.add(R.xml.devicesettings_workout_start_on_phone);
|
||||
settings.add(R.xml.devicesettings_workout_send_gps_to_band);
|
||||
}
|
||||
settings.add(R.xml.devicesettings_workout_keep_screen_on);
|
||||
settings.add(R.xml.devicesettings_workout_detection);
|
||||
|
||||
//
|
||||
|
@ -204,7 +204,8 @@ public class Huami2021SettingsCustomizer extends HuamiSettingsCustomizer {
|
||||
DeviceSettingsPreferenceConst.PREF_HEADER_GPS,
|
||||
DeviceSettingsPreferenceConst.PREF_WORKOUT_START_ON_PHONE,
|
||||
DeviceSettingsPreferenceConst.PREF_WORKOUT_SEND_GPS_TO_BAND,
|
||||
DeviceSettingsPreferenceConst.PREF_HEADER_WORKOUT_DETECTION
|
||||
DeviceSettingsPreferenceConst.PREF_HEADER_WORKOUT_DETECTION,
|
||||
DeviceSettingsPreferenceConst.PREF_WORKOUT_KEEP_SCREEN_ON
|
||||
));
|
||||
hidePrefIfNoneVisible(handler, DeviceSettingsPreferenceConst.PREF_HEADER_AGPS, Arrays.asList(
|
||||
DeviceSettingsPreferenceConst.PREF_AGPS_EXPIRY_REMINDER_ENABLED,
|
||||
|
@ -298,6 +298,7 @@ public class ZeppOsConfigService extends AbstractZeppOsService {
|
||||
LIFT_WRIST_SCHEDULED_END(ConfigGroup.DISPLAY, ConfigType.DATETIME_HH_MM, 0x0a, PREF_DISPLAY_ON_LIFT_END),
|
||||
LIFT_WRIST_RESPONSE_SENSITIVITY(ConfigGroup.DISPLAY, ConfigType.BYTE, 0x0b, PREF_DISPLAY_ON_LIFT_SENSITIVITY),
|
||||
SCREEN_ON_ON_NOTIFICATIONS(ConfigGroup.DISPLAY, ConfigType.BOOL, 0x0c, PREF_SCREEN_ON_ON_NOTIFICATIONS),
|
||||
WORKOUT_KEEP_SCREEN_ON(ConfigGroup.DISPLAY, ConfigType.BOOL, 0x0d, PREF_WORKOUT_KEEP_SCREEN_ON),
|
||||
ALWAYS_ON_DISPLAY_FOLLOW_WATCHFACE(ConfigGroup.DISPLAY, ConfigType.BOOL, 0x0e, PREF_ALWAYS_ON_DISPLAY_FOLLOW_WATCHFACE),
|
||||
ALWAYS_ON_DISPLAY_STYLE(ConfigGroup.DISPLAY, ConfigType.STRING_LIST, 0x0f, PREF_ALWAYS_ON_DISPLAY_STYLE),
|
||||
|
||||
|
@ -469,6 +469,8 @@
|
||||
<string name="pref_workout_start_on_phone_summary">Start/stop fitness app tracking on phone when a GPS workout is started on the band</string>
|
||||
<string name="pref_workout_send_gps_title">Send GPS during workout</string>
|
||||
<string name="pref_workout_send_gps_summary">Send the current GPS location to the band during a workout</string>
|
||||
<string name="pref_workout_keep_screen_on_title">Keep screen on during a workout</string>
|
||||
<string name="pref_workout_keep_screen_on_summary">The screen will stay on during a workout, and brightness will be adjusted to continuously display real-time workout data</string>
|
||||
<string name="pref_workout_detection_title">Workout Detection</string>
|
||||
<string name="pref_workout_detection_summary">Detect workout automatically</string>
|
||||
<string name="pref_workout_detection_categories_title">Workout Categories</string>
|
||||
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_always_on_display"
|
||||
android:key="workout_keep_screen_on"
|
||||
android:summary="@string/pref_workout_keep_screen_on_summary"
|
||||
android:title="@string/pref_workout_keep_screen_on_title" />
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user