mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-17 14:25:08 -05:00
fix keys with no expiry in ui code
This commit is contained in:
parent
bc76941bc1
commit
09d37a5fa6
@ -205,13 +205,18 @@ public abstract class OperationResults {
|
||||
|
||||
public EditKeyResult(Parcel source) {
|
||||
super(source);
|
||||
mRingMasterKeyId = source.readLong();
|
||||
mRingMasterKeyId = source.readInt() != 0 ? source.readLong() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeLong(mRingMasterKeyId);
|
||||
if (mRingMasterKeyId == null) {
|
||||
dest.writeInt(0);
|
||||
} else {
|
||||
dest.writeInt(1);
|
||||
dest.writeLong(mRingMasterKeyId);
|
||||
}
|
||||
}
|
||||
|
||||
public static Creator<EditKeyResult> CREATOR = new Creator<EditKeyResult>() {
|
||||
|
@ -183,7 +183,7 @@ public class SubkeysAdapter extends CursorAdapter {
|
||||
|
||||
SaveKeyringParcel.SubkeyChange subkeyChange = mSaveKeyringParcel.getSubkeyChange(keyId);
|
||||
if (subkeyChange != null) {
|
||||
if (subkeyChange.mExpiry == null) {
|
||||
if (subkeyChange.mExpiry == null || subkeyChange.mExpiry == 0L) {
|
||||
expiryDate = null;
|
||||
} else {
|
||||
expiryDate = new Date(subkeyChange.mExpiry * 1000);
|
||||
|
@ -141,7 +141,7 @@ public class EditSubkeyExpiryDialogFragment extends DialogFragment {
|
||||
dismiss();
|
||||
|
||||
Bundle data = new Bundle();
|
||||
data.putSerializable(MESSAGE_DATA_EXPIRY_DATE, null);
|
||||
data.putSerializable(MESSAGE_DATA_EXPIRY_DATE, 0L);
|
||||
sendMessageToHandler(MESSAGE_NEW_EXPIRY_DATE, data);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user