diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiSettingsCustomizer.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiSettingsCustomizer.java index 5e0f230ec..1bdc63591 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiSettingsCustomizer.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiSettingsCustomizer.java @@ -98,14 +98,7 @@ public class HuamiSettingsCustomizer implements DeviceSpecificSettingsCustomizer @Override public Set getPreferenceKeysWithSummary() { - final Set keysWithSummary = new HashSet<>(); - - for (HuamiVibrationPatternNotificationType notificationType : HuamiVibrationPatternNotificationType.values()) { - final String typeKey = notificationType.name().toLowerCase(Locale.ROOT); - keysWithSummary.add(HuamiConst.PREF_HUAMI_VIBRATION_COUNT_PREFIX + typeKey); - } - - return keysWithSummary; + return new HashSet<>(); } public static final Creator CREATOR = new Creator() { diff --git a/app/src/main/res/xml/devicesettings_vibrationpatterns.xml b/app/src/main/res/xml/devicesettings_vibrationpatterns.xml index 6e244f6a5..ec0acaa6d 100644 --- a/app/src/main/res/xml/devicesettings_vibrationpatterns.xml +++ b/app/src/main/res/xml/devicesettings_vibrationpatterns.xml @@ -1,5 +1,6 @@ - + + android:key="vibration_profile_key_app_alerts" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_generic"> @@ -23,27 +24,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_app_alerts" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_incoming_call" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_incoming_call"> @@ -53,27 +55,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_incoming_call" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_incoming_sms" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_sms"> @@ -83,27 +86,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_incoming_sms" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_goal_notification" + android:persistent="false" + android:title="@string/mi2_prefs_goal_notification"> @@ -113,27 +117,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_goal_notification" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_alarm" + android:persistent="false" + android:title="@string/vibration_profile_alarm_clock"> @@ -143,27 +148,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_alarm" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_idle_alerts" + android:persistent="false" + android:title="@string/pref_screen_notification_idle_alerts"> @@ -173,27 +179,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_idle_alerts" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_event_reminder" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_event_reminder"> @@ -203,27 +210,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_event_reminder" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_find_band" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_find_device"> @@ -233,27 +241,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_find_band" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_todo_list" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_todo_list"> @@ -263,27 +272,28 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_todo_list" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" /> + android:key="vibration_profile_key_schedule" + android:persistent="false" + android:title="@string/pref_screen_notification_profile_schedule"> @@ -293,20 +303,21 @@ android:entries="@array/vibration_profile" android:entryValues="@array/vibration_profile_values" android:key="huami_vibration_profile_schedule" - android:title="@string/miband_prefs_vibration" - android:summary="%s" /> + android:summary="%s" + android:title="@string/miband_prefs_vibration" /> + android:title="@string/pref_title_notifications_repetitions" + app:useSimpleSummaryProvider="true" /> + android:persistent="false" + android:title="@string/vibration_try" />