diff options
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/git/sshj')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/sshj/SshKey.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/sshj/SshKey.kt b/app/src/main/java/com/zeapo/pwdstore/git/sshj/SshKey.kt index 5e6cfb1b..52297133 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/sshj/SshKey.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/sshj/SshKey.kt @@ -262,7 +262,12 @@ object SshKey { apply(algorithm.applyToSpec) if (requireAuthentication) { setUserAuthenticationRequired(true) - setUserAuthenticationValidityDurationSeconds(30) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + setUserAuthenticationParameters(30, KeyProperties.AUTH_DEVICE_CREDENTIAL) + } else { + @Suppress("DEPRECATION") + setUserAuthenticationValidityDurationSeconds(30) + } } build() } |
