8000 Merge tag '5.66.1' into develop · githublucas420/Android@335165c · GitHub
[go: up one dir, main page]

Skip to content

Commit 335165c

Browse files
committed
Merge tag '5.66.1' into develop
no message
2 parents 615b84d + da193b6 commit 335165c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconPersister.kt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,20 @@ class FileBasedFaviconPersister(
118118
val faviconFile = prepareDestinationFile(directory, subFolder, domain)
119119
writeBytesToFile(faviconFile, bitmap)
120120

121-
return faviconFile
121+
return if (faviconFile.exists()) {
122+
faviconFile
123+
} else {
124+
null
125+
}
122126
}
123127

124128
@Synchronized
125129
private fun writeBytesToFile(file: File, bitmap: Bitmap) {
126-
FileOutputStream(file).use { outputStream ->
127-
bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream)
128-
outputStream.flush()
130+
runCatching {
131+
FileOutputStream(file).use { outputStream ->
132+
bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream)
133+
outputStream.flush()
134+
}
129135
}
130136
}
131137

app/version/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION=5.66.0
1+
VERSION=5.66.1

0 commit comments

Comments
 (0)
0