Remove unused method

This commit is contained in:
J-Jamet
2021-03-03 17:38:45 +01:00
parent b2aafda2b1
commit d49827f9f8
4 changed files with 8 additions and 16 deletions

View File

@@ -314,10 +314,6 @@ class DatabaseKDBX : DatabaseVersioned<UUID, UUID, GroupKDBX, EntryKDBX> {
return this.iconsManager.getIcon(iconUuid)
}
fun putCustomIcon(customIcon: IconImageCustom) {
this.iconsManager.putIcon(customIcon)
}
fun containsCustomIcons(): Boolean {
return this.iconsManager.containsAnyCustomIcon()
}

View File

@@ -54,6 +54,12 @@ abstract class DatabaseVersioned<
var finalKey: ByteArray? = null
protected set
/**
* Cipher key generated when the database is loaded, and destroyed when the database is closed
* Can be used to temporarily store database elements
*/
var loadedCipherKey: Database.LoadedKey? = null
val iconsManager = IconsManager()
var changeDuplicateId = false
@@ -388,12 +394,6 @@ abstract class DatabaseVersioned<
return true
}
/**
* Cipher key generated when the database is loaded, and destroyed when the database is closed
* Can be used to temporarily store database elements
*/
var loadedCipherKey: Database.LoadedKey? = null
companion object {
private const val TAG = "DatabaseVersioned"

View File

@@ -49,10 +49,6 @@ class IconsManager {
return IconImageCustom(keyBinary.keys.first(), keyBinary.binary)
}
fun putIcon(icon: IconImageCustom) {
customCache.put(icon.uuid, icon.binaryFile)
}
fun getIcon(iconUuid: UUID): IconImageCustom {
customCache[iconUuid]?.let {
return IconImageCustom(iconUuid, it)

View File

@@ -227,11 +227,11 @@ class IconDrawableFactory(private val retrieveCipherKey : () -> Database.LoadedK
customIconMap.clear()
}
private class PatternIcon
/**
* Build a blankDrawable drawable
* @param res Resource to build the drawable
*/(res: Resources) {
*/
private class PatternIcon(res: Resources) {
var blankDrawable: Drawable = ColorDrawable(Color.TRANSPARENT)
var width = -1