mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-26 00:48:51 -05:00
commit
882333ce05
@ -59,7 +59,6 @@ public class ClipboardReflection {
|
|||||||
* Wrapper around ClipboardManager based on Android version using Reflection API
|
* Wrapper around ClipboardManager based on Android version using Reflection API
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
* @param text
|
|
||||||
*/
|
*/
|
||||||
public static CharSequence getClipboardText(Context context) {
|
public static CharSequence getClipboardText(Context context) {
|
||||||
Object clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE);
|
Object clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
|
@ -160,7 +160,7 @@ public class ExportHelper {
|
|||||||
Toast.makeText(activity, toastMessage, Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, toastMessage, Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
package org.sufficientlysecure.keychain.helper;
|
package org.sufficientlysecure.keychain.helper;
|
||||||
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.GregorianCalendar;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public class PgpConversionHelper {
|
|||||||
*
|
*
|
||||||
* Singles keys are encoded as keyRings with one single key in it by Bouncy Castle
|
* Singles keys are encoded as keyRings with one single key in it by Bouncy Castle
|
||||||
*
|
*
|
||||||
* @param keysBytes
|
* @param keyBytes
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static PGPSecretKey BytesToPGPSecretKey(byte[] keyBytes) {
|
public static PGPSecretKey BytesToPGPSecretKey(byte[] keyBytes) {
|
||||||
@ -125,7 +125,7 @@ public class PgpConversionHelper {
|
|||||||
/**
|
/**
|
||||||
* Convert from PGPSecretKey to byte[]
|
* Convert from PGPSecretKey to byte[]
|
||||||
*
|
*
|
||||||
* @param keysBytes
|
* @param key
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static byte[] PGPSecretKeyToBytes(PGPSecretKey key) {
|
public static byte[] PGPSecretKeyToBytes(PGPSecretKey key) {
|
||||||
@ -141,7 +141,7 @@ public class PgpConversionHelper {
|
|||||||
/**
|
/**
|
||||||
* Convert from PGPSecretKeyRing to byte[]
|
* Convert from PGPSecretKeyRing to byte[]
|
||||||
*
|
*
|
||||||
* @param keysBytes
|
* @param keyRing
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static byte[] PGPSecretKeyRingToBytes(PGPSecretKeyRing keyRing) {
|
public static byte[] PGPSecretKeyRingToBytes(PGPSecretKeyRing keyRing) {
|
||||||
|
@ -743,10 +743,9 @@ public class PgpDecryptVerify {
|
|||||||
* @param sig
|
* @param sig
|
||||||
* @param line
|
* @param line
|
||||||
* @throws SignatureException
|
* @throws SignatureException
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
private static void processLine(PGPSignature sig, byte[] line)
|
private static void processLine(PGPSignature sig, byte[] line)
|
||||||
throws SignatureException, IOException {
|
throws SignatureException {
|
||||||
int length = getLengthWithoutWhiteSpace(line);
|
int length = getLengthWithoutWhiteSpace(line);
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
sig.update(line, 0, length);
|
sig.update(line, 0, length);
|
||||||
|
@ -17,11 +17,9 @@
|
|||||||
|
|
||||||
package org.sufficientlysecure.keychain.pgp;
|
package org.sufficientlysecure.keychain.pgp;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -29,12 +27,10 @@ import java.util.List;
|
|||||||
import org.spongycastle.bcpg.ArmoredOutputStream;
|
import org.spongycastle.bcpg.ArmoredOutputStream;
|
||||||
import org.spongycastle.openpgp.PGPException;
|
import org.spongycastle.openpgp.PGPException;
|
||||||
import org.spongycastle.openpgp.PGPKeyRing;
|
import org.spongycastle.openpgp.PGPKeyRing;
|
||||||
import org.spongycastle.openpgp.PGPObjectFactory;
|
|
||||||
import org.spongycastle.openpgp.PGPPublicKey;
|
import org.spongycastle.openpgp.PGPPublicKey;
|
||||||
import org.spongycastle.openpgp.PGPPublicKeyRing;
|
import org.spongycastle.openpgp.PGPPublicKeyRing;
|
||||||
import org.spongycastle.openpgp.PGPSecretKey;
|
import org.spongycastle.openpgp.PGPSecretKey;
|
||||||
import org.spongycastle.openpgp.PGPSecretKeyRing;
|
import org.spongycastle.openpgp.PGPSecretKeyRing;
|
||||||
import org.spongycastle.openpgp.PGPUtil;
|
|
||||||
import org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator;
|
import org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator;
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.Id;
|
import org.sufficientlysecure.keychain.Id;
|
||||||
@ -44,11 +40,9 @@ import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
|||||||
import org.sufficientlysecure.keychain.service.KeychainIntentService;
|
import org.sufficientlysecure.keychain.service.KeychainIntentService;
|
||||||
import org.sufficientlysecure.keychain.ui.adapter.ImportKeysListEntry;
|
import org.sufficientlysecure.keychain.ui.adapter.ImportKeysListEntry;
|
||||||
import org.sufficientlysecure.keychain.util.HkpKeyServer;
|
import org.sufficientlysecure.keychain.util.HkpKeyServer;
|
||||||
import org.sufficientlysecure.keychain.util.InputData;
|
|
||||||
import org.sufficientlysecure.keychain.util.IterableIterator;
|
import org.sufficientlysecure.keychain.util.IterableIterator;
|
||||||
import org.sufficientlysecure.keychain.util.KeyServer.AddKeyException;
|
import org.sufficientlysecure.keychain.util.KeyServer.AddKeyException;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
import org.sufficientlysecure.keychain.util.PositionAwareInputStream;
|
|
||||||
import org.sufficientlysecure.keychain.util.ProgressDialogUpdater;
|
import org.sufficientlysecure.keychain.util.ProgressDialogUpdater;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -304,7 +304,7 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
/**
|
/**
|
||||||
* Returns type of the query (secret/public)
|
* Returns type of the query (secret/public)
|
||||||
*
|
*
|
||||||
* @param uri
|
* @param match
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private int getKeyType(int match) {
|
private int getKeyType(int match) {
|
||||||
@ -862,7 +862,8 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
* Build default selection statement for KeyRings. If no extra selection is specified only build
|
* Build default selection statement for KeyRings. If no extra selection is specified only build
|
||||||
* where clause with rowId
|
* where clause with rowId
|
||||||
*
|
*
|
||||||
* @param uri
|
* @param defaultSelection
|
||||||
|
* @param keyType
|
||||||
* @param selection
|
* @param selection
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -23,8 +23,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.spongycastle.bcpg.ArmoredOutputStream;
|
import org.spongycastle.bcpg.ArmoredOutputStream;
|
||||||
import org.spongycastle.bcpg.UserAttributePacket;
|
|
||||||
import org.spongycastle.bcpg.UserAttributeSubpacket;
|
|
||||||
import org.spongycastle.openpgp.PGPKeyRing;
|
import org.spongycastle.openpgp.PGPKeyRing;
|
||||||
import org.spongycastle.openpgp.PGPPublicKey;
|
import org.spongycastle.openpgp.PGPPublicKey;
|
||||||
import org.spongycastle.openpgp.PGPPublicKeyRing;
|
import org.spongycastle.openpgp.PGPPublicKeyRing;
|
||||||
|
@ -21,7 +21,6 @@ import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment;
|
|||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnCancelListener;
|
import android.content.DialogInterface.OnCancelListener;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -249,7 +249,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
@ -295,7 +295,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
|||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -744,8 +744,6 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -224,7 +224,7 @@ public class EditKeyActivity extends ActionBarActivity {
|
|||||||
|
|
||||||
buildLayout();
|
buildLayout();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
@ -561,7 +561,7 @@ public class EditKeyActivity extends ActionBarActivity {
|
|||||||
setResult(RESULT_OK, data);
|
setResult(RESULT_OK, data);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -669,8 +669,6 @@ public class EncryptActivity extends DrawerActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -22,16 +22,11 @@ import java.util.ArrayList;
|
|||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.ui.adapter.TabsAdapter;
|
import org.sufficientlysecure.keychain.ui.adapter.TabsAdapter;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
|
||||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
|
||||||
import android.support.v4.app.FragmentTransaction;
|
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
public class HelpActivity extends ActionBarActivity {
|
public class HelpActivity extends ActionBarActivity {
|
||||||
public static final String EXTRA_SELECTED_TAB = "selectedTab";
|
public static final String EXTRA_SELECTED_TAB = "selectedTab";
|
||||||
@ -64,19 +59,19 @@ public class HelpActivity extends ActionBarActivity {
|
|||||||
Bundle startBundle = new Bundle();
|
Bundle startBundle = new Bundle();
|
||||||
startBundle.putInt(HelpHtmlFragment.ARG_HTML_FILE, R.raw.help_start);
|
startBundle.putInt(HelpHtmlFragment.ARG_HTML_FILE, R.raw.help_start);
|
||||||
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_start)),
|
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_start)),
|
||||||
HelpHtmlFragment.class, startBundle, (selectedTab == 0 ? true : false));
|
HelpHtmlFragment.class, startBundle, (selectedTab == 0) );
|
||||||
|
|
||||||
Bundle nfcBundle = new Bundle();
|
Bundle nfcBundle = new Bundle();
|
||||||
nfcBundle.putInt(HelpHtmlFragment.ARG_HTML_FILE, R.raw.help_nfc_beam);
|
nfcBundle.putInt(HelpHtmlFragment.ARG_HTML_FILE, R.raw.help_nfc_beam);
|
||||||
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_nfc_beam)),
|
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_nfc_beam)),
|
||||||
HelpHtmlFragment.class, nfcBundle, (selectedTab == 1 ? true : false));
|
HelpHtmlFragment.class, nfcBundle, (selectedTab == 1) );
|
||||||
|
|
||||||
Bundle changelogBundle = new Bundle();
|
Bundle changelogBundle = new Bundle();
|
||||||
changelogBundle.putInt(HelpHtmlFragment.ARG_HTML_FILE, R.raw.help_changelog);
|
changelogBundle.putInt(HelpHtmlFragment.ARG_HTML_FILE, R.raw.help_changelog);
|
||||||
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_changelog)),
|
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_changelog)),
|
||||||
HelpHtmlFragment.class, changelogBundle, (selectedTab == 2 ? true : false));
|
HelpHtmlFragment.class, changelogBundle, (selectedTab == 2) );
|
||||||
|
|
||||||
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_about)),
|
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_about)),
|
||||||
HelpAboutFragment.class, null, (selectedTab == 3 ? true : false));
|
HelpAboutFragment.class, null, (selectedTab == 3) );
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,7 +25,6 @@ import org.sufficientlysecure.keychain.helper.Preferences;
|
|||||||
import org.sufficientlysecure.keychain.ui.widget.IntegerListPreference;
|
import org.sufficientlysecure.keychain.ui.widget.IntegerListPreference;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -57,7 +56,6 @@ public class PreferencesActivity extends PreferenceActivity {
|
|||||||
// actionBar.setDisplayHomeAsUpEnabled(false);
|
// actionBar.setDisplayHomeAsUpEnabled(false);
|
||||||
// actionBar.setHomeButtonEnabled(false);
|
// actionBar.setHomeButtonEnabled(false);
|
||||||
|
|
||||||
//addPreferencesFromResource(R.xml.preferences);
|
|
||||||
String action = getIntent().getAction();
|
String action = getIntent().getAction();
|
||||||
|
|
||||||
if (action != null && action.equals(ACTION_PREFS_GEN)) {
|
if (action != null && action.equals(ACTION_PREFS_GEN)) {
|
||||||
|
@ -113,7 +113,7 @@ public class UploadKeyActivity extends ActionBarActivity {
|
|||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -88,12 +88,12 @@ public class ViewKeyActivity extends ActionBarActivity {
|
|||||||
Bundle mainBundle = new Bundle();
|
Bundle mainBundle = new Bundle();
|
||||||
mainBundle.putParcelable(ViewKeyMainFragment.ARG_DATA_URI, mDataUri);
|
mainBundle.putParcelable(ViewKeyMainFragment.ARG_DATA_URI, mDataUri);
|
||||||
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.key_view_tab_main)),
|
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.key_view_tab_main)),
|
||||||
ViewKeyMainFragment.class, mainBundle, (selectedTab == 0 ? true : false));
|
ViewKeyMainFragment.class, mainBundle, (selectedTab == 0));
|
||||||
|
|
||||||
Bundle certBundle = new Bundle();
|
Bundle certBundle = new Bundle();
|
||||||
certBundle.putParcelable(ViewKeyCertsFragment.ARG_DATA_URI, mDataUri);
|
certBundle.putParcelable(ViewKeyCertsFragment.ARG_DATA_URI, mDataUri);
|
||||||
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.key_view_tab_certs)),
|
mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.key_view_tab_certs)),
|
||||||
ViewKeyCertsFragment.class, certBundle, (selectedTab == 1 ? true : false));
|
ViewKeyCertsFragment.class, certBundle, (selectedTab == 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,9 +152,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
|||||||
// selected is default
|
// selected is default
|
||||||
this.selected = true;
|
this.selected = true;
|
||||||
|
|
||||||
if (pgpKeyRing instanceof PGPSecretKeyRing) {
|
if ( !(pgpKeyRing instanceof PGPSecretKeyRing) ) {
|
||||||
secretKey = true;
|
|
||||||
} else {
|
|
||||||
secretKey = false;
|
secretKey = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ package org.sufficientlysecure.keychain.ui.adapter;
|
|||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.spongycastle.openpgp.PGPKeyRing;
|
import org.spongycastle.openpgp.PGPKeyRing;
|
||||||
import org.spongycastle.openpgp.PGPObjectFactory;
|
import org.spongycastle.openpgp.PGPObjectFactory;
|
||||||
@ -88,7 +87,7 @@ public class ImportKeysListLoader extends AsyncTaskLoader<AsyncTaskResultWrapper
|
|||||||
/**
|
/**
|
||||||
* Reads all PGPKeyRing objects from input
|
* Reads all PGPKeyRing objects from input
|
||||||
*
|
*
|
||||||
* @param keyringBytes
|
* @param inputData
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private void generateListOfKeyrings(InputData inputData) {
|
private void generateListOfKeyrings(InputData inputData) {
|
||||||
|
@ -36,7 +36,6 @@ import android.support.v4.widget.CursorAdapter;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,7 +95,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
|||||||
Toast.makeText(activity, R.string.file_delete_successful,
|
Toast.makeText(activity, R.string.file_delete_successful,
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -33,7 +33,6 @@ import android.os.Message;
|
|||||||
import android.os.Messenger;
|
import android.os.Messenger;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.text.Html;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
|
@ -158,7 +158,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
|||||||
PGPSecretKey clickSecretKey = secretKey;
|
PGPSecretKey clickSecretKey = secretKey;
|
||||||
|
|
||||||
if (clickSecretKey != null) {
|
if (clickSecretKey != null) {
|
||||||
while (keyOK == true) {
|
while (keyOK) {
|
||||||
if (clickSecretKey != null) { // check again for loop
|
if (clickSecretKey != null) { // check again for loop
|
||||||
try {
|
try {
|
||||||
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder()
|
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder()
|
||||||
@ -207,7 +207,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
|||||||
// cache the new passphrase
|
// cache the new passphrase
|
||||||
Log.d(Constants.TAG, "Everything okay! Caching entered passphrase");
|
Log.d(Constants.TAG, "Everything okay! Caching entered passphrase");
|
||||||
PassphraseCacheService.addCachedPassphrase(activity, keyId, passphrase);
|
PassphraseCacheService.addCachedPassphrase(activity, keyId, passphrase);
|
||||||
if (keyOK == false && clickSecretKey.getKeyID() != keyId) {
|
if ( !keyOK && clickSecretKey.getKeyID() != keyId) {
|
||||||
PassphraseCacheService.addCachedPassphrase(activity, clickSecretKey.getKeyID(),
|
PassphraseCacheService.addCachedPassphrase(activity, clickSecretKey.getKeyID(),
|
||||||
passphrase);
|
passphrase);
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
|
|||||||
.getByteArray(KeychainIntentService.RESULT_NEW_KEY));
|
.getByteArray(KeychainIntentService.RESULT_NEW_KEY));
|
||||||
addGeneratedKeyToView(newKey);
|
addGeneratedKeyToView(newKey);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a new Messenger for the communication back
|
// Create a new Messenger for the communication back
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="left"
|
android:layout_gravity="left"
|
||||||
android:text="Main User Id"
|
android:text="@string/label_main_user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:layout_alignTop="@+id/linearLayout"
|
android:layout_alignTop="@+id/linearLayout"
|
||||||
android:layout_toRightOf="@+id/relativeLayout" />
|
android:layout_toRightOf="@+id/relativeLayout" />
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingRight="5dip"
|
android:paddingRight="5dip"
|
||||||
android:text="Name" />
|
android:text="@string/label_name" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
android:layout_gravity="right"
|
android:layout_gravity="right"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="Sign User Id"
|
android:text="@string/label_sign_user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -92,7 +92,7 @@
|
|||||||
android:layout_gravity="right"
|
android:layout_gravity="right"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="Sign email"
|
android:text="@string/label_sign_email"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
android:id="@+id/mainUserId"
|
android:id="@+id/mainUserId"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Main User ID"
|
android:text="@string/label_main_user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
android:id="@+id/mainUserId"
|
android:id="@+id/mainUserId"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Main User ID"
|
android:text="@string/label_main_user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentStart="true" />
|
android:layout_alignParentStart="true" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
android:id="@+id/mainUserId"
|
android:id="@+id/mainUserId"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Main User ID"
|
android:text="@string/label_main_user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
android:id="@+id/mainUserId"
|
android:id="@+id/mainUserId"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Main User ID"
|
android:text="@string/label_main_user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingRight="5dip"
|
android:paddingRight="5dip"
|
||||||
android:text="Key ID"
|
android:text="@string/label_key_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:typeface="monospace" />
|
android:typeface="monospace" />
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/userId"
|
android:id="@+id/userId"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="User ID"
|
android:text="@string/user_id"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -130,6 +130,8 @@
|
|||||||
<string name="label_name">Name</string>
|
<string name="label_name">Name</string>
|
||||||
<string name="label_comment">Comment</string>
|
<string name="label_comment">Comment</string>
|
||||||
<string name="label_email">Email</string>
|
<string name="label_email">Email</string>
|
||||||
|
<string name="label_sign_user_id">Sign User Id</string>
|
||||||
|
<string name="label_sign_email">Sign email</string>
|
||||||
<string name="label_send_key">Upload key to selected keyserver after certification</string>
|
<string name="label_send_key">Upload key to selected keyserver after certification</string>
|
||||||
<string name="label_fingerprint">Fingerprint</string>
|
<string name="label_fingerprint">Fingerprint</string>
|
||||||
<string name="select_keys_button_default">Select</string>
|
<string name="select_keys_button_default">Select</string>
|
||||||
@ -148,6 +150,7 @@
|
|||||||
<string name="can_sign">can sign</string>
|
<string name="can_sign">can sign</string>
|
||||||
<string name="expired">expired</string>
|
<string name="expired">expired</string>
|
||||||
<string name="revoked">revoked</string>
|
<string name="revoked">revoked</string>
|
||||||
|
<string name="user_id">User ID</string>
|
||||||
|
|
||||||
<plurals name="n_key_servers">
|
<plurals name="n_key_servers">
|
||||||
<item quantity="one">%d keyserver</item>
|
<item quantity="one">%d keyserver</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user