mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
clean up for release, AsciiArmour was a Button instead of CheckBox... fixed
This commit is contained in:
parent
fbd8f61aab
commit
2c093b3e0d
@ -30,7 +30,6 @@ import java.security.SignatureException;
|
||||
import java.util.Collections;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.bouncycastle2.bcpg.HashAlgorithmTags;
|
||||
import org.bouncycastle2.openpgp.PGPEncryptedData;
|
||||
import org.bouncycastle2.openpgp.PGPException;
|
||||
import org.bouncycastle2.openpgp.PGPPublicKeyRing;
|
||||
@ -75,7 +74,7 @@ public class EncryptFileActivity extends BaseActivity {
|
||||
private Spinner mAlgorithm = null;
|
||||
private EditText mPassPhrase = null;
|
||||
private EditText mPassPhraseAgain = null;
|
||||
private Button mAsciiArmour = null;
|
||||
private CheckBox mAsciiArmour = null;
|
||||
private Button mEncryptButton = null;
|
||||
|
||||
private long mEncryptionKeyIds[] = null;
|
||||
@ -237,7 +236,8 @@ public class EncryptFileActivity extends BaseActivity {
|
||||
if (mInputFilename == null || !mInputFilename.equals(currentFilename)) {
|
||||
mInputFilename = mFilename.getText().toString();
|
||||
File file = new File(mInputFilename);
|
||||
mOutputFilename = Constants.path.app_dir + "/" + file.getName() + ".gpg";
|
||||
String ending = (mAsciiArmour.isChecked() ? ".asc" : ".gpg");
|
||||
mOutputFilename = Constants.path.app_dir + "/" + file.getName() + ending;
|
||||
}
|
||||
|
||||
if (mInputFilename.equals("")) {
|
||||
@ -262,8 +262,9 @@ public class EncryptFileActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
boolean encryptIt = mEncryptionKeyIds != null && mEncryptionKeyIds.length > 0;
|
||||
if (getSecretKeyId() == 0 && !encryptIt) {
|
||||
Toast.makeText(this, "Select a signature key or encryption keys.",
|
||||
// for now only support encryption
|
||||
if (!encryptIt) {
|
||||
Toast.makeText(this, "Select at least one encryption key.",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -328,13 +329,13 @@ public class EncryptFileActivity extends BaseActivity {
|
||||
boolean encryptIt = mEncryptionKeyIds != null && mEncryptionKeyIds.length > 0;
|
||||
|
||||
if (encryptIt) {
|
||||
Apg.encrypt(in, out, mAsciiArmour.isSelected(),
|
||||
Apg.encrypt(in, out, mAsciiArmour.isChecked(),
|
||||
mEncryptionKeyIds, getSecretKeyId(),
|
||||
Apg.getPassPhrase(), this,
|
||||
PGPEncryptedData.AES_256, null);
|
||||
}
|
||||
} else {
|
||||
Apg.encrypt(in, out, mAsciiArmour.isSelected(),
|
||||
Apg.encrypt(in, out, mAsciiArmour.isChecked(),
|
||||
null, 0, null, this,
|
||||
((Choice) mAlgorithm.getSelectedItem()).getId(),
|
||||
mPassPhrase.getText().toString());
|
||||
|
@ -18,7 +18,6 @@ package org.thialfihar.android.apg;
|
||||
|
||||
import org.thialfihar.android.apg.provider.Accounts;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ContentValues;
|
||||
@ -223,7 +222,7 @@ public class MainActivity extends BaseActivity {
|
||||
SpannableString info =
|
||||
new SpannableString("Read the warnings!\n\n" +
|
||||
"Changes:\n" +
|
||||
" * OI File Manager support\n" +
|
||||
" * OI File Manager support (install from Market)\n" +
|
||||
" * file encryption/decryption\n" +
|
||||
"\n" +
|
||||
"WARNING: be careful editing your existing keys, as they " +
|
||||
|
@ -22,7 +22,6 @@ import java.util.Vector;
|
||||
import org.bouncycastle2.openpgp.PGPPublicKey;
|
||||
import org.bouncycastle2.openpgp.PGPPublicKeyRing;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
@ -25,7 +25,6 @@ import org.bouncycastle2.openpgp.PGPSecretKey;
|
||||
import org.bouncycastle2.openpgp.PGPSecretKeyRing;
|
||||
import org.thialfihar.android.apg.utils.IterableIterator;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
Loading…
Reference in New Issue
Block a user