PgpSignEncryptOperation refactoring
This commit is contained in:
@@ -63,6 +63,7 @@ import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.operations.results.SignEncryptResult;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpSecurityConstants;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpSignEncryptData;
|
||||
import org.sufficientlysecure.keychain.pgp.SignEncryptParcel;
|
||||
import org.sufficientlysecure.keychain.provider.TemporaryFileProvider;
|
||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
@@ -620,9 +621,7 @@ public class EncryptFilesFragment
|
||||
}
|
||||
|
||||
// fill values for this action
|
||||
SignEncryptParcel data = new SignEncryptParcel();
|
||||
|
||||
data.addInputUris(mFilesAdapter.getAsArrayList());
|
||||
PgpSignEncryptData data = new PgpSignEncryptData();
|
||||
|
||||
if (mUseCompression) {
|
||||
data.setCompressionAlgorithm(
|
||||
@@ -673,7 +672,11 @@ public class EncryptFilesFragment
|
||||
data.setSymmetricPassphrase(passphrase);
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
SignEncryptParcel parcel = new SignEncryptParcel(data);
|
||||
parcel.addInputUris(mFilesAdapter.getAsArrayList());
|
||||
|
||||
return parcel;
|
||||
}
|
||||
|
||||
private Intent createSendIntent() {
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.operations.results.SignEncryptResult;
|
||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpSecurityConstants;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpSignEncryptData;
|
||||
import org.sufficientlysecure.keychain.pgp.SignEncryptParcel;
|
||||
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
|
||||
import org.sufficientlysecure.keychain.ui.base.CachingCryptoOperationFragment;
|
||||
@@ -230,9 +231,8 @@ public class EncryptTextFragment
|
||||
}
|
||||
|
||||
// fill values for this action
|
||||
SignEncryptParcel data = new SignEncryptParcel();
|
||||
PgpSignEncryptData data = new PgpSignEncryptData();
|
||||
|
||||
data.setBytes(mMessage.getBytes());
|
||||
data.setCleartextSignature(true);
|
||||
|
||||
if (mUseCompression) {
|
||||
@@ -283,7 +283,11 @@ public class EncryptTextFragment
|
||||
}
|
||||
data.setSymmetricPassphrase(passphrase);
|
||||
}
|
||||
return data;
|
||||
|
||||
SignEncryptParcel parcel = new SignEncryptParcel(data);
|
||||
parcel.setBytes(mMessage.getBytes());
|
||||
|
||||
return parcel;
|
||||
}
|
||||
|
||||
private void copyToClipboard(SignEncryptResult result) {
|
||||
|
||||
Reference in New Issue
Block a user