integrated key server look-up into decrypt Activity, allowing to touch an unkown signature to import the key
Update issue 39 added: <string name="unknownSignatureKeyTouchToLookUp">Unknown signature, touch to look up key.</string>
This commit is contained in:
@@ -86,7 +86,8 @@ public class KeyServerQueryActivity extends BaseActivity {
|
||||
});
|
||||
|
||||
Intent intent = getIntent();
|
||||
if (Apg.Intent.LOOK_UP_KEY_ID.equals(intent.getAction())) {
|
||||
if (Apg.Intent.LOOK_UP_KEY_ID.equals(intent.getAction()) ||
|
||||
Apg.Intent.LOOK_UP_KEY_ID_AND_RETURN.equals(intent.getAction())) {
|
||||
long keyId = intent.getLongExtra(Apg.EXTRA_KEY_ID, 0);
|
||||
if (keyId != 0) {
|
||||
String query = "0x" + Apg.keyToHex(keyId);
|
||||
@@ -168,15 +169,21 @@ public class KeyServerQueryActivity extends BaseActivity {
|
||||
mAdapter.setKeys(mSearchResult);
|
||||
}
|
||||
} else if (mQueryType == Id.query.get) {
|
||||
if (mKeyData != null) {
|
||||
Intent intent = new Intent(this, PublicKeyListActivity.class);
|
||||
intent.setAction(Apg.Intent.IMPORT);
|
||||
intent.putExtra(Apg.EXTRA_TEXT, mKeyData);
|
||||
Intent orgIntent = getIntent();
|
||||
if (Apg.Intent.LOOK_UP_KEY_ID.equals(orgIntent.getAction())) {
|
||||
Intent orgIntent = getIntent();
|
||||
if (Apg.Intent.LOOK_UP_KEY_ID_AND_RETURN.equals(orgIntent.getAction())) {
|
||||
if (mKeyData != null) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Apg.EXTRA_TEXT, mKeyData);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
} else {
|
||||
setResult(RESULT_CANCELED);
|
||||
}
|
||||
finish();
|
||||
} else {
|
||||
if (mKeyData != null) {
|
||||
Intent intent = new Intent(this, PublicKeyListActivity.class);
|
||||
intent.setAction(Apg.Intent.IMPORT);
|
||||
intent.putExtra(Apg.EXTRA_TEXT, mKeyData);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user