summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt3
-rw-r--r--app/src/main/java/app/passwordstore/util/services/OreoAutofillService.kt3
-rw-r--r--autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillScenario.kt9
-rw-r--r--autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt3
-rw-r--r--autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FeatureAndTrustDetection.kt3
-rw-r--r--crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt1
-rw-r--r--gradle/libs.versions.toml2
-rw-r--r--ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt6
8 files changed, 10 insertions, 20 deletions
diff --git a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
index 2251f72b..b72fc58b 100644
--- a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
+++ b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
@@ -197,8 +197,7 @@ object SshKey {
// Cursor returns only a single row.
cursor.moveToFirst()
cursor.getInt(0)
- }
- ?: throw IOException(context.getString(R.string.ssh_key_does_not_exist))
+ } ?: throw IOException(context.getString(R.string.ssh_key_does_not_exist))
// We assume that an SSH key's ideal size is > 0 bytes && < 100 kilobytes.
if (fileSize > 100_000 || fileSize == 0)
diff --git a/app/src/main/java/app/passwordstore/util/services/OreoAutofillService.kt b/app/src/main/java/app/passwordstore/util/services/OreoAutofillService.kt
index 60891367..6a9cea8d 100644
--- a/app/src/main/java/app/passwordstore/util/services/OreoAutofillService.kt
+++ b/app/src/main/java/app/passwordstore/util/services/OreoAutofillService.kt
@@ -165,6 +165,5 @@ fun Context.getCustomSuffixes(): Sequence<String> {
return sharedPrefs
.getString(PreferenceKeys.OREO_AUTOFILL_CUSTOM_PUBLIC_SUFFIXES)
?.splitToSequence('\n')
- ?.filter { it.isNotBlank() && it.first() != '.' && it.last() != '.' }
- ?: emptySequence()
+ ?.filter { it.isNotBlank() && it.first() != '.' && it.last() != '.' } ?: emptySequence()
}
diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillScenario.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillScenario.kt
index 2670a77d..97419048 100644
--- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillScenario.kt
+++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillScenario.kt
@@ -70,24 +70,21 @@ public sealed class AutofillScenario<out T : Any> {
clientState,
BUNDLE_KEY_CURRENT_PASSWORD_IDS,
AutofillId::class.java
- )
- ?: emptyList()
+ ) ?: emptyList()
)
newPassword.addAll(
BundleCompat.getParcelableArrayList(
clientState,
BUNDLE_KEY_NEW_PASSWORD_IDS,
AutofillId::class.java
- )
- ?: emptyList()
+ ) ?: emptyList()
)
genericPassword.addAll(
BundleCompat.getParcelableArrayList(
clientState,
BUNDLE_KEY_GENERIC_PASSWORD_IDS,
AutofillId::class.java
- )
- ?: emptyList()
+ ) ?: emptyList()
)
}
.build()
diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt
index 94cef6e5..0a75f078 100644
--- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt
+++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillStrategyDsl.kt
@@ -430,8 +430,7 @@ internal class AutofillStrategy private constructor(private val rules: List<Auto
possibleOtpFields,
singleOriginMode = singleOriginMode,
isManualRequest = isManualRequest
- )
- ?: continue
+ ) ?: continue
}
return null
}
diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FeatureAndTrustDetection.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FeatureAndTrustDetection.kt
index 9e28808e..f3696ffd 100644
--- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FeatureAndTrustDetection.kt
+++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/FeatureAndTrustDetection.kt
@@ -238,8 +238,7 @@ private fun getBrowserAutofillSupportLevel(
// browsers here.
supportLevel != BrowserAutofillSupportLevel.GeneralFillAndSave &&
Build.VERSION.SDK_INT < Build.VERSION_CODES.P
- }
- ?: BrowserAutofillSupportLevel.None
+ } ?: BrowserAutofillSupportLevel.None
}
@RequiresApi(Build.VERSION_CODES.O)
diff --git a/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt b/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt
index 8bf6ba1e..5f5f8340 100644
--- a/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt
+++ b/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt
@@ -3,7 +3,6 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
@file:Suppress("JUnitMalformedDeclaration") // The test runner takes care of it
-
package app.passwordstore.crypto
import app.passwordstore.crypto.CryptoConstants.KEY_PASSPHRASE
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 387f3de4..2cc5d53a 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -41,7 +41,7 @@ build-diffutils = "io.github.java-diff-utils:java-diff-utils:4.12"
build-download = "de.undercouch:gradle-download-task:5.5.0"
build-javapoet = "com.squareup:javapoet:1.13.0"
build-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
-build-ktfmt = "com.facebook:ktfmt:0.44"
+build-ktfmt = "com.facebook:ktfmt:0.45"
build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.25.3"
build-metalava = "me.tylerbwong.gradle.metalava:plugin:0.3.3"
build-moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
diff --git a/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt b/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt
index f30249c1..e90eedee 100644
--- a/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt
+++ b/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt
@@ -61,8 +61,7 @@ public class SSHKeyManager(private val applicationContext: Context) {
private fun keyType(): SSHKeyType {
return SSHKeyType.fromValue(
applicationContext.sharedPrefs.getString(Constants.GIT_REMOTE_KEY_TYPE, null)
- )
- ?: throw NullKeyException()
+ ) ?: throw NullKeyException()
}
public fun keyExists(): Boolean {
@@ -121,8 +120,7 @@ public class SSHKeyManager(private val applicationContext: Context) {
// Cursor returns only a single row.
cursor.moveToFirst()
cursor.getInt(0)
- }
- ?: throw IOException(applicationContext.getString(R.string.ssh_key_does_not_exist))
+ } ?: throw IOException(applicationContext.getString(R.string.ssh_key_does_not_exist))
// We assume that an SSH key's ideal size is > 0 bytes && < 100 kilobytes.
require(fileSize in 1 until SSH_KEY_MAX_FILE_SIZE) {
applicationContext.getString(R.string.ssh_key_import_error_not_an_ssh_key_message)