diff options
| author | Harsh Shandilya <me@msfjarvis.dev> | 2021-05-15 12:56:49 +0530 |
|---|---|---|
| committer | Harsh Shandilya <me@msfjarvis.dev> | 2021-05-15 15:40:20 +0530 |
| commit | 7e2eb2425e7b9b6ccb37b7b89f19de3fa7a20c44 (patch) | |
| tree | 6b8a9557ac51b5fab5d2ad7611084cf0de6c57cf /openpgp-ktx/src/main/java/org | |
| parent | 2fcb285e276594842798be6990b92ba09e733f49 (diff) | |
| download | HardenedPass-7e2eb2425e7b9b6ccb37b7b89f19de3fa7a20c44.tar.gz HardenedPass-7e2eb2425e7b9b6ccb37b7b89f19de3fa7a20c44.zip | |
all: reformat with Spotless again
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'openpgp-ktx/src/main/java/org')
3 files changed, 58 insertions, 9 deletions
diff --git a/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.kt b/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.kt index 18f8cd0c..72bc1b39 100644 --- a/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.kt +++ b/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.kt @@ -22,7 +22,11 @@ public class OpenPgpDecryptionResult() : Parcelable { decryptedSessionKey = null } - private constructor(result: Int, sessionKey: ByteArray?, decryptedSessionKey: ByteArray?) : this() { + private constructor( + result: Int, + sessionKey: ByteArray?, + decryptedSessionKey: ByteArray? + ) : this() { this.result = result if (sessionKey == null != (decryptedSessionKey == null)) { throw AssertionError("sessionkey must be null iff decryptedSessionKey is null") diff --git a/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpMetadata.kt b/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpMetadata.kt index a73c77c1..a22c8af0 100644 --- a/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpMetadata.kt +++ b/openpgp-ktx/src/main/java/org/openintents/openpgp/OpenPgpMetadata.kt @@ -32,7 +32,12 @@ public class OpenPgpMetadata() : Parcelable { this.charset = charset } - private constructor(filename: String?, mimeType: String?, modificationTime: Long, originalSize: Long) : this() { + private constructor( + filename: String?, + mimeType: String?, + modificationTime: Long, + originalSize: Long + ) : this() { this.filename = filename this.mimeType = mimeType this.modificationTime = modificationTime 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 <T : Enum<T>?> readEnumWithNullAndFallback(source: Parcel, enumValues: Array<T>, fallback: T?): T? { + private fun <T : Enum<T>?> readEnumWithNullAndFallback( + source: Parcel, + enumValues: Array<T>, + fallback: T? + ): T? { val valueOrdinal = source.readInt() if (valueOrdinal == -1) { return null |
