added a context menu item to update public keys via key server, adding a key id look up Intent for the key server query

Update issue 9
Status: Fixed
Added public key update via key server. Considering this issue fixed now. More key server features will be added, but general support is added.
This commit is contained in:
Thialfihar
2010-08-18 00:23:28 +00:00
parent c57c36b3a5
commit 4f25edbe97
6 changed files with 97 additions and 12 deletions

View File

@@ -84,6 +84,16 @@ public class KeyServerQueryActivity extends BaseActivity {
search(query);
}
});
Intent intent = getIntent();
if (Apg.Intent.LOOK_UP_KEY_ID.equals(intent.getAction())) {
long keyId = intent.getLongExtra(Apg.EXTRA_KEY_ID, 0);
if (keyId != 0) {
String query = "0x" + Apg.keyToHex(keyId);
mQuery.setText(query);
search(query);
}
}
}
private void search(String query) {
@@ -162,7 +172,13 @@ public class KeyServerQueryActivity extends BaseActivity {
Intent intent = new Intent(this, PublicKeyListActivity.class);
intent.setAction(Apg.Intent.IMPORT);
intent.putExtra(Apg.EXTRA_TEXT, mKeyData);
startActivity(intent);
Intent orgIntent = getIntent();
if (Apg.Intent.LOOK_UP_KEY_ID.equals(orgIntent.getAction())) {
setResult(RESULT_OK, intent);
finish();
} else {
startActivity(intent);
}
}
}
}