Merge branch 'master' of github.com:open-keychain/open-keychain

This commit is contained in:
Vincent Breitmoser 2014-10-03 04:25:08 +02:00
commit f456c8a17d
5 changed files with 11 additions and 12 deletions

View File

@ -84,17 +84,17 @@ public class DecryptActivity extends DrawerActivity {
return;
}
new AsyncTask<Void, Void, Boolean>() {
new AsyncTask<String, Void, Boolean>() {
@Override
protected Boolean doInBackground(Void... params) {
protected Boolean doInBackground(String... clipboardText) {
// see if it looks like a pgp thing
Matcher matcher = PgpHelper.PGP_MESSAGE.matcher(clipboardText);
Matcher matcher = PgpHelper.PGP_MESSAGE.matcher(clipboardText[0]);
boolean animate = matcher.matches();
// see if it looks like another pgp thing
if (!animate) {
matcher = PgpHelper.PGP_CLEARTEXT_SIGNATURE.matcher(clipboardText);
matcher = PgpHelper.PGP_CLEARTEXT_SIGNATURE.matcher(clipboardText[0]);
animate = matcher.matches();
}
return animate;
@ -109,7 +109,7 @@ public class DecryptActivity extends DrawerActivity {
SubtleAttentionSeeker.tada(findViewById(R.id.clipboard_icon), 1.5f).start();
}
}
}.execute();
}.execute(clipboardText.toString());
}
}

View File

@ -122,8 +122,7 @@ public abstract class DecryptFragment extends Fragment {
if (userIdSplit[1] != null) {
mUserIdRest.setText(userIdSplit[1]);
} else {
mUserIdRest.setText(getString(R.string.label_key_id) + ": "
+ KeyFormattingUtils.convertKeyIdToHex(mSignatureKeyId));
mUserIdRest.setText(KeyFormattingUtils.beautifyKeyIdWithPrefix(getActivity(), mSignatureKeyId));
}
switch (signatureResult.getStatus()) {

View File

@ -156,11 +156,11 @@ public class DecryptTextActivity extends ActionBarActivity {
} else if (ACTION_DECRYPT_FROM_CLIPBOARD.equals(action)) {
Log.d(Constants.TAG, "ACTION_DECRYPT_FROM_CLIPBOARD");
String clipboardText = ClipboardReflection.getClipboardText(this).toString();
clipboardText = getPgpContent(clipboardText);
CharSequence clipboardText = ClipboardReflection.getClipboardText(this);
if (clipboardText != null) {
loadFragment(savedInstanceState, clipboardText);
String text = getPgpContent(clipboardText.toString());
loadFragment(savedInstanceState, text);
} else {
returnInvalidResult();
}

View File

@ -128,7 +128,7 @@ abstract public class SelectKeyCursorAdapter extends CursorAdapter {
}
long masterKeyId = cursor.getLong(mIndexMasterKeyId);
h.keyId.setText(KeyFormattingUtils.convertKeyIdToHex(masterKeyId));
h.keyId.setText(KeyFormattingUtils.beautifyKeyIdWithPrefix(mContext, masterKeyId));
boolean enabled = true;
if (cursor.getInt(mIndexRevoked) != 0) {

@ -1 +1 @@
Subproject commit d584614921600fabe2043d16acfefd55d4c00c8a
Subproject commit 5c48b928d0f250a9121a74690da86162467cc956