fixed warning

This commit is contained in:
sonalyadav 2024-12-19 19:31:57 +05:30 committed by Sonal Yadav
parent 68c24c47e3
commit 6e929e3786

View file

@ -86,7 +86,7 @@ class FileProcessor
*/
fun getExifTagsToRedact(): Set<String> {
val prefManageEXIFTags =
defaultKvStore.getStringSet(Prefs.MANAGED_EXIF_TAGS) ?: emptySet()
defaultKvStore.getStringSet(Prefs.MANAGED_EXIF_TAGS) ?: emptySet<String>()
val redactTags: Set<String> =
context.resources.getStringArray(R.array.pref_exifTag_values).toSet()
return redactTags - prefManageEXIFTags
@ -131,9 +131,10 @@ class FileProcessor
?.getAttribute(tag)
?.takeIf { it.isNotEmpty() }
?.let { attributeName ->
exifInterface.setAttribute(tag, null).also {
Timber.d("Exif tag $tag with value $attributeName redacted.")
exifInterface.setAttribute(tag, "").also {
Timber.d("EXIF tag $tag removed or set to empty.")
}
}
}