Upgrade to ktfmt 0.37 (#1897)

This commit is contained in:
Harsh Shandilya 2022-05-05 08:47:15 +05:30 committed by GitHub
parent 7c035aa042
commit 41213da780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 8 deletions

View file

@ -41,7 +41,8 @@ class LaunchActivity : AppCompatActivity() {
prefs.edit { remove(PreferenceKeys.BIOMETRIC_AUTH) } prefs.edit { remove(PreferenceKeys.BIOMETRIC_AUTH) }
startTargetActivity(false) startTargetActivity(false)
} }
is Result.Failure, Result.Cancelled -> { is Result.Failure,
Result.Cancelled -> {
finish() finish()
} }
is Result.Retry -> {} is Result.Retry -> {}

View file

@ -183,8 +183,8 @@ class OpenKeychainKeyProvider private constructor(val activity: ContinuationCont
"Request ${request::class.simpleName} failed: ${error?.message}" "Request ${request::class.simpleName} failed: ${error?.message}"
) )
when (error?.error) { when (error?.error) {
SshAuthenticationApiError.NO_AUTH_KEY, SshAuthenticationApiError.NO_SUCH_KEY -> SshAuthenticationApiError.NO_AUTH_KEY,
ApiResponse.NoSuchKey(exception) SshAuthenticationApiError.NO_SUCH_KEY -> ApiResponse.NoSuchKey(exception)
else -> ApiResponse.GeneralError(exception) else -> ApiResponse.GeneralError(exception)
} }
} }

View file

@ -35,7 +35,8 @@ class OpenKeychainWrappedKeyAlgorithm(private val keyAlgorithm: KeyAlgorithm) :
when (keyAlgorithm.keyAlgorithm) { when (keyAlgorithm.keyAlgorithm) {
"rsa-sha2-512" -> SshAuthenticationApi.SHA512 "rsa-sha2-512" -> SshAuthenticationApi.SHA512
"rsa-sha2-256" -> SshAuthenticationApi.SHA256 "rsa-sha2-256" -> SshAuthenticationApi.SHA256
"ssh-rsa", "ssh-rsa-cert-v01@openssh.com" -> SshAuthenticationApi.SHA1 "ssh-rsa",
"ssh-rsa-cert-v01@openssh.com" -> SshAuthenticationApi.SHA1
// Other algorithms don't use this value, but it has to be valid. // Other algorithms don't use this value, but it has to be valid.
else -> SshAuthenticationApi.SHA512 else -> SshAuthenticationApi.SHA512
} }

View file

@ -306,8 +306,8 @@ object SshKey {
fun provide(client: SSHClient, passphraseFinder: InteractivePasswordFinder): KeyProvider? = fun provide(client: SSHClient, passphraseFinder: InteractivePasswordFinder): KeyProvider? =
when (type) { when (type) {
Type.LegacyGenerated, Type.Imported -> Type.LegacyGenerated,
client.loadKeys(privateKeyFile.absolutePath, passphraseFinder) Type.Imported -> client.loadKeys(privateKeyFile.absolutePath, passphraseFinder)
Type.KeystoreNative -> KeystoreNativeKeyProvider Type.KeystoreNative -> KeystoreNativeKeyProvider
Type.KeystoreWrappedEd25519 -> KeystoreWrappedEd25519KeyProvider Type.KeystoreWrappedEd25519 -> KeystoreWrappedEd25519KeyProvider
null -> null null -> null

View file

@ -166,7 +166,8 @@ private class AutofillFormParser(
// reported web origin if no other web origin appears on the page. // reported web origin if no other web origin appears on the page.
webOriginToFormOrigin(context, webOrigins.singleOrNull() ?: return null) webOriginToFormOrigin(context, webOrigins.singleOrNull() ?: return null)
} }
BrowserMultiOriginMethod.WebView, BrowserMultiOriginMethod.Field -> { BrowserMultiOriginMethod.WebView,
BrowserMultiOriginMethod.Field -> {
// Security assumption: For browsers with full autofill support (the `Field` case), // Security assumption: For browsers with full autofill support (the `Field` case),
// every form field is annotated with its origin. For browsers based on WebView, // every form field is annotated with its origin. For browsers based on WebView,
// this is true after the web origins of WebViews are passed down to their children. // this is true after the web origins of WebViews are passed down to their children.

View file

@ -5,7 +5,7 @@
plugins { id("com.diffplug.spotless") } plugins { id("com.diffplug.spotless") }
val KTFMT_VERSION = "0.36" val KTFMT_VERSION = "0.37"
spotless { spotless {
kotlin { kotlin {