From b065d5c1d1e3c248dbba5bb0a09d8191c38afee9 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Fri, 26 May 2023 20:21:56 +0200 Subject: [PATCH] Remove unused functions --- src/org/kde/kdeconnect/Plugins/Plugin.java | 15 -------------- .../Plugins/SftpPlugin/SftpPlugin.java | 20 ------------------- 2 files changed, 35 deletions(-) diff --git a/src/org/kde/kdeconnect/Plugins/Plugin.java b/src/org/kde/kdeconnect/Plugins/Plugin.java index 8a719260..ef9f1014 100644 --- a/src/org/kde/kdeconnect/Plugins/Plugin.java +++ b/src/org/kde/kdeconnect/Plugins/Plugin.java @@ -141,21 +141,6 @@ public abstract class Plugin { */ public boolean supportsDeviceSpecificSettings() { return false; } - /** - * Called when it's time to move the plugin settings from the global preferences - * to device specific preferences - * - * @param globalSharedPreferences The global Preferences to copy the settings from - */ - public void copyGlobalToDeviceSpecificSettings(SharedPreferences globalSharedPreferences) {} - - /** - * Called when the plugin should remove it's settings from the provided ShardPreferences - * - * @param sharedPreferences The SharedPreferences to remove the settings from - */ - public void removeSettings(SharedPreferences sharedPreferences) {} - /** * If hasSettings returns true, this will be called when the user * wants to access this plugin's preferences. The default implementation diff --git a/src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java b/src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java index 7d86a17c..5e367d69 100644 --- a/src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java +++ b/src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java @@ -236,26 +236,6 @@ public class SftpPlugin extends Plugin implements SharedPreferences.OnSharedPref @Override public boolean supportsDeviceSpecificSettings() { return true; } - @Override - public void copyGlobalToDeviceSpecificSettings(SharedPreferences globalSharedPreferences) { - String KeyStorageInfoList = context.getString(PREFERENCE_KEY_STORAGE_INFO_LIST); - - if (this.preferences != null && !this.preferences.contains(KeyStorageInfoList)) { - this.preferences - .edit() - .putString(KeyStorageInfoList, globalSharedPreferences.getString(KeyStorageInfoList, "[]")) - .apply(); - } - } - - @Override - public void removeSettings(SharedPreferences sharedPreferences) { - sharedPreferences - .edit() - .remove(context.getString(PREFERENCE_KEY_STORAGE_INFO_LIST)) - .apply(); - } - @Override public PluginSettingsFragment getSettingsFragment(Activity activity) { return SftpSettingsFragment.newInstance(getPluginKey(), R.xml.sftpplugin_preferences);