From 7e2eb2425e7b9b6ccb37b7b89f19de3fa7a20c44 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 15 May 2021 12:56:49 +0530 Subject: all: reformat with Spotless again Signed-off-by: Harsh Shandilya --- .../openintents/openpgp/OpenPgpSignatureResult.kt | 54 +++++++++++++++++++--- 1 file changed, 47 insertions(+), 7 deletions(-) (limited to 'openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.kt') diff --git a/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.kt b/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.kt index 45f10abd..68a542a8 100644 --- a/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.kt +++ b/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.kt @@ -58,7 +58,8 @@ public class OpenPgpSignatureResult : Parcelable { } // backward compatibility for this exact version if (version > 2) { - senderStatusResult = readEnumWithNullAndFallback(source, SenderStatusResult.values(), SenderStatusResult.UNKNOWN) + senderStatusResult = + readEnumWithNullAndFallback(source, SenderStatusResult.values(), SenderStatusResult.UNKNOWN) confirmedUserIds = source.createStringArrayList() } else { senderStatusResult = SenderStatusResult.UNKNOWN @@ -151,7 +152,9 @@ public class OpenPgpSignatureResult : Parcelable { ) } - public fun withAutocryptPeerResult(autocryptPeerentityResult: AutocryptPeerResult?): OpenPgpSignatureResult { + public fun withAutocryptPeerResult( + autocryptPeerentityResult: AutocryptPeerResult? + ): OpenPgpSignatureResult { return OpenPgpSignatureResult( result, primaryUserId, @@ -253,18 +256,55 @@ public class OpenPgpSignatureResult : Parcelable { } public fun createWithNoSignature(): OpenPgpSignatureResult { - return OpenPgpSignatureResult(RESULT_NO_SIGNATURE, null, 0L, null, null, null, null, null, null) + return OpenPgpSignatureResult( + RESULT_NO_SIGNATURE, + null, + 0L, + null, + null, + null, + null, + null, + null + ) } - public fun createWithKeyMissing(keyId: Long, signatureTimestamp: Date?): OpenPgpSignatureResult { - return OpenPgpSignatureResult(RESULT_KEY_MISSING, null, keyId, null, null, null, null, signatureTimestamp, null) + public fun createWithKeyMissing( + keyId: Long, + signatureTimestamp: Date? + ): OpenPgpSignatureResult { + return OpenPgpSignatureResult( + RESULT_KEY_MISSING, + null, + keyId, + null, + null, + null, + null, + signatureTimestamp, + null + ) } public fun createWithInvalidSignature(): OpenPgpSignatureResult { - return OpenPgpSignatureResult(RESULT_INVALID_SIGNATURE, null, 0L, null, null, null, null, null, null) + return OpenPgpSignatureResult( + RESULT_INVALID_SIGNATURE, + null, + 0L, + null, + null, + null, + null, + null, + null + ) } - private fun ?> readEnumWithNullAndFallback(source: Parcel, enumValues: Array, fallback: T?): T? { + private fun ?> readEnumWithNullAndFallback( + source: Parcel, + enumValues: Array, + fallback: T? + ): T? { val valueOrdinal = source.readInt() if (valueOrdinal == -1) { return null -- cgit v1.2.3