Huami: Migrate some settings to device specific settings

- Migrate language setting
- Migrate menu items setting
- Migrate lastsync timestamp from prefixed global shared prefercence

All settings should be automatically be converted (e.g. Amazfit Bip settings to all paired Amazfit Bip devices) and then deleted.

Cor Settings aleady completely vanished from the global settings menu.

When migration is done we will have a much cleaner settings menu. Will also remove confusion that some Cor settings have to be done in Bip settings.
This commit is contained in:
Andreas Shimokawa
2019-05-20 16:36:06 +02:00
parent 8f893d6f2b
commit 08e7d728c2
30 changed files with 407 additions and 362 deletions
-50
View File
@@ -288,40 +288,17 @@
android:key="mi2_dateformat"
android:title="@string/miband2_prefs_dateformat"
android:summary="%s" />
<MultiSelectListPreference
android:dialogTitle="@string/mi2_prefs_display_items"
android:defaultValue="@array/pref_mi2_display_items_default"
android:entries="@array/pref_mi2_display_items"
android:entryValues="@array/pref_mi2_display_items_values"
android:key="mi2_display_items"
android:summary="@string/mi2_prefs_display_items_summary"
android:title="@string/mi2_prefs_display_items"/>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_device_miband2"
android:title="@string/preferences_miband3_settings">
<ListPreference
android:defaultValue="auto"
android:entries="@array/pref_miband3_language"
android:entryValues="@array/pref_miband3_language_values"
android:key="miband3_language"
android:summary="%s"
android:title="@string/pref_title_language" />
<CheckBoxPreference
android:layout="@layout/preference_checkbox"
android:defaultValue="false"
android:key="mi3_band_screen_unlock"
android:summary="@string/mi3_prefs_band_screen_unlock_summary"
android:title="@string/mi3_prefs_band_screen_unlock" />
<MultiSelectListPreference
android:dialogTitle="@string/mi2_prefs_display_items"
android:defaultValue="@array/pref_miband3_display_items_default"
android:entries="@array/pref_miband3_display_items"
android:entryValues="@array/pref_miband3_display_items_values"
android:key="miband3_display_items"
android:summary="@string/mi2_prefs_display_items_summary"
android:title="@string/mi2_prefs_display_items"/>
<PreferenceScreen
android:persistent="false"
android:title="@string/mi3_prefs_night_mode"
@@ -353,21 +330,6 @@
<PreferenceScreen
android:icon="@drawable/ic_device_hplus"
android:title="@string/preferences_amazfitbip_settings">
<ListPreference
android:defaultValue="-1"
android:entries="@array/pref_amazfitbip_language"
android:entryValues="@array/pref_amazfitbip_language_values"
android:key="amazfitbip_language"
android:summary="%s"
android:title="@string/pref_title_language" />
<MultiSelectListPreference
android:dialogTitle="@string/mi2_prefs_display_items"
android:defaultValue="@array/pref_bip_display_items_default"
android:entries="@array/pref_bip_display_items"
android:entryValues="@array/pref_bip_display_items_values"
android:key="bip_display_items"
android:summary="@string/mi2_prefs_display_items_summary"
android:title="@string/mi2_prefs_display_items"/>
<PreferenceScreen
android:persistent="false"
android:title="@string/prefs_disconnect_notification">
@@ -396,18 +358,6 @@
</PreferenceScreen>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_device_miband"
android:title="@string/preferences_amazfitcor_settings">
<MultiSelectListPreference
android:dialogTitle="@string/mi2_prefs_display_items"
android:defaultValue="@array/pref_cor_display_items_default"
android:entries="@array/pref_cor_display_items"
android:entryValues="@array/pref_cor_display_items_values"
android:key="cor_display_items"
android:summary="@string/mi2_prefs_display_items_summary"
android:title="@string/mi2_prefs_display_items"/>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/ic_device_pebble"
android:key="pref_key_pebble"