mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
fix saving new key (tmp)
This commit is contained in:
parent
8662ca2928
commit
01951810ae
@ -361,8 +361,10 @@ public class PgpKeyOperation {
|
||||
newPassPhrase = "";
|
||||
}
|
||||
|
||||
if (mKR == null)
|
||||
if (mKR == null) {
|
||||
buildNewSecretKey(userIds, keys, keysExpiryDates, keysUsages, newPassPhrase, oldPassPhrase); //new Keyring
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
IDs -
|
||||
|
@ -550,8 +550,13 @@ public class KeychainIntentService extends IntentService implements ProgressDial
|
||||
ArrayList<String> deleted_ids = data.getStringArrayList(SAVE_KEYRING_DELETED_IDS);
|
||||
boolean[] modded_keys = data.getBooleanArray(SAVE_KEYRING_MODDED_KEYS);
|
||||
boolean[] new_keys = data.getBooleanArray(SAVE_KEYRING_NEW_KEYS);
|
||||
ArrayList<PGPSecretKey> deletedKeys = PgpConversionHelper.BytesToPGPSecretKeyList(data
|
||||
byte[] tmp = data.getByteArray(SAVE_KEYRING_DELETED_KEYS);
|
||||
ArrayList<PGPSecretKey> deletedKeys;
|
||||
if (tmp != null)
|
||||
deletedKeys = PgpConversionHelper.BytesToPGPSecretKeyList(data
|
||||
.getByteArray(SAVE_KEYRING_DELETED_KEYS));
|
||||
else
|
||||
deletedKeys = new ArrayList<PGPSecretKey>();
|
||||
boolean primaryChanged = data.getBoolean(SAVE_KEYRING_PRIMARY_ID_CHANGED);
|
||||
|
||||
long masterKeyId = data.getLong(SAVE_KEYRING_MASTER_KEY_ID);
|
||||
|
@ -581,8 +581,11 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
data.putByteArray(KeychainIntentService.SAVE_KEYRING_KEYS,
|
||||
PgpConversionHelper.PGPSecretKeyArrayListToBytes(keys));
|
||||
ArrayList<PGPSecretKey> dKeys = mKeysView.getDeletedKeys();
|
||||
byte[] tmp = null;
|
||||
if (dKeys.size() != 0)
|
||||
tmp = PgpConversionHelper.PGPSecretKeyArrayListToBytes(dKeys);
|
||||
data.putByteArray(KeychainIntentService.SAVE_KEYRING_DELETED_KEYS,
|
||||
PgpConversionHelper.PGPSecretKeyArrayListToBytes(dKeys));
|
||||
tmp);
|
||||
data.putIntegerArrayList(KeychainIntentService.SAVE_KEYRING_KEYS_USAGES,
|
||||
getKeysUsages(mKeysView));
|
||||
data.putSerializable(KeychainIntentService.SAVE_KEYRING_KEYS_EXPIRY_DATES,
|
||||
|
Loading…
Reference in New Issue
Block a user