mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
in the encrypt activity automatically select the signature key as encryption key, if it is set, and if the button is pressed
This commit is contained in:
parent
0c073ca8eb
commit
7b219c5f72
@ -684,7 +684,23 @@ public class EncryptActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void selectPublicKeys() {
|
private void selectPublicKeys() {
|
||||||
Intent intent = new Intent(this, SelectPublicKeyListActivity.class);
|
Intent intent = new Intent(this, SelectPublicKeyListActivity.class);
|
||||||
intent.putExtra(Apg.EXTRA_SELECTION, mEncryptionKeyIds);
|
Vector<Long> keyIds = new Vector<Long>();
|
||||||
|
if (getSecretKeyId() != 0) {
|
||||||
|
keyIds.add(getSecretKeyId());
|
||||||
|
}
|
||||||
|
if (mEncryptionKeyIds != null && mEncryptionKeyIds.length > 0) {
|
||||||
|
for (int i = 0; i < mEncryptionKeyIds.length; ++i) {
|
||||||
|
keyIds.add(mEncryptionKeyIds[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long [] initialKeyIds = null;
|
||||||
|
if (keyIds.size() > 0) {
|
||||||
|
initialKeyIds = new long[keyIds.size()];
|
||||||
|
for (int i = 0; i < keyIds.size(); ++i) {
|
||||||
|
initialKeyIds[i] = keyIds.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intent.putExtra(Apg.EXTRA_SELECTION, initialKeyIds);
|
||||||
startActivityForResult(intent, Id.request.public_keys);
|
startActivityForResult(intent, Id.request.public_keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user