Removing remaining uses of Id, closing one of the oldest bugs #9

This commit is contained in:
Dominik Schürmann
2014-04-14 13:48:20 +02:00
parent 59220fbe04
commit b04e6816f4
26 changed files with 126 additions and 183 deletions

View File

@@ -19,11 +19,11 @@ package org.sufficientlysecure.keychain.remote;
import org.spongycastle.bcpg.HashAlgorithmTags;
import org.spongycastle.openpgp.PGPEncryptedData;
import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.Constants;
public class AccountSettings {
private String mAccountName;
private long mKeyId = Id.key.none;
private long mKeyId = Constants.key.none;
private int mEncryptionAlgorithm;
private int mHashAlgorithm;
private int mCompression;
@@ -39,7 +39,7 @@ public class AccountSettings {
// defaults:
this.mEncryptionAlgorithm = PGPEncryptedData.AES_256;
this.mHashAlgorithm = HashAlgorithmTags.SHA512;
this.mCompression = Id.choice.compression.zlib;
this.mCompression = Constants.choice.compression.zlib;
}
public String getAccountName() {

View File

@@ -30,7 +30,6 @@ import org.openintents.openpgp.OpenPgpSignatureResult;
import org.openintents.openpgp.util.OpenPgpApi;
import org.spongycastle.util.Arrays;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerify;
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerifyResult;
import org.sufficientlysecure.keychain.pgp.PgpHelper;
@@ -269,7 +268,7 @@ public class OpenPgpService extends RemoteService {
.signaturePassphrase(passphrase);
} else {
// encrypt only
builder.signatureMasterKeyId(Id.key.none);
builder.signatureMasterKeyId(Constants.key.none);
}
// execute PGP operation!
builder.build().execute();

View File

@@ -27,7 +27,6 @@ import android.view.View;
import org.openintents.openpgp.util.OpenPgpApi;
import org.sufficientlysecure.htmltextview.HtmlTextView;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.helper.ActionBarHelper;
import org.sufficientlysecure.keychain.provider.KeychainContract;
@@ -142,7 +141,7 @@ public class RemoteServiceActivity extends ActionBarActivity {
// Save
// user needs to select a key!
if (mAccSettingsFragment.getAccSettings().getKeyId() == Id.key.none) {
if (mAccSettingsFragment.getAccSettings().getKeyId() == Constants.key.none) {
mAccSettingsFragment.setErrorOnSelectKeyFragment(
getString(R.string.api_register_error_select_key));
} else {