Remove unused method

This commit is contained in:
cketti 2023-03-15 17:28:58 +01:00
parent 10c19f1890
commit f17fb9fe17
3 changed files with 0 additions and 23 deletions

View file

@ -1,10 +1,6 @@
package com.fsck.k9.preferences
import android.content.SharedPreferences
interface StorageEditor {
fun copy(input: SharedPreferences)
fun putBoolean(key: String, value: Boolean): StorageEditor
fun putInt(key: String, value: Int): StorageEditor
fun putLong(key: String, value: Long): StorageEditor

View file

@ -27,21 +27,6 @@ public class K9StorageEditor implements StorageEditor {
this.storagePersister = storagePersister;
}
@Override
public void copy(android.content.SharedPreferences input) {
Map < String, ? > oldVals = input.getAll();
for (Entry < String, ? > entry : oldVals.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (key != null && value != null) {
Timber.d("Copying key '%s', value '%s'", key, value);
changes.put(key, "" + value);
} else {
Timber.d("Skipping copying key '%s', value '%s'", key, value);
}
}
}
@Override
public boolean commit() {
try {

View file

@ -1,7 +1,5 @@
package com.fsck.k9.preferences
import android.content.SharedPreferences
class InMemoryStoragePersister : StoragePersister {
private val values = mutableMapOf<String, Any?>()
@ -18,8 +16,6 @@ class InMemoryStoragePersister : StoragePersister {
private val changes = mutableMapOf<String, String>()
private var alreadyCommitted = false
override fun copy(input: SharedPreferences) = Unit
override fun putBoolean(key: String, value: Boolean) = apply {
changes[key] = value.toString()
removals.remove(key)