From 54763fc22d1b73dd3e6f360d53d6ceb5e586e190 Mon Sep 17 00:00:00 2001 From: cepprice Date: Fri, 29 Jan 2021 18:51:28 +0500 Subject: [PATCH] Small edit --- .../aidlapi/customization/ProfileSettingsParams.java | 9 +++++---- OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/ProfileSettingsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/ProfileSettingsParams.java index afca79aa0e..eee80329f7 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/customization/ProfileSettingsParams.java +++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/ProfileSettingsParams.java @@ -8,6 +8,7 @@ import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.profile.AExportSettingsType; import java.util.ArrayList; +import java.util.List; import static net.osmand.aidlapi.profile.ExportProfileParams.SETTINGS_TYPE_KEY; @@ -21,11 +22,11 @@ public class ProfileSettingsParams extends AidlParams { private Uri profileSettingsUri; private String latestChanges; private int version; - private ArrayList settingsTypeKeyList = new ArrayList<>(); + private List settingsTypeKeyList = new ArrayList<>(); private boolean silent; private boolean replace; - public ProfileSettingsParams(Uri profileSettingsUri, ArrayList settingsTypeList, boolean replace, + public ProfileSettingsParams(Uri profileSettingsUri, List settingsTypeList, boolean replace, boolean silent, String latestChanges, int version) { this.profileSettingsUri = profileSettingsUri; for (AExportSettingsType settingsType : settingsTypeList) { @@ -65,7 +66,7 @@ public class ProfileSettingsParams extends AidlParams { return profileSettingsUri; } - public ArrayList getSettingsTypeKeys() { + public List getSettingsTypeKeys() { return settingsTypeKeyList; } @@ -82,7 +83,7 @@ public class ProfileSettingsParams extends AidlParams { bundle.putInt(VERSION_KEY, version); bundle.putString(LATEST_CHANGES_KEY, latestChanges); bundle.putParcelable(PROFILE_SETTINGS_URI_KEY, profileSettingsUri); - bundle.putStringArrayList(SETTINGS_TYPE_KEY, settingsTypeKeyList); + bundle.putStringArrayList(SETTINGS_TYPE_KEY, new ArrayList<>(settingsTypeKeyList)); bundle.putBoolean(REPLACE_KEY, replace); bundle.putBoolean(SILENT_IMPORT_KEY, silent); } diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index 033fceff1a..3687602716 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -2296,11 +2296,11 @@ public class OsmandAidlApi { return false; } - public boolean importProfileV2(final Uri profileUri, ArrayList settingsTypeKeys, boolean replace, + public boolean importProfileV2(final Uri profileUri, List settingsTypeKeys, boolean replace, boolean silent, String latestChanges, int version) { if (profileUri != null) { Bundle bundle = new Bundle(); - bundle.putStringArrayList(SettingsHelper.SETTINGS_TYPE_LIST_KEY, settingsTypeKeys); + bundle.putStringArrayList(SettingsHelper.SETTINGS_TYPE_LIST_KEY, new ArrayList<>(settingsTypeKeys)); bundle.putBoolean(REPLACE_KEY, replace); bundle.putBoolean(SILENT_IMPORT_KEY, silent); bundle.putString(SettingsHelper.SETTINGS_LATEST_CHANGES_KEY, latestChanges);