Merge branch 'master' of github.com:open-keychain/open-keychain

This commit is contained in:
Dominik Schürmann 2014-08-15 10:19:51 +02:00
commit 2c2860e86d
3 changed files with 9 additions and 4 deletions

View File

@ -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>() {

View File

@ -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);

View File

@ -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);
}
});