mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Remove unused functions
This commit is contained in:
parent
c70d03dbe8
commit
b065d5c1d1
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user