get rid of double bang
This commit is contained in:
parent
2f75559ac2
commit
7cb474804b
1 changed files with 7 additions and 3 deletions
|
@ -334,9 +334,13 @@ class UserPreference : AppCompatActivity() {
|
||||||
@Throws(IOException::class)
|
@Throws(IOException::class)
|
||||||
private fun copySshKey(uri: Uri) {
|
private fun copySshKey(uri: Uri) {
|
||||||
val sshKey = this.contentResolver.openInputStream(uri)
|
val sshKey = this.contentResolver.openInputStream(uri)
|
||||||
val privateKey = IOUtils.toByteArray(sshKey!!)
|
if (sshKey != null) {
|
||||||
FileUtils.writeByteArrayToFile(File(filesDir.toString() + "/.ssh_key"), privateKey)
|
val privateKey = IOUtils.toByteArray(sshKey)
|
||||||
sshKey.close()
|
FileUtils.writeByteArrayToFile(File(filesDir.toString() + "/.ssh_key"), privateKey)
|
||||||
|
sshKey.close()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, "Unable to open the ssh private key, please check that the file exists", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns whether the autofill service is enabled
|
// Returns whether the autofill service is enabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue