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