fix saving new key (tmp)
This commit is contained in:
@@ -361,8 +361,10 @@ public class PgpKeyOperation {
|
|||||||
newPassPhrase = "";
|
newPassPhrase = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mKR == null)
|
if (mKR == null) {
|
||||||
buildNewSecretKey(userIds, keys, keysExpiryDates, keysUsages, newPassPhrase, oldPassPhrase); //new Keyring
|
buildNewSecretKey(userIds, keys, keysExpiryDates, keysUsages, newPassPhrase, oldPassPhrase); //new Keyring
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
IDs -
|
IDs -
|
||||||
|
|||||||
@@ -550,8 +550,13 @@ public class KeychainIntentService extends IntentService implements ProgressDial
|
|||||||
ArrayList<String> deleted_ids = data.getStringArrayList(SAVE_KEYRING_DELETED_IDS);
|
ArrayList<String> deleted_ids = data.getStringArrayList(SAVE_KEYRING_DELETED_IDS);
|
||||||
boolean[] modded_keys = data.getBooleanArray(SAVE_KEYRING_MODDED_KEYS);
|
boolean[] modded_keys = data.getBooleanArray(SAVE_KEYRING_MODDED_KEYS);
|
||||||
boolean[] new_keys = data.getBooleanArray(SAVE_KEYRING_NEW_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));
|
.getByteArray(SAVE_KEYRING_DELETED_KEYS));
|
||||||
|
else
|
||||||
|
deletedKeys = new ArrayList<PGPSecretKey>();
|
||||||
boolean primaryChanged = data.getBoolean(SAVE_KEYRING_PRIMARY_ID_CHANGED);
|
boolean primaryChanged = data.getBoolean(SAVE_KEYRING_PRIMARY_ID_CHANGED);
|
||||||
|
|
||||||
long masterKeyId = data.getLong(SAVE_KEYRING_MASTER_KEY_ID);
|
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,
|
data.putByteArray(KeychainIntentService.SAVE_KEYRING_KEYS,
|
||||||
PgpConversionHelper.PGPSecretKeyArrayListToBytes(keys));
|
PgpConversionHelper.PGPSecretKeyArrayListToBytes(keys));
|
||||||
ArrayList<PGPSecretKey> dKeys = mKeysView.getDeletedKeys();
|
ArrayList<PGPSecretKey> dKeys = mKeysView.getDeletedKeys();
|
||||||
|
byte[] tmp = null;
|
||||||
|
if (dKeys.size() != 0)
|
||||||
|
tmp = PgpConversionHelper.PGPSecretKeyArrayListToBytes(dKeys);
|
||||||
data.putByteArray(KeychainIntentService.SAVE_KEYRING_DELETED_KEYS,
|
data.putByteArray(KeychainIntentService.SAVE_KEYRING_DELETED_KEYS,
|
||||||
PgpConversionHelper.PGPSecretKeyArrayListToBytes(dKeys));
|
tmp);
|
||||||
data.putIntegerArrayList(KeychainIntentService.SAVE_KEYRING_KEYS_USAGES,
|
data.putIntegerArrayList(KeychainIntentService.SAVE_KEYRING_KEYS_USAGES,
|
||||||
getKeysUsages(mKeysView));
|
getKeysUsages(mKeysView));
|
||||||
data.putSerializable(KeychainIntentService.SAVE_KEYRING_KEYS_EXPIRY_DATES,
|
data.putSerializable(KeychainIntentService.SAVE_KEYRING_KEYS_EXPIRY_DATES,
|
||||||
|
|||||||
Reference in New Issue
Block a user