From 588bcffaabecc5c544c3d183cd60f26ba2368b6b Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Thu, 7 Oct 2021 14:52:21 +0200 Subject: [PATCH] Mi Band 3/4: Use language list from coordinator, remove array --- .../amazfitbipu/AmazfitBipUCoordinator.java | 6 +-- .../huami/miband3/MiBand3Coordinator.java | 26 +++++++++++ .../huami/miband4/MiBand4Coordinator.java | 26 +++++++++++ app/src/main/res/values/arrays.xml | 46 ------------------- .../main/res/xml/devicesettings_miband3.xml | 8 ---- 5 files changed, 55 insertions(+), 57 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java index 97ea091ff..e9b9acf4b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java @@ -109,8 +109,6 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator { public String[] getSupportedLanguageSettings(GBDevice device) { return new String[]{ "auto", - "zh_CH", - "zh_TW", "cs_CZ", "de_DE", "el_GR", @@ -126,9 +124,11 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator { "pt_BR", "ru_RU", "th_TH", + "tr_TR", "uk_UA", "vi_VN", - "tr_TR", + "zh_CH", + "zh_TW", }; } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java index 2f2c73467..763b5a747 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java @@ -117,4 +117,30 @@ public class MiBand3Coordinator extends HuamiCoordinator { R.xml.devicesettings_pairingkey }; } + + @Override + public String[] getSupportedLanguageSettings(GBDevice device) { + return new String[]{ + "auto", + "ar_SA", + "de_DE", + "en_US", + "es_ES", + "fr_FR", + "id_ID", + "it_IT", + "ja_JP", + "ko_KO", + "pt_PT", + "nl_NL", + "pl_PL", + "ru_RU", + "th_TH", + "tr_TR", + "uk_UA", + "vi_VN", + "zh_CN", + "zh_TW", + }; + } } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java index 1420bc906..ad5dab24a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java @@ -105,6 +105,32 @@ public class MiBand4Coordinator extends HuamiCoordinator { }; } + @Override + public String[] getSupportedLanguageSettings(GBDevice device) { + return new String[]{ + "auto", + "ar_SA", + "de_DE", + "el_GR", + "en_US", + "es_ES", + "fr_FR", + "id_ID", + "it_IT", + "ja_JP", + "ko_KO", + "pt_PT", + "pl_PL", + "ru_RU", + "th_TH", + "tr_TR", + "uk_UA", + "vi_VN", + "zh_CN", + "zh_TW", + }; + } + @Override public int getBondingStyle() { return BONDING_STYLE_REQUIRE_KEY; diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 85c683784..a5fcae174 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -1364,52 +1364,6 @@ ru_RU - - @string/automatic - @string/simplified_chinese - @string/traditional_chinese - @string/english - @string/spanish - @string/german - @string/italian - @string/french - @string/portuguese - @string/dutch - @string/polish - @string/turkish - @string/russian - @string/ukrainian - @string/arabic - @string/indonesian - @string/thai - @string/vietnamese - @string/japanese - @string/korean - - - - auto - zh_CN - zh_TW - en_US - es_ES - de_DE - it_IT - fr_FR - pt_PT - nl_NL - pl_PL - tr_TR - ru_RU - uk_UA - ar_SA - id_ID - th_TH - vi_VN - ja_JP - ko_KO - - @string/automatic @string/simplified_chinese diff --git a/app/src/main/res/xml/devicesettings_miband3.xml b/app/src/main/res/xml/devicesettings_miband3.xml index 0412dfe13..150f5ef51 100644 --- a/app/src/main/res/xml/devicesettings_miband3.xml +++ b/app/src/main/res/xml/devicesettings_miband3.xml @@ -10,12 +10,4 @@ android:persistent="true" android:summary="@string/mi2_prefs_display_items_summary" android:title="@string/mi2_prefs_display_items" /> -