diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt index 69b40a2e..cd4ab07f 100644 --- a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt @@ -34,7 +34,7 @@ class PGPKeyImportActivity : AppCompatActivity() { val keyInputStream = contentResolver.openInputStream(uri) ?: throw IllegalStateException("Failed to open selected file") - val bytes = keyInputStream.readBytes() + val bytes = keyInputStream.use { `is` -> `is`.readBytes() } val (key, error) = runBlocking { keyManager.addKey(PGPKey(bytes)) } if (error != null) throw error key |