mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-17 07:30:14 -05:00
progress is shown when creating the default key based on number of keys created so far
This commit is contained in:
parent
2737aedca7
commit
3fbda4245c
@ -596,13 +596,20 @@ public class KeychainIntentService extends IntentService implements ProgressDial
|
|||||||
String passphrase = data.getString(GENERATE_KEY_SYMMETRIC_PASSPHRASE);
|
String passphrase = data.getString(GENERATE_KEY_SYMMETRIC_PASSPHRASE);
|
||||||
|
|
||||||
/* Operation */
|
/* Operation */
|
||||||
|
int keysTotal = 2;
|
||||||
|
int keysCreated =0;
|
||||||
|
this.setProgress(keysCreated, keysTotal);
|
||||||
PgpKeyOperation keyOperations = new PgpKeyOperation(this, this);
|
PgpKeyOperation keyOperations = new PgpKeyOperation(this, this);
|
||||||
|
|
||||||
PGPSecretKey masterKey = keyOperations.createKey(Id.choice.algorithm.rsa,
|
PGPSecretKey masterKey = keyOperations.createKey(Id.choice.algorithm.rsa,
|
||||||
4096, passphrase, true);
|
4096, passphrase, true);
|
||||||
|
keysCreated++;
|
||||||
|
setProgress(keysCreated, keysTotal);
|
||||||
|
|
||||||
PGPSecretKey subKey = keyOperations.createKey(Id.choice.algorithm.rsa,
|
PGPSecretKey subKey = keyOperations.createKey(Id.choice.algorithm.rsa,
|
||||||
4096, passphrase, false);
|
4096, passphrase, false);
|
||||||
|
keysCreated++;
|
||||||
|
setProgress(keysCreated, keysTotal );
|
||||||
|
|
||||||
// TODO: default to one master for cert, one sub for encrypt and one sub
|
// TODO: default to one master for cert, one sub for encrypt and one sub
|
||||||
// for sign
|
// for sign
|
||||||
|
@ -187,7 +187,7 @@ public class EditKeyActivity extends ActionBarActivity {
|
|||||||
|
|
||||||
// Message is received after generating is done in ApgService
|
// Message is received after generating is done in ApgService
|
||||||
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(
|
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(
|
||||||
this, R.string.progress_generating, ProgressDialog.STYLE_SPINNER, true,
|
this, R.string.progress_generating, ProgressDialog.STYLE_HORIZONTAL, true,
|
||||||
|
|
||||||
new DialogInterface.OnCancelListener() {
|
new DialogInterface.OnCancelListener() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user