android: replaced function that requires higher API (#3324)

This commit is contained in:
Stanislav Dmitrenko
2023-11-07 22:58:19 +00:00
committed by GitHub
parent 2dc621a56c
commit e3938f6fb5
3 changed files with 3 additions and 5 deletions
@@ -137,7 +137,7 @@ fun saveAnimImage(uri: URI, encrypted: Boolean): CryptoFile? {
val destFileName = generateNewFileName("IMG", ext)
val destFile = File(getAppFilePath(destFileName))
if (encrypted) {
val args = writeCryptoFile(destFile.absolutePath, uri.inputStream()?.readAllBytes() ?: return null)
val args = writeCryptoFile(destFile.absolutePath, uri.inputStream()?.readBytes() ?: return null)
CryptoFile(destFileName, args)
} else {
Files.copy(uri.inputStream(), destFile.toPath())