From 6f6db01bcecf7b6689b221d105d767aaf35c78f2 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Wed, 24 Mar 2021 10:49:46 +0100 Subject: [PATCH] Fix list exception (regression from previous Neo commit) --- .../gadgetbridge/service/devices/huami/HuamiSupport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java index 03c0d8786..6257ebeeb 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java @@ -2445,7 +2445,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport { protected HuamiSupport setDisplayItemsNew(TransactionBuilder builder, boolean isShortcuts, boolean forceWatchface, int defaultSettings) { SharedPreferences prefs = GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()); String pages; - List enabledList; + ArrayList enabledList; byte menuType; if (isShortcuts) { menuType = (byte) 0xfd; @@ -2457,9 +2457,9 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport { LOG.info("Setting menu items"); } if (pages == null) { - enabledList = Arrays.asList(getContext().getResources().getStringArray(defaultSettings)); + enabledList = new ArrayList<>(Arrays.asList(getContext().getResources().getStringArray(defaultSettings))); } else { - enabledList = Arrays.asList(pages.split(",")); + enabledList = new ArrayList<>(Arrays.asList(pages.split(","))); } if (forceWatchface) { enabledList.add(0, "watchface");