use autovalue for PgpDecryptVerifyInputParcel

This commit is contained in:
Vincent Breitmoser
2017-05-23 21:47:21 +02:00
parent 76e9f6b229
commit 79af393847
9 changed files with 119 additions and 184 deletions

View File

@@ -22,6 +22,7 @@ package org.sufficientlysecure.keychain.remote;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
@@ -367,12 +368,13 @@ public class OpenPgpService extends Service {
// allow only private keys associated with accounts of this app
// no support for symmetric encryption
PgpDecryptVerifyInputParcel input = new PgpDecryptVerifyInputParcel()
PgpDecryptVerifyInputParcel input = PgpDecryptVerifyInputParcel.builder()
.setAllowSymmetricDecryption(false)
.setAllowedKeyIds(getAllowedKeyIds())
.setAllowedKeyIds(new ArrayList<>(getAllowedKeyIds()))
.setDecryptMetadataOnly(decryptMetadataOnly)
.setDetachedSignature(detachedSignature)
.setSenderAddress(senderAddress);
.setSenderAddress(senderAddress)
.build();
DecryptVerifyResult pgpResult = op.execute(input, cryptoInput, inputData, outputStream);